yonge 5 年之前
父节点
当前提交
00600b9619

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -29,6 +29,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
@@ -2729,6 +2730,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	}
 
 	@Override
+	@Async
 	public boolean updateHistoryTeacherSalaryOfOnline() {
 		// 查询所有含有线上课的课程组,线上课节数,实付金额
 		List<VipCourseStudentInfoDto> list = vipGroupDao.queryVipCourseStudentInfo();

+ 12 - 0
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleTeacherSalaryController.java

@@ -2,9 +2,12 @@ package com.ym.mec.web.controller;
 
 import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
 import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
+import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -18,6 +21,9 @@ public class CourseScheduleTeacherSalaryController extends BaseController {
 
     @Autowired
     private CourseScheduleTeacherSalaryService courseScheduleTeacherSalaryService;
+    
+    @Autowired
+    private VipGroupService vipGroupService;
 
     @ApiOperation(value = "分页查询教师薪酬列表")
     @GetMapping("/queryPage")
@@ -25,4 +31,10 @@ public class CourseScheduleTeacherSalaryController extends BaseController {
     public Object queryPage(CourseScheduleTeacherSalaryQueryInfo queryInfo) {
         return succeed(courseScheduleTeacherSalaryService.querySalaries(queryInfo));
     }
+    
+    @GetMapping("/updateHistoryTeacherSalaryOfOnline")
+    public Object updateHistoryTeacherSalaryOfOnline() {
+    	vipGroupService.updateHistoryTeacherSalaryOfOnline();
+        return succeed();
+    }
 }