会员增余额修改

This commit is contained in:
张松 2025-02-19 14:33:09 +08:00
parent 869dc9bb5d
commit bf8acf5a4e
2 changed files with 13 additions and 11 deletions

View File

@ -9,31 +9,33 @@ import lombok.Getter;
@Getter
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"),
//adminOut
ADMIN_OUT("adminOut"),
ADMIN_OUT("adminOut", "管理员退款充值"),
//adminInOut
// ADMIN_IN_OUT("adminInOut"),
;
private final String code;
private final String msg;
ShopUserFlowBizEnum(String code) {
ShopUserFlowBizEnum(String code, String msg) {
this.msg = msg;
this.code = code;
}
}

View File

@ -97,7 +97,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
userFlow.setAmount(shopUserEditDTO.getMoney());
userFlow.setBalance(shopUserEditDTO.getType() == 0 ? userInfo.getAmount().subtract(shopUserEditDTO.getMoney()) : userInfo.getAmount().add(shopUserEditDTO.getMoney()));
userFlow.setBizCode(shopUserEditDTO.getBizEnum().getCode());
userFlow.setType(shopUserEditDTO.getType() == 0 ? "-" : "+");
// userFlow.setType(shopUserEditDTO.getType() == 0 ? "-" : "+");
userFlow.setRemark(shopUserEditDTO.getRemark());
userFlow.setRelationId(shopUserEditDTO.getRelationId());
shopUserFlowService.save(userFlow);