feat: There is no way the

This commit is contained in:
super_liu
2021-08-18 13:46:11 +08:00
parent 8db9e0bccf
commit 8e0e632c35
16 changed files with 1007 additions and 70 deletions
@@ -2,4 +2,134 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarBussStandVal.dao.SarBussStandValDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarBussStandVal.entity.SarBussStandVal" >
<result column="modify_time" property="modifyTime" />
<result column="creation_time" property="creationTime" />
<result column="valid_flag" property="validFlag" />
<result column="property_value" property="propertyValue" />
<result column="property_type" property="propertyType" />
<result column="stand_id" property="standId" />
<result column="id" property="id" />
</resultMap>
<!-- SAR_BUSS_STAND_VAL table all fields -->
<sql id="Base_Column_List" >
modify_time, creation_time, valid_flag, property_value, property_type, stand_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 &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
and modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null" >
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
and creation_time &lt;= #{creationTime2}
</if>
<if test="validFlag != null" >
and valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="propertyValue != null" >
and property_value ${propertyValueOperator} #{propertyValue}
</if>
<if test="propertyType != null" >
and property_type ${propertyTypeOperator} #{propertyType}
</if>
<if test="standId != null" >
and stand_id ${standIdOperator} #{standId}
</if>
<if test="id != null" >
and id ${idOperator} #{id}
</if>
</trim>
</sql>
<!-- 插入记录 -->
<insert id="insert" parameterType="com.adc.da.slrs.sarBussStandVal.entity.SarBussStandVal" >
insert into SAR_BUSS_STAND_VAL(<include refid="Base_Column_List" />)
values (#{modifyTime, jdbcType=TIMESTAMP}, #{creationTime, jdbcType=TIMESTAMP}, #{validFlag, jdbcType=INTEGER}, #{propertyValue, jdbcType=VARCHAR}, #{propertyType, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR})
</insert>
<!-- 动态插入记录 主键是序列 -->
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarBussStandVal.entity.SarBussStandVal" >
insert into SAR_BUSS_STAND_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="propertyValue != null" >property_value,</if>
<if test="propertyType != null" >property_type,</if>
<if test="standId != null" >stand_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="propertyValue != null" >#{propertyValue, jdbcType=VARCHAR},</if>
<if test="propertyType != null" >#{propertyType, jdbcType=VARCHAR},</if>
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
</trim>
</insert>
<!-- SAR_BUSS_STAND_VAL 列表总数-->
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
select count(1) from SAR_BUSS_STAND_VAL
<include refid="Base_Where_Clause"/>
</select>
<!-- 查询SAR_BUSS_STAND_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_BUSS_STAND_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_BUSS_STAND_VAL
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
</select>
<delete id="deleteDataByStandId" parameterType="java.lang.String">
delete from SAR_BUSS_STAND_VAL
where stand_id = #{standId}
</delete>
<insert id="insertForeach" parameterType="java.util.List">
insert into SAR_BUSS_STAND_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.propertyValue, jdbcType=VARCHAR},
#{item.propertyType, jdbcType=VARCHAR},
#{item.standId, jdbcType=VARCHAR},
#{item.id, jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>