<resultMap id="PResult" type="packs" >
<result column="device_type" property="deviceType" jdbcType="VARCHAR" />
<result column="car_model" property="carModel" jdbcType="VARCHAR" />
<collection property="pcks" ofType="pcks" javaType="ArrayList">
<id column="pid" property="pid" jdbcType="INTEGER" />
<result column="package_version" property="packageVersion" jdbcType="VARCHAR" />
<result column="state" property="state" jdbcType="INTEGER" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="update_time" property="updateTime" jdbcType="VARCHAR" />
<result column="device_type" property="deviceType" jdbcType="VARCHAR" />
<result column="car_model" property="carModel" jdbcType="VARCHAR" />
<result column="pcktype" property="pcktype" jdbcType="VARCHAR" />
<result column="old_num" property="oldNnum" jdbcType="VARCHAR" />
<result column="new_num" property="newNum" jdbcType="VARCHAR" />
<collection property="files" ofType="packFile" javaType="ArrayList">
<id property="fid" column="fid" />
<result property="orignName" column="orignName" />
<result property="newName" column="newName" />
<result property="filePath" column="filePath" />
<result property="size" column="size" />
<result property="md5" column="md5" />
</collection>
</collection>
    <select id="selectAllPackages" resultMap="PResult">
select
p.device_type,
p.car_model,
p.pid,
p.package_version,
p.state,
p.description,
p.update_time,
p.device_type,
p.car_model,
p.pcktype,
p.old_num,
p.new_num,
f.fid ,
f.orign_name as orignName,
f.new_name as newName,
f.file_path as filePath,
f.size,
f.md5
from t_package p
left join t_package_file pf on pf.package_id=p.pid
left join t_file f on pf.file_id=f.fid where p.state!=2
</select>
package com.hcxy.car.bean.pojo;

import java.io.Serializable;
import java.util.ArrayList; import org.apache.ibatis.type.Alias; import com.hcxy.car.bean.PackageFile; @Alias("packs")
public class Packs {
private String deviceType;// tbox,vin,ipc
private String carModel;// 版本号
private ArrayList<Pcks> pcks; public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getCarModel() {
return carModel;
}
public void setCarModel(String carModel) {
this.carModel = carModel;
}
public ArrayList<Pcks> getPcks() {
return pcks;
}
public void setPcks(ArrayList<Pcks> pcks) {
this.pcks = pcks;
}
}
package com.hcxy.car.bean.pojo;

import java.io.Serializable;
import java.util.ArrayList; import org.apache.ibatis.type.Alias; import com.hcxy.car.bean.PackageFile; @Alias("pcks")
public class Pcks {
private int pid;// 主键.
private String packageVersion;// 文件名
private int state;
private String description;
private String updateTime;
private String deviceType;// tbox,vin,ipc
private String carModel;// 版本号
private String pcktype;// 包类型
private String oldNnum;// 包类型
private String newNum;// 包类型
private ArrayList<PackageFile> files; public int getPid() {
return pid;
}
public void setPid(int pid) {
this.pid = pid;
}
public String getPackageVersion() {
return packageVersion;
}
public void setPackageVersion(String packageVersion) {
this.packageVersion = packageVersion;
}
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public ArrayList<PackageFile> getFiles() {
return files;
}
public void setFiles(ArrayList<PackageFile> files) {
this.files = files;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getCarModel() {
return carModel;
}
public void setCarModel(String carModel) {
this.carModel = carModel;
}
public String getPcktype() {
return pcktype;
}
public void setPcktype(String pcktype) {
this.pcktype = pcktype;
}
public String getOldNnum() {
return oldNnum;
}
public void setOldNnum(String oldNnum) {
this.oldNnum = oldNnum;
}
public String getNewNum() {
return newNum;
}
public void setNewNum(String newNum) {
this.newNum = newNum;
} }

springboot-vue项目后台2---pojo对查询结果手动分组的更多相关文章

  1. Linux下 SpringBoot jar项目后台运行、查看、停用

    运行java jar: nohup java -jar **-0.0.1-SNAPSHOT.jar & 查看进程: 采用top或者ps aux命令.一般 如果后台是springboot,jar ...

  2. .gitignore 标准模板 -适用于SpringBoot+Vue项目 -Idea+VSCode开发

    .gitignore 标准模板 -适用于SpringBoot+Vue项目 node_modules/ target/ !.mvn/wrapper/maven-wrapper.jar ### STS # ...

  3. linux下部署springboot vue项目

    使用的工具是 XFTP5 XSHELL5 docker pull gmaslowski/jdk 拉取jdk docker images 查询下载的镜像ID (如:390b58b1be42) docke ...

  4. 【占坑】IDEA从github 导入并运行 SpringBoot + VUE项目

    最近工程实践的项目内容是开发一个类似于博客和bbs论坛的系统,在github上找了一个类似的项目可以照着写一写.所以这里先占着坑,等把后端的数据库连接学完了再来填坑. github项目链接:githu ...

  5. SpringBoot+Vue项目上手

    博客 https://gitee.com/RoadsideParty/White-Jotter-Vue?_from=gitee_search UI框架 https://at-ui.github.io/ ...

  6. 使用vue+elementUI+springboot创建基础后台增删改查的管理页面--(1)

    目前这家公司前端用的是vue框架,由于在之前的公司很少涉及到前端内容,对其的了解也只是会使用js和jquery,所以..慢慢来吧. 在此之前需要先了解vue的大致语法和规则,可先前往官方文档进行学习h ...

  7. SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 后端篇(五): 数据表设计、使用 jwt、redis、sms 工具类完善注册登录逻辑

    (1) 相关博文地址: SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 前端篇(一):搭建基本环境:https://www.cnblogs.com/l-y-h/p ...

  8. SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 后端篇(一): 搭建基本环境、整合 Swagger、MyBatisPlus、JSR303 以及国际化操作

    相关 (1) 相关博文地址: SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 前端篇(一):搭建基本环境:https://www.cnblogs.com/l-y- ...

  9. springboot实战小项目-简要介绍、vue项目创建

    因为菜,所以要好好学习! 一.项目介绍:这是一个后台管理系统,准备实现的功能: 1.登录.注册.个人信息查看.退出登录 2.根据关键字查询用户.新增用户.根据id或者其他字段排序.编辑用户信息.删除用 ...

随机推荐

  1. bgr to rgb

    因为在研究车牌识别算法(plr),遇到了算法 处理的格式问题,可分三个常用格式: 0:rgb 1:bgr 2:yuv422——需要注意的是,这里为啥选yuv422做识别,当然还可选yuv444,最坏打 ...

  2. 【BZOJ】3392: [Usaco2005 Feb]Part Acquisition 交易(spfa)

    http://www.lydsy.com/JudgeOnline/problem.php?id=3392 同1674 #include <cstdio> #include <cstr ...

  3. 【R】自定义描述统计函数-从均值到峰度偏度

    data_show<-function(x) { n<-length(x) m<-mean(x) v<-var(x) s<-sd(x) me<-median(x) ...

  4. Centos 虚拟机网络问题,网卡起不来,重启network服务失败

    拷贝了个虚拟机,有两个网卡,1个可以起来,另一个起不来.运行命令:$>systemctl restart network 输出如下:Job for network.service failed ...

  5. netty学习之路

    Netty是一个高效的提供异步事件驱动的网络通信框架,换言之,Netty是一个nio实现框架并且能简化传统的TCP.UDP.Socket编程.

  6. Asynchronous HTTP Requests in Android Using Volley

    Volley是Android开发者新的瑞士军刀,它提供了优美的框架,使得Android应用程序网络访问更容易和更快.Volley抽象实现了底层的HTTP Client库,让你不关注HTTP Clien ...

  7. HDU3533(Escape)

    不愧是kuangbin的搜索进阶,这题没灵感写起来好心酸 思路是预处理所有炮台射出的子弹,以此构造一个三维图(其中一维是时间) 预处理过程就相当于在图中增加了很多不可到达的墙,然后就是一个简单的bfs ...

  8. mac下面安装多个JDK

    JDK8 GA之后,小伙伴们喜大普奔,纷纷跃跃欲试,想体验一下Java8的Lambda等新特性,可是目前Java企业级应用的主打版本还是JDK6, JDK7.因此,我需要在我的电脑上同时有JDK8,J ...

  9. [LintCode] 二叉树的后序遍历

    The recursive solution is trivial and I omit it here. Iterative Solution using Stack (O(n) time and  ...

  10. 160624、Spark读取数据库(Mysql)的四种方式讲解

    目前Spark支持四种方式从数据库中读取数据,这里以Mysql为例进行介绍. 一.不指定查询条件 这个方式链接MySql的函数原型是: 1 def jdbc(url: String, table: S ...