|
@@ -1,6 +1,7 @@
|
|
|
package com.fs.store.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
@@ -11,6 +12,8 @@ import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ParseUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.dto.UserProjectDTO;
|
|
|
+import com.fs.course.domain.FsCourseWatchLog;
|
|
|
+import com.fs.course.service.IFsCourseWatchLogService;
|
|
|
import com.fs.store.domain.FsUser;
|
|
|
import com.fs.store.param.h5.FsUserPageListParam;
|
|
|
import com.fs.store.service.IFsUserCompanyUserService;
|
|
@@ -41,6 +44,9 @@ public class FsUserController extends BaseController
|
|
|
{
|
|
|
@Autowired
|
|
|
private IFsUserService fsUserService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsCourseWatchLogService fsCourseWatchLogService;
|
|
|
@Autowired
|
|
|
private IFsUserCompanyUserService userCompanyUserService;
|
|
|
|
|
@@ -67,6 +73,10 @@ public class FsUserController extends BaseController
|
|
|
List<FSUserVO> list = fsUserService.selectFsUserVOListByProject(fsUser);
|
|
|
for (FSUserVO vo : list){
|
|
|
vo.setPhone(ParseUtils.parsePhone(vo.getPhone()));
|
|
|
+ Long watchCourseCount = fsCourseWatchLogService.selectFsCourseWatchLogCount(vo.getUserId(),vo.getProjectId());
|
|
|
+ if (ObjectUtils.isNotEmpty(watchCourseCount)){
|
|
|
+ vo.setWatchCourseCount(watchCourseCount);
|
|
|
+ }
|
|
|
}
|
|
|
return getDataTable(list);
|
|
|
}
|
|
@@ -165,6 +175,9 @@ public class FsUserController extends BaseController
|
|
|
@DeleteMapping("/delete/{id}")
|
|
|
public AjaxResult delete(@PathVariable Long id)
|
|
|
{
|
|
|
+ if (ObjectUtils.isEmpty(id)){
|
|
|
+ return AjaxResult.error("没有关联项目,请直接去会员管理进行处理!");
|
|
|
+ }
|
|
|
return toAjax(userCompanyUserService.deleteFsUserCompanyUserById(id));
|
|
|
}
|
|
|
|