GoodsService.java 4.0 KB

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