GoodsService.java 2.0 KB

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