|
|
@@ -73,7 +73,10 @@
|
|
|
SELECT
|
|
|
p.c_id AS id,
|
|
|
p.c_title AS title,
|
|
|
- p.project_type AS productType,
|
|
|
+ CASE
|
|
|
+ WHEN p.project_type = '1' THEN 0
|
|
|
+ ELSE 0
|
|
|
+ END AS productType,
|
|
|
p.d_price AS price,
|
|
|
'广誉源' AS merchantName,
|
|
|
CAST(FLOOR(100000 + RAND() * 900000) AS UNSIGNED) AS merchantId,
|
|
|
@@ -99,9 +102,18 @@
|
|
|
) agg ON FIND_IN_SET(p.c_id, agg.c_bh_list)
|
|
|
WHERE
|
|
|
p.is_delete = 0
|
|
|
- <if test="dto.productType != null">
|
|
|
+ <if test="dto.productType != null and dto.productType == 0">
|
|
|
+ AND p.project_type = 1
|
|
|
+ </if>
|
|
|
+ <if test="dto.productType != null and dto.productType == 1">
|
|
|
+ AND 1 = 0
|
|
|
+ </if>
|
|
|
+ <if test="dto.productType != null and dto.productType != 0 and dto.productType != 1">
|
|
|
AND p.project_type = #{dto.productType}
|
|
|
</if>
|
|
|
+ <if test="dto.productType == null">
|
|
|
+ AND p.project_type = 1
|
|
|
+ </if>
|
|
|
AND EXISTS (
|
|
|
SELECT 1
|
|
|
FROM t_js j
|