20200929更新版本
parent
53f59bdcd9
commit
184709e9b0
@ -0,0 +1,22 @@
|
||||
package com.emr.dao;
|
||||
|
||||
import com.emr.entity.ArchiveSumbitdateInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArchiveSumbitdateInfoMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ArchiveSumbitdateInfo record);
|
||||
|
||||
int insertSelective(ArchiveSumbitdateInfo record);
|
||||
|
||||
ArchiveSumbitdateInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ArchiveSumbitdateInfo record);
|
||||
|
||||
int updateByPrimaryKey(ArchiveSumbitdateInfo record);
|
||||
|
||||
List<ArchiveSumbitdateInfo> selectOneByFileId(@Param("fileId")String fileId);
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
package com.emr.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ArchiveSumbitdateInfo implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String fileId;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private Integer int1;
|
||||
|
||||
private Integer int2;
|
||||
|
||||
private Integer int3;
|
||||
|
||||
private String str1;
|
||||
|
||||
private String str2;
|
||||
|
||||
private String str3;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
|
||||
public void setFileId(String fileId) {
|
||||
this.fileId = fileId == null ? null : fileId.trim();
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime == null ? null : createTime.trim();
|
||||
}
|
||||
|
||||
public Integer getInt1() {
|
||||
return int1;
|
||||
}
|
||||
|
||||
public void setInt1(Integer int1) {
|
||||
this.int1 = int1;
|
||||
}
|
||||
|
||||
public Integer getInt2() {
|
||||
return int2;
|
||||
}
|
||||
|
||||
public void setInt2(Integer int2) {
|
||||
this.int2 = int2;
|
||||
}
|
||||
|
||||
public Integer getInt3() {
|
||||
return int3;
|
||||
}
|
||||
|
||||
public void setInt3(Integer int3) {
|
||||
this.int3 = int3;
|
||||
}
|
||||
|
||||
public String getStr1() {
|
||||
return str1;
|
||||
}
|
||||
|
||||
public void setStr1(String str1) {
|
||||
this.str1 = str1 == null ? null : str1.trim();
|
||||
}
|
||||
|
||||
public String getStr2() {
|
||||
return str2;
|
||||
}
|
||||
|
||||
public void setStr2(String str2) {
|
||||
this.str2 = str2 == null ? null : str2.trim();
|
||||
}
|
||||
|
||||
public String getStr3() {
|
||||
return str3;
|
||||
}
|
||||
|
||||
public void setStr3(String str3) {
|
||||
this.str3 = str3 == null ? null : str3.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", fileId=").append(fileId);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", int1=").append(int1);
|
||||
sb.append(", int2=").append(int2);
|
||||
sb.append(", int3=").append(int3);
|
||||
sb.append(", str1=").append(str1);
|
||||
sb.append(", str2=").append(str2);
|
||||
sb.append(", str3=").append(str3);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.emr.util;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2020/8/4 14:18
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2020/8/4 14:18
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public class ExceptionPrintUtil {
|
||||
private static Logger log = Logger.getLogger("errorMsg");
|
||||
public static void printException(Exception e){
|
||||
//方法名
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
e.printStackTrace(new PrintStream(baos));
|
||||
String exception = baos.toString();
|
||||
log.error(exception);
|
||||
try {
|
||||
baos.flush();
|
||||
baos.close();
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
<?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.emr.dao.ArchiveSumbitdateInfoMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.emr.entity.ArchiveSumbitdateInfo" >
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="file_id" property="fileId" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="VARCHAR" />
|
||||
<result column="int1" property="int1" jdbcType="INTEGER" />
|
||||
<result column="int2" property="int2" jdbcType="INTEGER" />
|
||||
<result column="int3" property="int3" jdbcType="INTEGER" />
|
||||
<result column="str1" property="str1" jdbcType="NVARCHAR" />
|
||||
<result column="str2" property="str2" jdbcType="NVARCHAR" />
|
||||
<result column="str3" property="str3" jdbcType="NVARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, file_id, create_time, int1, int2, int3, str1, str2, str3
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from archive_sumbitDate_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from archive_sumbitDate_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.emr.entity.ArchiveSumbitdateInfo" >
|
||||
insert into archive_sumbitDate_info (id, file_id, create_time,
|
||||
int1, int2, int3, str1,
|
||||
str2, str3)
|
||||
values (#{id,jdbcType=INTEGER}, #{fileId,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR},
|
||||
#{int1,jdbcType=INTEGER}, #{int2,jdbcType=INTEGER}, #{int3,jdbcType=INTEGER}, #{str1,jdbcType=NVARCHAR},
|
||||
#{str2,jdbcType=NVARCHAR}, #{str3,jdbcType=NVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.emr.entity.ArchiveSumbitdateInfo" >
|
||||
insert into archive_sumbitDate_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="fileId != null" >
|
||||
file_id,
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time,
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1,
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2,
|
||||
</if>
|
||||
<if test="int3 != null" >
|
||||
int3,
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1,
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2,
|
||||
</if>
|
||||
<if test="str3 != null" >
|
||||
str3,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fileId != null" >
|
||||
#{fileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
#{createTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
#{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
#{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="int3 != null" >
|
||||
#{int3,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
#{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
#{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="str3 != null" >
|
||||
#{str3,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchiveSumbitdateInfo" >
|
||||
update archive_sumbitDate_info
|
||||
<set >
|
||||
<if test="fileId != null" >
|
||||
file_id = #{fileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="int3 != null" >
|
||||
int3 = #{int3,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2 = #{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="str3 != null" >
|
||||
str3 = #{str3,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchiveSumbitdateInfo" >
|
||||
update archive_sumbitDate_info
|
||||
set file_id = #{fileId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=VARCHAR},
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
int3 = #{int3,jdbcType=INTEGER},
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
str2 = #{str2,jdbcType=NVARCHAR},
|
||||
str3 = #{str3,jdbcType=NVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectOneByFileId" resultMap="BaseResultMap">
|
||||
select id,file_id,create_time from archive_sumbitDate_info
|
||||
<where>
|
||||
<if test="fileId != null and fileId != ''">
|
||||
and file_id in(${fileId})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue