| @@ -68,7 +68,7 @@ public class WxMerchantBUserController extends BaseController { | |||||
| @GetMapping("/hasphone") | @GetMapping("/hasphone") | ||||
| @ApiImplicitParam(name="phone",value="phone",dataType="String", paramType = "query",required=true) | @ApiImplicitParam(name="phone",value="phone",dataType="String", paramType = "query",required=true) | ||||
| public ResultData hasphone(String phone) { | public ResultData hasphone(String phone) { | ||||
| boolean has=wxMerchantBUserService.hasphone(phone); | |||||
| boolean has=wxMerchantBUserService.hasphone(phone,getTenantId()); | |||||
| return new ResultData(Result.SUCCESS,"查询成功",has); | return new ResultData(Result.SUCCESS,"查询成功",has); | ||||
| } | } | ||||
| @@ -55,7 +55,7 @@ public interface WxMerchantBUserService { | |||||
| void deleteById(Long id); | void deleteById(Long id); | ||||
| boolean hasphone(String phone); | |||||
| boolean hasphone(String phone, String tenantId); | |||||
| ResultData updatepwd(String appId, String phone, String code, String pwd); | ResultData updatepwd(String appId, String phone, String code, String pwd); | ||||
| @@ -10,6 +10,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxAppinfo; | import com.iformall.domain.po.WxAppinfo; | ||||
| import com.iformall.domain.po.WxMerchantBUser; | import com.iformall.domain.po.WxMerchantBUser; | ||||
| import com.iformall.domain.po.WxMsgValidationcode; | import com.iformall.domain.po.WxMsgValidationcode; | ||||
| import com.iformall.enums.EnumMerchantBUserStatus; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.WxAppinfoMapper; | import com.iformall.mapper.WxAppinfoMapper; | ||||
| import com.iformall.mapper.WxMerchantBUserMapper; | import com.iformall.mapper.WxMerchantBUserMapper; | ||||
| @@ -85,10 +86,11 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public boolean hasphone(String phone) { | |||||
| public boolean hasphone(String phone, String tenantId) { | |||||
| WxMerchantBUser bUser = new WxMerchantBUser(); | WxMerchantBUser bUser = new WxMerchantBUser(); | ||||
| bUser.setTenantId(tenantId); | |||||
| bUser.setPhone(phone); | bUser.setPhone(phone); | ||||
| bUser.setStatus(0); | |||||
| bUser.setStatus(EnumMerchantBUserStatus.NOT_BOUND.getCode()); | |||||
| List<WxMerchantBUser> list = wxMerchantBUserMapper.findList(bUser); | List<WxMerchantBUser> list = wxMerchantBUserMapper.findList(bUser); | ||||
| return list.size()>=1?true:false; | return list.size()>=1?true:false; | ||||
| } | } | ||||
| @@ -132,6 +132,15 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());//未出租 | wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());//未出租 | ||||
| WxShopMapper.updateByPrimaryKeySelective(wxShop); | WxShopMapper.updateByPrimaryKeySelective(wxShop); | ||||
| } | } | ||||
| //解绑用户 | |||||
| WxMerchantBUser bUser = new WxMerchantBUser(); | |||||
| bUser.setMerchantId(wxMerchant.getId()); | |||||
| List<WxMerchantBUser> wxMerchantBUserMapperList = wxMerchantBUserMapper.findList(bUser); | |||||
| for(WxMerchantBUser wxMerchantBUser:wxMerchantBUserMapperList){ | |||||
| wxMerchantBUser.setStatus(EnumMerchantBUserStatus.NOT_BOUND.getCode()); | |||||
| wxMerchantBUserMapper.updateByPrimaryKeySelective(wxMerchantBUser); | |||||
| } | |||||
| } | } | ||||
| @Transactional | @Transactional | ||||
| @@ -30,7 +30,7 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | <if test=" null != tenantId "> | ||||
| and `tenant_id` like concat('%', #{tenantId},'%') | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | </if> | ||||