Commit 0510ffe4 by 墨竹

feat:关联导购数量

parent ce4ec087
......@@ -1190,18 +1190,11 @@ public class ClerkController extends WebBaseController {
*/
@RequestMapping("can-relation-count")
public RestResponse canRelationCount(@RequestBody @Valid CommonQO qo) {
List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(qo.getWxEnterpriseId());
if (list == null || list.isEmpty()) {
return RestResponse.successResult();
List<StaffClerkInfoDTO> staffClerkInfoDTOS = staffClerkRelationApiService.listBindDetailByStaffId(qo.getStaffId());
if (CollectionUtils.isEmpty(staffClerkInfoDTOS)) {
return RestResponse.successResult(0);
}
List<String> enterpriseIdList = list.stream().filter(s -> {
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());
return RestResponse.successResult(staffClerkInfoDTOS.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