From 93c9717bb5bba8230b7d168abf446159f20e432c Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 25 六月 2026 15:13:37 +0800
Subject: [PATCH] 【省立同德】新增或修改指标选项库 增加排序功能

---
 smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
index 91884b1..5d92cd8 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
@@ -37,6 +37,7 @@
         <result property="picturePath" column="picture_path"/>
         <result property="prompt" column="prompt"/>
         <result property="isEnd" column="is_end"/>
+        <result property="sortid" column="sortid"/>
     </resultMap>
 
     <sql id="selectIvrLibaTargetoptionVo">
@@ -54,15 +55,15 @@
                nodynamiccruxs,
                orderno,
                dynamiccruxs,
-               optiondesc, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
+               optiondesc, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, sortid
         from ivr_liba_targetoption
     </sql>
 
     <select id="selectIvrLibaTargetoptionList" parameterType="com.smartor.domain.IvrLibaTargetoption"
             resultMap="IvrLibaTargetoptionResult">
         <include refid="selectIvrLibaTargetoptionVo"/>
-        <where>
-            del_flag != 1
+        where 1=1
+            and del_flag != 1
             <if test="targetid != null ">and targetid = #{targetid}</if>
             <if test="targettype != null  and targettype != ''">and targettype = #{targettype}</if>
             <if test="categoryName != null  and categoryName != ''">and categoryName like concat('%', #{categoryName},
@@ -90,8 +91,8 @@
             <if test="appenddesc != null">and appenddesc = #{appenddesc}</if>
             <if test="picturePath != null">and picture_path = #{picturePath}</if>
             <if test="isEnd != null ">and is_end = #{isEnd}</if>
-        </where>
-        order by guid asc
+            <if test="sortid != null  and sortid != ''">and sortid = #{sortid}</if>
+        order by guid asc, sortid asc
     </select>
 
     <select id="selectIvrLibaTargetoptionByTargetoptionid" parameterType="Long" resultMap="IvrLibaTargetoptionResult">
@@ -133,6 +134,7 @@
             <if test="appenddesc != null">appenddesc,</if>
             <if test="picturePath != null">picture_path,</if>
             <if test="isEnd != null ">is_end,</if>
+            <if test="sortid != null and sortid != ''">sortid,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="targetid != null">#{targetid},</if>
@@ -165,6 +167,7 @@
             <if test="appenddesc != null">#{appenddesc},</if>
             <if test="picturePath != null">#{picturePath},</if>
             <if test="isEnd != null ">#{isEnd},</if>
+            <if test="sortid != null and sortid != ''">#{sortid},</if>
         </trim>
     </insert>
 
@@ -201,6 +204,7 @@
             <if test="appenddesc != null">appenddesc = #{appenddesc},</if>
             <if test="picturePath != null">picture_path = #{picturePath},</if>
             <if test="isEnd != null ">is_end = #{isEnd},</if>
+            <if test="sortid != null and sortid != ''">sortid = #{sortid},</if>
         </trim>
         where targetoptionid = #{targetoptionid}
     </update>

--
Gitblit v1.9.3