| @@ -114,8 +114,8 @@ public class MqBaseConsumer { | |||
| } | |||
| else if(EnumMsgRecordType.INSIDE_ORDER_PUSH.getCode().equals(baseMsg.getMsgType())) { | |||
| // 内部消息 - 订单同步 | |||
| FmInsideOrderPushMsg msg = (FmInsideOrderPushMsg)JsonUtil.readValue(message,FmInsideOrderPushMsg.class); | |||
| fmInsideOrderPushMsgService.send(msg); | |||
| // FmInsideOrderPushMsg msg = (FmInsideOrderPushMsg)JsonUtil.readValue(message,FmInsideOrderPushMsg.class); | |||
| // fmInsideOrderPushMsgService.send(msg); | |||
| } | |||
| else if(EnumMsgRecordType.INSIDE_ORDER_PUSH_DELIVERY.getCode().equals(baseMsg.getMsgType())) { | |||
| // 内部消息 - 2.0核销同步 | |||
| @@ -40,7 +40,7 @@ public interface TtWebGoodsService { | |||
| /** | |||
| *7 免审修改团购活动 | |||
| */ | |||
| String PRODUCT_FREE_AUDIT = "/life/goods/product/free_audit"; | |||
| String PRODUCT_FREE_AUDIT = "/life/goods/product/free_audit/"; | |||
| /** | |||
| *8 创建/更新多SKU商品的SKU列表(团购/代金券不用对接这个接口) | |||
| */ | |||
| @@ -158,16 +158,20 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||
| //浮层下架 | |||
| wxFloatingLayerMapper.updateStatus(orignal.getCouponId()); | |||
| try{ | |||
| spuStatusSyncByCoupon(orignal,orignal.getCouponId()); | |||
| }catch(Exception e){ | |||
| logger.error("send spuStatusSync error: " + e.getMessage()); | |||
| } | |||
| } | |||
| } | |||
| record.setUpdateDate(new Date()); | |||
| wxCouponChannelMapper.updateById(record); | |||
| try{ | |||
| if(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(record.getStatus())){ | |||
| //同步抖音状态 | |||
| spuStatusSyncByCoupon(record,record.getId()); | |||
| } | |||
| }catch(Exception e){ | |||
| logger.error("send spuStatusSync error: " + e.getMessage()); | |||
| } | |||
| } | |||
| //清除缓存 | |||
| @@ -293,13 +297,13 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||
| wxCouponChannel.setUpdateDate(new Date()); | |||
| wxCouponChannelMapper.updateStatusByCouponId(wxCouponChannel); | |||
| if(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode().equals(status)){ | |||
| try{ | |||
| spuStatusSyncByCoupon(tenantEntity,couponId); | |||
| }catch(Exception e){ | |||
| logger.error("send spuStockSync error: " + e.getMessage()); | |||
| } | |||
| } | |||
| // if(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode().equals(status)){ | |||
| // try{ | |||
| // spuStatusSyncByCoupon(tenantEntity,couponId); | |||
| // }catch(Exception e){ | |||
| // logger.error("send spuStockSync error: " + e.getMessage()); | |||
| // } | |||
| // } | |||
| } | |||
| @Override | |||
| @@ -646,16 +646,19 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| // 卡券下架,未使用的卡密要下架 | |||
| couponPasswordMapper.disableByCouponId(record.getId()); | |||
| // try{ | |||
| // //同步抖音状态 | |||
| // wxCouponChannelService.spuStatusSyncByCoupon(record,record.getId()); | |||
| // }catch(Exception e){ | |||
| // logger.error("send spuStatusSync error: " + e.getMessage()); | |||
| // } | |||
| } | |||
| record.setUpdateDate(new Date()); | |||
| wxCouponMapper.updateById(record); | |||
| try{ | |||
| if(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(record.getStatus())){ | |||
| //同步抖音状态 | |||
| wxCouponChannelService.spuStatusSyncByCoupon(record,record.getId()); | |||
| } | |||
| }catch(Exception e){ | |||
| logger.error("send spuStatusSync error: " + e.getMessage()); | |||
| } | |||
| } | |||
| //清空缓存 | |||
| @@ -988,12 +991,6 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| if(ret != 1) { | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "数据库更新数量错误"); | |||
| } | |||
| // 免审修改 | |||
| try{ | |||
| spuFreeAuditSync(wxCoupon,wxCoupon.getId()); | |||
| }catch(Exception e){ | |||
| logger.error("send spuStockSync error: " + e.getMessage()); | |||
| } | |||
| // 5. 更新coupon channel 有效期 | |||
| if(wxCoupon.getValidType().equals(EnumCouponValidType.BETWEEN_TWO_TIME.getCode())) { | |||
| @@ -1004,6 +1001,13 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| wxCouponChannelMapper.updateEndTimeByCouponId(couponChannel); | |||
| } | |||
| // 免审修改 | |||
| try{ | |||
| spuFreeAuditSync(wxCoupon,wxCoupon.getId()); | |||
| }catch(Exception e){ | |||
| logger.error("send spuFreeAuditSync error: " + e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @@ -1032,11 +1036,11 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| if (num == 0) { | |||
| throw new MallinkException(ErrorCode.ORDER_SAVE_ERR); | |||
| } | |||
| // try{ | |||
| // spuStockSync(tenantEntity,id); | |||
| // }catch(Exception e){ | |||
| // logger.error("send spuStockSync error: " + e.getMessage()); | |||
| // } | |||
| try{ | |||
| spuStockSync(tenantEntity,id); | |||
| }catch(Exception e){ | |||
| logger.error("send spuStockSync error: " + e.getMessage()); | |||
| } | |||
| } | |||
| @Override | |||
| @@ -1046,11 +1050,11 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| if (num == 0) { | |||
| throw new MallinkException(ErrorCode.REMAIN_BACK_FAIL); | |||
| } | |||
| // try{ | |||
| // spuStockSync(tenantEntity,id); | |||
| // }catch(Exception e){ | |||
| // logger.error("send spuStockSync error: " + e.getMessage()); | |||
| // } | |||
| try{ | |||
| spuStockSync(tenantEntity,id); | |||
| }catch(Exception e){ | |||
| logger.error("send spuStockSync error: " + e.getMessage()); | |||
| } | |||
| } | |||
| private void spuStockSync(TenantEntity tenantEntity,Long couponId){ | |||
| @@ -3475,17 +3475,17 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| @Override | |||
| public void sendInsideOrderPushMsg(TenantEntity tenantEntity,Long composeOrderId) { | |||
| try{ | |||
| FmInsideOrderPushMsg orderPush = new FmInsideOrderPushMsg(); | |||
| orderPush.setDelayTimeLevel(5); | |||
| orderPush.setMsgType(EnumMsgRecordType.INSIDE_ORDER_PUSH.getCode()); | |||
| orderPush.updateTenantInfo(tenantEntity); | |||
| orderPush.setBatchOrderId(composeOrderId); | |||
| logger.info(">>>>>>>>>>>send sendInsideOrderPushMsg :"+orderPush); | |||
| mqBaseProducer.sendMessage(orderPush, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| }catch(Exception e){ | |||
| logger.info(">>>>>>>>>>>send sendInsideOrderPushMsg : error"+e.getMessage()); | |||
| } | |||
| // try{ | |||
| // FmInsideOrderPushMsg orderPush = new FmInsideOrderPushMsg(); | |||
| // orderPush.setDelayTimeLevel(5); | |||
| // orderPush.setMsgType(EnumMsgRecordType.INSIDE_ORDER_PUSH.getCode()); | |||
| // orderPush.updateTenantInfo(tenantEntity); | |||
| // orderPush.setBatchOrderId(composeOrderId); | |||
| // logger.info(">>>>>>>>>>>send sendInsideOrderPushMsg :"+orderPush); | |||
| // mqBaseProducer.sendMessage(orderPush, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| // }catch(Exception e){ | |||
| // logger.info(">>>>>>>>>>>send sendInsideOrderPushMsg : error"+e.getMessage()); | |||
| // } | |||
| } | |||
| @@ -32,6 +32,10 @@ public class FmInsideProductPushMsgServiceImpl implements MsgSendService { | |||
| public void send(BaseMsg baseMsg) throws Exception{ | |||
| FmInsideProductPushMsg msg = (FmInsideProductPushMsg)baseMsg; | |||
| try{ | |||
| Thread.currentThread().sleep(1000);//延时秒 | |||
| }catch(Exception e){} | |||
| if(EnumPushType.SPU_STATUS_SYNC.equals(msg.getSyncType())){ | |||
| ttCouponGoodsService.productOperate(msg.getTenantInfo(),msg.getCouponId()); | |||
| // poiService.spuStatusSync(msg.getTenantInfo(),msg.getCouponId()); | |||