|
@@ -7,12 +7,24 @@
|
|
|
min(CONVERT(danjia, DECIMAL)) as minDanjia,
|
|
|
avg(CONVERT(danjia, DECIMAL)) as aveDanjia,
|
|
|
ifnull((select danjia from kzks_cost_model_cl_price
|
|
|
- ORDER BY ABS(NOW() - ifnull(caigou_time,now())) ASC limit 1),0) as recentDanjia,
|
|
|
+ <where>
|
|
|
+ <if test="wlbm != null and wlbm != ''">and wlbm = #{wlbm}</if>
|
|
|
+ <if test="ggxh != null and ggxh != ''">and ggxh = #{ggxh}</if>
|
|
|
+ <if test="zlLevel != null and zlLevel != ''">and zl_level = #{zlLevel}</if>
|
|
|
+ <if test="pici != null and pici != ''">and pici = #{pici}</if>
|
|
|
+ </where>
|
|
|
+ ORDER BY caigou_time DESC limit 1),0) as recentDanjia,
|
|
|
max(CONVERT(danjia, DECIMAL)) * #{number} as maxPrice,
|
|
|
min(CONVERT(danjia, DECIMAL)) * #{number} as minPrice,
|
|
|
avg(CONVERT(danjia, DECIMAL)) * #{number} as avePrice,
|
|
|
ifnull((select danjia from kzks_cost_model_cl_price
|
|
|
- ORDER BY ABS(NOW() - ifnull(caigou_time,now())) ASC limit 1),0) * #{number} as recentPrice,
|
|
|
+ <where>
|
|
|
+ <if test="wlbm != null and wlbm != ''">and wlbm = #{wlbm}</if>
|
|
|
+ <if test="ggxh != null and ggxh != ''">and ggxh = #{ggxh}</if>
|
|
|
+ <if test="zlLevel != null and zlLevel != ''">and zl_level = #{zlLevel}</if>
|
|
|
+ <if test="pici != null and pici != ''">and pici = #{pici}</if>
|
|
|
+ </where>
|
|
|
+ ORDER BY caigou_time DESC limit 1),0) * #{number} as recentPrice,
|
|
|
#{xiangmuId} as xiangmuId,
|
|
|
#{xiangmuName} as xiangmuName,
|
|
|
#{caigouTime} as caigouTime,
|