Commit dc4145c4 authored by tangwei's avatar tangwei

修改bug

parent 77df8035
......@@ -34,16 +34,6 @@ public class MyBatisPlusConfig {
}
/**
* plus分页插件支持
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return mybatisPlusInterceptor;
}
/**
* pageHelper插件支持
*
* @return
......
package com.yeejoin.amos.boot.module.tzs.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @description:
* @author: tw
* @createDate: 2022/3/31
*/
@Configuration
public class MybatisPlusConfig {
/**
* plus分页插件支持
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return mybatisPlusInterceptor;
}
}
......@@ -1027,26 +1027,35 @@
<select id="getbyqrCode" resultType="com.yeejoin.equipmanage.common.entity.dto.EquipSpecificAlarmDTO">
-- SELECT
-- (
-- CASE
--
-- WHEN d.type = 'FIREALARM' THEN
-- '火警'
-- WHEN d.type = 'BREAKDOWN' THEN
-- '故障'
-- WHEN d.type = 'SHIELD' THEN
-- '屏蔽'
-- WHEN d.type = 'NOTICE' THEN
-- '预警' ELSE ''
--
-- END
-- ) AS type,
-- ( CASE WHEN d.update_date = NULL THEN d.create_date ELSE d.update_date END ) AS createDate
-- FROM
-- wl_equipment_specific_alarm d LEFT JOIN wl_equipment_specific on wl_equipment_specific.id=d.equipment_specific_id
-- where wl_equipment_specific.qr_code=#{code}
-- ORDER BY d.create_date ,d.update_date LIMIT 1
SELECT
(
CASE
WHEN d.type = 'FIREALARM' THEN
'火警'
WHEN d.type = 'BREAKDOWN' THEN
'故障'
WHEN d.type = 'SHIELD' THEN
'屏蔽'
WHEN d.type = 'NOTICE' THEN
'预警' ELSE ''
END
) AS type,
( CASE WHEN d.update_date = NULL THEN d.create_date ELSE d.update_date END ) AS createDate
FROM
wl_equipment_specific_alarm d LEFT JOIN wl_equipment_specific on wl_equipment_specific.id=d.equipment_specific_id
where wl_equipment_specific.qr_code=#{code}
ORDER BY d.create_date ,d.update_date LIMIT 1
wl_signal_classify.type_name AS type,
( CASE WHEN d.update_date = NULL THEN d.create_date ELSE d.update_date END ) AS createDate
FROM
wl_equipment_specific_alarm d
LEFT JOIN wl_equipment_specific on wl_equipment_specific.id=d.equipment_specific_id
LEFT JOIN wl_signal_classify on wl_signal_classify.type_code=d.type
where wl_equipment_specific.qr_code=#{code}
ORDER BY d.create_date ,d.update_date LIMIT 1
</select>
......
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