GoodsService.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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.api.entity.exportpdf.PDFGoodsDto;
  7. import java.util.List;
  8. import java.util.Map;
  9. /**
  10. * Service接口
  11. *
  12. * @author Scott
  13. * @email
  14. * @date 2017-08-21 21:19:49
  15. */
  16. public interface GoodsService {
  17. /**
  18. * 根据主键查询实体
  19. *
  20. * @param id 主键
  21. * @return 实体
  22. */
  23. GoodsEntity queryObject(Integer id);
  24. GoodsEntity queryObjectByProdBarcodeAndBizType(String prodBarcode, Integer storeId);
  25. /**
  26. * 分页查询
  27. *
  28. * @param map 参数
  29. * @return list
  30. */
  31. List<GoodsEntity> queryList(Map<String, Object> map);
  32. List<GoodsEntity> querySame(Map<String, Object> map);
  33. /**
  34. * 分页统计总数
  35. *
  36. * @param map 参数
  37. * @return 总数
  38. */
  39. int queryTotal(Map<String, Object> map);
  40. /**
  41. * 保存实体
  42. *
  43. * @param goods 实体
  44. * @return 保存条数
  45. */
  46. int save(GoodsEntity goods);
  47. /**
  48. * 根据主键更新实体
  49. *
  50. * @param goods 实体
  51. * @return 更新条数
  52. */
  53. int update(GoodsEntity goods);
  54. /**
  55. * 根据主键删除
  56. *
  57. * @param id
  58. * @return 删除条数
  59. */
  60. int delete(Integer id);
  61. /**
  62. * 根据主键批量删除
  63. *
  64. * @param ids
  65. * @return 删除条数
  66. */
  67. int deleteBatch(Integer[] ids);
  68. /**
  69. * 商品从回收站恢复
  70. *
  71. * @param ids
  72. * @return
  73. */
  74. int back(Integer[] ids);
  75. /**
  76. * 上架
  77. *
  78. * @param id
  79. * @return
  80. */
  81. int enSale(Integer id);
  82. /**
  83. * 上架
  84. *
  85. * @param ids
  86. * @return
  87. */
  88. int enSaleBatch(Integer[] ids);
  89. /**
  90. * 下架
  91. *
  92. * @param id
  93. * @return
  94. */
  95. int unSale(Integer id);
  96. /**
  97. * 下架
  98. *
  99. * @param ids
  100. * @return
  101. */
  102. int unSaleBatch(Integer[] ids);
  103. /**
  104. * 导入商品
  105. *
  106. * @param goodsEntityList
  107. * @return
  108. */
  109. int uploadExcel(List<GoodsDto> goodsEntityList,int exportDataType);
  110. /**
  111. * 导入商品(修改库存版)
  112. *
  113. * @param goodsEntityList
  114. * @return
  115. */
  116. int uploadExcelByCover(List<GoodsDto> goodsEntityList,int exportDataType);
  117. /**
  118. * 条形码查询商品详情
  119. * @param prodBarcode 条形码
  120. * @param storeId
  121. * @return
  122. */
  123. GoodsDetailsDto queryGoodsDetailsByProdBarcode(String prodBarcode, String storeId);
  124. GoodsPanoramaDto searchGoodsPanoramaDtoByKeyword(String keyword);
  125. /**
  126. * 查询出要导出的列表
  127. * @param params 查询参数
  128. * @return
  129. */
  130. List<GoodsEntity> queryExportList(Map<String, Object> params);
  131. /**
  132. * 查出pdf需要的需要
  133. * @param sku 商品sku
  134. * @param storeId
  135. * @param prodBarcode
  136. * @return
  137. */
  138. PDFGoodsDto queryForPDFData(String sku, String storeId, String prodBarcode);
  139. /**
  140. * 查询产品价格
  141. * @param prodBarcode
  142. * @param storeId
  143. * @return
  144. */
  145. Map<String,Object> calculateGoodsDetail(String prodBarcode, String storeId);
  146. /**
  147. * 根据条形码查询商品
  148. * @param barCode
  149. * @return
  150. */
  151. GoodsEntity queryByBarcode(String barCode);
  152. /**
  153. * 根据sku查询商品
  154. * @param sku
  155. * @return
  156. */
  157. GoodsEntity queryBySku(String sku);
  158. void updateForImgUrl(GoodsEntity goodsEntity);
  159. /**
  160. * 根据商品名称查询商品
  161. * @param goodsName
  162. * @return
  163. */
  164. List<GoodsEntity> queryByName(String goodsName);
  165. void syncOmsHsCode();
  166. }