Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
c61b40c7
Commit
c61b40c7
authored
Aug 06, 2019
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v1' of
http://git.quantgroup.cn/QG/cash-loan-flow-boss
into v1
parents
5e0ff5ae
026aece9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
24 deletions
+32
-24
ChannelConfigurationRepository.java
...hannel/repository/clf/ChannelConfigurationRepository.java
+2
-12
ChannelConfService.java
...hloanflowboss/api/channel/service/ChannelConfService.java
+24
-7
Role.java
...uantgroup/cashloanflowboss/api/role/entity/boss/Role.java
+3
-2
ApplicationStatus.java
...p/cashloanflowboss/core/dictionary/ApplicationStatus.java
+3
-3
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/channel/repository/clf/ChannelConfigurationRepository.java
View file @
c61b40c7
...
@@ -2,21 +2,11 @@ package cn.quantgroup.cashloanflowboss.api.channel.repository.clf;
...
@@ -2,21 +2,11 @@ package cn.quantgroup.cashloanflowboss.api.channel.repository.clf;
import
cn.quantgroup.cashloanflowboss.api.channel.entity.clf.ChannelConfiguration
;
import
cn.quantgroup.cashloanflowboss.api.channel.entity.clf.ChannelConfiguration
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
@Repository
@Repository
public
interface
ChannelConfigurationRepository
extends
PagingAndSortingRepository
<
ChannelConfiguration
,
String
>
{
public
interface
ChannelConfigurationRepository
extends
PagingAndSortingRepository
<
ChannelConfiguration
,
Long
>,
JpaSpecificationExecutor
<
ChannelConfiguration
>
{
/**
* 获取用户列表(分页)
*
* @param pageable 分页
* @return
*/
Page
<
ChannelConfiguration
>
findAllBy
(
Pageable
pageable
);
ChannelConfiguration
findByRegisteredFrom
(
Integer
channelId
);
}
}
src/main/java/cn/quantgroup/cashloanflowboss/api/channel/service/ChannelConfService.java
View file @
c61b40c7
...
@@ -12,6 +12,11 @@ import org.springframework.data.domain.Page;
...
@@ -12,6 +12,11 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.persistence.criteria.Predicate
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
* function:
* function:
* date: 2019/8/2
* date: 2019/8/2
...
@@ -31,13 +36,25 @@ public class ChannelConfService {
...
@@ -31,13 +36,25 @@ public class ChannelConfService {
public
Page
<
ChannelConfiguration
>
getChannelInfo
(
Pagination
pagination
,
Integer
channelId
)
{
public
Page
<
ChannelConfiguration
>
getChannelInfo
(
Pagination
pagination
,
Integer
channelId
)
{
if
(
channelId
==
null
)
{
return
clfChannelConfigurationRepository
.
findAllBy
(
new
PageRequest
(
pagination
.
getPageNumber
(),
pagination
.
getPageSize
()));
Page
<
ChannelConfiguration
>
page
=
this
.
clfChannelConfigurationRepository
.
findAll
((
root
,
criteriaQuery
,
criteriaBuilder
)
->
{
}
else
{
ChannelConfiguration
channelConfiguration
=
clfChannelConfigurationRepository
.
findByRegisteredFrom
(
channelId
);
List
<
Predicate
>
predicates
=
new
ArrayList
<>();
Page
<
ChannelConfiguration
>
result
=
null
;
return
null
;
// 指定渠道号
if
(
Objects
.
nonNull
(
channelId
))
{
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"channelId"
),
channelId
));
}
}
// 指定排序
criteriaQuery
.
orderBy
(
criteriaBuilder
.
desc
(
root
.
get
(
"id"
)));
return
criteriaQuery
.
getRestriction
();
},
new
PageRequest
(
pagination
.
getPageNumber
(),
pagination
.
getPageSize
()));
return
page
;
}
}
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/role/entity/boss/Role.java
View file @
c61b40c7
package
cn
.
quantgroup
.
cashloanflowboss
.
api
.
role
.
entity
.
boss
;
package
cn
.
quantgroup
.
cashloanflowboss
.
api
.
role
.
entity
.
boss
;
import
cn.quantgroup.cashloanflowboss.
component.security.Authority
;
import
cn.quantgroup.cashloanflowboss.
api.role.entity.boss.Permission
;
import
cn.quantgroup.cashloanflowboss.core.persistence.Primary
;
import
cn.quantgroup.cashloanflowboss.core.persistence.Primary
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -31,6 +31,7 @@ public class Role extends Primary {
...
@@ -31,6 +31,7 @@ public class Role extends Primary {
* 授权列表
* 授权列表
*/
*/
@Transient
@Transient
private
List
<
Authority
>
authorities
;
private
List
<
Permission
>
permissions
;
}
}
src/main/java/cn/quantgroup/cashloanflowboss/core/dictionary/ApplicationStatus.java
View file @
c61b40c7
...
@@ -27,11 +27,11 @@ public enum ApplicationStatus implements Status<ApplicationStatus> {
...
@@ -27,11 +27,11 @@ public enum ApplicationStatus implements Status<ApplicationStatus> {
INVALID_AUTHORITY
(
501001
,
"无效的授权"
),
INVALID_AUTHORITY
(
501001
,
"无效的授权"
),
INVALID_USER
(
50100
1
,
"无效的用户"
),
INVALID_USER
(
50100
2
,
"无效的用户"
),
DISABLED_USER
(
50100
2
,
"用户已被禁用"
),
DISABLED_USER
(
50100
3
,
"用户已被禁用"
),
USERNAME_OR_PASSWORD_ERROR
(
50100
3
,
"用户名或密码错误"
);
USERNAME_OR_PASSWORD_ERROR
(
50100
4
,
"用户名或密码错误"
);
private
int
code
;
private
int
code
;
...
...
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