Browse Source

数据配置列表排序调整

master
yinzuomei 3 years ago
parent
commit
6c50acb57c
  1. 28
      epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncConfigDao.xml

28
epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncConfigDao.xml

@ -31,26 +31,26 @@
</resultMap>
<select id="list" resultMap="dataConfigList">
SELECT
ID AS id,
DEPT_CODE AS deptCode,
DEPT_NAME AS deptName,
DATA_NAME AS dataName,
switch_status AS switchStatus,
sort AS sort,
data_code AS dataCode,
customer_id as customerId
FROM data_sync_config
WHERE DEL_FLAG = 0
c.ID AS id,
c.DEPT_CODE AS deptCode,
c.DEPT_NAME AS deptName,
c.DATA_NAME AS dataName,
c.switch_status AS switchStatus,
c.sort AS sort,
c.data_code AS dataCode,
c.customer_id as customerId
FROM data_sync_config c
WHERE c.DEL_FLAG = 0
<if test="switchStatus != null and switchStatus != ''">
AND switch_status = #{switchStatus}
AND c.switch_status = #{switchStatus}
</if>
<if test='null != customerId and customerId != "" '>
AND CUSTOMER_ID = #{customerId}
AND c.CUSTOMER_ID = #{customerId}
</if>
<if test="dataCode != null and dataCode != ''">
AND data_code = #{dataCode}
AND c.data_code = #{dataCode}
</if>
order by sort
order by CONVERT(c.DEPT_NAME USING gbk),c.sort asc
</select>
<!-- 范围查询 -->

Loading…
Cancel
Save