package com.hx.medical.service.impl; import com.hx.exception.TipsException; import com.hx.medical.dao.mapper.SystemParameterMapper; import com.hx.medical.model.SystemParameter; import com.hx.medical.service.SystemParameterService; import com.hx.mybatisTool.SqlSentence; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; import java.util.Map; @Transactional @Service public class SystemParameterServiceImpl implements SystemParameterService { @Resource private SystemParameterMapper systemParameterMapper; /**查询列表*/ @Override public List selectList(SqlSentence sqlSentence) { return systemParameterMapper.selectList(sqlSentence); } /**查询列表*/ @Override public List> selectListMap(SqlSentence sqlSentence) { return systemParameterMapper.selectListMap(sqlSentence); } /**查询单个*/ @Override public SystemParameter selectOne(SqlSentence sqlSentence) { return systemParameterMapper.selectOne(sqlSentence); } /**查询单个*/ @Override public Map selectOneMap(SqlSentence sqlSentence) { return systemParameterMapper.selectOneMap(sqlSentence); } /**查询单个,大数据不拿取*/ @Override public SystemParameter selectOneByKey(Object object) { return systemParameterMapper.selectOneByKey(object); } /**查询单个,大数据拿取*/ @Override public SystemParameter selectOneByKeyBlob(Object object) { return systemParameterMapper.selectOneByKeyBlob(object); } /**新增*/ @Override public void insert(SystemParameter systemParameter) { int count = systemParameterMapper.insert(systemParameter); if(count != 1) { throw new TipsException("新增失败!"); } } /**修改*/ @Override public void updateAll(SystemParameter systemParameter) { int count = systemParameterMapper.updateAll(systemParameter); if(count!=1) { throw new TipsException("保存失败!"); } } /**修改*/ @Override public void updateWhere(SqlSentence sqlSentence) { int count = systemParameterMapper.updateWhere(sqlSentence); if(count!=1) { throw new TipsException("保存失败!"); } } /**删除一个*/ @Override public void deleteOne(String delId) { int count = systemParameterMapper.deleteById(delId); if(count!=1) { throw new TipsException("删除失败!"); } } /**查询条数*/ @Override public int selectCount(SqlSentence sqlSentence) { int count = systemParameterMapper.selectCount(sqlSentence); return count; } }