|
|
@@ -500,6 +500,9 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
relation.setNewRelationId(newRelation.getId());
|
|
|
relationClearService.clearTicket(relation, source);
|
|
|
|
|
|
+ //是否是GPT镜像规格
|
|
|
+ updateChatGptUserStatus(orderDon.getGoodsId(), orderDon.getRelationId());
|
|
|
+
|
|
|
if (plusPurchaseSkuRelation != null && plus_relationList != null) {
|
|
|
plus_relationList.remove(relationId);
|
|
|
plus_relationList.add(newRelation.getId());
|
|
|
@@ -847,10 +850,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
giftCardOrderUseRecordService.returnGiftCardCash(orderDon.getId());
|
|
|
}
|
|
|
//是否是GPT镜像规格
|
|
|
- if (orderDon.getGoodsId() == 18 && sku.getIsMirror()) {
|
|
|
- chatgptUserMapper.delete(Wrappers.lambdaQuery(ChatgptUser.class)
|
|
|
- .eq(ChatgptUser::getRelationId, orderDon.getRelationId()));
|
|
|
- }
|
|
|
+ updateChatGptUserStatus(orderDon.getGoodsId(), orderDon.getRelationId());
|
|
|
//是否是分销订单
|
|
|
//处理下级渠道分销提成
|
|
|
handleSubRewards(orderDon);
|
|
|
@@ -1123,4 +1123,19 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
}
|
|
|
return relation;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除gptUser
|
|
|
+ */
|
|
|
+ public void updateChatGptUserStatus(Long goodsId, Long relationId) {
|
|
|
+ //gpt镜像
|
|
|
+ if (goodsId != null && goodsId == 18) {
|
|
|
+ Integer selectCount = chatgptUserMapper.selectCount(Wrappers.lambdaQuery(ChatgptUser.class)
|
|
|
+ .eq(ChatgptUser::getRelationId, relationId));
|
|
|
+ if (selectCount > 0) {
|
|
|
+ chatgptUserMapper.delete(Wrappers.lambdaQuery(ChatgptUser.class)
|
|
|
+ .eq(ChatgptUser::getRelationId, relationId));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|