GoodsService.java 2.0 KB

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