Commit 9dd5cd44 by 徐高华

区经绑定

parent 52208592
......@@ -199,23 +199,25 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger.info("该导购已经被被申请绑定,请审核处理后再绑定");
return ServiceResponse.failure("4", "该导购已经被被申请绑定,请审核处理后再绑定");
}
List<AuditDTO> list = auditApiService.listByStoreId(staffClerkRelationDTO.getStoreId());
if (CollectionUtils.isNotEmpty(list)) {
Set<String> staffIds = list.stream().map(AuditDTO::getCommitStaffId).collect(Collectors.toSet());
if (staffIds.contains(staffId)) {
logger.info("该成员已经已经在该门店下申请了绑定,请审核处理后再绑定");
return ServiceResponse.failure("5", "该成员已经已经在该门店下申请了绑定,请审核处理后再绑定");
if (manageFlag == null || manageFlag == 0) {
List<AuditDTO> list = auditApiService.listByStoreId(staffClerkRelationDTO.getStoreId());
if (CollectionUtils.isNotEmpty(list)) {
Set<String> staffIds = list.stream().map(AuditDTO::getCommitStaffId).collect(Collectors.toSet());
if (staffIds.contains(staffId)) {
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;
}
......
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