|
|
@@ -197,7 +197,7 @@ public class CpsPopularizeController {
|
|
|
* 获取所有平台列表
|
|
|
*/
|
|
|
@GetMapping("/get/all/goods")
|
|
|
- public Result<List<GoodsDon>> getAllGoodsList(Boolean isNoBuyout) {
|
|
|
+ public Result<List<GoodsDon>> getAllGoodsList(Boolean isNoBuyout, Boolean isRate) {
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
//过滤买断制 平台
|
|
|
String conditionSql;
|
|
|
@@ -207,7 +207,10 @@ public class CpsPopularizeController {
|
|
|
} else {
|
|
|
conditionSql = "(special_type is null or special_type != 'giftCard')";
|
|
|
}
|
|
|
- conditionSql += " and exists (select id from goods_don_sku sku where sku.goods_id = g.id limit 1) and exist (select 1 from )";
|
|
|
+ conditionSql += " and exists (select id from goods_don_sku sku where sku.goods_id = g.id limit 1)";
|
|
|
+ if (isRate != null && isRate) {
|
|
|
+ conditionSql += " and exist (select 1 from user_plat_distribute_rate upr where upr.goods_id = g.id and upr.rate > 0)";
|
|
|
+ }
|
|
|
List<GoodsDon> goodsDons = beanSearcher.searchAll(GoodsDon.class, mapBuilder
|
|
|
.put("condition", conditionSql)
|
|
|
.field(GoodsDon::getType, 1)
|