|
@@ -122,7 +122,9 @@ public class UserExchangeController extends BaseApiController {
|
|
|
@DynamicParameter(name = "categoryId",value = "分类id",dataTypeClass = Long.class),
|
|
|
@DynamicParameter(name = "tagIds",value = "标签id",dataTypeClass = String.class),
|
|
|
@DynamicParameter(name = "startPrice",value = "开始价格",dataTypeClass = Integer.class),
|
|
|
- @DynamicParameter(name = "endPrice",value = "结束价格",dataTypeClass = Integer.class)
|
|
|
+ @DynamicParameter(name = "endPrice",value = "结束价格",dataTypeClass = Integer.class),
|
|
|
+ @DynamicParameter(name = "categoryIdList",value = "分类id列表",dataTypeClass = List.class),
|
|
|
+ @DynamicParameter(name = "goodsName",value = "商品名称",dataTypeClass = String.class),
|
|
|
})
|
|
|
@ApiResponses(
|
|
|
@ApiResponse(code = 200, message = "success" , response = GoodsListVO.class)
|
|
@@ -132,6 +134,8 @@ public class UserExchangeController extends BaseApiController {
|
|
|
String tagIds = param.getString("tagIds");
|
|
|
Integer startPrice = param.getInteger("startPrice");
|
|
|
Integer endPrice = param.getInteger("endPrice");
|
|
|
+ List<Long> categoryIdList = param.getJSONArray("categoryIdList").toJavaList(Long.class);
|
|
|
+ String goodsName = param.getString("goodsName");
|
|
|
|
|
|
List<Long> goodsIds = new ArrayList<>();
|
|
|
if (StringUtils.isNotBlank(tagIds)) {
|
|
@@ -145,6 +149,8 @@ public class UserExchangeController extends BaseApiController {
|
|
|
.eq(null != categoryId && 0 != categoryId, Goods::getCategoryId, categoryId)
|
|
|
.ge(null != startPrice && 0 != startPrice, Goods::getExchangePrice, startPrice)
|
|
|
.le(null != endPrice && 0 != endPrice, Goods::getExchangePrice, endPrice)
|
|
|
+ .in(!CollectionUtils.isEmpty(goodsIds), Goods::getCategoryId, categoryIdList)
|
|
|
+ .like(StringUtils.isNotBlank(goodsName), Goods::getTitle, goodsName)
|
|
|
.eq(Goods::getStatus, GoodsStatusEnum.PUT_ON)
|
|
|
.eq(Goods::getExchangeShow, 1)
|
|
|
.in(!CollectionUtils.isEmpty(goodsIds), Goods::getGoodsId, goodsIds)
|