| | |
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | |
|
| | | @Service
|
| | |
| | | long count = integralTaskRecordMapper.getTotalGoldCoinByUid(record.getUid());
|
| | | if (count >= 200) {// 大于200发送消息
|
| | | IntegralTaskMQMsg msg = new IntegralTaskMQMsg(record.getUid(), count, new Date());
|
| | | Message message = new Message(MQTopicName.TOPIC_USER.name(), UserTopicTagEnum.integralTaskFinish.name(),
|
| | | new Gson().toJson(msg).getBytes());
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.integralTaskFinish,
|
| | | msg);
|
| | | producer.send(message);
|
| | | }
|
| | |
|
| | |
| | | * @param tlj
|
| | | */
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void taoLiJinExchange(Long uid, Integer addGoldCoin, BigDecimal tlj) {
|
| | | String uniqueKey = "taoLiJinExchange-" + uid.toString();
|
| | | IntegralDetail detailRecord = integralDetailService.getDetailByUniqueKey(uniqueKey);
|