Commit 9502dffe by fudahua

Merge branch 'developer' into 'master'

会员详情

See merge request !71
parents 0474991e 239ded62
......@@ -129,23 +129,34 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if(CollectionUtil.isEmpty(list)){
return null;
}
//1、查该staff的门店id
List<TabHaobanStaffDepartmentRelated> relatedIds = staffDepartmentRelatedService.listByWxUserId(wxUserId);
if(CollectionUtil.isEmpty(relatedIds)){
log.info("staff关联部门不存在1");
String wxEnterpriseId = list.get(0).getWxEnterpriseId();
TabHaobanStaff haobanStaff = staffService.selectByUserIdAndEnterpriseId(wxUserId, wxEnterpriseId);
if (null == haobanStaff) {
log.info("staff不存在");
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)){
List<StaffClerkRelationDTO> clerkRelationDTOS = staffClerkRelationService.listBindCodeByStaffId(null, haobanStaff.getStaffId());
if(CollectionUtil.isEmpty(clerkRelationDTOS)){
log.info("staff关联门店不存在1");
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)){
log.info("staff关联门店不存在2");
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