Commit 1957b8ea by 徐高华

过滤非上线门店

parent 9dd5cd44
...@@ -501,12 +501,22 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -501,12 +501,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 ;
...@@ -518,7 +528,17 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -518,7 +528,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 ;
} }
......
...@@ -1481,7 +1481,7 @@ public class WxStaffController extends WebBaseController { ...@@ -1481,7 +1481,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