From 47a751cb301d05276ae5d75145d57b2d090fe4e1 Mon Sep 17 00:00:00 2001 From: kongzy <kongzy> Date: 星期一, 01 七月 2024 10:58:35 +0800 Subject: [PATCH] change --- src/main/java/com/nanometer/smartlab/dao/EncodeReplaceDictMapper.xml | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/dao/EncodeReplaceDictMapper.xml b/src/main/java/com/nanometer/smartlab/dao/EncodeReplaceDictMapper.xml index 56dc56b..9399194 100644 --- a/src/main/java/com/nanometer/smartlab/dao/EncodeReplaceDictMapper.xml +++ b/src/main/java/com/nanometer/smartlab/dao/EncodeReplaceDictMapper.xml @@ -44,10 +44,14 @@ and number = #{p_number} </if> <if test="type != null"> - and type = #{type,} + and type = #{type} </if> </where> + order by update_time desc + <if test="first != null and pageSize != null"> + limit #{first},#{pageSize} + </if> </select> <select id="countAll" resultType="java.lang.Integer"> select count(1) @@ -87,12 +91,12 @@ update sys_encode_replace_dict set valid_flag = 0 where id = #{id,jdbcType=BIGINT} </update> - <insert id="insert" parameterType="com.nanometer.smartlab.entity.EncodeReplaceDict" > + <insert id="insert" parameterType="com.nanometer.smartlab.entity.EncodeReplaceDict" useGeneratedKeys = "true" keyProperty = "id"> <!-- --> - insert into sys_encode_replace_dict (id, type, number, + insert into sys_encode_replace_dict (type, number, info, abbreviation, creator, update_time, valid_flag) - values (#{id,jdbcType=BIGINT}, #{type}, #{number,jdbcType=VARCHAR}, + values (#{type}, #{number,jdbcType=VARCHAR}, #{info,jdbcType=VARCHAR}, #{abbreviation,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 1) </insert> @@ -100,9 +104,6 @@ <!-- --> insert into sys_encode_replace_dict <trim prefix="(" suffix=")" suffixOverrides="," > - <if test="id != null" > - id, - </if> <if test="type != null" > type, </if> @@ -126,9 +127,6 @@ </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > - <if test="id != null" > - #{id,jdbcType=BIGINT}, - </if> <if test="type != null" > #{type}, </if> -- Gitblit v1.9.2