diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java index eeafff5c2..c6f64b63a 100755 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java @@ -699,8 +699,19 @@ public class WxUserGrantController extends BaseController { } if (StringUtils.isBlank(wxCUserBasicInfo.getName()) || wxCUserBasicInfo.getBirthdate() == null || wxCUserBasicInfo.getSex() == null) { - return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"必填信息不能为空"); + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"必填信息[姓名,生日,性别]不能为空"); } + + boolean isFirst = true; + try { + //WxCUserBasicInfo curWxCUserBasicInfo = getShortCacheMember(memberId,getFinalTenantId()); + WxCUserBasicInfo curWxCUserBasicInfo = wxCUserBasicInfoService.getById(memberId,getFinalTenantId()); + if (StringUtils.isNotBlank(curWxCUserBasicInfo.getName ()) && null != curWxCUserBasicInfo.getBirthdate() && null != curWxCUserBasicInfo.getSex()) { + isFirst = false; + } + } catch (Exception e) { + return new ResultData(Result.ERROR,e.getMessage()); + } if (StringUtils.isNotBlank(wxCUserBasicInfo.getNickName()) || StringUtils.isNotBlank(wxCUserBasicInfo.getAvatarUrl()) @@ -724,7 +735,7 @@ public class WxUserGrantController extends BaseController { removeCacheMember(memberId); - wxCUserBasicInfoService.completeInfoMsg(tenantEntity, record.getId()); + wxCUserBasicInfoService.completeInfoMsg(tenantEntity, record.getId(),isFirst); } return new ResultData(); diff --git a/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java b/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java index b0151c1d3..3d29eddad 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java @@ -182,7 +182,7 @@ public interface WxCUserBasicInfoService { void phoneFirstMsg(TenantEntity tenantEntity, Long id, boolean isFirst); - void completeInfoMsg(TenantEntity tenantEntity, Long id); + void completeInfoMsg(TenantEntity tenantEntity, Long id, boolean IsFirst); /** * 通过手机号更新积分 diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java index d5d3f9cf8..48859b536 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java @@ -1367,12 +1367,13 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc } @Override - public void completeInfoMsg(TenantEntity tenantEntity, Long id) { + public void completeInfoMsg(TenantEntity tenantEntity, Long id, boolean isFirst) { try{ FmInsideBasicUserMsg basicUserPushMsg = new FmInsideBasicUserMsg(); basicUserPushMsg.setMsgType(EnumMsgRecordType.INSIDE_C_COMPLETE_INFO.getCode()); basicUserPushMsg.updateTenantInfo(tenantEntity); basicUserPushMsg.setBasicUserId(id); + basicUserPushMsg.setIsFirst(isFirst); logger.info(">>>>>>>>>>>send completeInfoMsg :"+basicUserPushMsg); mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); }catch(Exception e){