Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 years ago
parent
commit
2286f6f515

+ 16 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -1,19 +1,22 @@
 package com.ym.mec.biz.dal.dao;
 
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.ibatis.annotations.Param;
+
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.dto.Practice4ExercisesSituationDto;
 import com.ym.mec.biz.dal.dto.StudentAttendanceStatisticsResponse;
+import com.ym.mec.biz.dal.dto.StudentCourseTimesDto;
 import com.ym.mec.biz.dal.dto.VipGroupGiveCourseSortDto;
 import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.common.dal.BaseDAO;
-import org.apache.ibatis.annotations.Param;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
 
 public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseScheduleStudentPayment> {
 
@@ -249,4 +252,11 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
                                                                         @Param("sunday")String sunday);
 
     Integer findNoPracticeStudentTeacherId(@Param("studentId") Integer studentId);
+    
+    /**
+     * 从指定时间开始查询学的线上可数
+     * @param startDate 指定的开始时间
+     * @return
+     */
+    List<StudentCourseTimesDto> queryStudentCourseTimesOfOnline(Date startDate);
 }

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleTeacherSalaryDao.java

@@ -397,6 +397,15 @@ public interface CourseScheduleTeacherSalaryDao extends BaseDAO<Long, CourseSche
 											 @Param("month") String month);
 
 	/**
+	 * @describe 获取指定月份已结算的老师编号
+	 * @author Joburgess
+	 * @date 2020/4/16
+	 * @param month:
+	 * @return java.util.List<java.lang.Integer>
+	 */
+	List<Integer> findIsSettlementTeacherIdsWithMonth(@Param("month") String month);
+
+	/**
 	 * @describe 更新指定课酬的确认状态
 	 * @author Joburgess
 	 * @date 2020/4/15
@@ -408,6 +417,15 @@ public interface CourseScheduleTeacherSalaryDao extends BaseDAO<Long, CourseSche
                                          @Param("confirmStatus") TeacherSalaryConfirmStatus confirmStatus);
 
 	/**
+	 * @describe 更新指定课酬的确认状态至已完成
+	 * @author Joburgess
+	 * @date 2020/4/16
+	 * @param ids:
+	 * @return int
+	 */
+	int updateTeacherSalaryConfirmStatusToComplied(@Param("ids") List<Long> ids);
+
+	/**
 	 * @describe 统计教师指定月份不同团体类型的课酬
 	 * @author Joburgess
 	 * @date 2020/4/15

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java

@@ -14,4 +14,8 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
 
     List<SysUser> findStudents(Map<String, Object> params);
     int countStudents(Map<String, Object> params);
+    
+    List<Student> queryByOperatingTag(Integer operatingTag);
+    
+    int batchUpdate(List<Student> studentList);
 }

+ 54 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentCourseTimesDto.java

@@ -0,0 +1,54 @@
+package com.ym.mec.biz.dal.dto;
+
+public class StudentCourseTimesDto {
+
+	private Integer userId;
+	
+	private Integer totalCourseTimes;
+	
+	private Integer vipCourseTimes;
+	
+	private Integer practiceCourseTimes;
+	
+	private Integer freePracticeCourseTimes;
+
+	public Integer getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public Integer getTotalCourseTimes() {
+		return totalCourseTimes;
+	}
+
+	public void setTotalCourseTimes(Integer totalCourseTimes) {
+		this.totalCourseTimes = totalCourseTimes;
+	}
+
+	public Integer getVipCourseTimes() {
+		return vipCourseTimes;
+	}
+
+	public void setVipCourseTimes(Integer vipCourseTimes) {
+		this.vipCourseTimes = vipCourseTimes;
+	}
+
+	public Integer getPracticeCourseTimes() {
+		return practiceCourseTimes;
+	}
+
+	public void setPracticeCourseTimes(Integer practiceCourseTimes) {
+		this.practiceCourseTimes = practiceCourseTimes;
+	}
+
+	public Integer getFreePracticeCourseTimes() {
+		return freePracticeCourseTimes;
+	}
+
+	public void setFreePracticeCourseTimes(Integer freePracticeCourseTimes) {
+		this.freePracticeCourseTimes = freePracticeCourseTimes;
+	}
+}

+ 4 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherCourseSalaryDetail4WebDto.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.dal.dto;
 
 import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.biz.dal.enums.TeacherSalaryConfirmStatus;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 
 import java.math.BigDecimal;
@@ -48,7 +49,7 @@ public class TeacherCourseSalaryDetail4WebDto {
 
     private BigDecimal finalSalary;
 
-    private YesOrNoEnum confirmStatus;
+    private TeacherSalaryConfirmStatus confirmStatus;
 
     private String memo;
 
@@ -196,11 +197,11 @@ public class TeacherCourseSalaryDetail4WebDto {
         this.reduceSalary = reduceSalary;
     }
 
-    public YesOrNoEnum getConfirmStatus() {
+    public TeacherSalaryConfirmStatus getConfirmStatus() {
         return confirmStatus;
     }
 
-    public void setConfirmStatus(YesOrNoEnum confirmStatus) {
+    public void setConfirmStatus(TeacherSalaryConfirmStatus confirmStatus) {
         this.confirmStatus = confirmStatus;
     }
 

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java

@@ -135,7 +135,9 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     BACKSTAGE_STUDENT_APPLY_QUIT_COURSE("BACKSTAGE_STUDENT_APPLY_QUIT_COURSE", "学员申请退课"),
     BACKSTAGE_STUDENT_APPLY_WITHDRAW("BACKSTAGE_STUDENT_APPLY_WITHDRAW", "学员申请提现"),
     PUSH_STUDY_REPORT("PUSH_STUDY_REPORT", "陪练报告"),
-    NEED_POST_STUDY_REPORT("NEED_POST_STUDY_REPORT", "新增待填写月报");
+    NEED_POST_STUDY_REPORT("NEED_POST_STUDY_REPORT", "新增待填写月报"),
+
+    TEACHER_SALARY_CONFIRM_PUSH("TEACHER_SALARY_CONFIRM_PUSH", "课酬确认");
 
 
     MessageTypeEnum(String code, String msg) {

+ 7 - 7
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/TeacherSalaryConfirmStatus.java

@@ -6,22 +6,22 @@ import com.ym.mec.common.enums.BaseEnum;
  * @Author Joburgess
  * @Date 2020/4/16
  */
-public enum  TeacherSalaryConfirmStatus implements BaseEnum<String, TeacherSalaryConfirmStatus> {
-    UNCONFIRMED("1", "待确认"),
-    CONFIRMED("2", "已确认"),
-    COMPLETED("3", "已完成");
+public enum  TeacherSalaryConfirmStatus implements BaseEnum<Integer, TeacherSalaryConfirmStatus> {
+    UNCONFIRMED(1, "待确认"),
+    CONFIRMED(2, "已确认"),
+    COMPLETED(3, "已完成");
 
-    private String code;
+    private Integer code;
 
     private String desc;
 
-    private TeacherSalaryConfirmStatus(String code, String desc) {
+    private TeacherSalaryConfirmStatus(Integer code, String desc) {
         this.code = code;
         this.desc = desc;
     }
 
     @Override
-    public String getCode() {
+    public Integer getCode() {
         return code;
     }
 

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentService.java

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.service;
 
+import java.text.ParseException;
+
 import com.ym.mec.biz.dal.entity.Student;
 import com.ym.mec.biz.dal.page.StudentQueryInfo;
 import com.ym.mec.common.page.PageInfo;
@@ -11,4 +13,10 @@ public interface StudentService extends BaseService<Integer, Student> {
 
     Long upSet(Student student);
 
+    /**
+     * 更新学生运营指标
+     * @return
+     * @throws ParseException 
+     */
+    boolean updateOperatingTag() throws ParseException;
 }

+ 31 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -14,6 +14,7 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import org.slf4j.Logger;
@@ -75,6 +76,8 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
     private StudentAttendanceDao studentAttendanceDao;
     @Autowired
     private TeacherSalaryComplaintsDao teacherSalaryComplaintsDao;
+    @Autowired
+    private SysMessageService sysMessageService;
 
     private static final Logger LOGGER = LoggerFactory
             .getLogger(CourseScheduleTeacherSalaryServiceImpl.class);
@@ -830,6 +833,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void confirmTeacherMonthSalary(Integer teacherId, String month) {
         if(Objects.isNull(month)){
             month=DateUtil.dateToString(DateUtil.addMonths(new Date(), -1), "yyyy-MM");
@@ -882,7 +886,8 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
         }
         result.put("stat", teacherGroupTypeSalary);
         if(!CollectionUtils.isEmpty(pageInfo.getRows())){
-            if(YesOrNoEnum.YES.equals(pageInfo.getRows().get(0).getConfirmStatus())){
+            if(TeacherSalaryConfirmStatus.CONFIRMED.equals(pageInfo.getRows().get(0).getConfirmStatus())||
+                    TeacherSalaryConfirmStatus.COMPLETED.equals(pageInfo.getRows().get(0).getConfirmStatus())){
                 result.put("confirmStatus",1);
             }else{
                 result.put("confirmStatus",0);
@@ -919,12 +924,35 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void openSalaryConfirm(String month) {
-
+        if(Objects.isNull(month)){
+            month=DateUtil.dateToString(DateUtil.addMonths(new Date(), -1), "yyyy-MM");
+        }
+        int i = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(month);
+        if(i>0){
+            throw new BizException("课酬确认已开启");
+        }
+        List<Long> teacherSalaryIds = courseScheduleTeacherSalaryDao.findTeacherSalaryIdsWithMonth(null, month);
+        if(CollectionUtils.isEmpty(teacherSalaryIds)){
+            return;
+        }
+        courseScheduleTeacherSalaryDao.updateTeacherSalaryConfirmStatus(teacherSalaryIds,TeacherSalaryConfirmStatus.UNCONFIRMED);
+        String notifyUrl="8?http://mteadev.dayaedu.com/#/remuneration?month=" + month;
+        String monthStr = DateUtil.dateToString(DateUtil.stringToDate(month, "yyyy-MM"),"yyyy年MM月");
+        List<Integer> teacherIds = courseScheduleTeacherSalaryDao.findIsSettlementTeacherIdsWithMonth(month);
+        Map<Integer, String> userMap = teacherIds.stream().collect(Collectors.toMap(Integer::valueOf, id->String.valueOf(id)));
+        sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.TEACHER_SALARY_CONFIRM_PUSH,
+                userMap, null, 0, notifyUrl, "TEACHER", monthStr);
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void closeSalaryConfirm(String month) {
-
+        List<Long> teacherSalaryIds = courseScheduleTeacherSalaryDao.findTeacherSalaryIdsWithMonth(null, month);
+        if(CollectionUtils.isEmpty(teacherSalaryIds)){
+            return;
+        }
+        courseScheduleTeacherSalaryDao.updateTeacherSalaryConfirmStatusToComplied(teacherSalaryIds);
     }
 }

+ 46 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServiceImpl.java

@@ -1,6 +1,21 @@
 package com.ym.mec.biz.service.impl;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
 import com.ym.mec.biz.dal.dao.StudentDao;
+import com.ym.mec.biz.dal.dto.StudentCourseTimesDto;
 import com.ym.mec.biz.dal.entity.Student;
 import com.ym.mec.biz.dal.page.StudentQueryInfo;
 import com.ym.mec.biz.service.StudentService;
@@ -8,17 +23,15 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.collection.MapUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
 
 @Service
 public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implements StudentService {
 
 	@Autowired
 	private StudentDao studentDao;
+	
+	@Autowired
+	private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
 
 	@Override
 	public BaseDAO<Integer, Student> getDAO() {
@@ -56,4 +69,32 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 			return student.getUserId().longValue();
 		}
 	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public boolean updateOperatingTag() throws ParseException {
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+		Date date = sdf.parse("2020-02-08");
+		List<StudentCourseTimesDto> studentCourseTimesDtoList = courseScheduleStudentPaymentDao.queryStudentCourseTimesOfOnline(date);
+		Map<Integer,StudentCourseTimesDto> map = studentCourseTimesDtoList.stream().collect(Collectors.toMap(StudentCourseTimesDto::getUserId, s -> s));
+		//查询服务指标为0的用户
+		List<Student> studentList = studentDao.queryByOperatingTag(0);
+		
+		List<Student> updateStudentList = new ArrayList<Student>();
+		StudentCourseTimesDto dto = null;
+		for(Student s : studentList){
+			dto = map.get(s.getUpdateTime());
+			if(dto != null){
+				if(dto.getTotalCourseTimes() != dto.getFreePracticeCourseTimes()){
+					updateStudentList.add(s);
+				}
+			}
+		}
+		
+		if(updateStudentList.size() > 0){
+			studentDao.batchUpdate(updateStudentList);
+		}
+		
+		return true;
+	}
 }

+ 18 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -20,6 +20,14 @@
 		<result column="class_group_id_" property="classGroupId" />
 	</resultMap>
 	
+	<resultMap type="com.ym.mec.biz.dal.dto.StudentCourseTimesDto" id="studentCourseTimesDto">
+		<result column="user_id_" property="userId" />
+        <result column="totalTimes" property="totalCourseTimes"/>
+		<result column="vipTimes" property="vipCourseTimes" />
+		<result column="practiceTmes" property="practiceCourseTimes" />
+		<result column="freePracticeTimes" property="freePracticeCourseTimes" />
+	</resultMap>
+	
 	<!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="CourseScheduleStudentPayment" >
 		SELECT * FROM course_schedule_student_payment WHERE id_ = #{id} 
@@ -373,4 +381,14 @@
 	<delete id="deleteByGroup">
 		DELETE FROM course_schedule_student_payment WHERE music_group_id_=#{groupId} AND group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 	</delete>
+	
+	<select id="queryStudentCourseTimesOfOnline" resultMap="studentCourseTimesDto">
+		SELECT cssp.`user_id_`,count(*) totalTimes, 
+		sum(case when (pg.buy_months_ > 0) then 1 ELSE 0 END) practiceTmes,
+		sum(case when (pg.buy_months_ IS NULL AND cssp.`group_type_` = 'PRACTICE' ) then 1 ELSE 0 END) freePracticeTimes
+		FROM course_schedule_student_payment cssp LEFT JOIN course_schedule cs on cssp.course_schedule_id_ = cs.id_
+		LEFT JOIN practice_group pg ON pg.id_ = cs.music_group_id_ AND cs.group_type_ = 'PRACTICE'
+		WHERE cs.`teach_mode_` = 'ONLINE' AND cs.`class_date_` &gt;= #{startDate}
+		GROUP BY cssp.`user_id_`
+	</select>
 </mapper>

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

@@ -455,6 +455,14 @@
 			#{id}
 		</foreach>
 	</update>
+	<update id="updateTeacherSalaryConfirmStatusToComplied">
+		UPDATE course_schedule_teacher_salary SET confirm_status_=3
+		WHERE confirm_status_!=2
+		AND id_ IN
+		<foreach collection="ids" item="id" open="(" close=")" separator=",">
+			#{id}
+		</foreach>
+	</update>
 
 	<select id="findCourseScheduleTeacherSalaryByMusicGroupId" resultMap="CourseScheduleTeacherSalary">
 		SELECT * FROM course_schedule_teacher_salary WHERE music_group_id_=#{musicGroupId} AND group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
@@ -763,7 +771,7 @@
 				AND ta.sign_out_status_=#{signOutStatus}
 			</if>
 			<if test="confirmStatus!=null">
-				AND csts.reduce_salary=#{confirmStatus}
+				AND csts.reduce_salary=#{confirmStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
 			<if test="groupName!=null">
 				AND cs.name_ LIKE CONCAT('%', #{groupName}, '%')
@@ -875,9 +883,22 @@
 		WHERE
 			( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
 			AND csts.settlement_time_ IS NOT NULL
-			AND csts.user_id_ = #{teacherId}
+			<if test="teacherId!=null">
+				AND csts.user_id_ = #{teacherId}
+			</if>
 			AND DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
 	</select>
+    <select id="findIsSettlementTeacherIdsWithMonth" resultType="int">
+        SELECT
+          DISTINCT csts.user_id_
+        FROM
+        course_schedule_teacher_salary csts
+        LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
+        WHERE
+        ( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
+        AND csts.settlement_time_ IS NOT NULL
+        AND DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
+    </select>
 
 	<select id="countOpenConfirmSalarysWithMonth" resultType="int">
 		SELECT

+ 28 - 0
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -105,4 +105,32 @@
 			AND FIND_IN_SET("STUDENT", user_type_)
 		</where>
 	</sql>
+	
+	<select id="queryByOperatingTag" resultMap="Student">
+		SELECT * FROM student WHERE operating_tag_ = #{operatingTag}
+	</select>
+	
+	<update id="batchUpdate" parameterType="java.util.List">
+    	<foreach collection="studentList" item="item" index="index" open="" close="" separator=";">
+			UPDATE student
+			<set>
+				<if test="item.subjectIdList != null">
+					subject_id_list_ = #{item.subjectIdList},
+				</if>
+				<if test="item.serviceTag != null">
+					service_tag_ = #{item.serviceTag},
+				</if>
+				<if test="item.operatingTag != null">
+					operating_tag_ = #{item.operatingTag},
+				</if>
+				<if test="item.updateTime != null">
+					update_time_ = #{item.updateTime},
+				</if>
+				<if test="item.updateTime == null">
+					update_time_ = NOW()
+				</if>
+			</set>
+			WHERE user_id_ = #{item.userId}
+        </foreach>
+	</update>
 </mapper>

+ 4 - 0
mec-client-api/src/main/java/com/ym/mec/task/TaskRemoteService.java

@@ -105,4 +105,8 @@ public interface TaskRemoteService {
 
 	@GetMapping("task/exercisesSituationStatistics")
 	void exercisesSituationStatistics();
+
+	//更新学生运营指标
+	@GetMapping("task/updateStudentOperatingTag")
+	void updateStudentOperatingTag();
 }

+ 5 - 0
mec-client-api/src/main/java/com/ym/mec/task/fallback/TaskRemoteServiceFallback.java

@@ -135,4 +135,9 @@ public class TaskRemoteServiceFallback implements TaskRemoteService {
 	public void exercisesSituationStatistics() {
 		logger.info("学员服务信息统计失败");
 	}
+
+	@Override
+	public void updateStudentOperatingTag() {
+		logger.info("更新学生运营指标失败");
+	}
 }

+ 20 - 0
mec-task/src/main/java/com/ym/mec/task/jobs/UpdateStudentOperatingTagTask.java

@@ -0,0 +1,20 @@
+package com.ym.mec.task.jobs;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.task.TaskRemoteService;
+import com.ym.mec.task.core.BaseTask;
+import com.ym.mec.task.core.TaskException;
+
+@Service
+public class UpdateStudentOperatingTagTask extends BaseTask {
+
+	@Autowired
+	private TaskRemoteService taskRemoteService;
+
+	@Override
+	public void execute() throws TaskException {
+		taskRemoteService.updateStudentOperatingTag();
+	}
+}

+ 11 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -2,11 +2,13 @@ package com.ym.mec.web.controller;
 
 import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.text.ParseException;
 import java.util.Date;
 
 @RequestMapping("task")
@@ -57,6 +59,9 @@ public class TaskController extends BaseController {
 
 	@Autowired
 	private ExtracurricularExercisesReplyService extracurricularExercisesReplyService;
+	
+	@Autowired
+	private StudentService studentService;
 
 	@GetMapping("/refreshPaymentFeeStatus")
 	// 刷新付费状态
@@ -213,4 +218,10 @@ public class TaskController extends BaseController {
 	public void exercisesSituationStatistics(){
 		extracurricularExercisesReplyService.exercisesSituationStatistics();
 	}
+
+	//更新学生运营指标
+	@GetMapping("/updateStudentOperatingTag")
+	public void updateStudentOperatingTag() throws ParseException{
+		studentService.updateOperatingTag();
+	}
 }