|
|
@@ -7,9 +7,11 @@ import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.simple.common.ErrorCode; |
|
|
import com.simple.common.ErrorCode; |
|
|
import com.simple.common.ResultData; |
|
|
import com.simple.common.ResultData; |
|
|
|
|
|
import com.simple.domain.po.WxAppinfo; |
|
|
import com.simple.domain.po.WxMerchantBUser; |
|
|
import com.simple.domain.po.WxMerchantBUser; |
|
|
import com.simple.domain.po.WxMsgValidationcode; |
|
|
import com.simple.domain.po.WxMsgValidationcode; |
|
|
import com.simple.exception.MallinkException; |
|
|
import com.simple.exception.MallinkException; |
|
|
|
|
|
import com.simple.mapper.WxAppinfoMapper; |
|
|
import com.simple.mapper.WxMerchantBUserMapper; |
|
|
import com.simple.mapper.WxMerchantBUserMapper; |
|
|
import com.simple.mapper.WxMsgValidationcodeMapper; |
|
|
import com.simple.mapper.WxMsgValidationcodeMapper; |
|
|
import com.simple.service.WxMerchantBUserService; |
|
|
import com.simple.service.WxMerchantBUserService; |
|
|
@@ -23,6 +25,8 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { |
|
|
|
|
|
|
|
|
private Logger logger = Logger.getLogger(WxMerchantBUserServiceImpl.class); |
|
|
private Logger logger = Logger.getLogger(WxMerchantBUserServiceImpl.class); |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
WxAppinfoMapper wxAppinfoMapper; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
WxMerchantBUserMapper wxMerchantBUserMapper; |
|
|
WxMerchantBUserMapper wxMerchantBUserMapper; |
|
|
@@ -90,7 +94,7 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public ResultData updatepwd(String phone, String code, String pwd) { |
|
|
|
|
|
|
|
|
public ResultData updatepwd(String appId, String phone, String code, String pwd) { |
|
|
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
wxMsgValidationcode.setPhone(phone); |
|
|
wxMsgValidationcode.setPhone(phone); |
|
|
wxMsgValidationcode.setCode(code); |
|
|
wxMsgValidationcode.setCode(code); |
|
|
@@ -105,6 +109,11 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { |
|
|
List<WxMerchantBUser> list = wxMerchantBUserMapper.findList(bUser); |
|
|
List<WxMerchantBUser> list = wxMerchantBUserMapper.findList(bUser); |
|
|
if(list.size()>0){ |
|
|
if(list.size()>0){ |
|
|
bUser = list.get(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); |
|
|
bUser.setBUserPwd(pwd); |
|
|
try{ |
|
|
try{ |
|
|
wxMerchantBUserMapper.updateByPrimaryKeySelective(bUser); |
|
|
wxMerchantBUserMapper.updateByPrimaryKeySelective(bUser); |
|
|
|