SecondHandService.java 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. package com.caimei365.commodity.service;
  2. import com.caimei365.commodity.model.ResponseJson;
  3. import com.caimei365.commodity.model.dto.SecondDto;
  4. import com.caimei365.commodity.model.vo.BrandVo;
  5. import com.caimei365.commodity.model.vo.PaginationVo;
  6. import com.caimei365.commodity.model.vo.SecondDetailVo;
  7. import com.caimei365.commodity.model.vo.SecondListVo;
  8. import org.springframework.http.HttpHeaders;
  9. import java.util.List;
  10. /**
  11. * Description
  12. *
  13. * @author : Charles
  14. * @date : 2021/4/14
  15. */
  16. public interface SecondHandService {
  17. /**
  18. * 二手商品列表
  19. *
  20. * @param userId 机构用户id
  21. * @param secondHandType 二手商品分类,1二手仪器,2临期产品,3其他
  22. * @param instrumentType 二手仪器分类的类型,1轻光电、2重光电、3耗材配件
  23. * @param name 二手商品名称搜索关键词
  24. * @param pageNum 页码
  25. * @param pageSize 每页数量
  26. * @return List<SecondHandVo>
  27. */
  28. ResponseJson<PaginationVo<SecondListVo>> getSecondHandList(Integer userId, Integer secondHandType, Integer instrumentType, String name, int pageNum, int pageSize);
  29. /**
  30. * 获取二手商品详情
  31. *
  32. * @param userId 机构用户id
  33. * @param productId 商品表的商品Id
  34. * @return SecondDetailVo
  35. */
  36. ResponseJson<SecondDetailVo> getSecondHandDetail(Integer userId, Integer productId);
  37. /**
  38. * 发布二手商品
  39. *
  40. * @param secondDto 对象内容描述{
  41. * "secondHandType" : 二手商品分类,1二手仪器,2临期产品,3其他
  42. * ,"instrumentType" : 二手仪器分类的类型,1轻光电、2重光电、3耗材配件(仅适用于二手仪器分类多个用英文逗号分分隔)
  43. * ,"brandId" : 品牌Id
  44. * ,"name" : 商品名称
  45. * ,"fixedYears" : 出厂日期格式:2020年6月
  46. * ,"maturityYears" : 产品到期日格式:2020年6月(仅适用于临期产品)
  47. * ,"companyName" : 公司名称
  48. * ,"price" : 交易价格
  49. * ,"detailTalkFlag" : 是否启用详聊,1不开启,2开启(开启详聊不展示交易价)
  50. * ,"normalPrice" : 市场价
  51. * ,"originalPrice" : 采购价/原价(该二手原始购买价格)
  52. * ,"stock" : 数量(等同库存)
  53. * ,"productQuality" : 商品成色
  54. * ,"contactName" : 联系人名字
  55. * ,"contactMobile" : 联系方式
  56. * ,"secondProductType" : 设备类型:1医美、2非医美
  57. * ,"townId" : 县区ID
  58. * ,"address" : 详细地址
  59. * ,"image" : 图片信息
  60. * ,"productDetails" : 商品详细信息
  61. * ,"source" : 信息来源 1网站 2CRM 3后台
  62. * }
  63. * @param headers HttpHeaders
  64. */
  65. ResponseJson releaseSecondHand(SecondDto secondDto, HttpHeaders headers);
  66. /**
  67. * 二手下单页面商品
  68. *
  69. * @param searchKeyword 搜索关键词
  70. * @param secondHandType 二手商品分类,1二手仪器,2临期产品,3其他
  71. * @param instrumentType 二手仪器分类的类型,1轻光电、2重光电、3耗材配件
  72. */
  73. ResponseJson<PaginationVo<SecondListVo>> getOrderPageSecondList(String searchKeyword, Integer secondHandType, Integer instrumentType, int pageNum, int pageSize);
  74. /**
  75. * 商品品牌列表
  76. */
  77. ResponseJson<List<BrandVo>> getBrandList();
  78. /**
  79. * 计算二手商品浏览量
  80. * @param productId 商品Id
  81. */
  82. ResponseJson<Integer> updateSecondHandViews(Integer productId);
  83. /**
  84. * 二手商品-相关推荐
  85. * @param productId 商品Id
  86. */
  87. ResponseJson<List<SecondListVo>> getSecondRecommends(Integer productId);
  88. }