瀏覽代碼

fix(mapper): 移除冗余排序逻辑并删除无用字段

- 删除 FsUserCourseMapper 中冗余的排序条件判断逻辑
- 从 SopUserLogsMapper 查询语句中移除_id actual_qw_user 字段
- 简化 SQL 查询结构,提升可读性和维护性
xw 3 周之前
父節點
當前提交
802ce998dd

+ 0 - 10
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseMapper.java

@@ -157,17 +157,7 @@ public interface FsUserCourseMapper
             "<if test ='maps.companyIdsList != null and maps.companyIdsList.length !=0 '> " +
             " and <foreach collection='maps.companyIdsList'  item='item' index='index'  open='( 1=2 ' separator='' close=')'> or find_in_set(  #{item} , REGEXP_REPLACE ( c.company_ids, '[\"\\\\[\\\\]]', '' ) )  </foreach> " +
             "</if> " +
-            "<choose>"+
-            "<when test = 'maps.sorting!=null and maps.sorting==1 '> " +
-            "order by c.course_id asc"+
-            "</when>"+
-            "<when test = 'maps.sorting!=null and maps.sorting==2 '> " +
-            "order by c.course_id desc"+
-            "</when>"+
-            "<otherwise>"+
             " order by c.sort, c.course_id  "+
-            "</otherwise>"+
-            "</choose>"+
             "</script>"})
     List<FsUserCourseListPVO> selectFsUserCourseListPVO(@Param("maps") FsUserCourse param);
 

+ 0 - 2
fs-service/src/main/java/com/fs/sop/mapper/SopUserLogsMapper.java

@@ -195,7 +195,6 @@ public interface SopUserLogsMapper {
             "            l.sop_id,\n" +
             "            l.sop_temp_id,\n" +
             "            l.qw_user_id,\n" +
-            "            l.actual_qw_user_id,\n" +
             "            l.chat_id,\n" +
             "            l.corp_id,\n" +
             "            l.start_time,\n" +
@@ -292,7 +291,6 @@ public interface SopUserLogsMapper {
         "            l.sop_id,\n" +
         "            l.sop_temp_id,\n" +
         "            l.qw_user_id,\n" +
-        "            l.actual_qw_user_id,\n" +
         "            l.corp_id,\n" +
         "            l.chat_id,\n" +
         "            l.start_time,\n" +