Ver a proveniência

[BUG][ID1001633][B端-收银台,收银后补充会员信息填写后提示参数不能为空]

release_toaliyun_real
gongbiao há 7 anos
ascendente
cometimento
78b5f98a33
3 ficheiros alterados com 11 adições e 12 eliminações
  1. +6
    -6
      mallinkBApi/src/main/java/com/iformall/controller/WxCUserController.java
  2. +3
    -2
      mallinkService/src/main/java/com/iformall/domain/dto/WxCUserFromBDto.java
  3. +2
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromBServiceImpl.java

+ 6
- 6
mallinkBApi/src/main/java/com/iformall/controller/WxCUserController.java Ver ficheiro

@@ -75,11 +75,11 @@ public class WxCUserController extends BaseController {
if (StringUtils.isEmpty(wxCUserFromBDto.getAppId())) { if (StringUtils.isEmpty(wxCUserFromBDto.getAppId())) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "C端appId不能为空"); 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不能为空"); return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "bUserId不能为空");
} }
//根据bUserId查询B端用户是否存在 //根据bUserId查询B端用户是否存在
WxMerchantBUser bUser = wxMerchantBUserService.getById(wxCUserFromBDto.getBUserId());
WxMerchantBUser bUser = wxMerchantBUserService.getById(wxCUserFromBDto.getUserId());
if (bUser == null) { if (bUser == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "B端用户不存在"); 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); wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, wxCUserBasicInfo);
//新增来自B端的会员关联数据 //新增来自B端的会员关联数据
wxCUserFromB = new WxCUserFromB(); wxCUserFromB = new WxCUserFromB();
wxCUserFromB.setBUserId(wxCUserFromBDto.getBUserId());
wxCUserFromB.setBUserId(wxCUserFromBDto.getUserId());
wxCUserFromB.setCUserId(wxCUserBasicInfo.getId()); wxCUserFromB.setCUserId(wxCUserBasicInfo.getId());
wxCUserFromB.setOpenid(wxCUserFromBDto.getOpenid()); wxCUserFromB.setOpenid(wxCUserFromBDto.getOpenid());
wxCUserFromB.setMerchantId(bUser.getMerchantId()); wxCUserFromB.setMerchantId(bUser.getMerchantId());
@@ -151,7 +151,7 @@ public class WxCUserController extends BaseController {
wxCUserBasicInfoService.save(wxCUserBasicInfo); wxCUserBasicInfoService.save(wxCUserBasicInfo);
//新增来自B端的会员关联数据 //新增来自B端的会员关联数据
wxCUserFromB = new WxCUserFromB(); wxCUserFromB = new WxCUserFromB();
wxCUserFromB.setBUserId(wxCUserFromBDto.getBUserId());
wxCUserFromB.setBUserId(wxCUserFromBDto.getUserId());
wxCUserFromB.setCUserId(cUserId); wxCUserFromB.setCUserId(cUserId);
wxCUserFromB.setOpenid(wxCUserFromBDto.getOpenid()); wxCUserFromB.setOpenid(wxCUserFromBDto.getOpenid());
wxCUserFromB.setMerchantId(bUser.getMerchantId()); wxCUserFromB.setMerchantId(bUser.getMerchantId());
@@ -217,8 +217,8 @@ public class WxCUserController extends BaseController {
if (StringUtils.isEmpty(wxCUserFromBDto.getAppId())) { if (StringUtils.isEmpty(wxCUserFromBDto.getAppId())) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "C端appid不能为空"); 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); WxCUserFromB wxCUserFromB = wxCUserFromBService.getByOpenidAndAppId(wxCUserFromBDto);
if(wxCUserFromB!=null){ if(wxCUserFromB!=null){


+ 3
- 2
mallinkService/src/main/java/com/iformall/domain/dto/WxCUserFromBDto.java Ver ficheiro

@@ -10,8 +10,6 @@ import java.util.Date;
public class WxCUserFromBDto implements Serializable { public class WxCUserFromBDto implements Serializable {
private static final long serialVersionUID = 1L; 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") @io.swagger.annotations.ApiModelProperty(value="C端openid",name="openid")
private String openid; private String openid;
@io.swagger.annotations.ApiModelProperty(value="C端appid",name="appId") @io.swagger.annotations.ApiModelProperty(value="C端appid",name="appId")
@@ -28,4 +26,7 @@ public class WxCUserFromBDto implements Serializable {
private String phone; private String phone;
@io.swagger.annotations.ApiModelProperty(value = "商户ID", name = "merchantId") @io.swagger.annotations.ApiModelProperty(value = "商户ID", name = "merchantId")
private Long merchantId; private Long merchantId;
@io.swagger.annotations.ApiModelProperty(value = "B端登录者ID", name = "userId")
private Long userId;

} }

+ 2
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromBServiceImpl.java Ver ficheiro

@@ -3,7 +3,6 @@ package com.iformall.service.impl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker; import com.iformall.common.IdWorker;
import com.iformall.common.ResultData;
import com.iformall.domain.dto.WxCUserFromBDto; import com.iformall.domain.dto.WxCUserFromBDto;
import com.iformall.domain.po.WxCUserFromB; import com.iformall.domain.po.WxCUserFromB;
import com.iformall.domain.po.WxMerchantBUser; import com.iformall.domain.po.WxMerchantBUser;
@@ -14,7 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


import java.util.Date; import java.util.Date;
import java.util.UUID;


/** /**
* @author gongbiao * @author gongbiao
@@ -60,7 +58,7 @@ public class WxCUserFromBServiceImpl implements WxCUserFromBService {


@Override @Override
public WxCUserFromB getByOpenidAndAppId(WxCUserFromBDto wxCUserFromBDto) { public WxCUserFromB getByOpenidAndAppId(WxCUserFromBDto wxCUserFromBDto) {
WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectByPrimaryKey(wxCUserFromBDto.getBUserId());
WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectByPrimaryKey(wxCUserFromBDto.getUserId());
if (wxMerchantBUser == null) { if (wxMerchantBUser == null) {
return null; return null;
} }
@@ -71,7 +69,7 @@ public class WxCUserFromBServiceImpl implements WxCUserFromBService {
@Override @Override
public PageInfo<WxCUserFromB> listCUser(WxCUserFromBDto wxCUserFromBDto, Integer pageIndex, Integer pageSize) { public PageInfo<WxCUserFromB> listCUser(WxCUserFromBDto wxCUserFromBDto, Integer pageIndex, Integer pageSize) {
WxCUserFromB record = new WxCUserFromB(); WxCUserFromB record = new WxCUserFromB();
record.setBUserId(wxCUserFromBDto.getBUserId());
record.setBUserId(wxCUserFromBDto.getUserId());
return PageHelper.startPage(pageIndex, pageSize) return PageHelper.startPage(pageIndex, pageSize)
.doSelectPageInfo(() -> wxCUserFromBMapper.findList(record)); .doSelectPageInfo(() -> wxCUserFromBMapper.findList(record));
} }


Carregando…
Cancelar
Guardar