|
|
|
@@ -981,9 +981,9 @@ public class WxCouponServiceImpl implements WxCouponService { |
|
|
|
if(ret != 1) { |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "数据库更新数量错误"); |
|
|
|
} |
|
|
|
// 更新库存后同步 |
|
|
|
// 免审修改 |
|
|
|
try{ |
|
|
|
spuStockSync(wxCoupon,wxCoupon.getId()); |
|
|
|
spuFreeAuditSync(wxCoupon,wxCoupon.getId()); |
|
|
|
}catch(Exception e){ |
|
|
|
logger.error("send spuStockSync error: " + e.getMessage()); |
|
|
|
} |
|
|
|
@@ -1064,6 +1064,28 @@ public class WxCouponServiceImpl implements WxCouponService { |
|
|
|
logger.info(">>>>>>>>>>>send FmInsideProductPushMsg :"+productPush); |
|
|
|
mqBaseProducer.sendMessage(productPush, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
|
|
|
|
// }).start(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void spuFreeAuditSync(TenantEntity tenantEntity,Long couponId){ |
|
|
|
// new Thread(() -> { |
|
|
|
// //1秒之后同步poi |
|
|
|
// try { |
|
|
|
// Thread.currentThread().sleep(1000); |
|
|
|
// } catch (Exception e) { |
|
|
|
// logger.error("sleep error: " + e.getMessage()); |
|
|
|
// } |
|
|
|
|
|
|
|
FmInsideProductPushMsg productPush = new FmInsideProductPushMsg(); |
|
|
|
productPush.setDelayTimeLevel(3); |
|
|
|
productPush.setMsgType(EnumMsgRecordType.INSIDE_PRODUCT_PUSH.getCode()); |
|
|
|
productPush.updateTenantInfo(tenantEntity); |
|
|
|
productPush.setCouponId(couponId); |
|
|
|
productPush.setSyncType(EnumPushType.SPU_FREE_AUDIT_SYNC); |
|
|
|
logger.info(">>>>>>>>>>>send FmInsideProductPushMsg :"+productPush); |
|
|
|
mqBaseProducer.sendMessage(productPush, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
|
|
|
|
// }).start(); |
|
|
|
|
|
|
|
} |
|
|
|
|