Commit e7666575 by fudahua

根据userId 伪登录

parent c27b5b51
...@@ -115,13 +115,28 @@ public class InfoController extends WebBaseController{ ...@@ -115,13 +115,28 @@ public class InfoController extends WebBaseController{
return resultResponse(HaoBanErrCode.ERR_600001); return resultResponse(HaoBanErrCode.ERR_600001);
} }
if (StringUtils.isNotBlank(loginStaff.getPhoneNumber())) { if (StringUtils.isNotBlank(loginStaff.getPhoneNumber())) {
DictDTO loginPhoneNum = managerDictService.getSMSDict("app_login_phone_num", loginStaff.getPhoneNumber()); DictDTO loginUserId = managerDictService.getSMSDict("app_login_phone_num", loginStaff.getPhoneNumber());
logger.info("伪登录:{}",loginStaff.getPhoneNumber(), JSONObject.toJSONString(loginPhoneNum)); logger.info("伪登录:{},userId:{}",loginStaff.getPhoneNumber(), JSONObject.toJSONString(loginUserId));
if (null != loginPhoneNum) { if (null != loginUserId) {
String midPhone = loginPhoneNum.getDictValue(); String wxUserId = loginUserId.getDictValue();
List<StaffDTO> staffDTOS = staffApiService.listByPhoneNumber(midPhone); List<StaffDTO> staffDTOS = staffApiService.listByWxUserId(wxUserId);
if (CollectionUtils.isNotEmpty(staffDTOS)) { if (CollectionUtils.isNotEmpty(staffDTOS)) {
loginStaff=staffDTOS.get(0); if (staffDTOS.size() > 1) {
String dictName = loginUserId.getDictName();
String[] split = dictName.split("-");
if (split.length > 1) {
Integer pos = Integer.valueOf(split[1]);
if (pos != null && staffDTOS.size() > pos) {
loginStaff = staffDTOS.get(pos);
} else {
loginStaff = staffDTOS.get(0);
}
} else {
loginStaff = staffDTOS.get(0);
}
} else {
loginStaff = staffDTOS.get(0);
}
} }
// StaffDTO staffDTO = staffApiService.selectByNationcodeAndPhoneNumber(enterprise.getWxEnterpriseId(), "86", midPhone); // StaffDTO staffDTO = staffApiService.selectByNationcodeAndPhoneNumber(enterprise.getWxEnterpriseId(), "86", midPhone);
// if (null !=staffDTO) { // if (null !=staffDTO) {
......
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