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

group order 语法调整

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