| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- package com.ruoyi.system.service.impl;
- import java.math.BigDecimal;
- import java.util.List;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.ruoyi.system.mapper.UserWalletMapper;
- import com.ruoyi.system.domain.UserWallet;
- import com.ruoyi.system.service.IUserWalletService;
- /**
- * 用户钱包 Service业务层处理
- *
- * @author ruoyi
- * @date 2025-05-29
- */
- @Service
- public class UserWalletServiceImpl extends ServiceImpl<BaseMapper<UserWallet>,UserWallet> implements IUserWalletService
- {
- @Autowired
- private UserWalletMapper userWalletMapper;
- /**
- * 查询【请填写功能名称】
- *
- * @param id 【请填写功能名称】主键
- * @return 【请填写功能名称】
- */
- @Override
- public UserWallet selectUserWalletById(Long id)
- {
- return userWalletMapper.selectUserWalletById(id);
- }
- /**
- * 查询【请填写功能名称】列表
- *
- * @param userWallet 【请填写功能名称】
- * @return 【请填写功能名称】
- */
- @Override
- public List<UserWallet> selectUserWalletList(UserWallet userWallet)
- {
- return userWalletMapper.selectUserWalletList(userWallet);
- }
- /**
- * 新增【请填写功能名称】
- *
- * @param userWallet 【请填写功能名称】
- * @return 结果
- */
- @Override
- public int insertUserWallet(UserWallet userWallet)
- {
- return userWalletMapper.insertUserWallet(userWallet);
- }
- /**
- * 创建用户时创建钱包
- *
- * @param userId
- */
- @Override
- public void createUserWallet(Long userId)
- {
- UserWallet userWallet = new UserWallet();
- userWallet.setUserId(userId);
- userWallet.setPointsWallet(0L);
- userWallet.setBalanceWallet(BigDecimal.ZERO);
- // userWallet.setBlockedFunds(BigDecimal.ZERO);
- userWalletMapper.insertUserWallet(userWallet);
- }
- /**
- * 修改【请填写功能名称】
- *
- * @param userWallet 【请填写功能名称】
- * @return 结果
- */
- @Override
- public int updateUserWallet(UserWallet userWallet)
- {
- return userWalletMapper.updateUserWallet(userWallet);
- }
- /**
- * 批量删除【请填写功能名称】
- *
- * @param ids 需要删除的【请填写功能名称】主键
- * @return 结果
- */
- @Override
- public int deleteUserWalletByIds(Long[] ids)
- {
- return userWalletMapper.deleteUserWalletByIds(ids);
- }
- /**
- * 删除【请填写功能名称】信息
- *
- * @param id 【请填写功能名称】主键
- * @return 结果
- */
- @Override
- public int deleteUserWalletById(Long id)
- {
- return userWalletMapper.deleteUserWalletById(id);
- }
- }
|