Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tankaikai
2025-02-19 15:30:21 +08:00
5 changed files with 24 additions and 15 deletions

View File

@@ -39,7 +39,7 @@ public class ShopTableAddDTO {
*/ */
@NotNull @NotNull
@Min(message = "客位数最小为1", value = 1) @Min(message = "客位数最小为1", value = 1)
private Integer capacity; private Integer maxCapacity;
/** /**
* 是否自动清台 * 是否自动清台
*/ */

View File

@@ -54,6 +54,11 @@ public class ShopUserFlow implements Serializable {
private String remark; private String remark;
/**
* 是否可退款
*/
private Integer isCanRefund;
/** /**
* 关联id * 关联id
* 订单支付/订单退款/霸王餐时 订单id * 订单支付/订单退款/霸王餐时 订单id

View File

@@ -9,30 +9,33 @@ import lombok.Getter;
@Getter @Getter
public enum ShopUserFlowBizEnum { public enum ShopUserFlowBizEnum {
// 会员充值 // 会员充值
CASH_IN("cashIn"), CASH_IN("cashIn", "会员充值"),
// 重置奖励 // 重置奖励
AWARD_IN("awardIn"), AWARD_IN("awardIn", "充值奖励"),
// 微信小程序充值 // 微信小程序充值
WECHAT_IN("wechatIn"), WECHAT_IN("wechatIn", "微信小程序充值"),
// 支付宝小程序重置 // 支付宝小程序重置
ALIPAY_IN("alipayIn"), ALIPAY_IN("alipayIn", "支付宝小程序充值"),
// 订单支付奖励 // 订单支付奖励
ORDER_PAY("orderPay"), ORDER_PAY("orderPay", "订单支付奖励"),
// 订单退款 // 订单退款
ORDER_REFUND("orderRefund"), ORDER_REFUND("orderRefund", "订单退款"),
// 充值退款 // 充值退款
RECHARGE_REFUND("rechargeRefund"), RECHARGE_REFUND("rechargeRefund", "充值退款"),
// 管理员手动增减余额 // 管理员手动增减余额
ADMIN_IN("adminIn"), ADMIN_IN("adminIn", "管理员手动增减余额"),
//管理员退款充值 //管理员退款充值
ADMIN_REFUND("adminRefund"), // ADMIN_REFUND("adminRefund"),
//adminOut //adminOut
ADMIN_OUT("adminOut"), ADMIN_OUT("adminOut", "管理员退款充值"),
//adminInOut //adminInOut
ADMIN_IN_OUT("adminInOut"),; // ADMIN_IN_OUT("adminInOut"),
;
private final String code; private final String code;
private final String msg;
ShopUserFlowBizEnum(String code) { ShopUserFlowBizEnum(String code, String msg) {
this.msg = msg;
this.code = code; this.code = code;
} }
} }

View File

@@ -66,7 +66,7 @@ public class ShopTableServiceImpl extends ServiceImpl<ShopTableMapper, ShopTable
ShopTable shopTable = new ShopTable(); ShopTable shopTable = new ShopTable();
shopTable.setShopId(shopId); shopTable.setShopId(shopId);
shopTable.setName(name); shopTable.setName(name);
shopTable.setMaxCapacity(shopTableAddDTO.getCapacity()); shopTable.setMaxCapacity(shopTableAddDTO.getMaxCapacity());
shopTable.setAreaId(shopTableAddDTO.getAreaId()); shopTable.setAreaId(shopTableAddDTO.getAreaId());
shopTable.setStatus(ShopTableStatusEnum.CLOSED.getValue()); shopTable.setStatus(ShopTableStatusEnum.CLOSED.getValue());
tableArrayList.add(shopTable); tableArrayList.add(shopTable);

View File

@@ -91,12 +91,13 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
throw new ApiNotPrintException("增减用户余额操作失败"); throw new ApiNotPrintException("增减用户余额操作失败");
} }
userFlow.setIsCanRefund(0);
userFlow.setUserId(userInfo.getUserId()); userFlow.setUserId(userInfo.getUserId());
userFlow.setShopId(userInfo.getShopId()); userFlow.setShopId(userInfo.getShopId());
userFlow.setAmount(shopUserEditDTO.getMoney()); userFlow.setAmount(shopUserEditDTO.getMoney());
userFlow.setBalance(shopUserEditDTO.getType() == 0 ? userInfo.getAmount().subtract(shopUserEditDTO.getMoney()) : userInfo.getAmount().add(shopUserEditDTO.getMoney())); userFlow.setBalance(shopUserEditDTO.getType() == 0 ? userInfo.getAmount().subtract(shopUserEditDTO.getMoney()) : userInfo.getAmount().add(shopUserEditDTO.getMoney()));
userFlow.setBizCode(shopUserEditDTO.getBizEnum().getCode()); userFlow.setBizCode(shopUserEditDTO.getBizEnum().getCode());
userFlow.setType(shopUserEditDTO.getType() == 0 ? "-" : "+"); // userFlow.setType(shopUserEditDTO.getType() == 0 ? "-" : "+");
userFlow.setRemark(shopUserEditDTO.getRemark()); userFlow.setRemark(shopUserEditDTO.getRemark());
userFlow.setRelationId(shopUserEditDTO.getRelationId()); userFlow.setRelationId(shopUserEditDTO.getRelationId());
shopUserFlowService.save(userFlow); shopUserFlowService.save(userFlow);