|
|
@@ -202,6 +202,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
|
|
|
private final UserBenefitsService userBenefitsService;
|
|
|
|
|
|
+ private final ChatgptUserMapper chatgptUserMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account, String orderNo, Integer cmt) {
|
|
|
User u = userMapper.selectById(userId);
|
|
|
@@ -1809,6 +1811,18 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
//续费升级折扣
|
|
|
BigDecimal renewDiscount = getRenewDiscount(ticket.getGoodsId(), ticket.getSkuId(), ticket.getIsMirror(), ticket.getSkuNum());
|
|
|
ticket.setDiscount(renewDiscount);
|
|
|
+ setAIZoneMirrorTicketInfo(ticket);
|
|
|
+
|
|
|
+ OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
+ .eq(OrderDon::getRelationId, ticket.getRelationId())
|
|
|
+ .eq(OrderDon::getUserId, ticket.getUserId())
|
|
|
+ .eq(OrderDon::getOrderType, 1)
|
|
|
+ .notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
|
|
|
+ .orderByDesc(OrderDon::getId)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (orderDon != null) {
|
|
|
+ ticket.setOrderId(orderDon.getId());
|
|
|
+ }
|
|
|
});
|
|
|
userLoginRecordService.saveUserLoginDayRecord(userId);
|
|
|
return list;
|
|
|
@@ -2222,4 +2236,19 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
orderDonMapper.insert(orderDon);
|
|
|
return orderDon;
|
|
|
}
|
|
|
+
|
|
|
+ private void setAIZoneMirrorTicketInfo(UserMirrorTicketView ticket) {
|
|
|
+ setAIZoneGptMirrorInfo(ticket);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setAIZoneGptMirrorInfo(UserMirrorTicketView ticket) {
|
|
|
+ if (ticket.getGoodsId() != null && ticket.getGoodsId() == Constant.GPT_PLUS_GID) {
|
|
|
+ ChatgptUser chatgptUser = chatgptUserMapper.selectOne(Wrappers.lambdaQuery(ChatgptUser.class)
|
|
|
+ .eq(ChatgptUser::getRelationId, ticket.getRelationId())
|
|
|
+ .last("limit 1"));
|
|
|
+ if (chatgptUser != null) {
|
|
|
+ ticket.setModel(chatgptUser.getModel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|