Commit 2490ac42 by 墨竹

fix:好办登陆接口修改

parent f3f3d784
...@@ -4,9 +4,7 @@ import com.gic.commons.util.EntityUtil; ...@@ -4,9 +4,7 @@ import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.StringUtil; import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.StaffDTO; import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper; import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import com.gic.haoban.manage.service.entity.TabHaobanStaff; import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.service.MemberUnionRelatedService; import com.gic.haoban.manage.service.service.MemberUnionRelatedService;
import com.gic.haoban.manage.service.service.StaffService; import com.gic.haoban.manage.service.service.StaffService;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
...@@ -67,6 +65,9 @@ public class StaffServiceImpl implements StaffService { ...@@ -67,6 +65,9 @@ public class StaffServiceImpl implements StaffService {
@Override @Override
public TabHaobanStaff selectByPhoneNumberAndEnterpriseId(String phoneNumber, String wxEnterpriseId) { public TabHaobanStaff selectByPhoneNumberAndEnterpriseId(String phoneNumber, String wxEnterpriseId) {
if (StringUtils.isBlank(phoneNumber)) {
return null;
}
return mapper.selectByPhoneNumberAndEnterpriseId(phoneNumber, wxEnterpriseId); return mapper.selectByPhoneNumberAndEnterpriseId(phoneNumber, wxEnterpriseId);
} }
......
...@@ -389,7 +389,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -389,7 +389,7 @@ public class StaffApiServiceImpl implements StaffApiService {
String[] arr = getNationCodeAndPhoneNumber(mobile); String[] arr = getNationCodeAndPhoneNumber(mobile);
String nationCode = arr[0]; String nationCode = arr[0];
String phoneNumber = arr[1]; String phoneNumber = arr[1];
TabHaobanStaff staff = staffService.selectByUserIdAndEnterpriseId(userId, wxEnterpriseId); TabHaobanStaff staff = staffService.selectByPhoneNumberAndEnterpriseId(phoneNumber, wxEnterpriseId);
if (staff != null) { if (staff != null) {
staffService.delOtherStaffByWxUserId(staff.getWxUserId(), staff.getStaffId(), wxEnterpriseId); staffService.delOtherStaffByWxUserId(staff.getWxUserId(), staff.getStaffId(), wxEnterpriseId);
} }
......
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