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
22b767cf
Commit
22b767cf
authored
Aug 07, 2019
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
channel List 查询
parent
6eb6b88b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
ChannelConfController.java
...lowboss/api/channel/controller/ChannelConfController.java
+11
-11
ChannelConfService.java
...hloanflowboss/api/channel/service/ChannelConfService.java
+1
-0
ChannelIdInit.java
...group/cashloanflowboss/core/annotation/ChannelIdInit.java
+1
-1
RoleDataLoadAspect.java
...roup/cashloanflowboss/core/aspect/RoleDataLoadAspect.java
+9
-10
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/channel/controller/ChannelConfController.java
View file @
22b767cf
package
cn
.
quantgroup
.
cashloanflowboss
.
api
.
channel
.
controller
;
package
cn
.
quantgroup
.
cashloanflowboss
.
api
.
channel
.
controller
;
import
cn.quantgroup.cashloanflowboss.api.channel.model.ChannelListModel
;
import
cn.quantgroup.cashloanflowboss.core.annotation.ChannelIdInit
;
import
cn.quantgroup.cashloanflowboss.api.channel.util.ChannelConfUtil
;
import
cn.quantgroup.cashloanflowboss.core.annotation.RoleDataLoad
;
import
cn.quantgroup.cashloanflowboss.spi.clf.entity.ChannelConfiguration
;
import
cn.quantgroup.cashloanflowboss.api.channel.service.ChannelConfService
;
import
cn.quantgroup.cashloanflowboss.api.channel.service.ChannelConfService
;
import
cn.quantgroup.cashloanflowboss.api.user.model.Pagination
;
import
cn.quantgroup.cashloanflowboss.core.base.Result
;
import
cn.quantgroup.cashloanflowboss.core.base.Result
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
/**
/**
* Created with suntao on 2019/8/2
* Created with suntao on 2019/8/2
* @author suntao
* @author suntao
...
@@ -26,10 +19,17 @@ public class ChannelConfController {
...
@@ -26,10 +19,17 @@ public class ChannelConfController {
private
ChannelConfService
channelConfService
;
private
ChannelConfService
channelConfService
;
@RoleDataLoad
/**
* 查询渠道列表
* @param channelId 在接受参数时,必须放到第一个参数位置
* @param pageNumber
* @param pageSize
* @return
*/
@ChannelIdInit
@PostMapping
(
"/info"
)
@PostMapping
(
"/info"
)
public
Page
<
ChannelListModel
>
channelInfo
(
Long
channelId
,
Integer
pageNumber
,
Integer
pageSize
)
{
public
Result
channelInfo
(
@RequestParam
(
name
=
"channelId"
,
required
=
false
)
Long
channelId
,
Integer
pageNumber
,
Integer
pageSize
)
{
return
channelConfService
.
getChannelInfo
(
pageNumber
,
pageSize
,
channelId
);
return
Result
.
buildSuccess
(
channelConfService
.
getChannelInfo
(
pageNumber
,
pageSize
,
channelId
)
);
}
}
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/channel/service/ChannelConfService.java
View file @
22b767cf
...
@@ -59,6 +59,7 @@ public class ChannelConfService {
...
@@ -59,6 +59,7 @@ public class ChannelConfService {
channelListModel
.
setChannelId
(
it
.
getRegisteredFrom
());
channelListModel
.
setChannelId
(
it
.
getRegisteredFrom
());
channelListModel
.
setChannelName
(
it
.
getChannelName
());
channelListModel
.
setChannelName
(
it
.
getChannelName
());
channelListModel
.
setChannelCode
(
it
.
getChannelCode
());
channelListModel
.
setChannelCode
(
it
.
getChannelCode
());
// TODO
channelListModel
.
setBizType
(
1
);
channelListModel
.
setBizType
(
1
);
channelListModel
.
setCreatedAt
(
it
.
getCreatedAt
());
channelListModel
.
setCreatedAt
(
it
.
getCreatedAt
());
return
channelListModel
;
return
channelListModel
;
...
...
src/main/java/cn/quantgroup/cashloanflowboss/core/annotation/
RoleDataLoad
.java
→
src/main/java/cn/quantgroup/cashloanflowboss/core/annotation/
ChannelIdInit
.java
View file @
22b767cf
...
@@ -14,5 +14,5 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
...
@@ -14,5 +14,5 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
*/
*/
@Target
({
METHOD
})
@Target
({
METHOD
})
@Retention
(
RUNTIME
)
@Retention
(
RUNTIME
)
public
@interface
RoleDataLoad
{
public
@interface
ChannelIdInit
{
}
}
src/main/java/cn/quantgroup/cashloanflowboss/core/aspect/RoleDataLoadAspect.java
View file @
22b767cf
package
cn
.
quantgroup
.
cashloanflowboss
.
core
.
aspect
;
package
cn
.
quantgroup
.
cashloanflowboss
.
core
.
aspect
;
import
cn.quantgroup.cashloanflowboss.api.channel.model.ChannelListModel
;
import
cn.quantgroup.cashloanflowboss.api.user.model.UserSessionInfo
;
import
cn.quantgroup.cashloanflowboss.api.user.model.UserSessionInfo
;
import
cn.quantgroup.cashloanflowboss.api.user.service.UserSessionService
;
import
cn.quantgroup.cashloanflowboss.api.user.service.UserSessionService
;
import
cn.quantgroup.cashloanflowboss.core.annotation.
RoleDataLoad
;
import
cn.quantgroup.cashloanflowboss.core.annotation.
ChannelIdInit
;
import
cn.quantgroup.cashloanflowboss.core.base.BossPageImpl
;
import
cn.quantgroup.cashloanflowboss.core.base.BossPageImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
...
@@ -11,19 +10,14 @@ import org.aspectj.lang.ProceedingJoinPoint;
...
@@ -11,19 +10,14 @@ import org.aspectj.lang.ProceedingJoinPoint;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.CodeSignature
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.convert.converter.Converter
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.util.Iterator
;
import
java.util.List
;
/**
/**
* function:
* function:
...
@@ -48,11 +42,16 @@ public class RoleDataLoadAspect {
...
@@ -48,11 +42,16 @@ public class RoleDataLoadAspect {
Object
[]
args
=
pjp
.
getArgs
();
Object
[]
args
=
pjp
.
getArgs
();
MethodSignature
methodSignature
=
(
MethodSignature
)
pjp
.
getSignature
();
MethodSignature
methodSignature
=
(
MethodSignature
)
pjp
.
getSignature
();
Method
method
=
methodSignature
.
getMethod
();
Method
method
=
methodSignature
.
getMethod
();
RoleDataLoad
annotation
=
method
.
getAnnotation
(
RoleDataLoad
.
class
);
ChannelIdInit
annotation
=
method
.
getAnnotation
(
ChannelIdInit
.
class
);
UserSessionInfo
userSessionInfo
=
userSessionService
.
findUserSessionInfo
();
UserSessionInfo
userSessionInfo
=
userSessionService
.
findUserSessionInfo
();
if
(
annotation
!=
null
&&
"channel_role"
.
equals
(
userSessionInfo
.
getRoleInfo
().
getRoleName
()))
{
if
(
annotation
!=
null
&&
"channel_role"
.
equals
(
userSessionInfo
.
getRoleInfo
().
getRoleName
()))
{
args
[
0
]
=
userSessionInfo
.
getChannelId
();
String
[]
paramNames
=
((
CodeSignature
)
pjp
.
getSignature
()).
getParameterNames
();
for
(
int
i
=
0
;
i
<
paramNames
.
length
;
i
++)
{
if
(
"channelId"
.
equals
(
paramNames
[
i
]))
{
args
[
i
]
=
userSessionInfo
.
getChannelId
();
}
}
}
}
try
{
try
{
...
...
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