提交本地工具-标准比对的相关接口
This commit is contained in:
+269
@@ -0,0 +1,269 @@
|
||||
<?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.adc.da.slrs.standardSplit.dao.SarItemsCompareHisEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="old_items_id" property="oldItemsId" />
|
||||
<result column="old_items_name" property="oldItemsName" />
|
||||
<result column="old_items_text" property="oldItemsText" />
|
||||
<result column="new_items_id" property="newItemsId" />
|
||||
<result column="new_items_name" property="newItemsName" />
|
||||
<result column="new_items_text" property="newItemsText" />
|
||||
<result column="create_user" property="createUser" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_user" property="modifyUser" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="stand_his_id" property="standHisId" />
|
||||
<result column="similarity_degree" property="similarityDegree" />
|
||||
<result column="old_items_num" property="oldItemsNum" />
|
||||
<result column="new_items_num" property="newItemsNum" />
|
||||
<result column="old_remark" property="oldRemark" />
|
||||
<result column="new_remark" property="newRemark" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_ITEMS_COMPARE_HIS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, old_items_id, old_items_name, old_items_text, new_items_id, new_items_name, new_items_text,
|
||||
create_user, create_time, modify_user, modify_time, stand_his_id, similarity_degree,
|
||||
old_items_num, new_items_num,old_remark,new_remark
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="oldItemsId != null" >
|
||||
and old_items_id ${oldItemsIdOperator} #{oldItemsId}
|
||||
</if>
|
||||
<if test="oldItemsName != null" >
|
||||
and old_items_name ${oldItemsNameOperator} #{oldItemsName}
|
||||
</if>
|
||||
<if test="oldItemsText != null" >
|
||||
and old_items_text ${oldItemsTextOperator} #{oldItemsText}
|
||||
</if>
|
||||
<if test="newItemsId != null" >
|
||||
and new_items_id ${newItemsIdOperator} #{newItemsId}
|
||||
</if>
|
||||
<if test="newItemsName != null" >
|
||||
and new_items_name ${newItemsNameOperator} #{newItemsName}
|
||||
</if>
|
||||
<if test="newItemsText != null" >
|
||||
and new_items_text ${newItemsTextOperator} #{newItemsText}
|
||||
</if>
|
||||
<if test="createUser != null" >
|
||||
and create_user ${createUserOperator} #{createUser}
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
and create_time ${createTimeOperator} #{createTime}
|
||||
</if>
|
||||
<if test="createTime1 != null" >
|
||||
and create_time >= #{createTime1}
|
||||
</if>
|
||||
<if test="createTime2 != null" >
|
||||
and create_time <= #{createTime2}
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="standHisId != null" >
|
||||
and stand_his_id ${standHisIdOperator} #{standHisId}
|
||||
</if>
|
||||
<if test="similarityDegree != null" >
|
||||
and similarity_degree ${similarityDegreeOperator} #{similarityDegree}
|
||||
</if>
|
||||
<if test="oldItemsNum != null" >
|
||||
and old_items_num ${oldItemsNumOperator} #{oldItemsNum}
|
||||
</if>
|
||||
<if test="newItemsNum != null" >
|
||||
and new_items_num ${newItemsNumOperator} #{newItemsNum}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_ITEMS_COMPARE_HIS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_ITEMS_COMPARE_HIS(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{oldItemsId, jdbcType=VARCHAR}, #{oldItemsName, jdbcType=VARCHAR}, #{oldItemsText, jdbcType=CLOB}, #{newItemsId, jdbcType=VARCHAR}, #{newItemsName, jdbcType=VARCHAR}, #{newItemsText, jdbcType=CLOB}, #{createUser, jdbcType=VARCHAR}, #{createTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{standHisId, jdbcType=VARCHAR}, #{similarityDegree, jdbcType=VARCHAR}, #{oldItemsNum, jdbcType=VARCHAR}, #{newItemsNum, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_ITEMS_COMPARE_HIS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_ITEMS_COMPARE_HIS
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="oldItemsId != null" >old_items_id,</if>
|
||||
<if test="oldItemsName != null" >old_items_name,</if>
|
||||
<if test="oldItemsText != null" >old_items_text,</if>
|
||||
<if test="newItemsId != null" >new_items_id,</if>
|
||||
<if test="newItemsName != null" >new_items_name,</if>
|
||||
<if test="newItemsText != null" >new_items_text,</if>
|
||||
<if test="createUser != null" >create_user,</if>
|
||||
<if test="createTime != null" >create_time,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="standHisId != null" >stand_his_id,</if>
|
||||
<if test="similarityDegree != null" >similarity_degree,</if>
|
||||
<if test="oldItemsNum != null" >old_items_num,</if>
|
||||
<if test="newItemsNum != null" >new_items_num,</if>
|
||||
<if test="oldRemark != null" >old_remark,</if>
|
||||
<if test="newRemark != null" >new_remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="oldItemsId != null" >#{oldItemsId, jdbcType=VARCHAR},</if>
|
||||
<if test="oldItemsName != null" >#{oldItemsName, jdbcType=VARCHAR},</if>
|
||||
<if test="oldItemsText != null" >#{oldItemsText, jdbcType=CLOB},</if>
|
||||
<if test="newItemsId != null" >#{newItemsId, jdbcType=VARCHAR},</if>
|
||||
<if test="newItemsName != null" >#{newItemsName, jdbcType=VARCHAR},</if>
|
||||
<if test="newItemsText != null" >#{newItemsText, jdbcType=CLOB},</if>
|
||||
<if test="createUser != null" >#{createUser, jdbcType=VARCHAR},</if>
|
||||
<if test="createTime != null" >#{createTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="standHisId != null" >#{standHisId, jdbcType=VARCHAR},</if>
|
||||
<if test="similarityDegree != null" >#{similarityDegree, jdbcType=VARCHAR},</if>
|
||||
<if test="oldItemsNum != null" >#{oldItemsNum, jdbcType=VARCHAR},</if>
|
||||
<if test="newItemsNum != null" >#{newItemsNum, jdbcType=VARCHAR},</if>
|
||||
<if test="oldRemark != null" >#{oldRemark, jdbcType=VARCHAR},</if>
|
||||
<if test="newRemark != null" >#{newRemark, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
|
||||
update SAR_ITEMS_COMPARE_HIS
|
||||
set old_items_id = #{oldItemsId},
|
||||
old_items_name = #{oldItemsName},
|
||||
old_items_text = #{oldItemsText},
|
||||
new_items_id = #{newItemsId},
|
||||
new_items_name = #{newItemsName},
|
||||
new_items_text = #{newItemsText},
|
||||
create_user = #{createUser},
|
||||
create_time = #{createTime},
|
||||
modify_user = #{modifyUser},
|
||||
modify_time = #{modifyTime},
|
||||
stand_his_id = #{standHisId},
|
||||
similarity_degree = #{similarityDegree},
|
||||
old_items_num = #{oldItemsNum},
|
||||
new_items_num = #{newItemsNum}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
|
||||
update SAR_ITEMS_COMPARE_HIS
|
||||
<set >
|
||||
<if test="oldItemsId != null" >
|
||||
old_items_id = #{oldItemsId},
|
||||
</if>
|
||||
<if test="oldItemsName != null" >
|
||||
old_items_name = #{oldItemsName},
|
||||
</if>
|
||||
<if test="oldItemsText != null" >
|
||||
old_items_text = #{oldItemsText},
|
||||
</if>
|
||||
<if test="newItemsId != null" >
|
||||
new_items_id = #{newItemsId},
|
||||
</if>
|
||||
<if test="newItemsName != null" >
|
||||
new_items_name = #{newItemsName},
|
||||
</if>
|
||||
<if test="newItemsText != null" >
|
||||
new_items_text = #{newItemsText},
|
||||
</if>
|
||||
<if test="createUser != null" >
|
||||
create_user = #{createUser},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
modify_user = #{modifyUser},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="standHisId != null" >
|
||||
stand_his_id = #{standHisId},
|
||||
</if>
|
||||
<if test="similarityDegree != null" >
|
||||
similarity_degree = #{similarityDegree},
|
||||
</if>
|
||||
<if test="oldItemsNum != null" >
|
||||
old_items_num = #{oldItemsNum},
|
||||
</if>
|
||||
<if test="newItemsNum != null" >
|
||||
new_items_num = #{newItemsNum},
|
||||
</if>
|
||||
<if test="oldRemark != null" >
|
||||
old_remark = #{oldRemark},
|
||||
</if>
|
||||
<if test="newRemark != null" >
|
||||
new_remark = #{newRemark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_ITEMS_COMPARE_HIS -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_ITEMS_COMPARE_HIS
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_ITEMS_COMPARE_HIS
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_ITEMS_COMPARE_HIS 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_ITEMS_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_ITEMS_COMPARE_HIS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_ITEMS_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
ORDER BY CREATE_TIME DESC
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_ITEMS_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
<?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.adc.da.slrs.standardSplit.dao.SarStandCompareHisEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="compare_type" property="compareType" />
|
||||
<result column="old_stand_id" property="oldStandId" />
|
||||
<result column="old_stand_num" property="oldStandNum" />
|
||||
<result column="old_stand_name" property="oldStandName" />
|
||||
<result column="new_stand_id" property="newStandId" />
|
||||
<result column="new_stand_num" property="newStandNum" />
|
||||
<result column="new_stand_name" property="newStandName" />
|
||||
<result column="old_file_type" property="oldFileType" />
|
||||
<result column="old_sar_type" property="oldSarType" />
|
||||
<result column="create_user" property="createUser" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_user" property="modifyUser" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="new_file_type" property="newFileType" />
|
||||
<result column="new_sar_type" property="newSarType" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STAND_COMPARE_HIS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
compare_type, id, old_stand_id, old_stand_num, old_stand_name, new_stand_id, new_stand_num, new_stand_name, old_file_type, old_sar_type, create_user, create_time, modify_user, modify_time, new_file_type, new_sar_type
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="compareType != null" >
|
||||
and compare_type ${compareTypeOperator} #{compareType}
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="oldStandId != null" >
|
||||
and old_stand_id ${oldStandIdOperator} #{oldStandId}
|
||||
</if>
|
||||
<if test="oldStandNum != null" >
|
||||
and old_stand_num ${oldStandNumOperator} #{oldStandNum}
|
||||
</if>
|
||||
<if test="oldStandName != null" >
|
||||
and old_stand_name ${oldStandNameOperator} #{oldStandName}
|
||||
</if>
|
||||
<if test="newStandId != null" >
|
||||
and new_stand_id ${newStandIdOperator} #{newStandId}
|
||||
</if>
|
||||
<if test="newStandNum != null" >
|
||||
and new_stand_num ${newStandNumOperator} #{newStandNum}
|
||||
</if>
|
||||
<if test="newStandName != null" >
|
||||
and new_stand_name ${newStandNameOperator} #{newStandName}
|
||||
</if>
|
||||
<if test="oldFileType != null" >
|
||||
and old_file_type ${oldFileTypeOperator} #{oldFileType}
|
||||
</if>
|
||||
<if test="oldSarType != null" >
|
||||
and old_sar_type ${oldSarTypeOperator} #{oldSarType}
|
||||
</if>
|
||||
<if test="createUser != null" >
|
||||
and create_user ${createUserOperator} #{createUser}
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
and create_time ${createTimeOperator} #{createTime}
|
||||
</if>
|
||||
<if test="createTime1 != null" >
|
||||
and create_time >= #{createTime1}
|
||||
</if>
|
||||
<if test="createTime2 != null" >
|
||||
and create_time <= #{createTime2}
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="newFileType != null" >
|
||||
and new_file_type ${newFileTypeOperator} #{newFileType}
|
||||
</if>
|
||||
<if test="newSarType != null" >
|
||||
and new_sar_type ${newSarTypeOperator} #{newSarType}
|
||||
</if>
|
||||
<if test="oldNumOrName != null" >
|
||||
and (old_stand_num like concat('%',#{oldNumOrName},'%') OR old_stand_name like concat('%',#{oldNumOrName},'%'))
|
||||
</if>
|
||||
<if test="newNumOrName != null" >
|
||||
and (new_stand_num like concat('%',#{newNumOrName},'%') OR new_stand_name like concat('%',#{newNumOrName},'%'))
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_COMPARE_HIS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_COMPARE_HIS(<include refid="Base_Column_List" />)
|
||||
values (#{compareType, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR}, #{oldStandId, jdbcType=VARCHAR}, #{oldStandNum, jdbcType=VARCHAR}, #{oldStandName, jdbcType=VARCHAR}, #{newStandId, jdbcType=VARCHAR}, #{newStandNum, jdbcType=VARCHAR}, #{newStandName, jdbcType=VARCHAR}, #{oldFileType, jdbcType=VARCHAR}, #{oldSarType, jdbcType=VARCHAR}, #{createUser, jdbcType=VARCHAR}, #{createTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{newFileType, jdbcType=VARCHAR}, #{newSarType, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_COMPARE_HIS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_COMPARE_HIS
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="compareType != null" >compare_type,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="oldStandId != null" >old_stand_id,</if>
|
||||
<if test="oldStandNum != null" >old_stand_num,</if>
|
||||
<if test="oldStandName != null" >old_stand_name,</if>
|
||||
<if test="newStandId != null" >new_stand_id,</if>
|
||||
<if test="newStandNum != null" >new_stand_num,</if>
|
||||
<if test="newStandName != null" >new_stand_name,</if>
|
||||
<if test="oldFileType != null" >old_file_type,</if>
|
||||
<if test="oldSarType != null" >old_sar_type,</if>
|
||||
<if test="createUser != null" >create_user,</if>
|
||||
<if test="createTime != null" >create_time,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="newFileType != null" >new_file_type,</if>
|
||||
<if test="newSarType != null" >new_sar_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="compareType != null" >#{compareType, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="oldStandId != null" >#{oldStandId, jdbcType=VARCHAR},</if>
|
||||
<if test="oldStandNum != null" >#{oldStandNum, jdbcType=VARCHAR},</if>
|
||||
<if test="oldStandName != null" >#{oldStandName, jdbcType=VARCHAR},</if>
|
||||
<if test="newStandId != null" >#{newStandId, jdbcType=VARCHAR},</if>
|
||||
<if test="newStandNum != null" >#{newStandNum, jdbcType=VARCHAR},</if>
|
||||
<if test="newStandName != null" >#{newStandName, jdbcType=VARCHAR},</if>
|
||||
<if test="oldFileType != null" >#{oldFileType, jdbcType=VARCHAR},</if>
|
||||
<if test="oldSarType != null" >#{oldSarType, jdbcType=VARCHAR},</if>
|
||||
<if test="createUser != null" >#{createUser, jdbcType=VARCHAR},</if>
|
||||
<if test="createTime != null" >#{createTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="newFileType != null" >#{newFileType, jdbcType=VARCHAR},</if>
|
||||
<if test="newSarType != null" >#{newSarType, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEO" >
|
||||
update SAR_STAND_COMPARE_HIS
|
||||
set compare_type = #{compareType},
|
||||
old_stand_id = #{oldStandId},
|
||||
old_stand_num = #{oldStandNum},
|
||||
old_stand_name = #{oldStandName},
|
||||
new_stand_id = #{newStandId},
|
||||
new_stand_num = #{newStandNum},
|
||||
new_stand_name = #{newStandName},
|
||||
old_file_type = #{oldFileType},
|
||||
old_sar_type = #{oldSarType},
|
||||
create_user = #{createUser},
|
||||
create_time = #{createTime},
|
||||
modify_user = #{modifyUser},
|
||||
modify_time = #{modifyTime},
|
||||
new_file_type = #{newFileType},
|
||||
new_sar_type = #{newSarType}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEO" >
|
||||
update SAR_STAND_COMPARE_HIS
|
||||
<set >
|
||||
<if test="compareType != null" >
|
||||
compare_type = #{compareType},
|
||||
</if>
|
||||
<if test="oldStandId != null" >
|
||||
old_stand_id = #{oldStandId},
|
||||
</if>
|
||||
<if test="oldStandNum != null" >
|
||||
old_stand_num = #{oldStandNum},
|
||||
</if>
|
||||
<if test="oldStandName != null" >
|
||||
old_stand_name = #{oldStandName},
|
||||
</if>
|
||||
<if test="newStandId != null" >
|
||||
new_stand_id = #{newStandId},
|
||||
</if>
|
||||
<if test="newStandNum != null" >
|
||||
new_stand_num = #{newStandNum},
|
||||
</if>
|
||||
<if test="newStandName != null" >
|
||||
new_stand_name = #{newStandName},
|
||||
</if>
|
||||
<if test="oldFileType != null" >
|
||||
old_file_type = #{oldFileType},
|
||||
</if>
|
||||
<if test="oldSarType != null" >
|
||||
old_sar_type = #{oldSarType},
|
||||
</if>
|
||||
<if test="createUser != null" >
|
||||
create_user = #{createUser},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
modify_user = #{modifyUser},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="newFileType != null" >
|
||||
new_file_type = #{newFileType},
|
||||
</if>
|
||||
<if test="newSarType != null" >
|
||||
new_sar_type = #{newSarType},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_STAND_COMPARE_HIS -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_COMPARE_HIS
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_STAND_COMPARE_HIS
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_STAND_COMPARE_HIS 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_STAND_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STAND_COMPARE_HIS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_STAND_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
<if test="sql != null">
|
||||
${sql}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_STAND_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
<?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.adc.da.slrs.standardSplit.dao.SarStandItemsCompareHisEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarStandItemsCompareHisEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="items_id" property="itemsId" />
|
||||
<result column="items_name" property="itemsName" />
|
||||
<result column="items_num" property="itemsNum" />
|
||||
<result column="items_text" property="itemsText" />
|
||||
<result column="items_display_num" property="itemsDisplayNum" />
|
||||
<result column="target_stand" property="targetStand" />
|
||||
<result column="left_or_right" property="leftOrRight" />
|
||||
<result column="stand_his_id" property="standHisId" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STAND_ITEMS_COMPARE_HIS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, items_id, items_name, items_num, items_text, items_display_num, target_stand, left_or_right,
|
||||
stand_his_id, create_time, modify_time,remark
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="itemsId != null" >
|
||||
and items_id ${itemsIdOperator} #{itemsId}
|
||||
</if>
|
||||
<if test="itemsName != null" >
|
||||
and items_name ${itemsNameOperator} #{itemsName}
|
||||
</if>
|
||||
<if test="itemsNum != null" >
|
||||
and items_num ${itemsNumOperator} #{itemsNum}
|
||||
</if>
|
||||
<if test="itemsText != null" >
|
||||
and items_text ${itemsTextOperator} #{itemsText}
|
||||
</if>
|
||||
<if test="itemsDisplayNum != null" >
|
||||
and items_display_num ${itemsDisplayNumOperator} #{itemsDisplayNum}
|
||||
</if>
|
||||
<if test="targetStand != null" >
|
||||
and target_stand ${targetStandOperator} #{targetStand}
|
||||
</if>
|
||||
<if test="leftOrRight != null" >
|
||||
and left_or_right ${leftOrRightOperator} #{leftOrRight}
|
||||
</if>
|
||||
<if test="standHisId != null" >
|
||||
and stand_his_id ${standHisIdOperator} #{standHisId}
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
and create_time ${createTimeOperator} #{createTime}
|
||||
</if>
|
||||
<if test="createTime1 != null" >
|
||||
and create_time >= #{createTime1}
|
||||
</if>
|
||||
<if test="createTime2 != null" >
|
||||
and create_time <= #{createTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandItemsCompareHisEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_ITEMS_COMPARE_HIS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_ITEMS_COMPARE_HIS(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{itemsId, jdbcType=VARCHAR}, #{itemsName, jdbcType=VARCHAR}, #{itemsNum, jdbcType=VARCHAR}, #{itemsText, jdbcType=CLOB}, #{itemsDisplayNum, jdbcType=INTEGER}, #{targetStand, jdbcType=INTEGER}, #{leftOrRight, jdbcType=VARCHAR}, #{standHisId, jdbcType=VARCHAR}, #{createTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandItemsCompareHisEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_ITEMS_COMPARE_HIS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_ITEMS_COMPARE_HIS
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="itemsId != null" >items_id,</if>
|
||||
<if test="itemsName != null" >items_name,</if>
|
||||
<if test="itemsNum != null" >items_num,</if>
|
||||
<if test="itemsText != null" >items_text,</if>
|
||||
<if test="itemsDisplayNum != null" >items_display_num,</if>
|
||||
<if test="targetStand != null" >target_stand,</if>
|
||||
<if test="leftOrRight != null" >left_or_right,</if>
|
||||
<if test="standHisId != null" >stand_his_id,</if>
|
||||
<if test="createTime != null" >create_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="remark != null" >remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="itemsId != null" >#{itemsId, jdbcType=VARCHAR},</if>
|
||||
<if test="itemsName != null" >#{itemsName, jdbcType=VARCHAR},</if>
|
||||
<if test="itemsNum != null" >#{itemsNum, jdbcType=VARCHAR},</if>
|
||||
<if test="itemsText != null" >#{itemsText, jdbcType=CLOB},</if>
|
||||
<if test="itemsDisplayNum != null" >#{itemsDisplayNum, jdbcType=INTEGER},</if>
|
||||
<if test="targetStand != null" >#{targetStand, jdbcType=INTEGER},</if>
|
||||
<if test="leftOrRight != null" >#{leftOrRight, jdbcType=VARCHAR},</if>
|
||||
<if test="standHisId != null" >#{standHisId, jdbcType=VARCHAR},</if>
|
||||
<if test="createTime != null" >#{createTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="remark != null" >#{remark, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandItemsCompareHisEO" >
|
||||
update SAR_STAND_ITEMS_COMPARE_HIS
|
||||
set items_id = #{itemsId},
|
||||
items_name = #{itemsName},
|
||||
items_num = #{itemsNum},
|
||||
items_text = #{itemsText},
|
||||
items_display_num = #{itemsDisplayNum},
|
||||
target_stand = #{targetStand},
|
||||
left_or_right = #{leftOrRight},
|
||||
stand_his_id = #{standHisId},
|
||||
create_time = #{createTime},
|
||||
modify_time = #{modifyTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandItemsCompareHisEO" >
|
||||
update SAR_STAND_ITEMS_COMPARE_HIS
|
||||
<set >
|
||||
<if test="itemsId != null" >
|
||||
items_id = #{itemsId},
|
||||
</if>
|
||||
<if test="itemsName != null" >
|
||||
items_name = #{itemsName},
|
||||
</if>
|
||||
<if test="itemsNum != null" >
|
||||
items_num = #{itemsNum},
|
||||
</if>
|
||||
<if test="itemsText != null" >
|
||||
items_text = #{itemsText},
|
||||
</if>
|
||||
<if test="itemsDisplayNum != null" >
|
||||
items_display_num = #{itemsDisplayNum},
|
||||
</if>
|
||||
<if test="targetStand != null" >
|
||||
target_stand = #{targetStand},
|
||||
</if>
|
||||
<if test="leftOrRight != null" >
|
||||
left_or_right = #{leftOrRight},
|
||||
</if>
|
||||
<if test="standHisId != null" >
|
||||
stand_his_id = #{standHisId},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
remark = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_STAND_ITEMS_COMPARE_HIS -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_ITEMS_COMPARE_HIS
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_STAND_ITEMS_COMPARE_HIS
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_STAND_ITEMS_COMPARE_HIS 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_STAND_ITEMS_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STAND_ITEMS_COMPARE_HIS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_STAND_ITEMS_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_STAND_ITEMS_COMPARE_HIS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
ORDER BY ITEMS_DISPLAY_NUM ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user