统一降序排列

This commit is contained in:
mashuai 2024-10-10 14:32:49 +08:00
parent 74677acf75
commit 08be20dea4
6 changed files with 6 additions and 3 deletions

View File

@ -50,6 +50,7 @@
and DATE_FORMAT(tbr.create_time, '%Y-%m-%d') = #{applyTime} and DATE_FORMAT(tbr.create_time, '%Y-%m-%d') = #{applyTime}
</if> </if>
GROUP BY tbr.id GROUP BY tbr.id
ORDER BY tbr.create_time DESC
</select> </select>
<select id="selectByName" resultType="com.bonus.base.domain.TbBdRecord"> <select id="selectByName" resultType="com.bonus.base.domain.TbBdRecord">

View File

@ -56,6 +56,7 @@
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
<![CDATA[and tddr.create_time BETWEEN #{startTime} AND #{endTime} ]]> <![CDATA[and tddr.create_time BETWEEN #{startTime} AND #{endTime} ]]>
</if> </if>
ORDER BY tddr.create_time DESC
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">

View File

@ -31,7 +31,7 @@
<if test="isAll != null and isAll == 0"> <if test="isAll != null and isAll == 0">
and (tp.team_id is null and tp.id not in (select rel_id from tb_team where del_flag = '0' and rel_id is not null and js_time is null)) and (tp.team_id is null and tp.id not in (select rel_id from tb_team where del_flag = '0' and rel_id is not null and js_time is null))
</if> </if>
ORDER BY CASE WHEN tp.id = tt.rel_id THEN 0 ELSE 1 END, tp.id ORDER BY tp.create_time DESC, CASE WHEN tp.id = tt.rel_id THEN 0 ELSE 1 END, tp.id
</select> </select>
<select id="queryById" resultType="com.bonus.base.domain.TbPeople"> <select id="queryById" resultType="com.bonus.base.domain.TbPeople">
@ -53,10 +53,8 @@
tp.rel_phone as relPhone, tp.rel_phone as relPhone,
tp.id_card as idCard, tp.id_card as idCard,
tp.post_code as postCode, tp.post_code as postCode,
sda.dict_label as postName,
tp.sex as sex tp.sex as sex
from tb_people tp from tb_people tp
left join sys_dict_data sda on tp.post_code = sda.dict_code
where tp.del_flag = '0' where tp.del_flag = '0'
<if test="idCard != null and idCard != ''"> <if test="idCard != null and idCard != ''">
and tp.id_card = #{idCard} and tp.id_card = #{idCard}

View File

@ -31,6 +31,7 @@
<if test="headUser != null and headUser != ''"> <if test="headUser != null and headUser != ''">
and tpd.head_user like concat('%',#{headUser},'%') and tpd.head_user like concat('%',#{headUser},'%')
</if> </if>
ORDER BY tpd.create_time DESC
</select> </select>
<!--查询单个--> <!--查询单个-->

View File

@ -49,6 +49,7 @@
and tb.depart_id = #{departId} and tb.depart_id = #{departId}
</if> </if>
GROUP BY tb.id GROUP BY tb.id
ORDER BY tb.create_time DESC
</select> </select>
<select id="queryById" resultType="com.bonus.base.vo.TbProjectVo"> <select id="queryById" resultType="com.bonus.base.vo.TbProjectVo">

View File

@ -410,6 +410,7 @@
<if test="configName != null and configName != ''"> <if test="configName != null and configName != ''">
and twc.config_name like concat('%',#{configName},'%') and twc.config_name like concat('%',#{configName},'%')
</if> </if>
ORDER BY twc.create_time DESC
</select> </select>
<select id="queryByDeviceId" resultType="java.lang.Integer"> <select id="queryByDeviceId" resultType="java.lang.Integer">
select count(1) from tb_device select count(1) from tb_device