guang
2023-04-23 9e1c8d19bbca288b74464e90b75c9c1fe710ec1e
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
95
96
97
98
99
100
101
102
103
104
105
106
package com.hx.other.service.service.impl;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import com.hx.exception.TipsException;
import com.hx.other.service.dao.mapper.SqlQueryTempMapper;
import com.hx.other.service.model.SqlQueryTemp;
import com.hx.other.service.service.SqlQueryTempService;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
 
@Transactional
@Service
public class SqlQueryTempServiceImpl implements SqlQueryTempService {
 
    @Resource
    private SqlQueryTempMapper sqlQueryTempMapper;
 
    /**查询列表*/
    @Override
    public List<SqlQueryTemp> selectList(SqlSentence sqlSentence) {
        return sqlQueryTempMapper.selectList(sqlSentence);
    }
 
    /**查询列表*/
    @Override
    public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
        return sqlQueryTempMapper.selectListMap(sqlSentence);
    }
 
    /**查询单个*/
    @Override
    public SqlQueryTemp selectOne(SqlSentence sqlSentence) {
        return sqlQueryTempMapper.selectOne(sqlSentence);
    }
 
    /**查询单个*/
    @Override
    public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
        return sqlQueryTempMapper.selectOneMap(sqlSentence);
    }
 
    /**查询单个,大数据不拿取*/
    @Override
    public SqlQueryTemp selectOneByKey(Object object) {
        return sqlQueryTempMapper.selectOneByKey(object);
    }
 
    /**查询单个,大数据拿取*/
    @Override
    public SqlQueryTemp selectOneByKeyBlob(Object object) {
        return sqlQueryTempMapper.selectOneByKeyBlob(object);
    }
 
    /**新增*/
    @Override
    public void insert(SqlQueryTemp sqlQueryTemp) {
        int count = sqlQueryTempMapper.insert(sqlQueryTemp);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
 
    /**修改*/
    @Override
    public void updateAll(SqlQueryTemp sqlQueryTemp) {
        int count = sqlQueryTempMapper.updateAll(sqlQueryTemp);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
 
    /**修改*/
    @Override
    public void updateWhere(SqlSentence sqlSentence) {
        int count = sqlQueryTempMapper.updateWhere(sqlSentence);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = sqlQueryTempMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
 
    @Override
    public String selectByContent(String content) {
        return sqlQueryTempMapper.selectByContent(content);
    }
 
    /**查询条数*/
    @Override
    public int selectCount(SqlSentence sqlSentence) {
        int count = sqlQueryTempMapper.selectCount(sqlSentence);
        return count;
    }
}