|
|
@@ -15,7 +15,6 @@ import com.cyksj.common.i18n.I18nMessageUtil;
|
|
|
import com.cyksj.common.snowflake.Sequence;
|
|
|
import com.cyksj.common.task.GlobalThreadPoolTaskExecutor;
|
|
|
import com.cyksj.common.util.Jsons;
|
|
|
-import com.cyksj.common.util.SmsUtil;
|
|
|
import com.cyksj.common.util.StringUtil;
|
|
|
import com.cyksj.dto.RedisKey;
|
|
|
import com.cyksj.enums.GatewayApiCode;
|
|
|
@@ -44,6 +43,7 @@ import com.cyksj.service.order.OrderDonPostService;
|
|
|
import com.cyksj.service.order.OrderDonService;
|
|
|
import com.cyksj.service.relation.GroupRelationClearService;
|
|
|
import com.cyksj.service.relation.GroupRelationFrontService;
|
|
|
+import com.cyksj.service.relation.GroupsRelationNetflixService;
|
|
|
import com.cyksj.service.sys.SysConfigService;
|
|
|
import com.cyksj.service.user.UserBenefitsService;
|
|
|
import com.cyksj.service.user.UserBindRelationService;
|
|
|
@@ -144,6 +144,10 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
|
|
|
private final SysConfigService sysConfigService;
|
|
|
|
|
|
+ private final AccountMapper accountMapper;
|
|
|
+
|
|
|
+ private final GroupsRelationNetflixService groupsRelationNetflixService;
|
|
|
+
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
@Override
|
|
|
public OrderDon submit(OrderPayRequest payRequest) throws Exception {
|
|
|
@@ -1075,14 +1079,19 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
//修改车位状态并发送模板消息
|
|
|
updateCarParkAndSendMsg(goodsDon, sku, orderDon);
|
|
|
}
|
|
|
- try {
|
|
|
- //订单成功购买,短信通知
|
|
|
- if (orderDon.getMoney() != null && orderDon.getMoney().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- SmsUtil.sendLuoKey2Msg(Constant.XK_PHONE, String.format(Constant.ABROAD_ORDER_MSG, orderDon.getUserId(), goodsDon.getTitle(), sku.getSpecVal()));
|
|
|
+ //同步车票是否重购 记录
|
|
|
+ TASK_POOL.execute(() -> {
|
|
|
+ if (goodsDon.getId() == 1) {
|
|
|
+ //设置netflix座位号
|
|
|
+ GroupsRelation relation = groupsRelationMapper.selectById(orderDon.getRelationId());
|
|
|
+ GroupsTrips groupsTrips = groupsMapper.selectById(relation.getGroupsId());
|
|
|
+ if (groupsTrips.getStatus() != GroupsTrips.Status.waiting) {
|
|
|
+ Account account = accountMapper.selectById(groupsTrips.getAccountId());
|
|
|
+ User user = userMapper.selectById(relation.getUserId());
|
|
|
+ groupsRelationNetflixService.timingSetNetflix(relation.getNum(), user.getNickname(), account.getAccount(), account.getPassword(), relation.getExpiryTime());
|
|
|
+ }
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("用户下单完成,短息通知失败");
|
|
|
- }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
|