Commit 239ded62 by fudahua

会员详情

parent 00139557
...@@ -129,23 +129,34 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -129,23 +129,34 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if(CollectionUtil.isEmpty(list)){ if(CollectionUtil.isEmpty(list)){
return null; return null;
} }
//1、查该staff的门店id String wxEnterpriseId = list.get(0).getWxEnterpriseId();
List<TabHaobanStaffDepartmentRelated> relatedIds = staffDepartmentRelatedService.listByWxUserId(wxUserId); TabHaobanStaff haobanStaff = staffService.selectByUserIdAndEnterpriseId(wxUserId, wxEnterpriseId);
if(CollectionUtil.isEmpty(relatedIds)){ if (null == haobanStaff) {
log.info("staff关联部门不存在1"); log.info("staff不存在");
return null; return null;
} }
List<String> departmentIds = relatedIds.stream().map(s->s.getDepartmentId()).collect(Collectors.toList()); List<StaffClerkRelationDTO> clerkRelationDTOS = staffClerkRelationService.listBindCodeByStaffId(null, haobanStaff.getStaffId());
if(CollectionUtil.isEmpty(departmentIds)){ if(CollectionUtil.isEmpty(clerkRelationDTOS)){
log.info("staff部门不存在1");
return null;
}
List<DepartmentDTO> stores = departmentApiService.listByDepartmentIds(departmentIds, 1);
if(CollectionUtil.isEmpty(stores)){
log.info("staff关联门店不存在1"); log.info("staff关联门店不存在1");
return null; return null;
} }
List<String> storeIds = stores.stream().filter(s->(s.getRelatedId()!=null || "".equals(s.getRelatedId()))).map(s->s.getRelatedId()).collect(Collectors.toList()); // //1、查该staff的门店id
// List<TabHaobanStaffDepartmentRelated> relatedIds = staffDepartmentRelatedService.listByWxUserId(wxUserId);
// if(CollectionUtil.isEmpty(relatedIds)){
// log.info("staff关联部门不存在1");
// return null;
// }
// List<String> departmentIds = relatedIds.stream().map(s->s.getDepartmentId()).collect(Collectors.toList());
// if(CollectionUtil.isEmpty(departmentIds)){
// log.info("staff部门不存在1");
// return null;
// }
// List<DepartmentDTO> stores = departmentApiService.listByDepartmentIds(departmentIds, 1);
// if(CollectionUtil.isEmpty(stores)){
// log.info("staff关联门店不存在1");
// return null;
// }
List<String> storeIds = clerkRelationDTOS.stream().filter(s->(s.getStoreId()!=null || "".equals(s.getStoreId()))).map(s->s.getStoreId()).collect(Collectors.toList());
if(CollectionUtil.isEmpty(storeIds)){ if(CollectionUtil.isEmpty(storeIds)){
log.info("staff关联门店不存在2"); log.info("staff关联门店不存在2");
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