GoodsService.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. /**
  23. * 分页查询
  24. *
  25. * @param map 参数
  26. * @return list
  27. */
  28. List<GoodsEntity> queryList(Map<String, Object> map);
  29. /**
  30. * 分页统计总数
  31. *
  32. * @param map 参数
  33. * @return 总数
  34. */
  35. int queryTotal(Map<String, Object> map);
  36. /**
  37. * 保存实体
  38. *
  39. * @param goods 实体
  40. * @return 保存条数
  41. */
  42. int save(GoodsEntity goods);
  43. /**
  44. * 根据主键更新实体
  45. *
  46. * @param goods 实体
  47. * @return 更新条数
  48. */
  49. int update(GoodsEntity goods);
  50. /**
  51. * 根据主键删除
  52. *
  53. * @param id
  54. * @return 删除条数
  55. */
  56. int delete(Integer id);
  57. /**
  58. * 根据主键批量删除
  59. *
  60. * @param ids
  61. * @return 删除条数
  62. */
  63. int deleteBatch(Integer[] ids);
  64. /**
  65. * 商品从回收站恢复
  66. *
  67. * @param ids
  68. * @return
  69. */
  70. int back(Integer[] ids);
  71. /**
  72. * 上架
  73. *
  74. * @param id
  75. * @return
  76. */
  77. int enSale(Integer id);
  78. /**
  79. * 上架
  80. *
  81. * @param ids
  82. * @return
  83. */
  84. int enSaleBatch(Integer[] ids);
  85. /**
  86. * 下架
  87. *
  88. * @param id
  89. * @return
  90. */
  91. int unSale(Integer id);
  92. /**
  93. * 下架
  94. *
  95. * @param ids
  96. * @return
  97. */
  98. int unSaleBatch(Integer[] ids);
  99. /**
  100. * 导入商品
  101. *
  102. * @param file
  103. * @return
  104. */
  105. int uploadExcel(MultipartFile file);
  106. }