|
@@ -22,6 +22,7 @@ import com.fs.company.param.CompanyUserCodeParam;
|
|
|
import com.fs.company.param.CompanyUserQwParam;
|
|
|
import com.fs.company.service.*;
|
|
|
import com.fs.company.utils.DomainUtil;
|
|
|
+import com.fs.company.utils.QwStatusEnum;
|
|
|
import com.fs.company.vo.BatchUserRolesVO;
|
|
|
import com.fs.company.vo.CompanyUserImportVO;
|
|
|
import com.fs.company.vo.CompanyUserQwListVO;
|
|
@@ -36,6 +37,7 @@ import com.fs.hisStore.vo.FsStoreProductExportVO;
|
|
|
import com.fs.im.service.OpenIMService;
|
|
|
import com.fs.qw.domain.QwCompany;
|
|
|
import com.fs.qw.service.IQwCompanyService;
|
|
|
+import com.fs.qw.service.IQwUserService;
|
|
|
import com.fs.qw.vo.CompanyUserQwVO;
|
|
|
import com.fs.qw.vo.QwUserVO;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
@@ -60,13 +62,10 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 用户信息
|
|
|
- *
|
|
|
-
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/company/user")
|
|
|
-public class CompanyUserController extends BaseController
|
|
|
-{
|
|
|
+public class CompanyUserController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private ICompanyRoleService roleService;
|
|
@@ -79,19 +78,28 @@ public class CompanyUserController extends BaseController
|
|
|
|
|
|
@Autowired
|
|
|
private ICompanyUserService companyUserService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ICompanyService companyService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ICompanyUserDelayTimeService companyUserDelayTimeService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
+
|
|
|
@Autowired
|
|
|
private OpenIMService openIMService;
|
|
|
+
|
|
|
@Autowired
|
|
|
IQwCompanyService iQwCompanyService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IQwUserService qwUserService;
|
|
|
+
|
|
|
private static final String appLink = "https://jump.ylrztop.com/jumpapp/pages/index/index?link=";
|
|
|
|
|
|
/**
|
|
@@ -125,24 +133,34 @@ public class CompanyUserController extends BaseController
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
@GetMapping("/qwList")
|
|
|
- public TableDataInfo qwList(CompanyUserQwParam user)
|
|
|
- {
|
|
|
+ public TableDataInfo qwList(CompanyUserQwParam user) {
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
user.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
startPage();
|
|
|
List<CompanyUserQwListVO> list = companyUserService.selectCompanyUserQwListVO(user);
|
|
|
for (CompanyUserQwListVO companyUserQwListVO : list) {
|
|
|
- CompanyUserDelayTime companyUserDelayTime = companyUserDelayTimeService.selectCompanyUserDelayTimeByCompanyUser(companyUserQwListVO.getCompanyId(),companyUserQwListVO.getUserId());
|
|
|
- if (ObjectUtil.isEmpty(companyUserDelayTime)){
|
|
|
+ CompanyUserDelayTime companyUserDelayTime = companyUserDelayTimeService.selectCompanyUserDelayTimeByCompanyUser(companyUserQwListVO.getCompanyId(), companyUserQwListVO.getUserId());
|
|
|
+ if (ObjectUtil.isEmpty(companyUserDelayTime)) {
|
|
|
String json = configService.selectConfigByKey("course.config");
|
|
|
CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
companyUserQwListVO.setSendDelayTime(config.getSendDelayTime());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
companyUserQwListVO.setSendDelayTime(companyUserDelayTime.getSendDelayTime());
|
|
|
}
|
|
|
+ //是否绑定
|
|
|
+ if(QwStatusEnum.BOUND.getCode() == companyUserQwListVO.getQwStatus()){
|
|
|
+ if(!companyUserQwListVO.getQwUserId().isEmpty()){
|
|
|
+ Long[] ids = Arrays.stream(companyUserQwListVO.getQwUserId().split(","))
|
|
|
+ .map(Long::parseLong)
|
|
|
+ .toArray(Long[]::new);
|
|
|
+ List<QwUserVO> qwUserVOS = qwUserService.selectQwUserVOByIds(ids);
|
|
|
+ companyUserQwListVO.setQwUsers(qwUserVOS);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
+
|
|
|
@Log(title = "用户管理导出", businessType = BusinessType.EXPORT)
|
|
|
@PreAuthorize("@ss.hasPermi('company:user:export')")
|
|
|
@GetMapping("/export")
|