feat: There is no way the Laws
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
<?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.sarLawsVal.dao.SarLawsValDao">
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsVal.entity.SarLawsVal" >
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="property_val" property="propertyVal" />
|
||||
<result column="property_type" property="propertyType" />
|
||||
<result column="LAWS_ID" property="lawsId" />
|
||||
<result column="id" property="id" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_LAWS_VAL table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
modify_time, creation_time, valid_flag, property_val, property_type, laws_id, id
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<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="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="propertyVal != null" >
|
||||
and property_val ${propertyValOperator} #{propertyVal}
|
||||
</if>
|
||||
<if test="propertyType != null" >
|
||||
and property_type ${propertyTypeOperator} #{propertyType}
|
||||
</if>
|
||||
<if test="lawsId != null" >
|
||||
and laws_id ${lawsIdOperator} #{lawsId}
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.sarLawsVal.entity.SarLawsVal" >
|
||||
insert into SAR_LAWS_VAL(<include refid="Base_Column_List" />)
|
||||
values (#{modifyTime, jdbcType=TIMESTAMP}, #{creationTime, jdbcType=TIMESTAMP}, #{validFlag, jdbcType=INTEGER}, #{propertyVal, jdbcType=VARCHAR}, #{propertyType, jdbcType=VARCHAR}, #{lawsId, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarLawsVal.entity.SarLawsVal" >
|
||||
insert into SAR_LAWS_VAL
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="propertyVal != null" >property_val,</if>
|
||||
<if test="propertyType != null" >property_type,</if>
|
||||
<if test="lawsId != null" >laws_id,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="propertyVal != null" >#{propertyVal, jdbcType=VARCHAR},</if>
|
||||
<if test="propertyType != null" >#{propertyType, jdbcType=VARCHAR},</if>
|
||||
<if test="lawsId != null" >#{lawsId, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- SAR_LAWS_VAL 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_LAWS_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_LAWS_VAL列表 -->
|
||||
<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_LAWS_VAL
|
||||
<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_LAWS_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteDataBylawsId" parameterType="java.lang.String">
|
||||
delete from SAR_LAWS_VAL
|
||||
where laws_id = #{lawsId}
|
||||
</delete>
|
||||
|
||||
<insert id="insertForeach" parameterType="java.util.List">
|
||||
insert into SAR_LAWS_VAL
|
||||
(<include refid="Base_Column_List" />)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.modifyTime, jdbcType=TIMESTAMP},
|
||||
#{item.creationTime, jdbcType=TIMESTAMP},
|
||||
#{item.validFlag, jdbcType=INTEGER},
|
||||
#{item.propertyVal, jdbcType=VARCHAR},
|
||||
#{item.propertyType, jdbcType=VARCHAR},
|
||||
#{item.lawsId, jdbcType=VARCHAR},
|
||||
#{item.id, jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user