会员退款
退款回调
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.account.entity.ShopUserFlow;
|
||||
import com.czg.account.service.ShopUserFlowService;
|
||||
import com.czg.service.account.mapper.ShopUserFlowMapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 用户余额流水 服务层实现。
|
||||
@@ -14,6 +13,6 @@ import org.springframework.stereotype.Service;
|
||||
* @since 2025-02-13
|
||||
*/
|
||||
@DubboService
|
||||
public class ShopUserFlowServiceImpl extends ServiceImpl<ShopUserFlowMapper, ShopUserFlow> implements ShopUserFlowService{
|
||||
public class ShopUserFlowServiceImpl extends ServiceImpl<ShopUserFlowMapper, ShopUserFlow> implements ShopUserFlowService {
|
||||
|
||||
}
|
||||
|
||||
@@ -91,15 +91,14 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
throw new ApiNotPrintException("增减用户余额操作失败");
|
||||
}
|
||||
|
||||
userFlow.setIsCanRefund(0);
|
||||
userFlow.setUserId(userInfo.getUserId());
|
||||
userFlow.setShopId(userInfo.getShopId());
|
||||
userFlow.setAmount(shopUserEditDTO.getMoney());
|
||||
userFlow.setAmount(shopUserEditDTO.getType() == 0 ? shopUserEditDTO.getMoney().negate() : 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.setRemark(shopUserEditDTO.getRemark());
|
||||
userFlow.setRelationId(shopUserEditDTO.getRelationId());
|
||||
userFlow.setRechargeId(shopUserEditDTO.getRechargeId());
|
||||
shopUserFlowService.save(userFlow);
|
||||
return userFlow.getId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user