Commit d2e3f448 authored by 军师中郎将's avatar 军师中郎将

group order 语法调整

parent 1855f366
......@@ -62,7 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
</where>
group by a.user_id desc
group by a.user_id
order by a.user_id desc
</select>
<select id="selectTDetectorListstatus" parameterType="TDetectorUser" resultMap="TDetectorUserResult">
SELECT a.user_id, a.username, a.nick_name , a.address,
......@@ -91,7 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="username != null and username != ''"> and a.username = #{username}</if>
<if test="nickName != null and nickName != ''"> and a.nick_name = #{nickName}</if>
</where>
group by a.user_id desc
group by a.user_id
order by a.user_id desc
</select>
<select id="selectTDetectorUserById" parameterType="Long" resultMap="TDetectorUserResult">
......
......@@ -57,7 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
</where>
group by a.device_id desc
group by a.device_id
order by a.device_id desc
</select>
<select id="selectDeviceList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult">
SELECT * FROM t_device_info WHERE device_name like concat('%', #{deviceName}, '%')
......@@ -185,7 +186,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model like concat('%', #{deviceModel}, '%')</if>
<if test="iotNo != null and iotNo != ''"> and iot_no like concat('%', #{iotNo}, '%')</if>
group by relation_device_detail_id desc
group by relation_device_detail_id
order by relation_device_detail_id desc
</select>
<!--查询设备已经关联的关联设备-->
......
......@@ -50,7 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="annualSupervisionInspection != null and annualSupervisionInspection != ''"> and annual_supervision_inspection = #{annualSupervisionInspection}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
group by enterprise_id desc
group by enterprise_id
order by enterprise_id desc
</select>
<select id="selectTEnterpriseInfoById" parameterType="Long" resultMap="TEnterpriseInfoResult">
......
......@@ -119,7 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hiddenSource!=null"> and hidden_source = #{hiddenSource}</if>
<if test="reportBeginTime != null and reportEndTime!=null">and report_time BETWEEN #{reportBeginTime} and #{reportEndTime}</if>
</where>
group by hidden_trouble_id desc
group by hidden_trouble_id
order by hidden_trouble_id desc
</select>
......
......@@ -49,7 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
group by pipe_id desc
group by pipe_id
order by pipe_id desc
</select>
<select id="selectTPipeInfoById" parameterType="Long" resultMap="TPipeInfoResult">
......
......@@ -41,7 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nearbyAddress != null and nearbyAddress != ''"> and nearby_address = #{nearbyAddress}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
group by project_id desc
group by project_id
order by project_id desc
</select>
<select id="selectTProjectInfoById" parameterType="Long" resultMap="TProjectInfoResult">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment