Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-bi
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
林锐标
slm-bi
Commits
adb0e9ba
Commit
adb0e9ba
authored
Mar 31, 2021
by
梁彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 重构仪表板API与DTO
parent
0c4cf8b8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
17 deletions
+43
-17
InstrumentPanelController.java
...m/syc/slm/slmbi/controller/InstrumentPanelController.java
+5
-4
InstrumentPanelConfigDTO.java
.../java/com/syc/slm/slmbi/dto/InstrumentPanelConfigDTO.java
+3
-0
QueryInstrumentPanelDTO.java
...n/java/com/syc/slm/slmbi/dto/QueryInstrumentPanelDTO.java
+8
-6
QueryPageDTO.java
src/main/java/com/syc/slm/slmbi/dto/QueryPageDTO.java
+20
-0
InstrumentPanelService.java
...ava/com/syc/slm/slmbi/service/InstrumentPanelService.java
+2
-2
InstrumentPanelServiceImpl.java
...yc/slm/slmbi/service/impl/InstrumentPanelServiceImpl.java
+2
-2
application.yml
src/main/resources/application.yml
+3
-3
No files found.
src/main/java/com/syc/slm/slmbi/controller/InstrumentPanelController.java
View file @
adb0e9ba
...
...
@@ -3,7 +3,7 @@ package com.syc.slm.slmbi.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.syc.slm.common.core.util.R
;
import
com.syc.slm.slmbi.dto.SaveInstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.
Search
InstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.
Query
InstrumentPanelDTO
;
import
com.syc.slm.slmbi.service.InstrumentPanelService
;
import
com.syc.slm.slmbi.vo.InstrumentPanelVo
;
import
io.swagger.annotations.Api
;
...
...
@@ -23,7 +23,7 @@ import java.util.List;
**/
@RestController
@RequestMapping
(
"/panels"
)
@Api
(
value
=
"仪表板"
,
description
=
"仪表板配置接口"
)
@Api
(
value
=
"仪表板
配置接口
"
,
description
=
"仪表板配置接口"
)
public
class
InstrumentPanelController
{
@Autowired
...
...
@@ -37,7 +37,7 @@ public class InstrumentPanelController {
*/
@GetMapping
@ApiOperation
(
"仪表板列表"
)
public
R
<
IPage
<
InstrumentPanelVo
>>
selectInstrumentPanelList
(
@RequestBody
Search
InstrumentPanelDTO
where
)
{
public
R
<
IPage
<
InstrumentPanelVo
>>
selectInstrumentPanelList
(
@RequestBody
Query
InstrumentPanelDTO
where
)
{
return
R
.
ok
(
instrumentPanelService
.
selectInstrumentPanelList
(
where
));
}
...
...
@@ -47,7 +47,7 @@ public class InstrumentPanelController {
return
R
.
ok
(
instrumentPanelService
.
savePanel
(
panel
));
}
@PutMapping
(
"/
batch-
publish"
)
@PutMapping
(
"/publish"
)
@ApiOperation
(
"批量发布"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"仪表板id集合"
,
required
=
true
)
public
R
<
Boolean
>
batchPublish
(
@RequestBody
List
<
String
>
ids
)
{
...
...
@@ -71,6 +71,7 @@ public class InstrumentPanelController {
@PostMapping
(
"/save-as"
)
@ApiOperation
(
"另存为"
)
public
R
<
String
>
saveAs
(
@RequestBody
SaveInstrumentPanelDTO
panelDTO
)
{
// FIXME 另存为需要保存配置、权限信息吗?
return
R
.
ok
(
instrumentPanelService
.
saveAsPanel
(
panelDTO
));
}
...
...
src/main/java/com/syc/slm/slmbi/dto/InstrumentPanelConfigDTO.java
View file @
adb0e9ba
...
...
@@ -22,6 +22,9 @@ public class InstrumentPanelConfigDTO {
@ApiModelProperty
(
value
=
"仪表板名称"
,
required
=
true
)
private
String
panelName
;
@ApiModelProperty
(
value
=
"仪表板分组id"
,
required
=
true
)
private
String
groupId
;
@ApiModelProperty
(
value
=
"仪表板配置详情,包含了样式,数据配置"
,
required
=
true
)
private
String
configDetails
;
...
...
src/main/java/com/syc/slm/slmbi/dto/
Search
InstrumentPanelDTO.java
→
src/main/java/com/syc/slm/slmbi/dto/
Query
InstrumentPanelDTO.java
View file @
adb0e9ba
...
...
@@ -16,8 +16,8 @@ import java.util.Date;
**/
@ApiModel
(
value
=
"查询仪表板列表DTO"
)
@Data
@EqualsAndHashCode
(
callSuper
=
fals
e
)
public
class
SearchInstrumentPanel
DTO
{
@EqualsAndHashCode
(
callSuper
=
tru
e
)
public
class
QueryInstrumentPanelDTO
extends
QueryPage
DTO
{
@ApiModelProperty
(
value
=
"仪表板名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"仪表板归属分组"
)
...
...
@@ -26,8 +26,10 @@ public class SearchInstrumentPanelDTO {
private
String
creatorName
;
@ApiModelProperty
(
value
=
"修改人名称"
)
private
String
updaterName
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"状态"
)
private
Integer
recordStatus
;
@ApiModelProperty
(
value
=
"修改时间开始"
)
private
Date
updateTimeBegin
;
@ApiModelProperty
(
value
=
"修改时间结束"
)
private
Date
updateTimeEnd
;
@ApiModelProperty
(
value
=
"发布状态"
)
private
Boolean
published
;
}
src/main/java/com/syc/slm/slmbi/dto/QueryPageDTO.java
0 → 100644
View file @
adb0e9ba
package
com
.
syc
.
slm
.
slmbi
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author liangbin
* @date 2021/3/31
*/
@ApiModel
(
"分布查询参数"
)
@Data
public
class
QueryPageDTO
{
@ApiModelProperty
(
"页码"
)
private
Integer
pageNum
=
1
;
@ApiModelProperty
(
"每页大小"
)
private
Integer
pageSize
=
10
;
}
src/main/java/com/syc/slm/slmbi/service/InstrumentPanelService.java
View file @
adb0e9ba
...
...
@@ -3,7 +3,7 @@ package com.syc.slm.slmbi.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.syc.slm.slmbi.dto.SaveInstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.
Search
InstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.
Query
InstrumentPanelDTO
;
import
com.syc.slm.slmbi.entity.InstrumentPanel
;
import
com.syc.slm.slmbi.vo.InstrumentPanelVo
;
...
...
@@ -23,7 +23,7 @@ public interface InstrumentPanelService extends IService<InstrumentPanel> {
* @param where
* @return
*/
IPage
<
InstrumentPanelVo
>
selectInstrumentPanelList
(
Search
InstrumentPanelDTO
where
);
IPage
<
InstrumentPanelVo
>
selectInstrumentPanelList
(
Query
InstrumentPanelDTO
where
);
/**
* 保存仪表板
...
...
src/main/java/com/syc/slm/slmbi/service/impl/InstrumentPanelServiceImpl.java
View file @
adb0e9ba
...
...
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.syc.slm.slmbi.dao.InstrumentPanelMapper
;
import
com.syc.slm.slmbi.dto.SaveInstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.
Search
InstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.
Query
InstrumentPanelDTO
;
import
com.syc.slm.slmbi.entity.InstrumentPanel
;
import
com.syc.slm.slmbi.service.InstrumentPanelService
;
import
com.syc.slm.slmbi.vo.InstrumentPanelVo
;
...
...
@@ -23,7 +23,7 @@ import java.util.List;
public
class
InstrumentPanelServiceImpl
extends
ServiceImpl
<
InstrumentPanelMapper
,
InstrumentPanel
>
implements
InstrumentPanelService
{
@Override
public
IPage
<
InstrumentPanelVo
>
selectInstrumentPanelList
(
Search
InstrumentPanelDTO
where
)
{
public
IPage
<
InstrumentPanelVo
>
selectInstrumentPanelList
(
Query
InstrumentPanelDTO
where
)
{
return
null
;
}
...
...
src/main/resources/application.yml
View file @
adb0e9ba
...
...
@@ -27,9 +27,9 @@ spring:
pool-name
:
HikariCP
max-lifetime
:
1800000
connection-timeout
:
30000
username
:
root
password
:
root
url
:
jdbc:mysql://${MYSQL_HOST:
slm-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:slmx
}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
username
:
syc_dev
password
:
Test123!
url
:
jdbc:mysql://${MYSQL_HOST:
dev.sycdev.com}:${MYSQL_PORT:3306}/${MYSQL_DB:sycloud_mall
}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
messages
:
basename
:
i18n/messages,i18n/sys
...
...
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