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
fc0b35b4
Commit
fc0b35b4
authored
Sep 27, 2019
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
dba43571
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
46 deletions
+47
-46
OrderController.java
...ashloanflowboss/api/order/controller/OrderController.java
+21
-25
UserController.java
.../cashloanflowboss/api/user/controller/UserController.java
+26
-21
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/order/controller/OrderController.java
View file @
fc0b35b4
package
cn
.
quantgroup
.
cashloanflowboss
.
api
.
order
.
controller
;
import
cn.quantgroup.cashloanflowboss.api.order.model.ApproveVo
;
import
cn.quantgroup.cashloanflowboss.api.order.model.LendingFormModel
;
import
cn.quantgroup.cashloanflowboss.api.order.service.OrderService
;
...
...
@@ -30,10 +31,10 @@ public class OrderController {
/**
*
* 订单查询列表接口
*
*
<p>
* 渠道用户只能查自己渠道订单 如果是别的渠道订单 不能查询(如果channelId 赋值 channelOrderNumber 是别的渠道订单 应该查询不到数据,所以不需要CheckChannelRole)
*
* @param channelId
* @param channelOrderNumber
* @param pageNumber
...
...
@@ -53,8 +54,9 @@ public class OrderController {
/**
* 审批接口
*
*
<p>
* 渠道只能审批自己渠道的订单
*
* @param approveVo
* @return
*/
...
...
@@ -62,13 +64,11 @@ public class OrderController {
@CheckChannelRole
(
channelOrderNumberSPEL
=
"#this[0].channelOrderNumber"
)
@PostMapping
(
"/approve"
)
public
Result
approveOpt
(
@RequestBody
@Valid
ApproveVo
approveVo
)
{
if
(
Application
.
isDebug
())
{
Tuple
<
Boolean
,
String
>
approveOptBooleanAndFundSettingBooleanTuple
=
orderService
.
approveOpt
(
approveVo
);
Boolean
approveResult
=
approveOptBooleanAndFundSettingBooleanTuple
.
getKey
();
return
Result
.
buildSuccess
(
approveResult
,
approveOptBooleanAndFundSettingBooleanTuple
.
getValue
());
final
Tuple
<
Boolean
,
String
>
approveOptTuple
=
orderService
.
approveOpt
(
approveVo
);
return
Result
.
buildSuccess
(
approveOptTuple
.
getKey
(),
approveOptTuple
.
getValue
());
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
}
}
...
...
@@ -82,10 +82,10 @@ public class OrderController {
@PostMapping
(
"/lending"
)
public
Result
<
Boolean
>
lending
(
@RequestBody
@Valid
LendingFormModel
lendingFormModel
)
{
if
(
Application
.
isDebug
())
{
Tuple
<
Boolean
,
String
>
lending
=
this
.
orderService
.
lending
(
lendingFormModel
);
final
Tuple
<
Boolean
,
String
>
lending
=
this
.
orderService
.
lending
(
lendingFormModel
);
return
Result
.
buildSuccess
(
lending
.
getKey
(),
lending
.
getValue
());
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
}
}
...
...
@@ -99,10 +99,10 @@ public class OrderController {
@GetMapping
(
"/secondAudit"
)
public
Result
<
Boolean
>
secondAudit
(
String
channelOrderNumber
)
{
if
(
Application
.
isDebug
())
{
Tuple
<
Boolean
,
String
>
booleanStringTuple
=
this
.
orderService
.
secondAudit
(
channelOrderNumber
);
final
Tuple
<
Boolean
,
String
>
booleanStringTuple
=
this
.
orderService
.
secondAudit
(
channelOrderNumber
);
return
Result
.
buildSuccess
(
booleanStringTuple
.
getKey
(),
booleanStringTuple
.
getValue
());
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
}
}
...
...
@@ -119,13 +119,11 @@ public class OrderController {
this
.
orderService
.
loadSecondAuditJob
();
return
Result
.
buildSuccess
(
true
,
"success"
);
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
}
}
/**
* 贷前关单
*
...
...
@@ -136,10 +134,10 @@ public class OrderController {
@PostMapping
(
"/cancel/loan"
)
public
Result
<
Boolean
>
cancelPreLoan
(
@RequestParam
@Valid
String
channelOrderNumber
)
{
if
(
Application
.
isDebug
())
{
Tuple
<
Boolean
,
String
>
preLoan
=
this
.
orderService
.
cancelPreLoan
(
channelOrderNumber
);
return
Result
.
buildSuccess
(
preLoan
.
getKey
(),
preLoan
.
getValue
());
final
Tuple
<
Boolean
,
String
>
preLoan
=
this
.
orderService
.
cancelPreLoan
(
channelOrderNumber
);
return
Result
.
buildSuccess
(
preLoan
.
getKey
(),
preLoan
.
getValue
());
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
}
}
...
...
@@ -153,10 +151,10 @@ public class OrderController {
@PostMapping
(
"/cancel/after/loan"
)
public
Result
<
Boolean
>
cancelAfterLoan
(
@RequestParam
@Valid
String
channelOrderNumber
)
{
if
(
Application
.
isDebug
())
{
Tuple
<
Boolean
,
String
>
afterLoan
=
this
.
orderService
.
cancelAfterLoan
(
channelOrderNumber
);
return
Result
.
buildSuccess
(
afterLoan
.
getKey
(),
afterLoan
.
getValue
());
final
Tuple
<
Boolean
,
String
>
afterLoan
=
this
.
orderService
.
cancelAfterLoan
(
channelOrderNumber
);
return
Result
.
buildSuccess
(
afterLoan
.
getKey
(),
afterLoan
.
getValue
());
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
}
}
...
...
@@ -211,11 +209,9 @@ public class OrderController {
@CheckChannelRole
(
channelOrderNumberSPEL
=
"#this[0]"
)
@GetMapping
(
"/settle"
)
public
Result
settle
(
String
channelOrderNumber
)
{
return
Result
.
buildSuccess
(
orderService
.
settle
(
channelOrderNumber
));
final
Tuple
<
Boolean
,
String
>
settle
=
orderService
.
settle
(
channelOrderNumber
);
return
Result
.
buildSuccess
(
settle
.
getKey
(),
settle
.
getValue
());
}
}
src/main/java/cn/quantgroup/cashloanflowboss/api/user/controller/UserController.java
View file @
fc0b35b4
...
...
@@ -12,6 +12,7 @@ import cn.quantgroup.cashloanflowboss.component.validator.constraints.NotEmpty;
import
cn.quantgroup.cashloanflowboss.core.base.Result
;
import
cn.quantgroup.cashloanflowboss.core.base.Tuple
;
import
cn.quantgroup.cashloanflowboss.spi.user.service.XyqbUserService
;
import
javax.validation.Valid
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.service.XYQBCenterService
;
...
...
@@ -81,6 +82,7 @@ public class UserController {
* @return
*/
@PutMapping
(
"/enable"
)
@Security
(
authorityId
=
"User.enable"
)
public
Boolean
enableUser
(
@RequestParam
@Valid
@NotEmpty
(
message
=
"无效的用户ID"
)
String
id
)
{
return
this
.
userService
.
enableUser
(
id
);
}
...
...
@@ -92,6 +94,7 @@ public class UserController {
* @return
*/
@PutMapping
(
"/disable"
)
@Security
(
authorityId
=
"User.disable"
)
public
Boolean
disableUser
(
@RequestParam
@Valid
@NotEmpty
(
message
=
"无效的用户ID"
)
String
id
)
{
return
this
.
userService
.
disableUser
(
id
);
}
...
...
@@ -103,18 +106,20 @@ public class UserController {
* @return
*/
@DeleteMapping
()
@Security
(
authorityId
=
"User.delete"
)
public
Boolean
removeUser
(
@RequestParam
@Valid
@NotEmpty
(
message
=
"无效的用户ID"
)
String
id
)
{
return
this
.
userService
.
removeUser
(
id
);
}
/**
* 获取用户详情
* @return
*/
@GetMapping
(
"/detail/info"
)
public
Result
<
UserDetailInfo
>
userDetailInfo
()
{
return
Result
.
buildSuccess
(
userService
.
getUserDetailInfo
());
}
/**
* 获取用户详情
*
* @return
*/
@GetMapping
(
"/detail/info"
)
public
Result
<
UserDetailInfo
>
userDetailInfo
()
{
return
Result
.
buildSuccess
(
userService
.
getUserDetailInfo
());
}
/**
* 清除用户活跃订单
...
...
@@ -126,20 +131,20 @@ public class UserController {
@Security
(
authorityId
=
"User.cleanUserOrder"
)
public
Result
<
Boolean
>
cleanUserOrder
(
@RequestParam
@Valid
@NotEmpty
(
message
=
"无效的用户手机号"
)
String
mobile
)
{
Tuple
<
Boolean
,
String
>
result
=
userService
.
cleanUserActiveOrder
(
mobile
);
return
Result
.
buildSuccess
(
result
.
getKey
(),
result
.
getValue
());
return
Result
.
buildSuccess
(
result
.
getKey
(),
result
.
getValue
());
}
/**
* 清除用户信息
*
* @param mobile 用户ID
* @return
*/
@PutMapping
(
"/info/clean"
)
@Security
(
authorityId
=
"User.cleanUserInfo"
)
public
Boolean
deleteByUserId
(
@RequestParam
@Valid
@NotEmpty
(
message
=
"无效的用户手机号"
)
String
mobile
)
{
Tuple
<
Boolean
,
String
>
result
=
this
.
xyqbUserService
.
deleteByUserId
(
mobile
);
return
result
.
getKey
();
}
/**
* 清除用户信息
*
* @param mobile 用户ID
* @return
*/
@PutMapping
(
"/info/clean"
)
@Security
(
authorityId
=
"User.cleanUserInfo"
)
public
Boolean
deleteByUserId
(
@RequestParam
@Valid
@NotEmpty
(
message
=
"无效的用户手机号"
)
String
mobile
)
{
Tuple
<
Boolean
,
String
>
result
=
this
.
xyqbUserService
.
deleteByUserId
(
mobile
);
return
result
.
getKey
();
}
}
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