he2802 3 rokov pred
rodič
commit
d1cea53c24

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

@@ -301,6 +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,
+        (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,
         cgu.finish_status,
@@ -346,7 +347,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="studyCountMore != null and studyCountMore == 0 ">
             AND og.study_count = 0
         </if>
-        order by cgu.create_time desc
+        order by (select MAX(uu.create_time) FROM user_update uu where cgu.user_id = uu.user_id ) desc,cgu.id desc
     </select>
 
     <select id="listGradeInform" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeQueryBo" resultMap="ClassGradeUserListVo">

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -227,7 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             order_goods og
                 LEFT JOIN `order` o on og.order_sn = o.order_sn
         WHERE
-            o.user_id = #{userId} and og.grade_id = #{gradeId} and og.pay_status in (2,3)
+            o.user_id = #{userId} and og.grade_id = #{gradeId} and og.pay_status in (2,3) and og.refund_status !=2
     </select>
 
 </mapper>