springboot-vue项目后台2---pojo对查询结果手动分组
<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对查询结果手动分组的更多相关文章
- Linux下 SpringBoot jar项目后台运行、查看、停用
运行java jar: nohup java -jar **-0.0.1-SNAPSHOT.jar & 查看进程: 采用top或者ps aux命令.一般 如果后台是springboot,jar ...
- .gitignore 标准模板 -适用于SpringBoot+Vue项目 -Idea+VSCode开发
.gitignore 标准模板 -适用于SpringBoot+Vue项目 node_modules/ target/ !.mvn/wrapper/maven-wrapper.jar ### STS # ...
- linux下部署springboot vue项目
使用的工具是 XFTP5 XSHELL5 docker pull gmaslowski/jdk 拉取jdk docker images 查询下载的镜像ID (如:390b58b1be42) docke ...
- 【占坑】IDEA从github 导入并运行 SpringBoot + VUE项目
最近工程实践的项目内容是开发一个类似于博客和bbs论坛的系统,在github上找了一个类似的项目可以照着写一写.所以这里先占着坑,等把后端的数据库连接学完了再来填坑. github项目链接:githu ...
- SpringBoot+Vue项目上手
博客 https://gitee.com/RoadsideParty/White-Jotter-Vue?_from=gitee_search UI框架 https://at-ui.github.io/ ...
- 使用vue+elementUI+springboot创建基础后台增删改查的管理页面--(1)
目前这家公司前端用的是vue框架,由于在之前的公司很少涉及到前端内容,对其的了解也只是会使用js和jquery,所以..慢慢来吧. 在此之前需要先了解vue的大致语法和规则,可先前往官方文档进行学习h ...
- SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 后端篇(五): 数据表设计、使用 jwt、redis、sms 工具类完善注册登录逻辑
(1) 相关博文地址: SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 前端篇(一):搭建基本环境:https://www.cnblogs.com/l-y-h/p ...
- SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 后端篇(一): 搭建基本环境、整合 Swagger、MyBatisPlus、JSR303 以及国际化操作
相关 (1) 相关博文地址: SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 前端篇(一):搭建基本环境:https://www.cnblogs.com/l-y- ...
- springboot实战小项目-简要介绍、vue项目创建
因为菜,所以要好好学习! 一.项目介绍:这是一个后台管理系统,准备实现的功能: 1.登录.注册.个人信息查看.退出登录 2.根据关键字查询用户.新增用户.根据id或者其他字段排序.编辑用户信息.删除用 ...
随机推荐
- 【Python】IDLE清屏
上网搜,没搜到可用的快捷键.但看到一个通过打印空内容来清屏的方法,smart ef clear(): for i in range(60): print
- 如何在ChemDraw 15.1 Pro中添加模板
ChemDraw化学绘图工具为了方便用户的使用,特地开发了众多的各种类型模板.用户在绘制一些简单或复杂的化学结构式时,可以直接从ChemDraw模板库里直接调用使用,虽然ChemDraw模板非常的丰富 ...
- HDU 5321 Beautiful Set
题目链接 我们能够枚举子集的大小k.求出全部大小为k的子集对答案的贡献.问题就攻克了. 注意到欧拉函数的性质:n=∑φ(d),d|n 莫比乌斯函数性质:∑d|nμ(d)=0n>1 感谢http: ...
- django用户认证系统——注册3
用户注册就是创建用户对象,将用户的个人信息保存到数据库里.回顾一下 Django 的 MVT 经典开发流程,对用户注册功能来说,首先创建用户模型(M),这一步我们已经完成了.编写注册视图函数(V),并 ...
- 如果 date_field = TRUNC(date_field) 就说明时分秒为0(也就是不包含),否则就包含时分秒
如果 date_field = TRUNC(date_field) 就说明时分秒为0(也就是不包含),否则就包含时分秒
- PhoneGap 获得设备属性Demo
<!DOCTYPE html> <html> <head> <title>设备属性Demo</title> <script type= ...
- acdream1415(dij+优先队列+桥)
这题好坑,卡SPFA... 无奈只能用dij+优先队列了. 因为好久没有写过代码了,所以今天写dij时候突然觉得复杂度不对,dij+优先队列的复杂度是(n+m)logn,这种复杂度对于稠密图是非常慢! ...
- 深入java虚拟机(一) 虚拟机内存结构
java虚拟机所管理的内存区域(运行时数据区)主要分为如下几个部分:堆(heap).方法区(method area).虚拟机栈(VM stack).本地方法栈(native method stack) ...
- HDU 5894 hannnnah_j’s Biological Test
题目链接:传送门 题目大意:有n张板凳围成一圈,有m个人,要让m个人都坐到凳子上且任意两人之间相隔>=k 个凳子,问有多少种方法%(1e9+7) 题目思路:组合数学 我们这样考虑,既然每个人相距 ...
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
作者:zyl910 手工写文档是一件苦差事,幸好现在有从源码中抽取注释生成文档的专用工具.对于Objective-C来说,目前最好用的工具是appledoc和doxygen.可是这两种工具对于注释的要 ...