puzhibing
2023-06-02 9b230057d5941c4ec0d29cda2c8163f9a6d7a1e9
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.agentdriving.user.modular.system.service.impl;
 
import com.agentdriving.user.modular.system.dao.AccountChangeDetailMapper;
import com.agentdriving.user.modular.system.model.AccountChangeDetail;
import com.agentdriving.user.modular.system.service.IAccountChangeDetailService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.agentdriving.user.modular.system.warpper.BalanceDetailsWarpper;
import org.springframework.stereotype.Service;
 
import java.util.Date;
import java.util.List;
 
/**
 * 账户变动
 * @author zhibing.pu
 * @date 2023/3/4 11:34
 */
@Service
public class AccountChangeDetailServiceImpl extends ServiceImpl<AccountChangeDetailMapper, AccountChangeDetail> implements IAccountChangeDetailService {
 
 
    /**
     * 保存数据
     * @param accountChangeDetail
     * @throws Exception
     */
    @Override
    public void saveData(AccountChangeDetail accountChangeDetail) throws Exception {
        accountChangeDetail.setCreateTime(new Date());
        this.baseMapper.insert(accountChangeDetail);
    }
 
 
    /**
     * 获取余额明细
     * @param uid
     * @param time
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    @Override
    public List<BalanceDetailsWarpper> queryBalanceDetails(Integer uid, String time, Integer pageNum, Integer pageSize) throws Exception {
        pageNum = (pageNum - 1) * pageSize;
        return this.baseMapper.queryBalanceDetails(uid, time, pageNum, pageSize);
    }
}