<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;
} }

最新文章

  1. 【JavaScript】 Webpack安装及文件打包
  2. CUDA1.1-函数类型限定符与变量类型限定符
  3. CSS 3中边框怎么用
  4. Linux VPS 基本命令
  5. 模仿开发H5游戏,看你有多色
  6. mysql 安装配置详解
  7. 2 - Annotations标注
  8. 设计模式(十四):Command命令模式 -- 行为型模式
  9. Python——Flash框架——用户认证
  10. 推荐常用的移动端、PC端、小程序的UI框架
  11. JAVA-8大基本类型与包装类的例子(基础必备)
  12. SharePoint开启错误提示
  13. 集群下Dubbo负载均衡配置
  14. SR锁存器
  15. [2]注解(Annotation)-- 深入理解Java:注解(Annotation)自定义注解入门
  16. (转)HTTP 错误 404.2 - Not Found 由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面
  17. 雷林鹏分享:C# 不安全代码
  18. Mouse Touch Stylus
  19. Java-子类扩展父类功能
  20. [转]聊聊技术选型 - Angular2 vs Vue2

热门文章

  1. 什么是Web容器?
  2. SpringBoot新增监听器Listener
  3. (推荐JsonConvert )序列化和反序列化Json
  4. 获取系统DPI
  5. 软件设计模式(Design pattern)(待续)
  6. cxGrid 隔行换色
  7. 160811、29 个你必须知道的 Linux 命令
  8. MySQL 1067
  9. Outlook自动回复功能无法使用
  10. 网站行为跟踪 Website Activity Tracking Log Aggregation 日志聚合 In comparison to log-centric systems like Scribe or Flume