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或者其他字段排序.编辑用户信息.删除用 ...
随机推荐
- 框架一般用作Java应用程序的窗口,而Applet是Java小程序的窗口
框架一般用作Java应用程序的窗口,而Applet是Java小程序的窗口. 与Frame不同,Applet是在网页中显示的,也可以通过添加Panel进行组件布局. package TomAwt; im ...
- Hourrank 21 Tree Isomorphism 树hash
https://www.hackerrank.com/contests/hourrank-21/challenges/tree-isomorphism 题目大意: 给出一棵树, 求有多少本质不同的子树 ...
- php在linux中执行外部命令
目录:一.PHP中调用外部命令介绍二.关于安全问题三.关于超时问题四.关于PHP运行linux环境中命令出现的问题 一.PHP中调用外部命令介绍在PHP中调用外部命令,可以用,1>调用专门函数. ...
- php中数组中&的问题
1.代码: <?php $arr = array('one','two','three'); foreach ($arr as $value){ echo 'Value:'.$value.'&l ...
- kafka 安装步骤
kafka安装文档 1.解压缩(官网下载:http://kafka.apache.org/downloads.html) tar -xzf kafka_2.10-0.8.2.0.tgz cd kafk ...
- poj 2386:Lake Counting(简单DFS深搜)
Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18201 Accepted: 9192 De ...
- Eclipse出现ContextLoaderListener not find
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis ...
- 记第一次破解js加密代码
首先,我要爬的是这个网站:http://www.66ip.cn/nm.html,我想做个直接调用网站的接口获取代理的爬虫 这个接口看上去似乎很简单,直接输入需要的代理条件后,点击提取即可 点击提取后就 ...
- CodeForces 666A Reberland Linguistics(DP)
A. Reberland Linguistics time limit per test 1 second memory limit per test 256 megabytes input stan ...
- PHP错误处理,无法显示验证码。。无法显示首页等莫名其妙的500
use the date.timezone setting or the date_default_timezone_set() 这是由于调用date时,若timezone设置不正确所产生的E_NOT ...