| @@ -699,8 +699,19 @@ public class WxUserGrantController extends BaseController { | |||||
| } | } | ||||
| if (StringUtils.isBlank(wxCUserBasicInfo.getName()) || wxCUserBasicInfo.getBirthdate() == null || wxCUserBasicInfo.getSex() == null) { | 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()) | if (StringUtils.isNotBlank(wxCUserBasicInfo.getNickName()) | ||||
| || StringUtils.isNotBlank(wxCUserBasicInfo.getAvatarUrl()) | || StringUtils.isNotBlank(wxCUserBasicInfo.getAvatarUrl()) | ||||
| @@ -724,7 +735,7 @@ public class WxUserGrantController extends BaseController { | |||||
| removeCacheMember(memberId); | removeCacheMember(memberId); | ||||
| wxCUserBasicInfoService.completeInfoMsg(tenantEntity, record.getId()); | |||||
| wxCUserBasicInfoService.completeInfoMsg(tenantEntity, record.getId(),isFirst); | |||||
| } | } | ||||
| return new ResultData(); | return new ResultData(); | ||||
| @@ -182,7 +182,7 @@ public interface WxCUserBasicInfoService { | |||||
| void phoneFirstMsg(TenantEntity tenantEntity, Long id, boolean isFirst); | void phoneFirstMsg(TenantEntity tenantEntity, Long id, boolean isFirst); | ||||
| void completeInfoMsg(TenantEntity tenantEntity, Long id); | |||||
| void completeInfoMsg(TenantEntity tenantEntity, Long id, boolean IsFirst); | |||||
| /** | /** | ||||
| * 通过手机号更新积分 | * 通过手机号更新积分 | ||||
| @@ -1367,12 +1367,13 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
| } | } | ||||
| @Override | @Override | ||||
| public void completeInfoMsg(TenantEntity tenantEntity, Long id) { | |||||
| public void completeInfoMsg(TenantEntity tenantEntity, Long id, boolean isFirst) { | |||||
| try{ | try{ | ||||
| FmInsideBasicUserMsg basicUserPushMsg = new FmInsideBasicUserMsg(); | FmInsideBasicUserMsg basicUserPushMsg = new FmInsideBasicUserMsg(); | ||||
| basicUserPushMsg.setMsgType(EnumMsgRecordType.INSIDE_C_COMPLETE_INFO.getCode()); | basicUserPushMsg.setMsgType(EnumMsgRecordType.INSIDE_C_COMPLETE_INFO.getCode()); | ||||
| basicUserPushMsg.updateTenantInfo(tenantEntity); | basicUserPushMsg.updateTenantInfo(tenantEntity); | ||||
| basicUserPushMsg.setBasicUserId(id); | basicUserPushMsg.setBasicUserId(id); | ||||
| basicUserPushMsg.setIsFirst(isFirst); | |||||
| logger.info(">>>>>>>>>>>send completeInfoMsg :"+basicUserPushMsg); | logger.info(">>>>>>>>>>>send completeInfoMsg :"+basicUserPushMsg); | ||||
| mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | ||||
| }catch(Exception e){ | }catch(Exception e){ | ||||