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