|
|
|
@@ -95,6 +95,7 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData updatepwd(String appId, String phone, String code, String pwd) { |
|
|
|
WxAppinfo appinfo = wxAppinfoMapper.findByAppId(appId); |
|
|
|
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.setPhone(phone); |
|
|
|
wxMsgValidationcode.setCode(code); |
|
|
|
@@ -105,15 +106,13 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { |
|
|
|
if(wxmsgvalidationcodelist.size()>0){ |
|
|
|
//更新 |
|
|
|
WxMerchantBUser bUser = new WxMerchantBUser(); |
|
|
|
bUser.setTenantId(appinfo.getTenantId()); |
|
|
|
bUser.setPhone(phone); |
|
|
|
bUser.setAppId(appId); |
|
|
|
List<WxMerchantBUser> list = wxMerchantBUserMapper.findList(bUser); |
|
|
|
if(list.size()>0){ |
|
|
|
bUser = list.get(0); |
|
|
|
if (bUser.getAppId().equalsIgnoreCase(appId)) |
|
|
|
{ |
|
|
|
logger.error("B端用户不是这个app的用户:" + appId); |
|
|
|
throw new MallinkException(ErrorCode.BUSER_NOT_IN_APP); |
|
|
|
} |
|
|
|
|
|
|
|
bUser.setBUserPwd(pwd); |
|
|
|
try{ |
|
|
|
wxMerchantBUserMapper.updateByPrimaryKeySelective(bUser); |
|
|
|
@@ -121,6 +120,9 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { |
|
|
|
logger.error("db failed: 商户-" + bUser.getId() + ", e:" + e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
logger.error("B端用户不是这个app的用户:" + appId); |
|
|
|
throw new MallinkException(ErrorCode.BUSER_NOT_IN_APP); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
|