From 78b5f98a33283784ac64732b73d96e902cd1a82a Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sat, 25 May 2019 16:24:49 +0800 Subject: [PATCH] =?UTF-8?q?[BUG][ID1001633][B=E7=AB=AF-=E6=94=B6=E9=93=B6?= =?UTF-8?q?=E5=8F=B0=EF=BC=8C=E6=94=B6=E9=93=B6=E5=90=8E=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=BF=A1=E6=81=AF=E5=A1=AB=E5=86=99=E5=90=8E?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=8F=82=E6=95=B0=E4=B8=8D=E8=83=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/controller/WxCUserController.java | 12 ++++++------ .../com/iformall/domain/dto/WxCUserFromBDto.java | 5 +++-- .../service/impl/WxCUserFromBServiceImpl.java | 6 ++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxCUserController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxCUserController.java index 11516e8b2..352db27ce 100755 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxCUserController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxCUserController.java @@ -75,11 +75,11 @@ public class WxCUserController extends BaseController { if (StringUtils.isEmpty(wxCUserFromBDto.getAppId())) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "C端appId不能为空"); } - if (wxCUserFromBDto.getBUserId() == null) { + if (wxCUserFromBDto.getUserId() == null) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "bUserId不能为空"); } //根据bUserId查询B端用户是否存在 - WxMerchantBUser bUser = wxMerchantBUserService.getById(wxCUserFromBDto.getBUserId()); + WxMerchantBUser bUser = wxMerchantBUserService.getById(wxCUserFromBDto.getUserId()); if (bUser == null) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "B端用户不存在"); } @@ -121,7 +121,7 @@ public class WxCUserController extends BaseController { wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, wxCUserBasicInfo); //新增来自B端的会员关联数据 wxCUserFromB = new WxCUserFromB(); - wxCUserFromB.setBUserId(wxCUserFromBDto.getBUserId()); + wxCUserFromB.setBUserId(wxCUserFromBDto.getUserId()); wxCUserFromB.setCUserId(wxCUserBasicInfo.getId()); wxCUserFromB.setOpenid(wxCUserFromBDto.getOpenid()); wxCUserFromB.setMerchantId(bUser.getMerchantId()); @@ -151,7 +151,7 @@ public class WxCUserController extends BaseController { wxCUserBasicInfoService.save(wxCUserBasicInfo); //新增来自B端的会员关联数据 wxCUserFromB = new WxCUserFromB(); - wxCUserFromB.setBUserId(wxCUserFromBDto.getBUserId()); + wxCUserFromB.setBUserId(wxCUserFromBDto.getUserId()); wxCUserFromB.setCUserId(cUserId); wxCUserFromB.setOpenid(wxCUserFromBDto.getOpenid()); wxCUserFromB.setMerchantId(bUser.getMerchantId()); @@ -217,8 +217,8 @@ public class WxCUserController extends BaseController { if (StringUtils.isEmpty(wxCUserFromBDto.getAppId())) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "C端appid不能为空"); } - if (wxCUserFromBDto.getBUserId() == null) { - return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "bUserId不能为空"); + if (wxCUserFromBDto.getUserId() == null) { + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "B端userId不能为空"); } WxCUserFromB wxCUserFromB = wxCUserFromBService.getByOpenidAndAppId(wxCUserFromBDto); if(wxCUserFromB!=null){ diff --git a/mallinkService/src/main/java/com/iformall/domain/dto/WxCUserFromBDto.java b/mallinkService/src/main/java/com/iformall/domain/dto/WxCUserFromBDto.java index df47816c5..df492f694 100644 --- a/mallinkService/src/main/java/com/iformall/domain/dto/WxCUserFromBDto.java +++ b/mallinkService/src/main/java/com/iformall/domain/dto/WxCUserFromBDto.java @@ -10,8 +10,6 @@ import java.util.Date; public class WxCUserFromBDto implements Serializable { private static final long serialVersionUID = 1L; - @io.swagger.annotations.ApiModelProperty(value="B端登录者ID",name="bUserId") - private Long bUserId; @io.swagger.annotations.ApiModelProperty(value="C端openid",name="openid") private String openid; @io.swagger.annotations.ApiModelProperty(value="C端appid",name="appId") @@ -28,4 +26,7 @@ public class WxCUserFromBDto implements Serializable { private String phone; @io.swagger.annotations.ApiModelProperty(value = "商户ID", name = "merchantId") private Long merchantId; + @io.swagger.annotations.ApiModelProperty(value = "B端登录者ID", name = "userId") + private Long userId; + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromBServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromBServiceImpl.java index 6083f9ce5..8047f8d0a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromBServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromBServiceImpl.java @@ -3,7 +3,6 @@ package com.iformall.service.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.iformall.common.IdWorker; -import com.iformall.common.ResultData; import com.iformall.domain.dto.WxCUserFromBDto; import com.iformall.domain.po.WxCUserFromB; import com.iformall.domain.po.WxMerchantBUser; @@ -14,7 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Date; -import java.util.UUID; /** * @author gongbiao @@ -60,7 +58,7 @@ public class WxCUserFromBServiceImpl implements WxCUserFromBService { @Override public WxCUserFromB getByOpenidAndAppId(WxCUserFromBDto wxCUserFromBDto) { - WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectByPrimaryKey(wxCUserFromBDto.getBUserId()); + WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectByPrimaryKey(wxCUserFromBDto.getUserId()); if (wxMerchantBUser == null) { return null; } @@ -71,7 +69,7 @@ public class WxCUserFromBServiceImpl implements WxCUserFromBService { @Override public PageInfo listCUser(WxCUserFromBDto wxCUserFromBDto, Integer pageIndex, Integer pageSize) { WxCUserFromB record = new WxCUserFromB(); - record.setBUserId(wxCUserFromBDto.getBUserId()); + record.setBUserId(wxCUserFromBDto.getUserId()); return PageHelper.startPage(pageIndex, pageSize) .doSelectPageInfo(() -> wxCUserFromBMapper.findList(record)); }