|
|
@ -45,14 +45,14 @@ |
|
|
|
AND uu.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|
AND ad.id IS NOT NULL |
|
|
|
) t |
|
|
|
) t GROUP BY t.streetId |
|
|
|
) t1 |
|
|
|
<choose> |
|
|
|
<when test='category != null and category == "0"'> order by t1.oldCount desc </when> |
|
|
|
<when test='category != null and category == "1"'> order by t1.youngCount desc </when> |
|
|
|
<when test='category != null and category == "2"'> order by t1.oldCount asc </when> |
|
|
|
<when test='category != null and category == "3"'> order by t1.youngCount asc </when> |
|
|
|
<otherwise> GROUP BY t1.streetId </otherwise> |
|
|
|
<otherwise> order by t1.streetId asc </otherwise> |
|
|
|
</choose> |
|
|
|
</select> |
|
|
|
|
|
|
@ -317,7 +317,7 @@ |
|
|
|
</if> |
|
|
|
AND ad.del_flag = 0 |
|
|
|
AND ama.ID IS <if test='category != null and category == "1"'>NOT</if> NULL |
|
|
|
<if test="gridId != null and grid != ''">and (ad1.id = #{gridId} or ad2.id = #{gridId})</if> |
|
|
|
<if test="gridId != null and gridId != ''">and (ad1.id = #{gridId} or ad2.id = #{gridId})</if> |
|
|
|
GROUP BY ad.id |
|
|
|
ORDER BY ama.CREATED_TIME DESC, ad.create_date DESC |
|
|
|
</select> |
|
|
@ -360,7 +360,7 @@ |
|
|
|
<if test="deptIdList != null and deptIdList.size() > 0"> |
|
|
|
AND ad.id in <include refid="foreachDeptIdList"></include> |
|
|
|
</if> |
|
|
|
<if test="gridId != null and grid != ''">and (ad1.id = #{gridId} or ad2.id = #{gridId})</if> |
|
|
|
<if test="gridId != null and gridId != ''">and (ad1.id = #{gridId} or ad2.id = #{gridId})</if> |
|
|
|
GROUP BY |
|
|
|
ad.id |
|
|
|
)t |
|
|
|