Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
c59d8d13
提交
c59d8d13
authored
3月 26, 2020
作者:
马晨俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mcj:修改page类名
上级
d2433b88
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
20 行增加
和
26 行删除
+20
-26
RuleController.java
...main/java/com/zjty/inspect/controller/RuleController.java
+1
-1
CustomPage.java
src/main/java/com/zjty/inspect/entity/CustomPage.java
+1
-1
Inspector.java
src/main/java/com/zjty/inspect/inspect/Inspector.java
+1
-0
ReportService.java
src/main/java/com/zjty/inspect/service/ReportService.java
+2
-2
RuleService.java
src/main/java/com/zjty/inspect/service/RuleService.java
+2
-2
ReportServiceImpl.java
...java/com/zjty/inspect/service/impl/ReportServiceImpl.java
+6
-6
RuleServiceImpl.java
...n/java/com/zjty/inspect/service/impl/RuleServiceImpl.java
+7
-14
没有找到文件。
src/main/java/com/zjty/inspect/controller/RuleController.java
浏览文件 @
c59d8d13
...
@@ -90,7 +90,7 @@ public class RuleController {
...
@@ -90,7 +90,7 @@ public class RuleController {
})
})
@RequestMapping
(
value
=
"/search/{page}/{size}"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/search/{page}/{size}"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
findSearch
(
@RequestBody
Map
searchMap
,
@PathVariable
int
page
,
@PathVariable
int
size
){
public
ResponseEntity
findSearch
(
@RequestBody
Map
searchMap
,
@PathVariable
int
page
,
@PathVariable
int
size
){
Page
<
RuleCollection
>
search
=
ruleService
.
findSearch
(
searchMap
,
page
,
size
);
Custom
Page
<
RuleCollection
>
search
=
ruleService
.
findSearch
(
searchMap
,
page
,
size
);
return
ResponseEntity
.
ok
(
search
);
return
ResponseEntity
.
ok
(
search
);
}
}
}
}
src/main/java/com/zjty/inspect/entity/Page.java
→
src/main/java/com/zjty/inspect/entity/
Custom
Page.java
浏览文件 @
c59d8d13
...
@@ -8,7 +8,7 @@ import java.util.List;
...
@@ -8,7 +8,7 @@ import java.util.List;
* @date 2020-03-05 19:24
* @date 2020-03-05 19:24
*/
*/
public
class
Page
<
T
>
{
public
class
Custom
Page
<
T
>
{
private
int
totalPage
;
private
int
totalPage
;
private
int
totalElement
;
private
int
totalElement
;
...
...
src/main/java/com/zjty/inspect/inspect/Inspector.java
浏览文件 @
c59d8d13
...
@@ -146,6 +146,7 @@ public class Inspector {
...
@@ -146,6 +146,7 @@ public class Inspector {
initData
();
initData
();
//扫描文件
//扫描文件
scanFiles
();
scanFiles
();
//配置
inspectParameter
.
setCodeSize
((
int
)
codeSize
);
inspectParameter
.
setCodeSize
((
int
)
codeSize
);
report
.
setFileNum
(
fileNum
);
report
.
setFileNum
(
fileNum
);
report
.
setFileLine
(
fileLine
);
report
.
setFileLine
(
fileLine
);
...
...
src/main/java/com/zjty/inspect/service/ReportService.java
浏览文件 @
c59d8d13
package
com
.
zjty
.
inspect
.
service
;
package
com
.
zjty
.
inspect
.
service
;
import
com.zjty.inspect.entity.Page
;
import
com.zjty.inspect.entity.
Custom
Page
;
import
com.zjty.inspect.entity.Report
;
import
com.zjty.inspect.entity.Report
;
import
com.zjty.inspect.entity.ReportManage
;
import
com.zjty.inspect.entity.ReportManage
;
public
interface
ReportService
{
public
interface
ReportService
{
public
Page
findReportByPage
(
int
page
);
public
Custom
Page
findReportByPage
(
int
page
);
public
ReportManage
findReportById
(
String
id
);
public
ReportManage
findReportById
(
String
id
);
...
...
src/main/java/com/zjty/inspect/service/RuleService.java
浏览文件 @
c59d8d13
package
com
.
zjty
.
inspect
.
service
;
package
com
.
zjty
.
inspect
.
service
;
import
com.zjty.inspect.entity.Page
;
import
com.zjty.inspect.entity.
Custom
Page
;
import
com.zjty.inspect.entity.Rule
;
import
com.zjty.inspect.entity.Rule
;
import
com.zjty.inspect.entity.RuleCollection
;
import
com.zjty.inspect.entity.RuleCollection
;
import
com.zjty.inspect.entity.RuleQo
;
import
com.zjty.inspect.entity.RuleQo
;
...
@@ -46,7 +46,7 @@ public interface RuleService {
...
@@ -46,7 +46,7 @@ public interface RuleService {
List
<
RuleCollection
>
findByName
(
String
name
);
List
<
RuleCollection
>
findByName
(
String
name
);
Page
<
RuleCollection
>
findSearch
(
Map
searchMap
,
int
page
,
int
size
);
Custom
Page
<
RuleCollection
>
findSearch
(
Map
searchMap
,
int
page
,
int
size
);
List
<
Rule
>
findAllByTechnologyIdIn
(
List
<
String
>
technologyIds
);
List
<
Rule
>
findAllByTechnologyIdIn
(
List
<
String
>
technologyIds
);
}
}
src/main/java/com/zjty/inspect/service/impl/ReportServiceImpl.java
浏览文件 @
c59d8d13
...
@@ -58,14 +58,14 @@ public class ReportServiceImpl implements ReportService {
...
@@ -58,14 +58,14 @@ public class ReportServiceImpl implements ReportService {
@Override
@Override
public
Page
findReportByPage
(
int
page
)
{
public
Custom
Page
findReportByPage
(
int
page
)
{
PageRequest
of
=
PageRequest
.
of
(
page
-
1
,
10
);
PageRequest
of
=
PageRequest
.
of
(
page
-
1
,
10
);
org
.
springframework
.
data
.
domain
.
Page
<
Report
>
all
=
reportDao
.
findAll
(
of
);
org
.
springframework
.
data
.
domain
.
Page
<
Report
>
all
=
reportDao
.
findAll
(
of
);
Page
<
Report
>
reportPage
=
new
Page
<>();
CustomPage
<
Report
>
reportCustomPage
=
new
Custom
Page
<>();
reportPage
.
setTotalElement
((
int
)
all
.
getTotalElements
());
report
Custom
Page
.
setTotalElement
((
int
)
all
.
getTotalElements
());
reportPage
.
setTotalPage
(
all
.
getTotalPages
());
report
Custom
Page
.
setTotalPage
(
all
.
getTotalPages
());
reportPage
.
addAll
(
all
.
getContent
());
report
Custom
Page
.
addAll
(
all
.
getContent
());
return
reportPage
;
return
report
Custom
Page
;
}
}
@Override
@Override
...
...
src/main/java/com/zjty/inspect/service/impl/RuleServiceImpl.java
浏览文件 @
c59d8d13
...
@@ -2,12 +2,8 @@ package com.zjty.inspect.service.impl;
...
@@ -2,12 +2,8 @@ package com.zjty.inspect.service.impl;
import
com.zjty.inspect.dao.RuleCollectionDao
;
import
com.zjty.inspect.dao.RuleCollectionDao
;
import
com.zjty.inspect.dao.RuleDao
;
import
com.zjty.inspect.dao.RuleDao
;
import
com.zjty.inspect.entity.ExcelDataVo
;
import
com.zjty.inspect.entity.*
;
import
com.zjty.inspect.entity.Rule
;
import
com.zjty.inspect.entity.RuleCollection
;
import
com.zjty.inspect.entity.RuleQo
;
import
com.zjty.inspect.service.RuleService
;
import
com.zjty.inspect.service.RuleService
;
import
com.zjty.inspect.service.TechnologyService
;
import
com.zjty.inspect.utils.UUIDUtil
;
import
com.zjty.inspect.utils.UUIDUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
...
@@ -18,10 +14,7 @@ import org.springframework.data.jpa.repository.Modifying;
...
@@ -18,10 +14,7 @@ import org.springframework.data.jpa.repository.Modifying;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -86,17 +79,17 @@ public class RuleServiceImpl implements RuleService {
...
@@ -86,17 +79,17 @@ public class RuleServiceImpl implements RuleService {
* @return
* @return
*/
*/
@Override
@Override
public
com
.
zjty
.
inspect
.
entity
.
Page
<
RuleCollection
>
findSearch
(
Map
whereMap
,
int
page
,
int
size
)
{
public
Custom
Page
<
RuleCollection
>
findSearch
(
Map
whereMap
,
int
page
,
int
size
)
{
Specification
<
RuleCollection
>
specification
=
createSpecification
(
whereMap
);
Specification
<
RuleCollection
>
specification
=
createSpecification
(
whereMap
);
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"updateDate"
);
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"updateDate"
);
PageRequest
pageRequest
=
PageRequest
.
of
(
page
-
1
,
size
,
sort
);
PageRequest
pageRequest
=
PageRequest
.
of
(
page
-
1
,
size
,
sort
);
Page
<
RuleCollection
>
ruleCollections
=
ruleCollectionDao
.
findAll
(
specification
,
pageRequest
);
Page
<
RuleCollection
>
ruleCollections
=
ruleCollectionDao
.
findAll
(
specification
,
pageRequest
);
com
.
zjty
.
inspect
.
entity
.
Page
<
RuleCollection
>
myPage
=
new
com
.
zjty
.
inspect
.
entity
.
Page
<>();
CustomPage
<
RuleCollection
>
myCustomPage
=
new
Custom
Page
<>();
myPage
.
setTotalPage
(
ruleCollections
.
getTotalPages
());
my
Custom
Page
.
setTotalPage
(
ruleCollections
.
getTotalPages
());
myPage
.
setTotalElement
((
int
)
ruleCollections
.
getTotalElements
());
my
Custom
Page
.
setTotalElement
((
int
)
ruleCollections
.
getTotalElements
());
myPage
.
setObjects
(
ruleCollections
.
getContent
());
my
Custom
Page
.
setObjects
(
ruleCollections
.
getContent
());
return
myPage
;
return
my
Custom
Page
;
}
}
@Override
@Override
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论