Explorar el Código

修复赛事相关bug

zhangxin hace 1 día
padre
commit
8a7e3425e7

+ 1 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/dto/evaluate/FindEvaluatePage.java

@@ -19,6 +19,7 @@ public class FindEvaluatePage<T> {
     private List<T> records;     // 当前页数据
     private BigDecimal averageScore; // 平均评分
     private Long scoreNum; // 评价人数
+    private BigDecimal applauseRate; // 好评率
 
     // 从 IPage 构建
     public static <T> FindEvaluatePage<T> build(IPage<T> page, BigDecimal averageScore,Long scoreNum) {

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/CoachServiceImpl.java

@@ -94,7 +94,7 @@ public class CoachServiceImpl implements ICoachService {
         }
         Long  teachingCount=0L;
         Long  orderNumCount=0L;
-        List<String> byInstructorId = appCoursesMapper.findByInstructorId(appCoachDetailsVO.getId());
+        List<String> byInstructorId = appCoursesMapper.findByInstructorId(appCoachDetailsVO.getUserId());
         //缺少授课人数和订单数,评价
         if (byInstructorId!=null&&!byInstructorId.isEmpty()){
             teachingCount=   appOrderMapper.findByTeachingCount(byInstructorId);

+ 3 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppOrderMapper.xml

@@ -48,12 +48,12 @@
     <select id="findByNewOrderInfo" resultType="org.jeecg.modules.app.vo.game.GameOrderVo">
         select b.avatar,b.username  from nm_order a
         left join  sys_user b on a.user_id = b.id
-        where product_ids in
+        where a.product_ids in
         <foreach collection="productIds" item="productId" open="(" separator="," close=")">
             #{productId}
         </foreach>
-        and `type`=#{type} and order_status in (1,2,3)
-        order by pay_time desc
+        and a.`type`=#{orderType} and a.order_status in (1,2,3)
+        order by a.pay_time desc
         limit 20
     </select>
     <select id="findByTeachingCount" resultType="java.lang.Long">

+ 10 - 10
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/EvaluateMapper.xml

@@ -9,7 +9,7 @@
         left join  sys_depart sd on  ne.dept_id = sd.id
         LEFT JOIN nm_site ns on  ne.site_id =ns.id
         LEFT JOIN sys_user su on  ne.user_id =su.id
-        where 1=1
+        where 1=1  AND ne.check_status = 1
         <if test="findEvaluateRequestDTO!=null and findEvaluateRequestDTO!=''">
             <if test="findEvaluateRequestDTO.orgCode!=null and findEvaluateRequestDTO.orgCode!=''">
                 and ne.org_code like CONCAT('',#{findEvaluateRequestDTO.orgCode},'%')
@@ -20,9 +20,9 @@
         <if test="findEvaluateRequestDTO.score!=null">
             AND ne.score = #{findEvaluateRequestDTO.score}
         </if>
-        <if test="findEvaluateRequestDTO.checkStatus!=null">
-            AND ne.check_status = #{findEvaluateRequestDTO.checkStatus}
-        </if>
+<!--        <if test="findEvaluateRequestDTO.checkStatus!=null">-->
+<!--            AND ne.check_status = #{findEvaluateRequestDTO.checkStatus}-->
+<!--        </if>-->
         <if test="findEvaluateRequestDTO.replyStatus!=null">
             AND ne.reply_status = #{findEvaluateRequestDTO.replyStatus}
         </if>
@@ -42,7 +42,7 @@
         left join  sys_depart sd on  ne.dept_id = sd.id
         LEFT JOIN nm_site ns on  ne.site_id =ns.id
         LEFT JOIN sys_user su on  ne.user_id =su.id
-        where 1=1 and ne.site_id =#{siteId}
+        where 1=1 and ne.check_status=1 and ne.site_id =#{siteId}
 
 
     </select>
@@ -54,7 +54,7 @@
         left join  sys_depart sd on  ne.dept_id = sd.id
         LEFT JOIN sys_user su on  ne.user_id =su.id
         left join  nm_order o on ne.order_id = o.id
-        where o.product_ids in
+        where  ne.check_status=1 and o.product_ids in
         <foreach collection="coursesIds" item="coursesId" open="(" separator="," close=")">
             #{coursesId}
         </foreach>
@@ -68,7 +68,7 @@
                  left join  sys_depart sd on  ne.dept_id = sd.id
                  LEFT JOIN nm_site ns on  ne.site_id =ns.id
                  LEFT JOIN sys_user su on  ne.user_id =su.id
-        where 1=1 and ne.site_id =#{siteId}
+        where 1=1 and  ne.check_status=1 and  ne.site_id =#{siteId}
     </select>
     <select id="findByScoreNum" resultType="java.lang.Long">
         select count(1)
@@ -76,7 +76,7 @@
                  left join  sys_depart sd on  ne.dept_id = sd.id
                  LEFT JOIN nm_site ns on  ne.site_id =ns.id
                  LEFT JOIN sys_user su on  ne.user_id =su.id
-        where 1=1 and ne.site_id =#{siteId}
+        where 1=1 and  ne.check_status=1 and  ne.site_id =#{siteId}
     </select>
     <select id="findByAverageScoreByCoursesId" resultType="java.lang.Long">
         select sum(ne.score)
@@ -84,7 +84,7 @@
         left join  sys_depart sd on  ne.dept_id = sd.id
         LEFT JOIN sys_user su on  ne.user_id =su.id
         left join  nm_order o on ne.order_id = o.id
-        where o.product_ids in
+        where  ne.check_status=1 and  o.product_ids in
         <foreach collection="coursesIds" item="coursesId" open="(" separator="," close=")">
             #{coursesId}
         </foreach>
@@ -95,7 +95,7 @@
         left join  sys_depart sd on  ne.dept_id = sd.id
         LEFT JOIN sys_user su on  ne.user_id =su.id
         left join  nm_order o on ne.order_id = o.id
-        where o.product_ids in
+        where  ne.check_status=1 and  o.product_ids in
         <foreach collection="coursesIds" item="coursesId" open="(" separator="," close=")">
             #{coursesId}
         </foreach>