1
dd
2025-10-21 8dcc757d17dd3bed804167a0aa640a978f10022c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.ruoyi.system.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.FundsLog;
import com.ruoyi.system.domain.OperationType;
import com.ruoyi.system.mapper.FundsLogMapper;
import com.ruoyi.system.service.FundsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import java.math.BigDecimal;
import java.util.List;
 
@Service
public class FundsLogServiceImpl extends ServiceImpl<FundsLogMapper, FundsLog> implements FundsLogService {
 
 
    @Override
    public void addLog(Integer userId, String account, BigDecimal amount, OperationType operationType) {
        // 创建资金日志记录
        FundsLog fundsLog = new FundsLog();
        fundsLog.setUserId(userId);
        fundsLog.setAccount(account);
        fundsLog.setOperationType(operationType.getCode());
        fundsLog.setAmount(amount);
        save(fundsLog);
    }
}