| @@ -164,18 +164,18 @@ public class TtMerchantPoiController extends BaseController { | |||||
| if(couponChannelId == null){ | if(couponChannelId == null){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | ||||
| } | } | ||||
| String merchantIdStr = param.get("merchantIds"); | |||||
| List<Long> merchantIds = new ArrayList<>(); | |||||
| try{ | |||||
| List<String> strings = Arrays.asList(merchantIdStr.split(",")); | |||||
| merchantIds = strings.stream().map(s -> Long.parseLong(s.trim())).collect(Collectors.toList()); | |||||
| }catch(Exception e){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_CAST_ERROR); | |||||
| } | |||||
| if(merchantIds == null || merchantIds.size() == 0){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| return ttMerchantPoiService.spuSync(getTenantInfo(),couponChannelId,merchantIds); | |||||
| // String merchantIdStr = param.get("merchantIds"); | |||||
| // List<Long> merchantIds = new ArrayList<>(); | |||||
| // try{ | |||||
| // List<String> strings = Arrays.asList(merchantIdStr.split(",")); | |||||
| // merchantIds = strings.stream().map(s -> Long.parseLong(s.trim())).collect(Collectors.toList()); | |||||
| // }catch(Exception e){ | |||||
| // return new ResultData(ErrorCode.SYS_PARAMETER_CAST_ERROR); | |||||
| // } | |||||
| // if(merchantIds == null || merchantIds.size() == 0){ | |||||
| // return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| // } | |||||
| return ttMerchantPoiService.spuSync(getTenantInfo(),couponChannelId,null); | |||||
| } | } | ||||
| @ApiOperation("商品同步查询") | @ApiOperation("商品同步查询") | ||||
| @@ -266,6 +266,7 @@ public class WxCouponController extends BaseController { | |||||
| wxcv.setBeginTime(cc.getBeginTime()); | wxcv.setBeginTime(cc.getBeginTime()); | ||||
| wxcv.setEndTime(cc.getEndTime()); | wxcv.setEndTime(cc.getEndTime()); | ||||
| wxcv.setQrCode(cc.getQrCode()); | wxcv.setQrCode(cc.getQrCode()); | ||||
| wxcv.setTtSpuId(cc.getTtSpuId()); | |||||
| return wxcv; | return wxcv; | ||||
| }else if(couponIdL > 0l){ | }else if(couponIdL > 0l){ | ||||
| WxCouponCVo wxcv = couponService.getVoById(couponIdL,tenantId); | WxCouponCVo wxcv = couponService.getVoById(couponIdL,tenantId); | ||||
| @@ -696,8 +696,13 @@ public class WxUserGrantController extends BaseController { | |||||
| record.setUpdChild(true); | record.setUpdChild(true); | ||||
| wxCUserBasicInfoService.update(record); | wxCUserBasicInfoService.update(record); | ||||
| //推送猫酷 | |||||
| mallCooUserInfoService.pullByMobile(tenantEntity, record); | |||||
| try{ | |||||
| //推送猫酷 | |||||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, record.getId()); | |||||
| }catch(Exception e){ | |||||
| logger.error("发送同步会员消息异常"); | |||||
| } | |||||
| wxScoreRulesService.addScore(tenantEntity,EnumScoreType.COMPLETE_INFO, record); | wxScoreRulesService.addScore(tenantEntity,EnumScoreType.COMPLETE_INFO, record); | ||||
| //增加积分 | //增加积分 | ||||
| @@ -55,6 +55,9 @@ public class MqBaseConsumer { | |||||
| @Autowired | @Autowired | ||||
| private FmInsideProductPushMsgServiceImpl fmInsideProductPushMsgServiceImpl; | private FmInsideProductPushMsgServiceImpl fmInsideProductPushMsgServiceImpl; | ||||
| @Autowired | |||||
| private FmInsideBasicUserPushMsgServiceImpl fmInsideBasicUserPushMsgServiceImpl; | |||||
| @@ -140,6 +143,12 @@ public class MqBaseConsumer { | |||||
| fmInsideProductPushMsgServiceImpl.send(msg); | fmInsideProductPushMsgServiceImpl.send(msg); | ||||
| } | } | ||||
| else if(EnumMsgRecordType.MALL_COO_USER_PUSH.getCode().equals(baseMsg.getMsgType())) { | |||||
| // 内部消息 - 同步会员 | |||||
| FmInsideBasicUserPushMsg msg = (FmInsideBasicUserPushMsg)JsonUtil.readValue(message,FmInsideBasicUserPushMsg.class); | |||||
| fmInsideBasicUserPushMsgServiceImpl.send(msg); | |||||
| } | |||||
| }catch (Throwable e){ | }catch (Throwable e){ | ||||
| log.error("consum received error: ", e); | log.error("consum received error: ", e); | ||||
| /** | /** | ||||
| @@ -0,0 +1,15 @@ | |||||
| package com.iformall.domain.po.msg; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class FmInsideBasicUserPushMsg extends BaseMsg{ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "会员Id", name = "basicUserId") | |||||
| private Long basicUserId; | |||||
| } | |||||
| @@ -37,6 +37,8 @@ public class WxCouponCVo extends WxCoupon implements Serializable { | |||||
| private String qrCode; | private String qrCode; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String ttQrCode; | private String ttQrCode; | ||||
| @TableField(exist = false) | |||||
| private String ttSpuId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="券ID",name="couponId") | @io.swagger.annotations.ApiModelProperty(value="券ID",name="couponId") | ||||
| @@ -45,8 +45,7 @@ public class TtWebGetRequestExecutor implements RequestExecutor<String, String> | |||||
| @Override | @Override | ||||
| public String execute(String uri, String queryParam, WxType wxType) throws WxErrorException, IOException { | public String execute(String uri, String queryParam, WxType wxType) throws WxErrorException, IOException { | ||||
| logger.info("uri{}"+uri); | |||||
| logger.info("request{}"+queryParam); | |||||
| String access_token = handleUrl(uri); | String access_token = handleUrl(uri); | ||||
| if(StringUtils.isBlank(access_token)){ | if(StringUtils.isBlank(access_token)){ | ||||
| WxError wxError = WxError.fromJson("{\n" + | WxError wxError = WxError.fromJson("{\n" + | ||||
| @@ -66,6 +65,9 @@ public class TtWebGetRequestExecutor implements RequestExecutor<String, String> | |||||
| HttpGet httpGet = new HttpGet(uri); | HttpGet httpGet = new HttpGet(uri); | ||||
| httpGet.addHeader("Content-Type","application/json"); | httpGet.addHeader("Content-Type","application/json"); | ||||
| httpGet.addHeader("access-token",access_token); | httpGet.addHeader("access-token",access_token); | ||||
| logger.info("get请求地址uri{}"+uri); | |||||
| logger.info("header-----access_token{}"+access_token); | |||||
| if (requestHttp.getRequestHttpProxy() != null) { | if (requestHttp.getRequestHttpProxy() != null) { | ||||
| RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); | RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); | ||||
| httpGet.setConfig(config); | httpGet.setConfig(config); | ||||
| @@ -46,8 +46,7 @@ public class TtWebPostRequestExecutor implements RequestExecutor<String, String> | |||||
| @Override | @Override | ||||
| public String execute(String uri, String postEntity, WxType wxType) throws WxErrorException, IOException { | public String execute(String uri, String postEntity, WxType wxType) throws WxErrorException, IOException { | ||||
| logger.info("uri{}"+uri); | |||||
| logger.info("request{}"+postEntity); | |||||
| String access_token = handleUrl(uri); | String access_token = handleUrl(uri); | ||||
| if(StringUtils.isBlank(access_token)){ | if(StringUtils.isBlank(access_token)){ | ||||
| WxError wxError = WxError.fromJson("{\n" + | WxError wxError = WxError.fromJson("{\n" + | ||||
| @@ -60,6 +59,9 @@ public class TtWebPostRequestExecutor implements RequestExecutor<String, String> | |||||
| HttpPost httpPost = new HttpPost(uri); | HttpPost httpPost = new HttpPost(uri); | ||||
| httpPost.addHeader("Content-Type","application/json"); | httpPost.addHeader("Content-Type","application/json"); | ||||
| httpPost.addHeader("access-token",access_token); | httpPost.addHeader("access-token",access_token); | ||||
| logger.info("post请求地址uri{}"+uri); | |||||
| logger.info("header-----access_token{}"+access_token); | |||||
| logger.info("请求参数{}"+postEntity); | |||||
| if (requestHttp.getRequestHttpProxy() != null) { | if (requestHttp.getRequestHttpProxy() != null) { | ||||
| RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); | RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); | ||||
| @@ -23,6 +23,8 @@ public enum EnumMsgRecordType { | |||||
| INSIDE_ORDER_REFUND(107, "退款提交成功"), | INSIDE_ORDER_REFUND(107, "退款提交成功"), | ||||
| INSIDE_ORDER_PUSH(108, "订单同步"), | INSIDE_ORDER_PUSH(108, "订单同步"), | ||||
| INSIDE_PRODUCT_PUSH(109, "商品状态或库存同步"), | INSIDE_PRODUCT_PUSH(109, "商品状态或库存同步"), | ||||
| MALL_COO_USER_PUSH(110, "猫酷同步会员"), | |||||
| ; | ; | ||||
| public static EnumMsgRecordType getEnum(Integer code) { | public static EnumMsgRecordType getEnum(Integer code) { | ||||
| @@ -26,7 +26,8 @@ public interface MallCooUserInfoService { | |||||
| MallCooUserInfo getByPhone(String phone,String finalTenantId); | MallCooUserInfo getByPhone(String phone,String finalTenantId); | ||||
| void pullByMobile(TenantEntity tenantEntity, WxCUserBasicInfo basicInfo); | |||||
| void pullByMobile(TenantEntity tenantEntity, Long basicUserId); | |||||
| void pullByMobileMsg(TenantEntity tenantEntity, Long id); | |||||
| } | } | ||||
| @@ -159,8 +159,12 @@ public class BasicCUserService { | |||||
| // 外部注券 | // 外部注券 | ||||
| memCouponFromDspService.couponOrderFromDsp(tenantEntity, userPhone); | memCouponFromDspService.couponOrderFromDsp(tenantEntity, userPhone); | ||||
| //推送猫酷 | |||||
| mallCooUserInfoService.pullByMobile(tenantEntity, basicInfo); | |||||
| try{ | |||||
| //推送猫酷 | |||||
| mallCooUserInfoService.pullByMobileMsg(tenantEntity, basicInfo.getId()); | |||||
| }catch(Exception e){ | |||||
| logger.error("发送同步会员消息异常"); | |||||
| } | |||||
| return basicInfo.getId(); | return basicInfo.getId(); | ||||
| } | } | ||||
| @@ -1,21 +1,21 @@ | |||||
| package com.iformall.service.impl; | package com.iformall.service.impl; | ||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumThirdPartyConfigType; | |||||
| import com.iformall.domain.po.msg.FmInsideBasicUserPushMsg; | |||||
| import com.iformall.enums.*; | |||||
| import com.iformall.mallcoo.MallcooHelper; | import com.iformall.mallcoo.MallcooHelper; | ||||
| import com.iformall.mallcoo.McUserInfo; | import com.iformall.mallcoo.McUserInfo; | ||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| import com.iformall.mq.MqBaseProducer; | |||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.scheduling.annotation.Async; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| @@ -34,6 +34,9 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { | |||||
| @Autowired | @Autowired | ||||
| WxThirdPartyConfigMapper wxThirdPartyConfigMapper; | WxThirdPartyConfigMapper wxThirdPartyConfigMapper; | ||||
| @Autowired | |||||
| private MqBaseProducer mqBaseProducer; | |||||
| @Override | @Override | ||||
| public PageInfo<MallCooUserInfo> listAsPage(MallCooUserInfo record, Integer pageIndex, Integer pageSize) { | public PageInfo<MallCooUserInfo> listAsPage(MallCooUserInfo record, Integer pageIndex, Integer pageSize) { | ||||
| @@ -54,18 +57,18 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { | |||||
| return mallCooUserInfoMapper.selectOne(new QueryWrapper<>(userInfo)); | return mallCooUserInfoMapper.selectOne(new QueryWrapper<>(userInfo)); | ||||
| } | } | ||||
| @Async | |||||
| @Override | @Override | ||||
| public void pullByMobile(TenantEntity tenantEntity, WxCUserBasicInfo basicInfo) { | |||||
| public void pullByMobile(TenantEntity tenantEntity, Long basicUserId) { | |||||
| try{ | try{ | ||||
| WxThirdPartyConfig config = getThirdPartyConfig(tenantEntity); | WxThirdPartyConfig config = getThirdPartyConfig(tenantEntity); | ||||
| if(config == null){ | if(config == null){ | ||||
| logger.error("未找到猫酷配置信息"); | logger.error("未找到猫酷配置信息"); | ||||
| return; | return; | ||||
| } | } | ||||
| if(StringUtils.isBlank(basicInfo.getPhone())){ | |||||
| basicInfo = wxCUserBasicInfoMapper.selectById(basicInfo.getId(),basicInfo.getFinalTenantId()); | |||||
| WxCUserBasicInfo basicInfo = wxCUserBasicInfoMapper.selectById(basicUserId, tenantEntity.getFinalTenantId()); | |||||
| if(null == basicInfo){ | |||||
| logger.error("未找到会员信息"+basicUserId); | |||||
| return; | |||||
| } | } | ||||
| MallCooUserInfo mallCooUserInfo = this.getByPhone(basicInfo.getPhone(), basicInfo.getFinalTenantId()); | MallCooUserInfo mallCooUserInfo = this.getByPhone(basicInfo.getPhone(), basicInfo.getFinalTenantId()); | ||||
| if(mallCooUserInfo == null){ | if(mallCooUserInfo == null){ | ||||
| @@ -109,6 +112,16 @@ 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()); | |||||
| } | |||||
| private WxThirdPartyConfig getThirdPartyConfig(TenantEntity tenantEntity){ | private WxThirdPartyConfig getThirdPartyConfig(TenantEntity tenantEntity){ | ||||
| WxThirdPartyConfig configQ = new WxThirdPartyConfig(); | WxThirdPartyConfig configQ = new WxThirdPartyConfig(); | ||||
| configQ.updateTenantInfo(tenantEntity); | configQ.updateTenantInfo(tenantEntity); | ||||
| @@ -67,7 +67,6 @@ public class OrderSnapshotServiceImpl implements OrderSnapshotService { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到订单数据"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到订单数据"); | ||||
| } | } | ||||
| @Async | |||||
| @Override | @Override | ||||
| public void saveOrderSnapshot(WxOrder order) { | public void saveOrderSnapshot(WxOrder order) { | ||||
| try{ | try{ | ||||
| @@ -579,18 +579,23 @@ public class TtMerchantPoiServiceImpl implements TtMerchantPoiService { | |||||
| if(!EnumCouponType.getSpuSyncType().contains(coupon.getType())){ | if(!EnumCouponType.getSpuSyncType().contains(coupon.getType())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"卷类型不支持同步poi"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"卷类型不支持同步poi"); | ||||
| } | } | ||||
| List<Long> couponMerchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(coupon.getId(), tenantInfo.getTenantId()); | |||||
| if(couponMerchantIds == null || couponMerchantIds.size() == 0 ){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到门店"); | |||||
| } | |||||
| TtMerchantPoi poi = new TtMerchantPoi(); | TtMerchantPoi poi = new TtMerchantPoi(); | ||||
| poi.updateTenantInfo(tenantInfo); | poi.updateTenantInfo(tenantInfo); | ||||
| poi.setIds(merchantIds); | |||||
| poi.setIds(couponMerchantIds); | |||||
| poi.setMatchStatus(EnumSupplierMathStatus.match_success.getCode()); | poi.setMatchStatus(EnumSupplierMathStatus.match_success.getCode()); | ||||
| poi.setSyncStatus(EnumSupplierSyncStatus.sync_success.getCode()); | poi.setSyncStatus(EnumSupplierSyncStatus.sync_success.getCode()); | ||||
| List<TtMerchantPoi> poiList = ttMerchantPoiMapper.findList(poi); | List<TtMerchantPoi> poiList = ttMerchantPoiMapper.findList(poi); | ||||
| if(merchantIds.size() != poiList.size()){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到poi或poi不匹配"); | |||||
| if(poiList == null || poiList.isEmpty()){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到可用poi"); | |||||
| } | } | ||||
| List<Long> collect = poiList.stream().map(p -> p.getId()).collect(Collectors.toList()); | |||||
| String spuId = spuSync(coupon,couponChannel,merchantIds); | |||||
| String spuId = spuSync(coupon,couponChannel,collect); | |||||
| if(StringUtils.isBlank(spuId)){ | if(StringUtils.isBlank(spuId)){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"同步失败"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"同步失败"); | ||||
| } | } | ||||
| @@ -969,13 +969,13 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| } | } | ||||
| private void spuStockSync(TenantEntity tenantEntity,Long id){ | private void spuStockSync(TenantEntity tenantEntity,Long id){ | ||||
| new Thread(() -> { | |||||
| //1秒之后同步poi | |||||
| try { | |||||
| Thread.currentThread().sleep(1000); | |||||
| } catch (Exception e) { | |||||
| logger.error("sleep error: " + e.getMessage()); | |||||
| } | |||||
| // new Thread(() -> { | |||||
| // //1秒之后同步poi | |||||
| // try { | |||||
| // Thread.currentThread().sleep(1000); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("sleep error: " + e.getMessage()); | |||||
| // } | |||||
| List<Long> couponChannelIds = wxCouponChannelMapper.getPoiProductIdList(tenantEntity.getTenantId(),id); | List<Long> couponChannelIds = wxCouponChannelMapper.getPoiProductIdList(tenantEntity.getTenantId(),id); | ||||
| if(couponChannelIds != null && couponChannelIds.size() > 0){ | if(couponChannelIds != null && couponChannelIds.size() > 0){ | ||||
| @@ -991,7 +991,7 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| } | } | ||||
| } | } | ||||
| }).start(); | |||||
| // }).start(); | |||||
| } | } | ||||
| @@ -213,6 +213,9 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| @Lazy | @Lazy | ||||
| @Autowired | @Autowired | ||||
| private WxMsgService wxMsgService; | private WxMsgService wxMsgService; | ||||
| @Autowired | |||||
| private OrderSnapshotService orderSnapshotService; | |||||
| @Override | @Override | ||||
| public PageInfo<WxOrder> listAsPage(WxOrder record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxOrder> listAsPage(WxOrder record, Integer pageIndex, Integer pageSize) { | ||||
| @@ -2034,6 +2037,8 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| * @param user | * @param user | ||||
| */ | */ | ||||
| public void actionAfterCouponOrderSuccess(WxOrder order, WxCoupon coupon, WxCUserBasicInfo user) { | public void actionAfterCouponOrderSuccess(WxOrder order, WxCoupon coupon, WxCUserBasicInfo user) { | ||||
| if(EnumCouponType.COUPON_GIFT.getCode().equals(coupon.getType())){ | if(EnumCouponType.COUPON_GIFT.getCode().equals(coupon.getType())){ | ||||
| WxCouponOrder couponOrderQ = new WxCouponOrder(); | WxCouponOrder couponOrderQ = new WxCouponOrder(); | ||||
| couponOrderQ.setOrderId(order.getId()); | couponOrderQ.setOrderId(order.getId()); | ||||
| @@ -2048,7 +2053,13 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| logger.error("系统券包核销异常:" + e.getMessage(),e); | logger.error("系统券包核销异常:" + e.getMessage(),e); | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| //订单快照 | |||||
| try { | |||||
| orderSnapshotService.saveOrderSnapshot(order); | |||||
| } catch (Exception e) { | |||||
| logger.error("订单快照error:" + e.getMessage(),e); | |||||
| } | } | ||||
| /// TODO 晚上会定时打一下tag | /// TODO 晚上会定时打一下tag | ||||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_BUY, user,order,null); | wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_BUY, user,order,null); | ||||
| @@ -936,11 +936,6 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||||
| } | } | ||||
| } | } | ||||
| try{ | |||||
| orderSnapshotService.saveOrderSnapshot(order); | |||||
| }catch(Exception e){ | |||||
| logger.error("订单快照 error"+e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,32 @@ | |||||
| 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.service.msg.MsgSendService; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| /** | |||||
| * | |||||
| * @author Stormeye Wu | |||||
| * @date 2019/5/10 | |||||
| */ | |||||
| @Service | |||||
| public class FmInsideBasicUserPushMsgServiceImpl implements MsgSendService { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private MallCooUserInfoService mallCooUserInfoService; | |||||
| @Override | |||||
| public void send(BaseMsg baseMsg) throws Exception{ | |||||
| FmInsideBasicUserPushMsg msg = (FmInsideBasicUserPushMsg)baseMsg; | |||||
| mallCooUserInfoService.pullByMobile(msg.getTenantInfo(),msg.getBasicUserId()); | |||||
| } | |||||
| } | |||||