Commit 776391e6 by huangZW

111

parent 14fd6473
......@@ -106,14 +106,17 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
//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 = stores.stream().map(s->s.getRelatedId()).collect(Collectors.toList());
......@@ -135,14 +138,17 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
dynamicSearchDTO.setRecordNumber(1);
ESResponseQuerySingle responseQuery = eSDataDynamicOperationApiService.queryDataSingle(dynamicSearchDTO);
if(null == responseQuery){
log.info("会员不存在1");
return null;
}
JSONObject res = responseQuery.getRes();
if(res == null){
log.info("会员不存在2");
return null;
}
String storeId = res.get("storeId") == null?"":res.get("storeId").toString();
if(StringUtils.isEmpty(storeId)){
log.info("会员门店不存在");
return null;
}
String[] memberStoreIds =storeId.split(" ");
......
......@@ -102,6 +102,7 @@ public class InfoController extends WebBaseController{
infoVo.setStaffName(loginStaff.getStaffName());
infoVo.setPhoneNumber(loginStaff.getPhoneNumber());
infoVo.setNationcode(loginStaff.getNationCode());
infoVo.setWxUserId(loginStaff.getWxUserId());
return resultResponse(HaoBanErrCode.ERR_1,infoVo);
}
......
......@@ -15,7 +15,14 @@ public class InfoVo implements Serializable {
private String staffName;
private String phoneNumber;
private String nationcode;
private String wxUserId;
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId;
}
public String getStaffId() {
return staffId;
}
......
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