refactor(ticket): 更新用户票务实体字段映射

- 将用户票务中的购买数量字段从buyQty替换为orderGoodsQty
- 移除GltUserTicket实体中的buyQty字段定义
- 添加orderGoodsQty字段到GltUserTicket实体中
- 修改服务层代码以使用订单商品总数量进行赋值
- 调整数据库映射关系以匹配新的业务逻辑
This commit is contained in:
2026-02-09 20:28:32 +08:00
parent 76aec53bae
commit c1efeef8c7
2 changed files with 4 additions and 4 deletions

View File

@@ -55,6 +55,9 @@ public class GltUserTicket implements Serializable {
@Schema(description = "订单商品ID") @Schema(description = "订单商品ID")
private Integer orderGoodsId; private Integer orderGoodsId;
@Schema(description = "订单商品数量")
private Integer orderGoodsQty;
@Schema(description = "总数量") @Schema(description = "总数量")
private Integer totalQty; private Integer totalQty;
@@ -70,9 +73,6 @@ public class GltUserTicket implements Serializable {
@Schema(description = "已释放数量") @Schema(description = "已释放数量")
private Integer releasedQty; private Integer releasedQty;
@Schema(description = "购买数量")
private Integer buyQty;
@Schema(description = "用户ID") @Schema(description = "用户ID")
private Integer userId; private Integer userId;

View File

@@ -257,7 +257,7 @@ public class GltTicketIssueService {
userTicket.setUsedQty(0); userTicket.setUsedQty(0);
// 初始可用量来自“购买量”,视为已释放 // 初始可用量来自“购买量”,视为已释放
userTicket.setReleasedQty(buyQty); userTicket.setReleasedQty(buyQty);
userTicket.setBuyQty(buyQty); userTicket.setOrderGoodsQty(og.getTotalNum());
userTicket.setUserId(order.getUserId()); userTicket.setUserId(order.getUserId());
userTicket.setSortNumber(0); userTicket.setSortNumber(0);
userTicket.setComments("订单发放套票"); userTicket.setComments("订单发放套票");