Browse Source

fix 排序

he2802 3 years ago
parent
commit
6ac29c5dd0

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -301,7 +301,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cgu.grade_id,
         u.telphone,
         (case WHEN (select COUNT(uu.id) FROM user_update uu where cgu.user_id = uu.user_id and uu.status = 2) >0 then 1 ELSE 0 end) as user_status,
-        (case WHEN (select MAX(uu.create_time) FROM user_update uu where cgu.user_id = uu.user_id) > cgu.official_status_time then 1 ELSE 0 end) as user_info_status,
+        (case WHEN cgu.official_status_time >  (select MAX(uu.create_time) FROM user_update uu where cgu.user_id = uu.user_id) then 0 ELSE 1 end) as user_info_status,
         (select MAX(uu.create_time) FROM user_update uu where cgu.user_id = uu.user_id ) as update_info_time,
         (SELECT g.class_hours FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.grade_id = cgg.grade_id) as class_hours,
         cgu.period_status,