GoodsService.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. package com.kmall.admin.service;
  2. import com.kmall.admin.dto.GoodsDto;
  3. import com.kmall.admin.entity.GoodsEntity;
  4. import com.kmall.common.utils.R;
  5. import org.springframework.web.multipart.MultipartFile;
  6. import java.util.List;
  7. import java.util.Map;
  8. /**
  9. * Service接口
  10. *
  11. * @author Scott
  12. * @email
  13. * @date 2017-08-21 21:19:49
  14. */
  15. public interface GoodsService {
  16. /**
  17. * 根据主键查询实体
  18. *
  19. * @param id 主键
  20. * @return 实体
  21. */
  22. GoodsEntity queryObject(Integer id);
  23. GoodsEntity queryObjectByProdBarcodeAndBizType(String prodBarcode);
  24. /**
  25. * 分页查询
  26. *
  27. * @param map 参数
  28. * @return list
  29. */
  30. List<GoodsEntity> queryList(Map<String, Object> map);
  31. List<GoodsEntity> querySame(Map<String, Object> map);
  32. /**
  33. * 分页统计总数
  34. *
  35. * @param map 参数
  36. * @return 总数
  37. */
  38. int queryTotal(Map<String, Object> map);
  39. /**
  40. * 保存实体
  41. *
  42. * @param goods 实体
  43. * @return 保存条数
  44. */
  45. int save(GoodsEntity goods);
  46. /**
  47. * 根据主键更新实体
  48. *
  49. * @param goods 实体
  50. * @return 更新条数
  51. */
  52. int update(GoodsEntity goods);
  53. /**
  54. * 根据主键删除
  55. *
  56. * @param id
  57. * @return 删除条数
  58. */
  59. int delete(Integer id);
  60. /**
  61. * 根据主键批量删除
  62. *
  63. * @param ids
  64. * @return 删除条数
  65. */
  66. int deleteBatch(Integer[] ids);
  67. /**
  68. * 商品从回收站恢复
  69. *
  70. * @param ids
  71. * @return
  72. */
  73. int back(Integer[] ids);
  74. /**
  75. * 上架
  76. *
  77. * @param id
  78. * @return
  79. */
  80. int enSale(Integer id);
  81. /**
  82. * 上架
  83. *
  84. * @param ids
  85. * @return
  86. */
  87. int enSaleBatch(Integer[] ids);
  88. /**
  89. * 下架
  90. *
  91. * @param id
  92. * @return
  93. */
  94. int unSale(Integer id);
  95. /**
  96. * 下架
  97. *
  98. * @param ids
  99. * @return
  100. */
  101. int unSaleBatch(Integer[] ids);
  102. /**
  103. * 导入商品
  104. *
  105. * @param goodsEntityList
  106. * @return
  107. */
  108. int uploadExcel(List<GoodsDto> goodsEntityList);
  109. }