Commit 0510ffe4 by 墨竹

feat:关联导购数量

parent ce4ec087
...@@ -1190,18 +1190,11 @@ public class ClerkController extends WebBaseController { ...@@ -1190,18 +1190,11 @@ public class ClerkController extends WebBaseController {
*/ */
@RequestMapping("can-relation-count") @RequestMapping("can-relation-count")
public RestResponse canRelationCount(@RequestBody @Valid CommonQO qo) { public RestResponse canRelationCount(@RequestBody @Valid CommonQO qo) {
List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(qo.getWxEnterpriseId()); List<StaffClerkInfoDTO> staffClerkInfoDTOS = staffClerkRelationApiService.listBindDetailByStaffId(qo.getStaffId());
if (list == null || list.isEmpty()) { if (CollectionUtils.isEmpty(staffClerkInfoDTOS)) {
return RestResponse.successResult(); return RestResponse.successResult(0);
} }
List<String> enterpriseIdList = list.stream().filter(s -> { return RestResponse.successResult(staffClerkInfoDTOS.size());
boolean over = wxEnterpriseApiService.enterpriseIsOver(s.getEnterpriseId());
return !over;
}).map(s -> s.getEnterpriseId()).collect(Collectors.toList());
List<String> storeIds = wxEnterpriseRelatedApiService.listStoreIdByWxEnterpriseId(qo.getWxEnterpriseId());
List<ClerkDTO> clerkList = this.getUnbindClerkList(enterpriseIdList, storeIds, qo.getStaffId());
return RestResponse.successResult(clerkList.size());
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment