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;
|
}
|
}
|