Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
dc4145c4
Commit
dc4145c4
authored
Mar 31, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
77df8035
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
29 deletions
+54
-29
MyBatisPlusConfig.java
...a/com/yeejoin/amos/boot/biz/config/MyBatisPlusConfig.java
+0
-10
MybatisPlusConfig.java
...eejoin/amos/boot/module/tzs/config/MybatisPlusConfig.java
+26
-0
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+28
-19
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/config/MyBatisPlusConfig.java
View file @
dc4145c4
...
...
@@ -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
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/config/MybatisPlusConfig.java
0 → 100644
View file @
dc4145c4
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
;
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
dc4145c4
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment