Commit 94dc3ebc by 徐高华

Merge branch 'ferture/四月迭代需求' into 'feature/自建应用验证'

Ferture/四月迭代需求

See merge request !1201
parents 3463d15c ba6f0683
......@@ -522,12 +522,22 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
List<StaffClerkRelationDTO> retList = new ArrayList<>() ;
for(StaffClerkRelationDTO item : list) {
boolean delFlag = false ;
String clerkId = item.getClerkId() ;
ClerkDTO clerk = this.clerkService.getclerkById(clerkId) ;
if(null != clerk && clerk.getStatus() == 1) {
retList.add(item) ;
}else {
if(null == clerk || clerk.getStatus() != 1) {
delFlag = true ;
}
if(!delFlag && null != clerk && clerk.getClerkType()<2 && StringUtils.isNotEmpty(clerk.getStoreId())) {
StoreDTO store = this.storeService.getStore(clerk.getStoreId()) ;
if(null == store || store.getStatus() == -3) {
delFlag = true ;
}
}
if(delFlag) {
this.mapper.delByClerkId(clerkId);
}else {
retList.add(item) ;
}
}
return retList ;
......@@ -539,7 +549,17 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
String clerkId = dto.getClerkId() ;
ClerkDTO clerk = this.clerkService.getclerkById(clerkId) ;
boolean delFlag = false ;
if(null == clerk || clerk.getStatus() != 1) {
delFlag = true ;
}
if(!delFlag && null != clerk && clerk.getClerkType() <2 && StringUtils.isNotEmpty(clerk.getStoreId())) {
StoreDTO store = this.storeService.getStore(clerk.getStoreId()) ;
if(null == store || store.getStatus() == -3) {
delFlag = true ;
}
}
if(delFlag) {
this.mapper.delByClerkId(clerkId);
dto = null ;
}
......
......@@ -199,6 +199,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger.info("该导购已经被被申请绑定,请审核处理后再绑定");
return ServiceResponse.failure("4", "该导购已经被被申请绑定,请审核处理后再绑定");
}
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());
......@@ -217,6 +218,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger.info("该导购已绑定区经,不允许绑定导购");
return ServiceResponse.failure("3", "该导购已绑定区经,不允许绑定导购");
}
}
return null;
}
......
......@@ -374,11 +374,13 @@ public class StaffController extends WebBaseController {
}
}
StoreDTO store = storeService.getStore(clerkInfoVo.getStoreId());
if (null != store) {
if (null != store && store.getStatus() != -3) {
clerkInfoVo.setStoreName(store.getStoreName());
}
});
if (manageFlag == null || manageFlag != 1) {
retList = retList.stream().filter(o->StringUtils.isNotEmpty(o.getStoreName())).collect(Collectors.toList()) ;
}
}
}
return resultResponse(HaoBanErrCode.ERR_1, retList);
......
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