src/main/kotlin/com/flightfeather/uav/domain/entity/SourceTraceMsgBlob.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/kotlin/com/flightfeather/uav/domain/mapper/SourceTraceMsgBlobMapper.kt | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/SourceTraceMsgBlobMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/kotlin/com/flightfeather/uav/domain/entity/SourceTraceMsgBlob.java
对比新文件 @@ -0,0 +1,57 @@ package com.flightfeather.uav.domain.entity; import javax.persistence.*; @Table(name = "source_trace_msg_blob") public class SourceTraceMsgBlob { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(name = "msg_id") private Integer msgId; private String content; /** * @return id */ public Integer getId() { return id; } /** * @param id */ public void setId(Integer id) { this.id = id; } /** * @return msg_id */ public Integer getMsgId() { return msgId; } /** * @param msgId */ public void setMsgId(Integer msgId) { this.msgId = msgId; } /** * @return content */ public String getContent() { return content; } /** * @param content */ public void setContent(String content) { this.content = content == null ? null : content.trim(); } } src/main/kotlin/com/flightfeather/uav/domain/mapper/SourceTraceMsgBlobMapper.kt
对比新文件 @@ -0,0 +1,20 @@ package com.flightfeather.uav.domain.mapper import com.flightfeather.uav.domain.MyMapper import com.flightfeather.uav.domain.entity.SourceTraceMsgBlob import com.flightfeather.uav.lightshare.bean.SourceTraceMsgVo import org.apache.ibatis.annotations.Mapper import org.apache.ibatis.annotations.Select import java.util.* @Mapper interface SourceTraceMsgBlobMapper : MyMapper<SourceTraceMsgBlob?> { fun selectWithBlob(deviceCode: String, startTime: Date, endTime: Date): List<SourceTraceMsgVo?> /** * 閲嶇疆鑷id */ @Select("alter table source_trace_msg_blob auto_increment = #{param1}") fun resetAutoIncrement(id: Int) } src/main/resources/mapper/SourceTraceMsgBlobMapper.xml
对比新文件 @@ -0,0 +1,56 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.flightfeather.uav.domain.mapper.SourceTraceMsgBlobMapper"> <resultMap id="BaseResultMap" type="com.flightfeather.uav.domain.entity.SourceTraceMsgBlob"> <!-- WARNING - @mbg.generated --> <id column="id" jdbcType="INTEGER" property="id" /> <result column="msg_id" jdbcType="INTEGER" property="msgId" /> </resultMap> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.flightfeather.uav.domain.entity.SourceTraceMsgBlob"> <!-- WARNING - @mbg.generated --> <result column="content" jdbcType="LONGVARCHAR" property="content" /> </resultMap> <sql id="Base_Column_List"> <!-- WARNING - @mbg.generated --> id, msg_id </sql> <sql id="Blob_Column_List"> <!-- WARNING - @mbg.generated --> content </sql> <resultMap extends="com.flightfeather.uav.domain.mapper.SourceTraceMsgMapper.BaseResultMap" id="SourceTraceMsgVoMap" type="com.flightfeather.uav.lightshare.bean.SourceTraceMsgVo"> </resultMap> <select id="selectWithBlob" resultMap="SourceTraceMsgVoMap"> select a.*, b.id as blobId, b.msg_id as blobMsgId, b.content as blobContent from source_trace_msg as a left join source_trace_msg_blob as b on a.id = b.msg_id <where> <if test="deviceCode != null"> and a.device_code = #{deviceCode} </if> <if test="startTime != null"> and a.start_time >= #{startTime} </if> <if test="endTime != null"> and a.end_time <= #{endTime} </if> </where> order by a.start_time desc </select> </mapper>