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.PerformanceInfoMapper;
|
import com.hx.other.service.model.PerformanceInfo;
|
import com.hx.other.service.service.PerformanceInfoService;
|
import com.hx.mybatisTool.SqlSentence;
|
import java.util.List;
|
import java.util.Map;
|
|
@Transactional
|
@Service
|
public class PerformanceInfoServiceImpl implements PerformanceInfoService {
|
|
@Resource
|
private PerformanceInfoMapper performanceInfoMapper;
|
|
/**查询列表*/
|
@Override
|
public List<PerformanceInfo> selectList(SqlSentence sqlSentence) {
|
return performanceInfoMapper.selectList(sqlSentence);
|
}
|
|
/**查询列表*/
|
@Override
|
public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
|
return performanceInfoMapper.selectListMap(sqlSentence);
|
}
|
|
/**查询单个*/
|
@Override
|
public PerformanceInfo selectOne(SqlSentence sqlSentence) {
|
return performanceInfoMapper.selectOne(sqlSentence);
|
}
|
|
/**查询单个*/
|
@Override
|
public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
|
return performanceInfoMapper.selectOneMap(sqlSentence);
|
}
|
|
/**查询单个,大数据不拿取*/
|
@Override
|
public PerformanceInfo selectOneByKey(Object object) {
|
return performanceInfoMapper.selectOneByKey(object);
|
}
|
|
/**查询单个,大数据拿取*/
|
@Override
|
public PerformanceInfo selectOneByKeyBlob(Object object) {
|
return performanceInfoMapper.selectOneByKeyBlob(object);
|
}
|
|
/**新增*/
|
@Override
|
public void insert(PerformanceInfo performanceInfo) {
|
int count = performanceInfoMapper.insert(performanceInfo);
|
if(count != 1) {
|
throw new TipsException("新增失败!");
|
}
|
}
|
|
/**修改*/
|
@Override
|
public void updateAll(PerformanceInfo performanceInfo) {
|
int count = performanceInfoMapper.updateAll(performanceInfo);
|
if(count!=1) {
|
throw new TipsException("保存失败!");
|
}
|
}
|
|
/**修改*/
|
@Override
|
public void updateWhere(SqlSentence sqlSentence) {
|
int count = performanceInfoMapper.updateWhere(sqlSentence);
|
if(count!=1) {
|
throw new TipsException("保存失败!");
|
}
|
}
|
|
/**删除一个*/
|
@Override
|
public void deleteOne(String delId) {
|
int count = performanceInfoMapper.deleteById(delId);
|
if(count!=1) {
|
throw new TipsException("删除失败!");
|
}
|
}
|
|
/**查询条数*/
|
@Override
|
public int selectCount(SqlSentence sqlSentence) {
|
int count = performanceInfoMapper.selectCount(sqlSentence);
|
return count;
|
}
|
}
|