GoodsService.java 4.3 KB

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