|
|
@@ -20,6 +20,7 @@ import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.List;
|
|
|
|
|
|
/*
|
|
|
@@ -41,6 +42,8 @@ public class YhShopGoodsController {
|
|
|
|
|
|
private final YhShopMapper yhShopMapper;
|
|
|
|
|
|
+ private final HttpServletRequest request;
|
|
|
+
|
|
|
/**
|
|
|
* 新增平台
|
|
|
*/
|
|
|
@@ -107,7 +110,7 @@ public class YhShopGoodsController {
|
|
|
@GetMapping("/get/available/goods")
|
|
|
public Result<SearchResult<YhShopAvailableGoodsView>> getAvailableGoods(){
|
|
|
long userId = StpYhShopManageUser.getLoginIdAsLong();
|
|
|
- SearchResult<YhShopAvailableGoodsView> search = beanSearcher.search(YhShopAvailableGoodsView.class, MapUtils.builder()
|
|
|
+ SearchResult<YhShopAvailableGoodsView> search = beanSearcher.search(YhShopAvailableGoodsView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
.put("condition", String.format("and (select count(*) from yh_shop_goods_sku where user_id = %s and goods_id = yr.goods_id and deleted is true) = 0", userId))
|
|
|
.build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|