feat:统计增加购买次数

This commit is contained in:
dzc committed 2025-07-08 20:07:02 +08:00
1 parent f34a6ce23b
commit b467020d41
4 files changed
+8 -1

No files matched your search

@@ -20,4 +20,7 @@ public class HardCanteenProductTotalVo {
@Schema(description = "食品总价格")
private Long totalPrice;
@Schema(description = "购买次数")
private Long timeCount;
}
@@ -18,4 +18,7 @@ public class HardCarVo extends HardCarEntity {
// 商品数量【统计使用】
private Long count;
// 购买次数【统计使用】
private Long payCount;
}
@@ -52,6 +52,7 @@
<select id="productTotal" resultType="com.bsd.pjcloud.hard.api.vo.order.HardCanteenProductTotalVo">
select DATE_FORMAT(a.create_time, '%Y-%m-%d') as createTime,
o.hour_type,
COUNT(0) as timeCount,
SUM(a.product_count) as payCount,
SUM(a.total_price) as totalPrice
from hard_car a
@@ -267,7 +267,7 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl<WalletRecharge
if (ObjectUtil.isEmpty(detail)) continue;
if (ObjectUtil.isNotEmpty(detail.getStatus()) && ObjectUtil.notEqual(detail.getStatus(), WalletRechargeInvoiceStatusEnum.UNBIND.getCode())) {
UserInfo userInfo = remoteUserService.getByUserId(detail.getApplyUserId()).getData();
throw new RuntimeException("用户<" + userInfo.getSysUser().getName() + ">创建的发票已经" + WalletRechargeInvoiceStatusEnum.codeOf(detail.getStatus()).getDesc() + "不能删除");
throw new RuntimeException("用户<" + userInfo.getSysUser().getName() + ">创建的发票已经<" + WalletRechargeInvoiceStatusEnum.codeOf(detail.getStatus()).getDesc() + ">不能删除");
}
// 如果是审批中就取消审批
if (ObjectUtil.equals(detail.getProcessStatus(), TaskCheckStatusEnum.PADDING.getCode())) {