浏览代码

学生评价列表导出增加学生评分

周箭河 5 年之前
父节点
当前提交
7810053d32

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleEvaluateDao.java

@@ -99,7 +99,7 @@ public interface CourseScheduleEvaluateDao extends BaseDAO<Long, CourseScheduleE
      * @param type
      * @return
      */
-    List<PracticeGroupsDto> getMonthOrganMoney(@Param("type") OrderTypeEnum type);
+    List<PracticeGroupsDto> getMonthOrganMoney(@Param("type") OrderTypeEnum type,@Param("startTime") Date startTime);
 
     /**
      * 获取当月新成交金额,人数

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/CourseScheduleEvaluateMapper.xml

@@ -277,8 +277,8 @@
         SELECT SUM(actual_amount_) total_money_, count(distinct user_id_) buy_nums_, organ_id_
         FROM student_payment_order
         WHERE type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+          AND create_time_ >= #{startTime}
           AND status_ = 'SUCCESS'
-          AND DATE_FORMAT(create_time_, '%Y%m') = DATE_FORMAT(now(), '%Y%m')
         GROUP BY organ_id_
     </select>
 
@@ -294,7 +294,7 @@
         AND group_status_ != 'CANCEL'
         AND buy_months_ >= 1
         <if test="type==@com.ym.mec.biz.dal.enums.OrderTypeEnum@PRACTICE_GROUP_BUY">
-        <![CDATA[ AND be_renew_group_id_ IS NULL AND create_time_ < #{startTime} ]]>
+            <![CDATA[ AND be_renew_group_id_ IS NULL AND create_time_ < #{startTime} ]]>
         </if>
         <if test="type==@com.ym.mec.biz.dal.enums.OrderTypeEnum@PRACTICE_GROUP_RENEW">
             <![CDATA[ AND be_renew_group_id_ >= 1 AND create_time_ < #{startTime} ]]>

+ 5 - 3
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -364,10 +364,12 @@ public class StudentOrderController extends BaseController {
         List<PracticeGroupsDto> practiceGroupsFrees = courseScheduleEvaluateDao.getPracticeGroupsFree();
         List<PracticeGroupsDto> practiceGroupsBuys = courseScheduleEvaluateDao.getPracticeGroupsBuy();
         List<PracticeGroupsDto> practiceGroupsRenews = courseScheduleEvaluateDao.getPracticeGroupsRenew();
-        List<PracticeGroupsDto> monthOrganBuyMoneys = courseScheduleEvaluateDao.getMonthOrganMoney(OrderTypeEnum.PRACTICE_GROUP_BUY);
-        List<PracticeGroupsDto> monthOrganRenewMoneys = courseScheduleEvaluateDao.getMonthOrganMoney(OrderTypeEnum.PRACTICE_GROUP_RENEW);
 
-        //Date startTime = DateUtil.getFirstDayOfMonth(new Date());
+        Date startTime = DateUtil.getFirstDayOfMonth(new Date());
+
+        List<PracticeGroupsDto> monthOrganBuyMoneys = courseScheduleEvaluateDao.getMonthOrganMoney(OrderTypeEnum.PRACTICE_GROUP_BUY,startTime);
+        List<PracticeGroupsDto> monthOrganRenewMoneys = courseScheduleEvaluateDao.getMonthOrganMoney(OrderTypeEnum.PRACTICE_GROUP_RENEW,startTime);
+
         //List<PracticeGroupsDto> monthOrganBuyMoneys = courseScheduleEvaluateDao.getOrganNewPracticeGroupsOfMonth(OrderTypeEnum.PRACTICE_GROUP_BUY,startTime);
         //List<PracticeGroupsDto> monthOrganRenewMoneys = courseScheduleEvaluateDao.getOrganNewPracticeGroupsOfMonth(OrderTypeEnum.PRACTICE_GROUP_RENEW,startTime);