| | |
| | | @Column(name = "co_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | @Column(name = "co_urank")
|
| | | private Integer urank;// 用户等级 100-为超级会员
|
| | |
|
| | | public Integer getUrank() {
|
| | | return urank;
|
| | | }
|
| | |
|
| | | public void setUrank(Integer urank) {
|
| | | this.urank = urank;
|
| | | }
|
| | |
|
| | | public CommonOrder() {
|
| | |
|
| | | }
|
| | |
| | | // 邀请赚到账事务消息
|
| | | OrderMoneyRecievedMQMsg mqMsg = new OrderMoneyRecievedMQMsg(OrderMoneyRecievedMQMsg.TYPE_INVITE, uid,
|
| | | sourceType, null, null, new Date(), 0);
|
| | |
|
| | | Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.orderFanLiActual, mqMsg);
|
| | | String taskKey = getTaskKey(uid);
|
| | | msg.setKey(taskKey);
|
| | |
| | | } catch (Exception e) {
|
| | | LogHelper.mqError(e.getMessage(), msg.getTopic(), msg.getTag(), new Gson().toJson(mqMsg));
|
| | | }
|
| | | System.out.println(new Gson().toJson(mqMsg));
|
| | | }
|
| | |
|
| | | @Transactional
|
| | |
| | | return hongBao;
|
| | | }
|
| | |
|
| | | @Transactional
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private void fanliInviteTB(List<HongBaoV2> hongBaoList, Long uid, String key) throws TaoBaoWeiQuanException {
|
| | | List<Long> hbIdList = new ArrayList<>();
|
| | | BigDecimal invitemoney = new BigDecimal(0);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void fanliInvaiteAndShare(Long uid) throws TaoBaoWeiQuanException {
|
| | | // 邀请赚到账
|
| | | try {
|
| | |
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | if(1>0)
|
| | | return;
|
| | | //
|
| | | try {
|
| | | orderMoneySettleService.inviteSettleJD(uid);
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | | import com.yeshi.fanli.entity.order.HongBaoV2SettleTemp;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoV2SettleTempService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoV2Service;
|
| | |
| | |
|
| | | @Override
|
| | | public Action consume(Message message, ConsumeContext context) {
|
| | | LogHelper.mqInfo("consumer:OrderMoneyRecievedMessageListener", message.getMsgID(), message.getTopic(),
|
| | | message.getTag(), new String(message.getBody()));
|
| | | // 根据红包做订单分发
|
| | | if (MQTopicName.TOPIC_ORDER.name().equalsIgnoreCase(message.getTopic())) {
|
| | | if (OrderTopicTagEnum.orderFanLiActual.name().equalsIgnoreCase(message.getTag())) {
|
| | |
| | | msg.setStartDeliverTime(System.currentTimeMillis() + 1000 * 60);
|
| | | producer.send(msg);
|
| | | return Action.CommitMessage;
|
| | | }
|
| | | } else if (tag.equalsIgnoreCase(OrderTopicTagEnum.orderStatisticDelay.name())) {// 订单统计
|
| | | OrderMQMsg orderMQMsg = new Gson().fromJson(new String(message.getBody()), OrderMQMsg.class);
|
| | | int hour = 24;
|
| | |
| | | }
|
| | | }
|
| | | return Action.CommitMessage;
|
| | | }
|
| | | } else if (MQTopicName.TOPIC_USER.name().equalsIgnoreCase(message.getTopic())) {
|
| | | boolean inviteSucceedReward = false;
|
| | | Long uid = null;
|