GoodsService.java 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. package com.kmall.admin.service;
  2. import com.kmall.admin.dto.GoodsDetailsDto;
  3. import com.kmall.admin.dto.GoodsDto;
  4. import com.kmall.admin.dto.GoodsPanoramaDto;
  5. import com.kmall.admin.entity.GoodsEntity;
  6. import com.kmall.admin.entity.TaxErrorRecordEntity;
  7. import com.kmall.admin.fromcomm.entity.SysUserEntity;
  8. import com.kmall.admin.haikong.vo.QueryGoodsVO;
  9. import com.kmall.api.entity.exportpdf.PDFGoodsDto;
  10. import java.util.List;
  11. import java.util.Map;
  12. /**
  13. * Service接口
  14. *
  15. * @author Scott
  16. * @email
  17. * @date 2017-08-21 21:19:49
  18. */
  19. public interface GoodsService {
  20. /**
  21. * 根据主键查询实体
  22. *
  23. * @param id 主键
  24. * @return 实体
  25. */
  26. GoodsEntity queryObject(Integer id);
  27. GoodsEntity queryObjectByProdBarcodeAndBizType(String prodBarcode, Integer storeId);
  28. /**
  29. * 分页查询
  30. *
  31. * @param map 参数
  32. * @return list
  33. */
  34. List<GoodsEntity> queryList(Map<String, Object> map);
  35. List<GoodsEntity> querySame(Map<String, Object> map);
  36. /**
  37. * 分页统计总数
  38. *
  39. * @param map 参数
  40. * @return 总数
  41. */
  42. int queryTotal(Map<String, Object> map);
  43. /**
  44. * 保存实体
  45. *
  46. * @param goods 实体
  47. * @return 保存条数
  48. */
  49. int save(GoodsEntity goods);
  50. /**
  51. * 根据主键更新实体
  52. *
  53. * @param goods 实体
  54. * @return 更新条数
  55. */
  56. int update(GoodsEntity goods);
  57. /**
  58. * 根据主键删除
  59. *
  60. * @param id
  61. * @return 删除条数
  62. */
  63. int delete(Integer id);
  64. /**
  65. * 根据主键批量删除
  66. *
  67. * @param ids
  68. * @return 删除条数
  69. */
  70. int deleteBatch(Integer[] ids);
  71. /**
  72. * 商品从回收站恢复
  73. *
  74. * @param ids
  75. * @return
  76. */
  77. int back(Integer[] ids);
  78. /**
  79. * 上架
  80. *
  81. * @param id
  82. * @return
  83. */
  84. int enSale(Integer id);
  85. /**
  86. * 上架
  87. *
  88. * @param ids
  89. * @return
  90. */
  91. int enSaleBatch(Integer[] ids);
  92. /**
  93. * 下架
  94. *
  95. * @param id
  96. * @return
  97. */
  98. int unSale(Integer id);
  99. /**
  100. * 下架
  101. *
  102. * @param ids
  103. * @return
  104. */
  105. int unSaleBatch(Integer[] ids);
  106. /**
  107. * 导入商品
  108. *
  109. * @param goodsEntityList
  110. * @return
  111. */
  112. int uploadExcel(List<GoodsDto> goodsEntityList,int exportDataType);
  113. /**
  114. * 导入商品(修改库存版)
  115. *
  116. * @param goodsEntityList
  117. * @return
  118. */
  119. int uploadExcelByCover(List<GoodsDto> goodsEntityList,int exportDataType);
  120. /**
  121. * 条形码查询商品详情
  122. * @param prodBarcode 条形码
  123. * @param storeId
  124. * @return
  125. */
  126. GoodsDetailsDto queryGoodsDetailsByProdBarcode(String prodBarcode, String storeId,String sku);
  127. GoodsPanoramaDto searchGoodsPanoramaDtoByKeyword(String keyword);
  128. /**
  129. * 查询出要导出的列表
  130. * @param params 查询参数
  131. * @return
  132. */
  133. List<GoodsEntity> queryExportList(Map<String, Object> params);
  134. /**
  135. * 查出pdf需要的需要
  136. * @param sku 商品sku
  137. * @param storeId
  138. * @param prodBarcode
  139. * @return
  140. */
  141. PDFGoodsDto queryForPDFData(String sku, String storeId, String prodBarcode);
  142. /**
  143. * 查询产品价格
  144. * @param prodBarcode
  145. * @param storeId
  146. * @return
  147. */
  148. Map<String,Object> calculateGoodsDetail(String prodBarcode, String storeId,String sku, Integer sellVolume);
  149. /**
  150. * 根据条形码查询商品
  151. * @param barCode
  152. * @return
  153. */
  154. GoodsEntity queryByBarcode(String barCode);
  155. /**
  156. * 根据sku查询商品
  157. * @param sku
  158. * @return
  159. */
  160. GoodsEntity queryBySku(String sku);
  161. void updateForImgUrl(GoodsEntity goodsEntity);
  162. /**
  163. * 根据商品名称查询商品
  164. * @param storeId
  165. * @param goodsName
  166. * @return
  167. */
  168. List<GoodsEntity> queryByName(String storeId, String goodsName);
  169. void updateTaxErrorRecord(TaxErrorRecordEntity taxErrorRecordEntity);
  170. void insertTaxErrorRecord(TaxErrorRecordEntity taxErrorRecordEntity);
  171. void updateByEntity(GoodsEntity updateGoods);
  172. void checkGoodsPrice(SysUserEntity user);
  173. List<GoodsEntity> queryAllList(Integer page,Integer pageSize);
  174. void syncOmsHsCodeTask();
  175. void syncOmsHsCodeGoode(List<Integer> skuList);
  176. void syncGoodsRateGoode(List<Integer> skuList);
  177. void syncGoodsRateTask();
  178. List<Map<String,Object>> selectSkuDetails(String prodBarcode, String storeId);
  179. /**
  180. * 批量还原园区库存
  181. * @param goodsEntities 数据
  182. */
  183. int restoreBatch(List<GoodsEntity> goodsEntities);
  184. /**
  185. * 查询库存及sku的信息,查询出来的库存是门店的库存
  186. * @param prodBarcode 条码
  187. * @param storeId 门店id
  188. * @param sku sku
  189. * @return 商品信息
  190. */
  191. GoodsEntity queryGoodsStockByBarcodeAndStoreIdAndSku(String prodBarcode, Integer storeId, String sku);
  192. /**
  193. * 查询库存及sku的信息,查询出来的库存是门店的库存
  194. * @param queryGoodsVOList 查询条件,包含商品条码、sku、门店id
  195. * @return 商品信息
  196. */
  197. List<GoodsEntity> queryGoodsStockByQueryGoodsVoList(List<QueryGoodsVO> queryGoodsVOList);
  198. /**
  199. * 根据产品条码和sku查询保税展示补货的商品
  200. * @param prodBarcode 商品条码
  201. * @param sku sku
  202. * @return 商品信息
  203. */
  204. GoodsEntity queryGoodsInfoByProductBarcodeAndSku(String prodBarcode, String sku);
  205. /**
  206. * 更新园区库存
  207. * @param goodsEntity 商品实体
  208. * @return 更新数
  209. */
  210. int updateStockNumberByProductCodeAndSku(GoodsEntity goodsEntity);
  211. void validateWarehouseStock(GoodsDetailsDto goods, String prodBarcode, String sku, String storeId);
  212. }