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