| | |
| | | package com.yeshi.fanli.service.inter.goods;
|
| | |
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.exception.goods.CommonGoodsException;
|
| | |
|
| | | /**
|
| | | * 常规商品库
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface CommonGoodsService {
|
| | |
|
| | | /**
|
| | | * 添加商品(无就添加,有则更新)
|
| | | * |
| | | * @param commonGoods
|
| | | * @return
|
| | | * @throws CommonGoodsException
|
| | | */
|
| | | public CommonGoods addOrUpdateCommonGoods(CommonGoods commonGoods) throws CommonGoodsException;
|
| | | |
| | | |
| | | /**
|
| | | * 添加商品(无就添加,有则返回)
|
| | | * |
| | | * @param commonGoods
|
| | | * @return
|
| | | * @throws CommonGoodsException
|
| | | */
|
| | | public CommonGoods addCommonGoods(CommonGoods commonGoods) throws CommonGoodsException;
|
| | |
|
| | | /**
|
| | | * 更新商品信息
|
| | | * |
| | | * @param commonGoods
|
| | | * @throws CommonGoodsException
|
| | | */
|
| | | public void updateCommonGoods(CommonGoods commonGoods) throws CommonGoodsException;
|
| | |
|
| | | /**
|
| | | * 商品下线
|
| | | * |
| | | * @param goodsId
|
| | | * @param goodsType
|
| | | */
|
| | | public void offlineCommonGoods(Long goodsId, int goodsType);
|
| | |
|
| | | /**
|
| | | * 根据商品ID和商品类型查询库商品
|
| | | * |
| | | * @param goodsId
|
| | | * @param goodsType
|
| | | * @return
|
| | | */
|
| | | CommonGoods getCommonGoodsByGoodsIdAndGoodsType(Long goodsId, int goodsType);
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.service.inter.goods; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.entity.goods.CommonGoods; |
| | | import com.yeshi.fanli.exception.goods.CommonGoodsException; |
| | | |
| | | /** |
| | | * 常规商品库 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | public interface CommonGoodsService { |
| | | |
| | | /** |
| | | * 添加商品(无就添加,有则更新) |
| | | * |
| | | * @param commonGoods |
| | | * @return |
| | | * @throws CommonGoodsException |
| | | */ |
| | | public CommonGoods addOrUpdateCommonGoods(CommonGoods commonGoods) throws CommonGoodsException; |
| | | |
| | | |
| | | /** |
| | | * 添加商品(无就添加,有则返回) |
| | | * |
| | | * @param commonGoods |
| | | * @return |
| | | * @throws CommonGoodsException |
| | | */ |
| | | public CommonGoods addCommonGoods(CommonGoods commonGoods) throws CommonGoodsException; |
| | | |
| | | /** |
| | | * 更新商品信息 |
| | | * |
| | | * @param commonGoods |
| | | * @throws CommonGoodsException |
| | | */ |
| | | public void updateCommonGoods(CommonGoods commonGoods) throws CommonGoodsException; |
| | | |
| | | /** |
| | | * 商品下线 |
| | | * |
| | | * @param goodsId |
| | | * @param goodsType |
| | | */ |
| | | public void offlineCommonGoods(String goodsId, Integer goodsType); |
| | | |
| | | /** |
| | | * 根据商品ID和商品类型查询库商品 |
| | | * |
| | | * @param goodsId |
| | | * @param goodsType |
| | | * @return |
| | | */ |
| | | public CommonGoods getCommonGoodsByGoodsIdAndGoodsType(String goodsId, Integer goodsType); |
| | | |
| | | /** |
| | | * 批量更新 |
| | | * @param listCommonGoods |
| | | */ |
| | | public void updateBatchCommonGoods(List<CommonGoods> listCommonGoods); |
| | | |
| | | |
| | | /** |
| | | * 批量插入 |
| | | * @param listCommonGoods |
| | | */ |
| | | public void addBatchCommonGoods(List<CommonGoods> listCommonGoods); |
| | | |
| | | /** |
| | | * 根据店铺id查询 最新5个 |
| | | * @param sellerId |
| | | * @return |
| | | */ |
| | | public List<CommonGoods> listBySellerId(Long sellerId, Integer goodsType); |
| | | |
| | | /** |
| | | * 统计店铺商品有券数量 |
| | | * @param sellerId |
| | | * @return |
| | | */ |
| | | public long countBySellerIdAndHasCoupon(Long sellerId, Integer goodsType); |
| | | |
| | | |
| | | /** |
| | | * 批量商品id查询商品信息 |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public List<CommonGoods> getByListGoodsId(List<String> list, Integer goodsType); |
| | | |
| | | |
| | | /** |
| | | * 获取商品 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public CommonGoods selectByPrimaryKey(Long id); |
| | | |
| | | } |