13693261870
2024-09-02 7d1535b74b9c27411bc45b695675b335c30f3c3a
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
84
85
86
87
88
89
90
91
92
93
94
package com.wgcloud.service;
 
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wgcloud.entity.SystemInfo;
import com.wgcloud.mapper.SystemInfoMapper;
import com.wgcloud.util.DateUtil;
import com.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:SystemInfoService.java
 * @author: http://www.wgstart.com
 * @date: 2019年11月16日
 * @Description: SystemInfoService.java
 * @Copyright: 2017-2024 wgcloud. All rights reserved.
 */
@Service
public class SystemInfoService {
 
    public PageInfo selectByParams(Map<String, Object> params, int currPage, int pageSize) throws Exception {
        PageHelper.startPage(currPage, pageSize);
        List<SystemInfo> list = systemInfoMapper.selectByParams(params);
        PageInfo<SystemInfo> pageInfo = new PageInfo<SystemInfo>(list);
        return pageInfo;
    }
 
    public void save(SystemInfo SystemInfo) throws Exception {
        SystemInfo.setId(UUIDUtil.getUUID());
        SystemInfo.setCreateTime(DateUtil.getNowTime());
        systemInfoMapper.save(SystemInfo);
    }
 
    @Transactional
    public void saveRecord(List<SystemInfo> recordList) throws Exception {
        if (recordList.size() < 1) {
            return;
        }
        for (SystemInfo as : recordList) {
            as.setId(UUIDUtil.getUUID());
            as.setCreateTime(DateUtil.getNowTime());
        }
        systemInfoMapper.insertList(recordList);
    }
 
    @Transactional
    public void updateRecord(List<SystemInfo> recordList) throws Exception {
        if (recordList.size() < 1) {
            return;
        }
        systemInfoMapper.updateList(recordList);
    }
 
    @Transactional
    public void updateById(SystemInfo SystemInfo) throws Exception {
        systemInfoMapper.updateById(SystemInfo);
    }
 
    public int deleteById(String[] id) throws Exception {
        return systemInfoMapper.deleteById(id);
    }
 
    public SystemInfo selectById(String id) throws Exception {
        return systemInfoMapper.selectById(id);
    }
 
    public List<SystemInfo> selectAllByParams(Map<String, Object> params) throws Exception {
        return systemInfoMapper.selectAllByParams(params);
    }
 
    public int countByParams(Map<String, Object> params) throws Exception {
        return systemInfoMapper.countByParams(params);
    }
 
    public List<SystemInfo> selectByAccountId(String accountId) throws Exception {
        return systemInfoMapper.selectByAccountId(accountId);
    }
 
    public int deleteByAccHname(Map<String, Object> params) throws Exception {
        return systemInfoMapper.deleteByAccHname(params);
    }
 
 
    @Autowired
    private SystemInfoMapper systemInfoMapper;
 
 
}