|
@@ -10,14 +10,8 @@ import com.gree.mall.manager.bean.es.CommonListES;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.logic.es.EsLogic;
|
|
|
-import com.gree.mall.manager.plus.entity.AdminWebsit;
|
|
|
-import com.gree.mall.manager.plus.entity.WorkerComList;
|
|
|
-import com.gree.mall.manager.plus.entity.WorkerComListWebsit;
|
|
|
-import com.gree.mall.manager.plus.entity.WorkerComListWorker;
|
|
|
-import com.gree.mall.manager.plus.service.AdminWebsitService;
|
|
|
-import com.gree.mall.manager.plus.service.WorkerComListService;
|
|
|
-import com.gree.mall.manager.plus.service.WorkerComListWebsitService;
|
|
|
-import com.gree.mall.manager.plus.service.WorkerComListWorkerService;
|
|
|
+import com.gree.mall.manager.plus.entity.*;
|
|
|
+import com.gree.mall.manager.plus.service.*;
|
|
|
import com.gree.mall.manager.utils.CommonUtils;
|
|
|
import com.gree.mall.manager.utils.excel.ExcelUtils;
|
|
|
import com.gree.mall.manager.utils.oss.OSSUtil;
|
|
@@ -56,6 +50,8 @@ public class WorkerComListLogic {
|
|
|
WorkerComListWebsitService workerComListWebsitService;
|
|
|
@Autowired
|
|
|
AdminWebsitService adminWebsitService;
|
|
|
+ @Autowired
|
|
|
+ WebsitUserService websitUserService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -74,8 +70,12 @@ public class WorkerComListLogic {
|
|
|
comListIds = worker.stream().map(WorkerComListWorker::getWorkerComListId).distinct().collect(Collectors.toList());
|
|
|
} else {
|
|
|
//以登录人为准
|
|
|
+ List<WebsitUser> websitUsers = websitUserService.lambdaQuery()
|
|
|
+ .in(WebsitUser::getWebsitId, adminUser.getAdminWebsitIds()).select(WebsitUser::getWorkerNumber).list();
|
|
|
+ List<String> collect = websitUsers.stream().map(WebsitUser::getWorkerNumber).collect(Collectors.toList());
|
|
|
+
|
|
|
List<WorkerComListWebsit> websit = workerComListWebsitService.lambdaQuery()
|
|
|
- .in(WorkerComListWebsit::getWebsitId, adminUser.getAdminWebsitIds())
|
|
|
+ .in(!CollectionUtils.isEmpty(collect),WorkerComListWebsit::getWebsitId,collect)
|
|
|
.list();
|
|
|
if (CollectionUtils.isEmpty(websit)) {
|
|
|
return new Page<>(pageNum, pageSize);
|