Explorar o código

feat: 投诉接口

xdd hai 3 semanas
pai
achega
f4127e0858

+ 1 - 2
fs-service/src/main/java/com/fs/complaint/mapper/FsComplaintCategoryMapper.java

@@ -42,8 +42,7 @@ public interface FsComplaintCategoryMapper {
     /**
      * 更新分类信息
      */
-    @Update("UPDATE fs_complaint_category SET category_name = #{categoryName}, category_code = #{categoryCode}, " +
-            "sort_order = #{sortOrder}, status = #{status} WHERE id = #{id}")
+
     int update(FsComplaintCategory category);
 
     /**

+ 19 - 0
fs-service/src/main/resources/mapper/complaint/FsComplaintCategoryMapper.xml

@@ -18,6 +18,25 @@
         select id, category_name, category_code, sort_order, status, create_time, update_time
         from fs_complaint_category
     </sql>
+    <update id="update">
+        UPDATE fs_complaint_category
+        <set>
+            <if test="categoryName != null and categoryName != ''">
+                category_name = #{categoryName},
+            </if>
+            <if test="categoryCode != null and categoryCode != ''">
+                category_code = #{categoryCode},
+            </if>
+            <if test="sortOrder != null">
+                sort_order = #{sortOrder},
+            </if>
+            <if test="status != null and status != ''">
+                status = #{status},
+            </if>
+        </set>
+        WHERE id = #{id}
+    </update>
+
 
     <select id="selectFsComplaintCategoryListVO" parameterType="com.fs.complaint.param.FsComplaintCategoryParam" resultMap="FsComplaintCategoryListVOResult">
         <include refid="selectFsComplaintCategoryVo"/>