| | |
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderMoneySettleService;
|
| | | import com.yeshi.fanli.service.inter.user.UserSystemCouponService;
|
| | | import com.yeshi.fanli.service.manger.msg.RocketMQManager;
|
| | | import com.yeshi.fanli.service.manger.order.TeamRewardManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.cmq.HongBaoRecieveCMQManager;
|
| | | import com.yeshi.fanli.util.factory.UserMoneyDetailFactory;
|
| | | import com.yeshi.fanli.util.mq.cmq.HongBaoRecieveCMQManager;
|
| | | import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private TeamRewardManager teamRewardManager;
|
| | | |
| | | @Resource
|
| | | private RocketMQManager rocketMQManager;
|
| | |
|
| | | // 下级被封禁,红包失效
|
| | | private void invalidHongBaoForbidden(Long id) {
|
| | |
| | | Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.teamRewardPreRecieved, mqMsg);
|
| | |
|
| | | msg.setKey(taskKey);
|
| | | |
| | | |
| | | // 添加事务消息
|
| | | try {
|
| | | orderTransactionProducer.send(msg, new LocalTransactionExecuter() {
|
| | |
| | | return TransactionStatus.CommitTransaction;
|
| | | }
|
| | | }, null);
|
| | | |
| | | // rocketMQManager.sendTransactionalMsg(msg, taskKey, new RocketMQManager.ITransactionalMQEvent() {
|
| | | // @Override
|
| | | // public TransactionStatus excute(Message arg0, Object arg1) {
|
| | | // try {
|
| | | // fanliInvite(hongBaoList, uid, Constant.SOURCE_TYPE_TAOBAO, taskKey, maxPregetTime);
|
| | | // } catch (Exception e) {
|
| | | // e.printStackTrace();
|
| | | // return TransactionStatus.RollbackTransaction;
|
| | | // }
|
| | | // return TransactionStatus.CommitTransaction;
|
| | | // }
|
| | | // });
|
| | | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | LogHelper.mqError(e.getMessage(), msg.getTopic(), msg.getTag(), new Gson().toJson(mqMsg));
|
| | |
| | | }
|
| | | // 通知免单到账
|
| | | try {
|
| | | userSystemCouponService.updateStateByArrivalAccount(orderId);
|
| | | userSystemCouponService.updateStateByArrivalAccount(orderId,sourceType);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|