|
|
@@ -1272,6 +1272,20 @@ public class WxLoginService implements IWxLoginService {
|
|
|
}
|
|
|
return user;
|
|
|
}
|
|
|
+ public DistributionSeller bindWxGzhOpenIdSeller(WxLoginBody loginBody) {
|
|
|
+ DistributionSeller seller = iDistributionSellerService.getOne(new LambdaQueryWrapper<DistributionSeller>().eq(DistributionSeller::getSellerId,loginBody.getSellerId()));
|
|
|
+ if (seller == null) {
|
|
|
+ throw new CustomException("您尚未注册,请前往小程序注册");
|
|
|
+ }
|
|
|
+ if(Validator.isNotEmpty(loginBody.getGzhOpenid())){
|
|
|
+ seller.setGzhOpenId(loginBody.getGzhOpenid());
|
|
|
+ }
|
|
|
+ if(Validator.isNotEmpty(loginBody.getUnionId())){
|
|
|
+ seller.setUnionId(loginBody.getUnionId());
|
|
|
+ }
|
|
|
+ iDistributionSellerService.updateById(seller);
|
|
|
+ return seller;
|
|
|
+ }
|
|
|
|
|
|
public DistributionSeller bindWxGzhUnionIdSeller(WxLoginBody loginBody) {
|
|
|
initData();
|