|
@@ -10,9 +10,11 @@ import com.ym.mec.biz.dal.entity.OperatingReport;
|
|
|
import com.ym.mec.biz.dal.entity.OperatingReportCloud;
|
|
|
import com.ym.mec.biz.dal.entity.TenantInfo;
|
|
|
import com.ym.mec.biz.dal.enums.IndexDataType;
|
|
|
+import com.ym.mec.biz.dal.page.StudentOperatingQueryInfo;
|
|
|
import com.ym.mec.biz.event.source.CourseEventSource;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.redis.service.RedisCache;
|
|
|
import com.ym.mec.common.tenant.TenantContextHolder;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
@@ -125,7 +127,7 @@ public class TaskController extends BaseController {
|
|
|
@Autowired
|
|
|
private StudentPreVisitService studentPreVisitService;
|
|
|
@Autowired
|
|
|
- private StudentDao studentDao;
|
|
|
+ private StudentManageService studentManageService;
|
|
|
@Autowired
|
|
|
private OperatingReportNewService operatingReportNewService;
|
|
|
|
|
@@ -620,10 +622,22 @@ public class TaskController extends BaseController {
|
|
|
@ApiOperation("每月1日0点-根据service_tag_查询所有数据,并添加待回访表中")
|
|
|
@GetMapping(value = "/findAllWaitVisit")
|
|
|
public void findAllWaitVisit(){
|
|
|
- Integer tenantId = TenantContextHolder.getTenantId();
|
|
|
- //查出所有在运营的学员
|
|
|
- List<Student4operating> operatingStudents = studentDao.getOperatingStudents(new HashMap<>());
|
|
|
- studentPreVisitService.batchInsert(operatingStudents);
|
|
|
+ List<TenantInfo> tenantInfos = tenantInfoService.list(new QueryWrapper<TenantInfo>().eq("state_",1));
|
|
|
+ List<Student4operating> student4operatingList = new ArrayList<>();
|
|
|
+ List<Integer> tenantIds = new ArrayList<>();
|
|
|
+ for (TenantInfo tenantInfo : tenantInfos) {
|
|
|
+ Integer id = tenantInfo.getId();
|
|
|
+ StudentOperatingQueryInfo queryInfo =new StudentOperatingQueryInfo();
|
|
|
+ queryInfo.setOperatingTag(1);
|
|
|
+ queryInfo.setTenantId(id);
|
|
|
+ PageInfo<Student4operating> operatingStudents = studentManageService.getOperatingStudents(queryInfo);
|
|
|
+ List<Student4operating> list = operatingStudents.getRows();
|
|
|
+ student4operatingList.addAll(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(student4operatingList !=null && student4operatingList.size()>0) {
|
|
|
+ studentPreVisitService.batchInsert(student4operatingList);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|