Commit 897aaa70 by 徐高华

Merge branch 'ferture/四月迭代需求' into 'developer'

区经绑定

See merge request !1188
parents 2c5f4279 9dd5cd44
...@@ -198,23 +198,25 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -198,23 +198,25 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger.info("该导购已经被被申请绑定,请审核处理后再绑定"); logger.info("该导购已经被被申请绑定,请审核处理后再绑定");
return ServiceResponse.failure("4", "该导购已经被被申请绑定,请审核处理后再绑定"); return ServiceResponse.failure("4", "该导购已经被被申请绑定,请审核处理后再绑定");
} }
List<AuditDTO> list = auditApiService.listByStoreId(staffClerkRelationDTO.getStoreId()); if (manageFlag == null || manageFlag == 0) {
if (CollectionUtils.isNotEmpty(list)) { List<AuditDTO> list = auditApiService.listByStoreId(staffClerkRelationDTO.getStoreId());
Set<String> staffIds = list.stream().map(AuditDTO::getCommitStaffId).collect(Collectors.toSet()); if (CollectionUtils.isNotEmpty(list)) {
if (staffIds.contains(staffId)) { Set<String> staffIds = list.stream().map(AuditDTO::getCommitStaffId).collect(Collectors.toSet());
logger.info("该成员已经已经在该门店下申请了绑定,请审核处理后再绑定"); if (staffIds.contains(staffId)) {
return ServiceResponse.failure("5", "该成员已经已经在该门店下申请了绑定,请审核处理后再绑定"); logger.info("该成员已经已经在该门店下申请了绑定,请审核处理后再绑定");
return ServiceResponse.failure("5", "该成员已经已经在该门店下申请了绑定,请审核处理后再绑定");
}
}
StaffClerkRelationDTO storeHasBind = staffClerkRelationService.getOneBindByStoreId(staffId, staffClerkRelationDTO.getStoreId());
if (storeHasBind != null) {
logger.info("该导购已在该门店下有其它成员绑定");
return ServiceResponse.failure("3", "该导购已在该门店下有其它成员绑定");
}
List<StaffClerkRelationDTO> staffClerkRelationDTOS = staffClerkRelationService.listManageBindByStaffId(staffId);
if (CollectionUtils.isNotEmpty(staffClerkRelationDTOS)) {
logger.info("该导购已绑定区经,不允许绑定导购");
return ServiceResponse.failure("3", "该导购已绑定区经,不允许绑定导购");
} }
}
StaffClerkRelationDTO storeHasBind = staffClerkRelationService.getOneBindByStoreId(staffId, staffClerkRelationDTO.getStoreId());
if (storeHasBind != null) {
logger.info("该导购已在该门店下有其它成员绑定");
return ServiceResponse.failure("3", "该导购已在该门店下有其它成员绑定");
}
List<StaffClerkRelationDTO> staffClerkRelationDTOS = staffClerkRelationService.listManageBindByStaffId(staffId);
if (CollectionUtils.isNotEmpty(staffClerkRelationDTOS)) {
logger.info("该导购已绑定区经,不允许绑定导购");
return ServiceResponse.failure("3", "该导购已绑定区经,不允许绑定导购");
} }
return null; return null;
} }
......
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