11
13693261870
2024-08-16 e28e6c5ea1ceff3f9f36698cc2c1866b4f47d527
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package se.wgcloud.service;
 
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import se.wgcloud.entity.DbTableCount;
import se.wgcloud.mapper.DbTableCountMapper;
import se.wgcloud.util.DateUtil;
import se.wgcloud.util.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import java.util.List;
import java.util.Map;
 
/**
 * @version v2.3
 * @ClassName: DbTableCountCountService.java
 * @author: 
 * @date: 2019年11月16日
 * @Description: DbTableCountService.java
 * @Copyright:
 */
@Service
public class DbTableCountService {
 
    public PageInfo selectByParams(Map<String, Object> params, int currPage, int pageSize) throws Exception {
        PageHelper.startPage(currPage, pageSize);
        List<DbTableCount> list = dbTableCountMapper.selectByParams(params);
        PageInfo<DbTableCount> pageInfo = new PageInfo<DbTableCount>(list);
        return pageInfo;
    }
 
    public void save(DbTableCount DbTableCount) throws Exception {
        DbTableCount.setId(UUIDUtil.getUUID());
        DbTableCount.setCreateTime(DateUtil.getNowTime());
        dbTableCountMapper.save(DbTableCount);
    }
 
    public void saveRecord(List<DbTableCount> recordList) throws Exception {
        if (recordList.size() < 1) {
            return;
        }
        for (DbTableCount as : recordList) {
            as.setId(UUIDUtil.getUUID());
            as.setDateStr(DateUtil.getDateTimeString(as.getCreateTime()));
        }
        dbTableCountMapper.insertList(recordList);
    }
 
 
    public int countByParams(Map<String, Object> params) throws Exception {
        return dbTableCountMapper.countByParams(params);
    }
 
    @Transactional
    public int deleteById(String[] id) throws Exception {
        return dbTableCountMapper.deleteById(id);
    }
 
    public void updateById(DbTableCount DbTableCount)
            throws Exception {
        dbTableCountMapper.updateById(DbTableCount);
    }
 
    public DbTableCount selectById(String id) throws Exception {
        return dbTableCountMapper.selectById(id);
    }
 
    public List<DbTableCount> selectAllByParams(Map<String, Object> params) throws Exception {
        return dbTableCountMapper.selectAllByParams(params);
    }
 
    public int deleteByDate(Map<String, Object> map) throws Exception {
        return dbTableCountMapper.deleteByDate(map);
    }
 
 
    @Autowired
    private DbTableCountMapper dbTableCountMapper;
 
 
}