| | |
| | | order by a.create_time desc |
| | | </select> |
| | | <select id="goodTop" resultType="java.util.Map"> |
| | | SELECT count(1) as counts ,ot.evaluation_tag_id |
| | | from t_order_evaluate_tag ot |
| | | left join t_order_evaluate te on ot.order_evaluate_id = te.id |
| | | left join t_charging_order co on te.order_id = co.id |
| | | SELECT |
| | | count( 1 ) AS counts, |
| | | |
| | | tt.`name` |
| | | FROM |
| | | t_order_evaluate_tag ot |
| | | LEFT JOIN t_order_evaluate te ON ot.order_evaluate_id = te.id |
| | | LEFT JOIN t_charging_order co ON te.order_id = co.id |
| | | LEFT JOIN `charging_pile_other`.`t_evaluation_tag` tt on ot.evaluation_tag_id = tt.id |
| | | WHERE ot.evaluation_tag_id in ( |
| | | SELECT id from `charging_pile_other`.`t_evaluation_tag` WHERE type = 1 |
| | | ) <if test="null != siteIds"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | GROUP BY ot.evaluation_tag_id |
| | | ORDER BY counts desc |
| | | limit 5 |
| | | GROUP BY |
| | | tt.`name` |
| | | ORDER BY |
| | | counts DESC |
| | | LIMIT 5 |
| | | |
| | | |
| | | |
| | | </select> |
| | | <select id="badTop" resultType="java.util.Map"> |
| | | SELECT count(1) as counts ,ot.evaluation_tag_id |
| | | from t_order_evaluate_tag ot |
| | | left join t_order_evaluate te on ot.order_evaluate_id = te.id |
| | | left join t_charging_order co on te.order_id = co.id |
| | | SELECT |
| | | count( 1 ) AS counts, |
| | | |
| | | tt.`name` |
| | | FROM |
| | | t_order_evaluate_tag ot |
| | | LEFT JOIN t_order_evaluate te ON ot.order_evaluate_id = te.id |
| | | LEFT JOIN t_charging_order co ON te.order_id = co.id |
| | | LEFT JOIN `charging_pile_other`.`t_evaluation_tag` tt on ot.evaluation_tag_id = tt.id |
| | | WHERE ot.evaluation_tag_id in ( |
| | | SELECT id from `charging_pile_other`.`t_evaluation_tag` WHERE type = 3 |
| | | ) <if test="null != siteIds"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | GROUP BY ot.evaluation_tag_id |
| | | ORDER BY counts desc |
| | | limit 5 |
| | | GROUP BY |
| | | tt.`name` |
| | | ORDER BY |
| | | counts DESC |
| | | LIMIT 5 |
| | | </select> |
| | | </mapper> |