会员充值 前置
This commit is contained in:
@@ -4,6 +4,7 @@ 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 org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@@ -12,7 +13,7 @@ import org.springframework.stereotype.Service;
|
||||
* @author zs
|
||||
* @since 2025-02-13
|
||||
*/
|
||||
@Service
|
||||
@DubboService
|
||||
public class ShopUserFlowServiceImpl extends ServiceImpl<ShopUserFlowMapper, ShopUserFlow> implements ShopUserFlowService{
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.czg.utils.PageUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.RoundingMode;
|
||||
@@ -32,7 +33,7 @@ import java.math.RoundingMode;
|
||||
* @author Administrator
|
||||
* @since 2025-02-08
|
||||
*/
|
||||
@Service
|
||||
@DubboService
|
||||
public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> implements ShopUserService {
|
||||
@Resource
|
||||
private ShopUserFlowService shopUserFlowService;
|
||||
@@ -82,7 +83,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
userFlow.setShopId(userInfo.getShopId());
|
||||
userFlow.setAmount(shopUserEditDTO.getMoney());
|
||||
userFlow.setBalance(shopUserEditDTO.getType() == 0 ? userInfo.getAmount().subtract(shopUserEditDTO.getMoney()) : userInfo.getAmount().add(shopUserEditDTO.getMoney()));
|
||||
userFlow.setBizCode(ShopUserFlowBizEnum.ADMIN_IN.getCode());
|
||||
userFlow.setBizCode(shopUserEditDTO.getBizEnum().getCode());
|
||||
userFlow.setType(shopUserEditDTO.getType() == 0 ? "-" : "+");
|
||||
userFlow.setRemark(shopUserEditDTO.getRemark());
|
||||
return shopUserFlowService.save(userFlow);
|
||||
|
||||
Reference in New Issue
Block a user