Commit e215c0c0 by 徐高华

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

过滤非上线门店

See merge request !1189
parents 897aaa70 1957b8ea
...@@ -521,12 +521,22 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -521,12 +521,22 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
List<StaffClerkRelationDTO> retList = new ArrayList<>() ; List<StaffClerkRelationDTO> retList = new ArrayList<>() ;
for(StaffClerkRelationDTO item : list) { for(StaffClerkRelationDTO item : list) {
boolean delFlag = false ;
String clerkId = item.getClerkId() ; String clerkId = item.getClerkId() ;
ClerkDTO clerk = this.clerkService.getclerkById(clerkId) ; ClerkDTO clerk = this.clerkService.getclerkById(clerkId) ;
if(null != clerk && clerk.getStatus() == 1) { if(null == clerk || clerk.getStatus() != 1) {
retList.add(item) ; delFlag = true ;
}else { }
if(!delFlag && null != clerk && clerk.getClerkType()<2 && StringUtils.isNotEmpty(clerk.getStoreId())) {
StoreDTO store = this.storeService.getStore(clerk.getStoreId()) ;
if(null == store || store.getStatus() != 2) {
delFlag = true ;
}
}
if(delFlag) {
this.mapper.delByClerkId(clerkId); this.mapper.delByClerkId(clerkId);
}else {
retList.add(item) ;
} }
} }
return retList ; return retList ;
...@@ -538,7 +548,17 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -538,7 +548,17 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
String clerkId = dto.getClerkId() ; String clerkId = dto.getClerkId() ;
ClerkDTO clerk = this.clerkService.getclerkById(clerkId) ; ClerkDTO clerk = this.clerkService.getclerkById(clerkId) ;
boolean delFlag = false ;
if(null == clerk || clerk.getStatus() != 1) { 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() != 2) {
delFlag = true ;
}
}
if(delFlag) {
this.mapper.delByClerkId(clerkId); this.mapper.delByClerkId(clerkId);
dto = null ; dto = null ;
} }
......
...@@ -1552,7 +1552,7 @@ public class WxStaffController extends WebBaseController { ...@@ -1552,7 +1552,7 @@ public class WxStaffController extends WebBaseController {
for (StaffClerkRelationDTO staffClerkRelationDTO : bindRelationList) { for (StaffClerkRelationDTO staffClerkRelationDTO : bindRelationList) {
String storeId = staffClerkRelationDTO.getStoreId(); String storeId = staffClerkRelationDTO.getStoreId();
StoreDTO store = storeService.getStore(storeId); StoreDTO store = storeService.getStore(storeId);
if (store == null) { if (store == null || store.getStatus() != 2) {
continue; continue;
} }
String enterpriseId = store.getEnterpriseId(); String enterpriseId = store.getEnterpriseId();
......
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