会员余额增减接口修改
This commit is contained in:
@@ -39,7 +39,7 @@ public class ShopUserMoneyEditDTO {
|
|||||||
@DecimalMax("9999")
|
@DecimalMax("9999")
|
||||||
private BigDecimal money;
|
private BigDecimal money;
|
||||||
|
|
||||||
private String bizEnum;
|
private ShopUserFlowBizEnum bizEnum;
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,7 +23,13 @@ public enum ShopUserFlowBizEnum {
|
|||||||
// 充值退款
|
// 充值退款
|
||||||
RECHARGE_REFUND("rechargeRefund"),
|
RECHARGE_REFUND("rechargeRefund"),
|
||||||
// 管理员手动增减余额
|
// 管理员手动增减余额
|
||||||
ADMIN_IN("adminIn");
|
ADMIN_IN("adminIn"),
|
||||||
|
//管理员退款充值
|
||||||
|
ADMIN_REFUND("adminRefund"),
|
||||||
|
//adminOut
|
||||||
|
ADMIN_OUT("adminOut"),
|
||||||
|
//adminInOut
|
||||||
|
ADMIN_IN_OUT("adminInOut"),;
|
||||||
private final String code;
|
private final String code;
|
||||||
|
|
||||||
ShopUserFlowBizEnum(String code) {
|
ShopUserFlowBizEnum(String code) {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
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());
|
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());
|
||||||
|
|||||||
Reference in New Issue
Block a user