<iftest="badEvaluateStatus != null or goodEvaluateStatus != null or reviewStatus != null or topHotStatus != null or maliciousStatus != null or goodsCompute != null or storeCompute != null or serviceCompute != null ">
<iftest="badEvaluateStatus != null ">
and (
and bad_evaluate_status = #{badEvaluateStatus}
<iftest="badEvaluateStatus != null or goodEvaluateStatus != null or reviewStatus != null or topHotStatus != null or maliciousStatus != null">
</if>
( 1=1
<iftest="goodEvaluateStatus != null ">
<iftest="badEvaluateStatus != null ">
and good_evaluate_status = #{goodEvaluateStatus}
and bad_evaluate_status = #{badEvaluateStatus}
</if>
</if>
<iftest="reviewStatus != null ">
<iftest="goodEvaluateStatus != null ">
and review_status = #{reviewStatus}
and good_evaluate_status = #{goodEvaluateStatus}
</if>
</if>
<iftest="topHotStatus != null ">
<iftest="reviewStatus != null ">
and top_hot_status = #{topHotStatus}
and review_status = #{reviewStatus}
</if>
</if>
<iftest="maliciousStatus != null ">
<iftest="topHotStatus != null ">
and malicious_status = #{maliciousStatus}
and top_hot_status = #{topHotStatus}
</if>
<iftest="maliciousStatus != null ">
and malicious_status = #{maliciousStatus}
</if>
)
</if>
<iftest="badEvaluateStatus == null and goodEvaluateStatus == null and reviewStatus == null and topHotStatus == null and maliciousStatus == null">
1=0
</if>
or (
<iftest="goodsCompute == null and storeCompute == null and serviceCompute == null">
1=0
</if>
<iftest="goodsCompute != null or storeCompute != null or serviceCompute != null">
1=1
<iftest="goodsCompute != null and goodsCompute != '' and goodsScore != null ">
and goods_score ${goodsCompute} #{goodsScore}
</if>
<iftest="storeCompute != null and storeCompute != '' and storeScore != null ">
and store_score ${storeCompute} #{storeScore}
</if>
<iftest="serviceCompute != null and serviceCompute != '' and serviceScore != null ">
and service_score ${serviceCompute} #{serviceScore}
</if>
</if>
)
)
</if>
</if>
<iftest="goodsCompute != null and goodsCompute != '' and goodsScore != null ">
and goods_score ${goodsCompute} #{goodsScore}
</if>
<iftest="storeCompute != null and storeCompute != '' and storeScore != null ">
and store_score ${storeCompute} #{storeScore}
</if>
<iftest="serviceCompute != null and serviceCompute != '' and serviceScore != null ">
and service_score ${serviceCompute} #{serviceScore}
left join ( select problem_id, count(*) problemCount from tab_problem_reply where status <> 0 GROUP BY problem_id ) t3 on t1.problem_id = t3.problem_id
left join ( select problem_id, count(*) problemCount from tab_problem_reply where status <> 0 GROUP BY problem_id ) t3 on t1.problem_id = t3.problem_id