|
@@ -1,6 +1,7 @@
|
|
package com.caimei365.commodity.controller;
|
|
package com.caimei365.commodity.controller;
|
|
|
|
|
|
import com.caimei365.commodity.annotation.Idempotent;
|
|
import com.caimei365.commodity.annotation.Idempotent;
|
|
|
|
+import com.caimei365.commodity.annotation.IpSave;
|
|
import com.caimei365.commodity.model.ResponseJson;
|
|
import com.caimei365.commodity.model.ResponseJson;
|
|
import com.caimei365.commodity.model.dto.SecondDto;
|
|
import com.caimei365.commodity.model.dto.SecondDto;
|
|
import com.caimei365.commodity.model.vo.BrandVo;
|
|
import com.caimei365.commodity.model.vo.BrandVo;
|
|
@@ -44,6 +45,7 @@ public class SecondHandApi {
|
|
@ApiImplicitParam(required = false, name = "pageNum", value = "页码"),
|
|
@ApiImplicitParam(required = false, name = "pageNum", value = "页码"),
|
|
@ApiImplicitParam(required = false, name = "pageSize", value = "每页数量")
|
|
@ApiImplicitParam(required = false, name = "pageSize", value = "每页数量")
|
|
})
|
|
})
|
|
|
|
+ @IpSave(saveName = "二手商品列表",saveParams = true)
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
public ResponseJson<PaginationVo<SecondListVo>> getSecondHandList(Integer userId, Integer secondHandType, Integer instrumentType, String name,
|
|
public ResponseJson<PaginationVo<SecondListVo>> getSecondHandList(Integer userId, Integer secondHandType, Integer instrumentType, String name,
|
|
@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
@@ -61,6 +63,7 @@ public class SecondHandApi {
|
|
@ApiImplicitParam(required = true, name = "userId", value = "机构用户id"),
|
|
@ApiImplicitParam(required = true, name = "userId", value = "机构用户id"),
|
|
@ApiImplicitParam(required = true, name = "productId", value = "商品Id")
|
|
@ApiImplicitParam(required = true, name = "productId", value = "商品Id")
|
|
})
|
|
})
|
|
|
|
+ @IpSave(saveName = "获取二手商品详情",saveParams = true)
|
|
@GetMapping("/detail")
|
|
@GetMapping("/detail")
|
|
public ResponseJson<SecondDetailVo> getSecondDetail(Integer userId, Integer productId) {
|
|
public ResponseJson<SecondDetailVo> getSecondDetail(Integer userId, Integer productId) {
|
|
return secondHandService.getSecondHandDetail(userId, productId);
|
|
return secondHandService.getSecondHandDetail(userId, productId);
|
|
@@ -102,6 +105,7 @@ public class SecondHandApi {
|
|
* @param headers HttpHeaders
|
|
* @param headers HttpHeaders
|
|
*/
|
|
*/
|
|
@ApiOperation("发布二手商品(旧:/product/releaseSecondHandProduct)")
|
|
@ApiOperation("发布二手商品(旧:/product/releaseSecondHandProduct)")
|
|
|
|
+ @IpSave(saveName = "发布二手商品",saveParams = false)
|
|
@Idempotent(prefix = "idempotent_secondhand", keys = {"#secondDto"}, expire = 5)
|
|
@Idempotent(prefix = "idempotent_secondhand", keys = {"#secondDto"}, expire = 5)
|
|
@PostMapping("/release")
|
|
@PostMapping("/release")
|
|
public ResponseJson releaseSecondHand(SecondDto secondDto, @RequestHeader HttpHeaders headers) {
|
|
public ResponseJson releaseSecondHand(SecondDto secondDto, @RequestHeader HttpHeaders headers) {
|