| @@ -720,28 +720,7 @@ public class WxUserGrantController extends BaseController { | |||
| removeCacheMember(memberId); | |||
| try{ | |||
| //推送猫酷 | |||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, record.getId()); | |||
| }catch(Exception e){ | |||
| logger.error("发送同步会员消息异常"); | |||
| } | |||
| wxScoreRulesService.addScore(tenantEntity,EnumScoreType.COMPLETE_INFO, record); | |||
| //增加积分 | |||
| WxCreditHistory wxCreditHistory = new WxCreditHistory(); | |||
| wxCreditHistory.setCUserId(record.getId()); | |||
| // wxCreditHistory.updateTenantInfo(tenantEntity); | |||
| wxCreditHistory.setTenantId(tenantEntity.getFinalTenantId()); | |||
| wxCreditHistory.setFinalTenantId(tenantEntity.getFinalTenantId()); | |||
| wxCreditHistory.setCreateDate(new Date()); | |||
| wxCreditHistory.setCreditType(EnumScoreType.COMPLETE_INFO.getCode()); | |||
| wxCreditHistory.setChangePurpose(EnumScoreType.COMPLETE_INFO.getMessage()); | |||
| wxCreditHistory.setOperatorType(EnumUserType.CUSERBASIC.getCode()); | |||
| wxCreditHistory.setOperatorId(memberId); | |||
| wxCreditHistoryService.saveOrUpdate(wxCreditHistory,tenantEntity.getTenantId()); | |||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, record,tenantEntity,null); | |||
| wxCUserBasicInfoService.completeInfoMsg(tenantEntity, record.getId()); | |||
| } | |||
| return new ResultData(); | |||
| @@ -68,6 +68,12 @@ public class MqBaseConsumer { | |||
| @Autowired | |||
| private FmInsideProductPushMsgServiceImpl fmInsideProductPushMsgServiceImpl; | |||
| @Autowired | |||
| private FmInsideBasicUserPhoneFirstMsgServiceImpl fmInsideBasicUserPhoneFirstMsgServiceImpl; | |||
| @Autowired | |||
| private FmInsideBasicUserCompleteInfoMsgServiceImpl fmInsideBasicUserCompleteInfoMsgServiceImpl; | |||
| @Autowired | |||
| private FmInsideBasicUserPushMsgServiceImpl fmInsideBasicUserPushMsgServiceImpl; | |||
| @@ -167,6 +173,16 @@ public class MqBaseConsumer { | |||
| FmInsideCLoginMsg msg = (FmInsideCLoginMsg)JsonUtil.readValue(message,FmInsideCLoginMsg.class); | |||
| fmInsideCLoginMsgService.send(msg); | |||
| } | |||
| else if(EnumMsgRecordType.INSIDE_C_PHONE_FIRST_LOGIN.getCode().equals(baseMsg.getMsgType())) { | |||
| // 内部消息 - c端首次登授权手机号 | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)JsonUtil.readValue(message, FmInsideBasicUserMsg.class); | |||
| fmInsideBasicUserPhoneFirstMsgServiceImpl.send(msg); | |||
| } | |||
| else if(EnumMsgRecordType.INSIDE_C_COMPLETE_INFO.getCode().equals(baseMsg.getMsgType())) { | |||
| // 内部消息 - c端完善个人信息 | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)JsonUtil.readValue(message, FmInsideBasicUserMsg.class); | |||
| fmInsideBasicUserCompleteInfoMsgServiceImpl.send(msg); | |||
| } | |||
| else if(EnumMsgRecordType.INSIDE_ORDER_PUSH.getCode().equals(baseMsg.getMsgType())) { | |||
| // 内部消息 - 订单同步 | |||
| FmInsideOrderPushMsg msg = (FmInsideOrderPushMsg)JsonUtil.readValue(message,FmInsideOrderPushMsg.class); | |||
| @@ -207,13 +223,13 @@ public class MqBaseConsumer { | |||
| else if(EnumMsgRecordType.MALL_COO_USER_PUSH.getCode().equals(baseMsg.getMsgType())) { | |||
| // 内部消息 - 同步会员 | |||
| FmInsideBasicUserPushMsg msg = (FmInsideBasicUserPushMsg)JsonUtil.readValue(message,FmInsideBasicUserPushMsg.class); | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)JsonUtil.readValue(message, FmInsideBasicUserMsg.class); | |||
| fmInsideBasicUserPushMsgServiceImpl.send(msg); | |||
| } | |||
| else if(EnumMsgRecordType.MEMBER_UPDATE_TENANT.getCode().equals(baseMsg.getMsgType())) { | |||
| // 内部消息 - 集团会员广场标签 | |||
| FmInsideBasicUserPushMsg msg = (FmInsideBasicUserPushMsg)JsonUtil.readValue(message,FmInsideBasicUserPushMsg.class); | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)JsonUtil.readValue(message, FmInsideBasicUserMsg.class); | |||
| FmInsideBasicUserTenantMsgService.send(msg); | |||
| } | |||
| @@ -7,9 +7,12 @@ import lombok.ToString; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class FmInsideBasicUserPushMsg extends BaseMsg{ | |||
| public class FmInsideBasicUserMsg extends BaseMsg{ | |||
| @io.swagger.annotations.ApiModelProperty(value = "会员Id", name = "basicUserId") | |||
| private Long basicUserId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "对否首次", name = "isFirst") | |||
| private Boolean isFirst; | |||
| } | |||
| @@ -36,6 +36,10 @@ public enum EnumMsgRecordType { | |||
| CAR_PAID(112,"停车支付回调"), | |||
| INSIDE_C_PHONE_FIRST_LOGIN(113, "C端用户授权手机号"),//内部消息,加积分等 | |||
| INSIDE_C_COMPLETE_INFO(114, "C端会员完善个人信息"),//内部消息,加积分等 | |||
| INSIDE_ORDER_PUSH_DELIVERY(200, "2.0核销同步"), | |||
| ; | |||
| @@ -28,7 +28,7 @@ public interface MallCooUserInfoService { | |||
| void pullByMobile(TenantEntity tenantEntity, Long basicUserId); | |||
| void pullByMobileMsg(TenantEntity tenantEntity, Long id); | |||
| void pullByMobileMsg(TenantEntity tenantEntity, Long basicUserId); | |||
| String payOrderMallCooPush(TenantEntity tenantEntity,WxCUserBasicInfo basicInfo,WxBatchOrder batchOrder,WxPayOrder payOrder); | |||
| @@ -179,5 +179,9 @@ public interface WxCUserBasicInfoService { | |||
| void updateTenantIdMsg(TenantEntity tenantInfo, TenantEntity mallTenant, Long userId); | |||
| void updateTenantId(TenantEntity tenantInfo, Long userId); | |||
| void phoneFirstMsg(TenantEntity tenantEntity, Long id, boolean isFirst); | |||
| void completeInfoMsg(TenantEntity tenantEntity, Long id); | |||
| } | |||
| @@ -104,6 +104,8 @@ public class BasicCUserService { | |||
| if (StringUtils.isBlank(userPhone)) | |||
| return null; | |||
| boolean isFirst = false; | |||
| Long basicUserId = null; | |||
| WxCUserBasicInfo byId = null; | |||
| if (null != userId) { | |||
| byId = wxCUserBasicInfoService.getById(userId,tenantEntity.getFinalTenantId()); | |||
| @@ -126,8 +128,8 @@ public class BasicCUserService { | |||
| basicInfo.setAvatarUrl(avatarUrl); | |||
| basicInfo.setSex(sex); | |||
| wxCUserBasicInfoService.update(basicInfo); | |||
| cleanBasicUser(basicInfo.getId()); | |||
| return basicInfo.getId(); | |||
| basicUserId = basicInfo.getId(); | |||
| } else { | |||
| if (byId != null) { | |||
| if (!byId.getTenantId().contains("," + tenantEntity.getTenantId() + ",")) { | |||
| @@ -138,8 +140,8 @@ public class BasicCUserService { | |||
| byId.setAvatarUrl(avatarUrl); | |||
| byId.setSex(sex); | |||
| wxCUserBasicInfoService.update(byId); | |||
| cleanBasicUser(byId.getId()); | |||
| return byId.getId(); | |||
| basicUserId = byId.getId(); | |||
| } else { | |||
| basicInfo = new WxCUserBasicInfo(); | |||
| basicInfo.setTenantId("," + tenantEntity.getTenantId() + ","); | |||
| @@ -149,26 +151,15 @@ public class BasicCUserService { | |||
| basicInfo.setAvatarUrl(avatarUrl); | |||
| basicInfo.setSex(sex); | |||
| wxCUserBasicInfoService.save(basicInfo); | |||
| cleanBasicUser(basicInfo.getId()); | |||
| // 首次授权, 增加成长值及积分 | |||
| // 成长值 | |||
| wxScoreRulesService.addScore(tenantEntity, EnumScoreType.WECHAT_PHONE, basicInfo); | |||
| // 增加积分 | |||
| wxCUserBasicInfoService.addCredit(basicInfo.getId(),tenantEntity,EnumScoreType.WECHAT_PHONE); | |||
| // 外部注券 | |||
| memCouponFromDspService.couponOrderFromDsp(tenantEntity, userPhone); | |||
| try{ | |||
| //推送猫酷 | |||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, basicInfo.getId()); | |||
| }catch(Exception e){ | |||
| logger.error("发送同步会员消息异常"); | |||
| } | |||
| return basicInfo.getId(); | |||
| isFirst = true; | |||
| basicUserId = basicInfo.getId(); | |||
| } | |||
| } | |||
| cleanBasicUser(basicUserId); | |||
| // 首次授权, 增加成长值及积分 | |||
| wxCUserBasicInfoService.phoneFirstMsg(tenantEntity,basicUserId,isFirst); | |||
| return basicUserId; | |||
| } | |||
| public void setCache(String token,BaseCUserEntity baseUser) { | |||
| @@ -177,7 +177,6 @@ public class TtCUserServiceAdapter extends BasicCUserService implements CUserSer | |||
| updateUser.setUpdateDate(new Date()); | |||
| ttCUserMapper.updateById(updateUser); | |||
| delForUserIdOnly(updateUser.getId(),updateUser.getUserId(),updateUser.getTenantId()); | |||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_PHONE, updateUser,updateUser,null); | |||
| cleanCuserToken(cuser.getToken()); | |||
| return updateUser.getPhone(); | |||
| } else { | |||
| @@ -205,7 +204,6 @@ public class TtCUserServiceAdapter extends BasicCUserService implements CUserSer | |||
| updateUser.setUpdateDate(new Date()); | |||
| ttCUserMapper.updateById(updateUser); | |||
| delForUserIdOnly(updateUser.getId(),updateUser.getUserId(),updateUser.getTenantId()); | |||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_PHONE, updateUser,updateUser,null); | |||
| cleanCuserToken(user.getToken()); | |||
| } | |||
| @@ -190,7 +190,6 @@ public class WxCUserServiceAdapter extends BasicCUserService implements CUserSer | |||
| updateUser.setUpdateDate(new Date()); | |||
| wxCUserMapper.updateById(updateUser); | |||
| delForUserIdOnly(updateUser.getId(),updateUser.getUserId(),updateUser.getTenantId()); | |||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_PHONE, updateUser,updateUser,null); | |||
| cleanCuserToken(cuser.getToken()); | |||
| return updateUser.getPhone(); | |||
| } else { | |||
| @@ -218,7 +217,6 @@ public class WxCUserServiceAdapter extends BasicCUserService implements CUserSer | |||
| updateUser.setUpdateDate(new Date()); | |||
| wxCUserMapper.updateById(updateUser); | |||
| delForUserIdOnly(updateUser.getId(),updateUser.getUserId(),updateUser.getTenantId()); | |||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_PHONE, updateUser,updateUser,null); | |||
| cleanCuserToken(user.getToken()); | |||
| } | |||
| @@ -3,13 +3,11 @@ package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserPushMsg; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserMsg; | |||
| import com.iformall.domain.vo.WxOrderCouponVo; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mallcoo.MallcooHelper; | |||
| import com.iformall.mallcoo.McUserInfo; | |||
| import com.iformall.mallcoo.biImport.BuyGroup; | |||
| @@ -243,13 +241,18 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { | |||
| } | |||
| @Override | |||
| public void pullByMobileMsg(TenantEntity tenantEntity, Long id) { | |||
| FmInsideBasicUserPushMsg basicUserPushMsg = new FmInsideBasicUserPushMsg(); | |||
| basicUserPushMsg.setMsgType(EnumMsgRecordType.MALL_COO_USER_PUSH.getCode()); | |||
| basicUserPushMsg.updateTenantInfo(tenantEntity); | |||
| basicUserPushMsg.setBasicUserId(id); | |||
| logger.info(">>>>>>>>>>>send pullByMobileMsg :"+basicUserPushMsg); | |||
| mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| public void pullByMobileMsg(TenantEntity tenantEntity, Long basicUserId) { | |||
| try{ | |||
| FmInsideBasicUserMsg basicUserPushMsg = new FmInsideBasicUserMsg(); | |||
| basicUserPushMsg.setMsgType(EnumMsgRecordType.MALL_COO_USER_PUSH.getCode()); | |||
| basicUserPushMsg.updateTenantInfo(tenantEntity); | |||
| basicUserPushMsg.setBasicUserId(basicUserId); | |||
| logger.info(">>>>>>>>>>>send pullByMobileMsg :"+basicUserPushMsg); | |||
| mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| }catch(Exception e){ | |||
| logger.error("发送同步会员消息异常"); | |||
| } | |||
| } | |||
| private WxThirdPartyConfig getThirdPartyConfig(TenantEntity tenantEntity){ | |||
| @@ -11,7 +11,7 @@ import com.iformall.domain.dto.WxCUserBasicInfoFilterDto; | |||
| import com.iformall.domain.dto.WxCUserBasicInfoFilterListDto; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserPushMsg; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserMsg; | |||
| import com.iformall.domain.vo.*; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.mapper.*; | |||
| @@ -747,7 +747,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||
| @Override | |||
| public void updateTenantIdMsg(TenantEntity tenantInfo, TenantEntity mallTenant, Long userId) { | |||
| try{ | |||
| FmInsideBasicUserPushMsg basicUserPushMsg = new FmInsideBasicUserPushMsg(); | |||
| FmInsideBasicUserMsg basicUserPushMsg = new FmInsideBasicUserMsg(); | |||
| basicUserPushMsg.setMsgType(EnumMsgRecordType.MEMBER_UPDATE_TENANT.getCode()); | |||
| basicUserPushMsg.updateTenantInfo(tenantInfo); | |||
| basicUserPushMsg.setMallTenantEntity(mallTenant); | |||
| @@ -769,12 +769,9 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||
| basicInfoUpd.setId(userId); | |||
| basicInfoUpd.setTenantId(basicInfo.getTenantId() + tenantEntity.getTenantId() + ","); | |||
| int i = wxCUserBasicInfoMapper.updateById(basicInfoUpd); | |||
| try{ | |||
| //推送猫酷 | |||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, basicInfo.getId()); | |||
| }catch(Exception e){ | |||
| logger.error("发送同步会员消息异常"); | |||
| } | |||
| //推送猫酷 | |||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, basicInfo.getId()); | |||
| } | |||
| } | |||
| @@ -1353,5 +1350,36 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||
| public List<Long> findIdList(WxCUserBasicInfo record) { | |||
| return wxCUserBasicInfoMapper.findIdList(record); | |||
| } | |||
| @Override | |||
| public void phoneFirstMsg(TenantEntity tenantEntity, Long id, boolean isFirst) { | |||
| try{ | |||
| FmInsideBasicUserMsg basicUserPushMsg = new FmInsideBasicUserMsg(); | |||
| basicUserPushMsg.setMsgType(EnumMsgRecordType.INSIDE_C_PHONE_FIRST_LOGIN.getCode()); | |||
| basicUserPushMsg.updateTenantInfo(tenantEntity); | |||
| basicUserPushMsg.setBasicUserId(id); | |||
| basicUserPushMsg.setIsFirst(isFirst); | |||
| logger.info(">>>>>>>>>>>send phoneFirstMsg :"+basicUserPushMsg); | |||
| mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| }catch(Exception e){ | |||
| logger.error("发送首次授权手机号消息异常"); | |||
| } | |||
| } | |||
| @Override | |||
| public void completeInfoMsg(TenantEntity tenantEntity, Long id) { | |||
| try{ | |||
| FmInsideBasicUserMsg basicUserPushMsg = new FmInsideBasicUserMsg(); | |||
| basicUserPushMsg.setMsgType(EnumMsgRecordType.INSIDE_C_COMPLETE_INFO.getCode()); | |||
| basicUserPushMsg.updateTenantInfo(tenantEntity); | |||
| basicUserPushMsg.setBasicUserId(id); | |||
| logger.info(">>>>>>>>>>>send completeInfoMsg :"+basicUserPushMsg); | |||
| mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| }catch(Exception e){ | |||
| logger.error("发送完善个人信息消息异常"); | |||
| } | |||
| } | |||
| } | |||
| @@ -172,8 +172,8 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| } | |||
| break; | |||
| case ASSIGN_TAGS_TRIGGER_PHONE: { | |||
| CUser param = (CUser) obj; | |||
| WxCUserBasicInfo user = wxCUserBasicInfoMapper.selectById(param.getUserId(),param.getFinalTenantId()); | |||
| WxCUserBasicInfo param = (WxCUserBasicInfo) obj; | |||
| WxCUserBasicInfo user = wxCUserBasicInfoMapper.selectById(param.getId(),param.getFinalTenantId()); | |||
| if (user != null) { | |||
| if (user.getPhone() != null) { | |||
| //来源 | |||
| @@ -0,0 +1,85 @@ | |||
| package com.iformall.service.msg.impl; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| import com.iformall.domain.po.WxCreditHistory; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.msg.BaseMsg; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserMsg; | |||
| import com.iformall.enums.EnumAssignTagsTrigger; | |||
| import com.iformall.enums.EnumScoreType; | |||
| import com.iformall.enums.EnumUserType; | |||
| import com.iformall.service.*; | |||
| import com.iformall.service.msg.MsgSendService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.Date; | |||
| /** | |||
| * | |||
| * @author | |||
| * @date | |||
| */ | |||
| @Service | |||
| public class FmInsideBasicUserCompleteInfoMsgServiceImpl implements MsgSendService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private MallCooUserInfoService mallCooUserInfoService; | |||
| @Autowired | |||
| private WxScoreRulesService wxScoreRulesService; | |||
| @Autowired | |||
| private WxCUserBasicInfoService wxCUserBasicInfoService; | |||
| @Autowired | |||
| private WxCreditHistoryService wxCreditHistoryService; | |||
| @Autowired | |||
| private WxCUserTagsService wxCUserTagsService; | |||
| @Autowired | |||
| private MemCouponFromDspService memCouponFromDspService; | |||
| @Override | |||
| public void send(BaseMsg baseMsg) throws Exception{ | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)baseMsg; | |||
| Long basicUserId = msg.getBasicUserId(); | |||
| TenantEntity tenantEntity = new TenantEntity(); | |||
| tenantEntity.setTenantId(msg.getTenantId()); | |||
| tenantEntity.setParentTenantId(msg.getParentTenantId()); | |||
| WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.getById(basicUserId, tenantEntity.getFinalTenantId()); | |||
| if(null == basicInfo){ | |||
| logger.error("未找到会员信息"+basicUserId); | |||
| return; | |||
| } | |||
| //增加成长值 | |||
| wxScoreRulesService.addScore(tenantEntity,EnumScoreType.COMPLETE_INFO, basicInfo); | |||
| //增加积分 | |||
| WxCreditHistory wxCreditHistory = new WxCreditHistory(); | |||
| wxCreditHistory.setCUserId(basicUserId); | |||
| // wxCreditHistory.updateTenantInfo(tenantEntity); | |||
| wxCreditHistory.setTenantId(tenantEntity.getFinalTenantId()); | |||
| wxCreditHistory.setFinalTenantId(tenantEntity.getFinalTenantId()); | |||
| wxCreditHistory.setCreateDate(new Date()); | |||
| wxCreditHistory.setCreditType(EnumScoreType.COMPLETE_INFO.getCode()); | |||
| wxCreditHistory.setChangePurpose(EnumScoreType.COMPLETE_INFO.getMessage()); | |||
| wxCreditHistory.setOperatorType(EnumUserType.CUSERBASIC.getCode()); | |||
| wxCreditHistory.setOperatorId(basicUserId); | |||
| wxCreditHistoryService.saveOrUpdate(wxCreditHistory,tenantEntity.getTenantId()); | |||
| //打标签 | |||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, basicInfo,tenantEntity,null); | |||
| //推送猫酷 | |||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, basicUserId); | |||
| } | |||
| } | |||
| @@ -0,0 +1,72 @@ | |||
| package com.iformall.service.msg.impl; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.msg.BaseMsg; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserMsg; | |||
| import com.iformall.enums.EnumAssignTagsTrigger; | |||
| import com.iformall.enums.EnumScoreType; | |||
| import com.iformall.service.*; | |||
| import com.iformall.service.msg.MsgSendService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * | |||
| * @author | |||
| * @date | |||
| */ | |||
| @Service | |||
| public class FmInsideBasicUserPhoneFirstMsgServiceImpl implements MsgSendService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private MallCooUserInfoService mallCooUserInfoService; | |||
| @Autowired | |||
| private WxScoreRulesService wxScoreRulesService; | |||
| @Autowired | |||
| private WxCUserBasicInfoService wxCUserBasicInfoService; | |||
| @Autowired | |||
| private MemCouponFromDspService memCouponFromDspService; | |||
| @Autowired | |||
| private WxCUserTagsService wxCUserTagsService; | |||
| @Override | |||
| public void send(BaseMsg baseMsg) throws Exception{ | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)baseMsg; | |||
| Long basicUserId = msg.getBasicUserId(); | |||
| TenantEntity tenantEntity = new TenantEntity(); | |||
| tenantEntity.setTenantId(msg.getTenantId()); | |||
| tenantEntity.setParentTenantId(msg.getParentTenantId()); | |||
| WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.getById(basicUserId, tenantEntity.getFinalTenantId()); | |||
| if(null == basicInfo){ | |||
| logger.error("未找到会员信息"+basicUserId); | |||
| return; | |||
| } | |||
| // 成长值 | |||
| wxScoreRulesService.addScore(tenantEntity, EnumScoreType.WECHAT_PHONE, basicInfo); | |||
| // 增加积分 | |||
| wxCUserBasicInfoService.addCredit(basicInfo.getId(),tenantEntity,EnumScoreType.WECHAT_PHONE); | |||
| // 外部注券 | |||
| memCouponFromDspService.couponOrderFromDsp(tenantEntity, basicInfo.getPhone()); | |||
| //打标签 | |||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_PHONE, basicInfo,tenantEntity,null); | |||
| //推送猫酷 | |||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, basicInfo.getId()); | |||
| } | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.service.msg.impl; | |||
| import com.iformall.domain.po.msg.BaseMsg; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserPushMsg; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserMsg; | |||
| import com.iformall.service.MallCooUserInfoService; | |||
| import com.iformall.service.msg.MsgSendService; | |||
| import org.slf4j.Logger; | |||
| @@ -24,7 +24,7 @@ public class FmInsideBasicUserPushMsgServiceImpl implements MsgSendService { | |||
| @Override | |||
| public void send(BaseMsg baseMsg) throws Exception{ | |||
| FmInsideBasicUserPushMsg msg = (FmInsideBasicUserPushMsg)baseMsg; | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)baseMsg; | |||
| mallCooUserInfoService.pullByMobile(msg.getTenantInfo(),msg.getBasicUserId()); | |||
| @@ -1,8 +1,7 @@ | |||
| package com.iformall.service.msg.impl; | |||
| import com.iformall.domain.po.msg.BaseMsg; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserPushMsg; | |||
| import com.iformall.service.MallCooUserInfoService; | |||
| import com.iformall.domain.po.msg.FmInsideBasicUserMsg; | |||
| import com.iformall.service.WxCUserBasicInfoService; | |||
| import com.iformall.service.msg.MsgSendService; | |||
| import org.slf4j.Logger; | |||
| @@ -25,7 +24,7 @@ public class FmInsideBasicUserTenantMsgServiceImpl implements MsgSendService { | |||
| @Override | |||
| public void send(BaseMsg baseMsg) throws Exception{ | |||
| FmInsideBasicUserPushMsg msg = (FmInsideBasicUserPushMsg)baseMsg; | |||
| FmInsideBasicUserMsg msg = (FmInsideBasicUserMsg)baseMsg; | |||
| wxCUserBasicInfoService.updateTenantId(msg.getMallTenantEntity(),msg.getBasicUserId()); | |||