Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
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
reyun
manager
Commits
f38a5e38
Commit
f38a5e38
authored
Oct 21, 2019
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限
parent
aad91a16
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
ContractController.java
src/main/java/common/controller/ContractController.java
+1
-1
ContractService.java
src/main/java/common/service/ContractService.java
+1
-2
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+7
-1
No files found.
src/main/java/common/controller/ContractController.java
View file @
f38a5e38
...
@@ -214,7 +214,7 @@ public class ContractController {
...
@@ -214,7 +214,7 @@ public class ContractController {
platform
=
dropall
;
platform
=
dropall
;
}
}
return
ResultModel
.
OK
(
service
.
findBody
(
platform
));
return
ResultModel
.
OK
(
service
.
findBody
(
platform
,
loginAccount
));
}
}
@RequestMapping
(
value
=
"find/code"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"find/code"
,
method
=
RequestMethod
.
GET
)
...
...
src/main/java/common/service/ContractService.java
View file @
f38a5e38
package
common
.
service
;
package
common
.
service
;
import
common.model.*
;
import
common.model.*
;
import
tkio.model.PackageType
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -15,7 +14,7 @@ public interface ContractService {
...
@@ -15,7 +14,7 @@ public interface ContractService {
Boolean
checkTime
(
String
email
,
String
platfrom
,
String
type
,
String
product
);
Boolean
checkTime
(
String
email
,
String
platfrom
,
String
type
,
String
product
);
List
<
ContractBody
>
findBody
(
String
platform
);
List
<
ContractBody
>
findBody
(
String
platform
,
User
loginAccount
);
String
getContractCode
(
String
code
);
String
getContractCode
(
String
code
);
...
...
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
f38a5e38
...
@@ -194,7 +194,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -194,7 +194,7 @@ public class ContractServiceImpl implements ContractService {
}
}
@Override
@Override
public
List
<
ContractBody
>
findBody
(
String
platform
)
{
public
List
<
ContractBody
>
findBody
(
String
platform
,
User
loginAccount
)
{
if
(
"all"
.
equals
(
platform
))
{
if
(
"all"
.
equals
(
platform
))
{
List
<
ContractBody
>
all
=
contractBodyRepository
.
findAllDis
();
List
<
ContractBody
>
all
=
contractBodyRepository
.
findAllDis
();
...
@@ -203,6 +203,12 @@ public class ContractServiceImpl implements ContractService {
...
@@ -203,6 +203,12 @@ public class ContractServiceImpl implements ContractService {
List
<
ContractBody
>
common
=
contractBodyRepository
.
findByPlatform
(
"common"
);
List
<
ContractBody
>
common
=
contractBodyRepository
.
findByPlatform
(
"common"
);
List
<
ContractBody
>
byPlatform
=
contractBodyRepository
.
findByPlatform
(
platform
);
List
<
ContractBody
>
byPlatform
=
contractBodyRepository
.
findByPlatform
(
platform
);
common
.
addAll
(
byPlatform
);
common
.
addAll
(
byPlatform
);
if
(
RoleEnum
.
FINANCE
.
getKey
().
equals
(
loginAccount
.
getRole
()))
{
Map
<
String
,
Object
>
filter
=
authService
.
getAuthExtends
(
loginAccount
);
common
=
common
.
stream
().
filter
(
t
->
filter
.
get
(
t
.
getCode
())
!=
null
).
collect
(
Collectors
.
toList
());
}
return
common
;
return
common
;
}
}
...
...
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