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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡慧
cash-loan-flow-boss
Commits
15901576
Commit
15901576
authored
Sep 16, 2019
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Application.isDebug()
parent
7c08e63c
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
42 deletions
+31
-42
Principal.java
...uantgroup/cashloanflowboss/api/login/model/Principal.java
+0
-4
LogService.java
...tgroup/cashloanflowboss/api/login/service/LogService.java
+0
-4
OrderController.java
...ashloanflowboss/api/order/controller/OrderController.java
+7
-8
OrderService.java
...roup/cashloanflowboss/api/order/service/OrderService.java
+1
-5
Application.java
...java/cn/quantgroup/cashloanflowboss/core/Application.java
+9
-0
ClothoCenterService.java
...hloanflowboss/spi/clotho/service/ClothoCenterService.java
+4
-8
JolyneCenter.java
.../quantgroup/cashloanflowboss/spi/jolyne/JolyneCenter.java
+8
-8
JolyneUtil.java
...cn/quantgroup/cashloanflowboss/spi/jolyne/JolyneUtil.java
+0
-1
XYQBCenterService.java
.../cashloanflowboss/spi/xyqb/service/XYQBCenterService.java
+2
-4
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/login/model/Principal.java
View file @
15901576
...
@@ -33,10 +33,6 @@ public class Principal {
...
@@ -33,10 +33,6 @@ public class Principal {
*/
*/
private
Set
<
Role
>
roles
;
private
Set
<
Role
>
roles
;
/**
* 是否测试模式 true 是;false 不是测试(生产环境)
*/
private
Boolean
debugModel
;
/**
/**
* 是否是超级管理员
* 是否是超级管理员
*
*
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/login/service/LogService.java
View file @
15901576
...
@@ -30,9 +30,6 @@ public class LogService {
...
@@ -30,9 +30,6 @@ public class LogService {
@Autowired
@Autowired
private
HttpServletRequest
request
;
private
HttpServletRequest
request
;
@Value
(
"${debug.model}"
)
private
Boolean
debugModel
;
/**
/**
* 登入
* 登入
*
*
...
@@ -62,7 +59,6 @@ public class LogService {
...
@@ -62,7 +59,6 @@ public class LogService {
principal
.
setChannelId
(
user
.
getChannelId
());
principal
.
setChannelId
(
user
.
getChannelId
());
principal
.
setRank
(
user
.
getRank
());
principal
.
setRank
(
user
.
getRank
());
principal
.
setRoles
(
user
.
getRoles
());
principal
.
setRoles
(
user
.
getRoles
());
principal
.
setDebugModel
(
debugModel
);
session
.
setAttribute
(
ApplicationDictionary
.
PRINCIPAL
,
JSONTools
.
serialize
(
principal
));
session
.
setAttribute
(
ApplicationDictionary
.
PRINCIPAL
,
JSONTools
.
serialize
(
principal
));
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/order/controller/OrderController.java
View file @
15901576
...
@@ -3,6 +3,7 @@ import cn.quantgroup.cashloanflowboss.api.order.model.ApproveVo;
...
@@ -3,6 +3,7 @@ import cn.quantgroup.cashloanflowboss.api.order.model.ApproveVo;
import
cn.quantgroup.cashloanflowboss.api.order.model.LendingFormModel
;
import
cn.quantgroup.cashloanflowboss.api.order.model.LendingFormModel
;
import
cn.quantgroup.cashloanflowboss.api.order.service.OrderService
;
import
cn.quantgroup.cashloanflowboss.api.order.service.OrderService
;
import
cn.quantgroup.cashloanflowboss.component.security.annotiation.Security
;
import
cn.quantgroup.cashloanflowboss.component.security.annotiation.Security
;
import
cn.quantgroup.cashloanflowboss.core.Application
;
import
cn.quantgroup.cashloanflowboss.core.annotation.ChannelIdInit
;
import
cn.quantgroup.cashloanflowboss.core.annotation.ChannelIdInit
;
import
cn.quantgroup.cashloanflowboss.core.annotation.CheckChannelRole
;
import
cn.quantgroup.cashloanflowboss.core.annotation.CheckChannelRole
;
import
cn.quantgroup.cashloanflowboss.core.annotation.CheckChannelRoleByChannelOrderNumber
;
import
cn.quantgroup.cashloanflowboss.core.annotation.CheckChannelRoleByChannelOrderNumber
;
...
@@ -30,9 +31,6 @@ public class OrderController {
...
@@ -30,9 +31,6 @@ public class OrderController {
private
OrderService
orderService
;
private
OrderService
orderService
;
@Value
(
"${debug.model}"
)
private
Boolean
debugModel
;
/**
/**
* 订单查询列表接口
* 订单查询列表接口
*
*
...
@@ -64,7 +62,8 @@ public class OrderController {
...
@@ -64,7 +62,8 @@ public class OrderController {
@ChannelIdInit
@ChannelIdInit
@PostMapping
(
"/approve"
)
@PostMapping
(
"/approve"
)
public
Result
approveOpt
(
@RequestBody
@Valid
ApproveVo
approveVo
)
{
public
Result
approveOpt
(
@RequestBody
@Valid
ApproveVo
approveVo
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
())
{
Tuple
<
Boolean
,
Boolean
>
approveOptBooleanAndFundSettingBooleanTuple
=
orderService
.
approveOpt
(
approveVo
);
Tuple
<
Boolean
,
Boolean
>
approveOptBooleanAndFundSettingBooleanTuple
=
orderService
.
approveOpt
(
approveVo
);
Boolean
approveResult
=
approveOptBooleanAndFundSettingBooleanTuple
.
getKey
();
Boolean
approveResult
=
approveOptBooleanAndFundSettingBooleanTuple
.
getKey
();
if
(
approveResult
)
{
if
(
approveResult
)
{
...
@@ -85,7 +84,7 @@ public class OrderController {
...
@@ -85,7 +84,7 @@ public class OrderController {
@Security
(
authorityId
=
"Order.lending"
)
@Security
(
authorityId
=
"Order.lending"
)
@PostMapping
(
"/lending"
)
@PostMapping
(
"/lending"
)
public
Result
<
Boolean
>
lending
(
@RequestBody
@Valid
LendingFormModel
lendingFormModel
)
{
public
Result
<
Boolean
>
lending
(
@RequestBody
@Valid
LendingFormModel
lendingFormModel
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
boolean
lendingResult
=
this
.
orderService
.
lending
(
lendingFormModel
);
boolean
lendingResult
=
this
.
orderService
.
lending
(
lendingFormModel
);
return
Result
.
buildSuccess
(
lendingResult
,
lendingResult
?
"放款操作成功"
:
"放款操作失败"
);
return
Result
.
buildSuccess
(
lendingResult
,
lendingResult
?
"放款操作成功"
:
"放款操作失败"
);
}
else
{
}
else
{
...
@@ -101,7 +100,7 @@ public class OrderController {
...
@@ -101,7 +100,7 @@ public class OrderController {
@Security
(
authorityId
=
"Order.secondAudit"
)
@Security
(
authorityId
=
"Order.secondAudit"
)
@GetMapping
(
"/secondAudit"
)
@GetMapping
(
"/secondAudit"
)
public
Result
<
Boolean
>
secondAudit
(
String
channelOrderNumber
)
{
public
Result
<
Boolean
>
secondAudit
(
String
channelOrderNumber
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
boolean
secondAudit
=
this
.
orderService
.
secondAudit
(
channelOrderNumber
);
boolean
secondAudit
=
this
.
orderService
.
secondAudit
(
channelOrderNumber
);
return
Result
.
buildSuccess
(
secondAudit
,
secondAudit
?
"操作成功"
:
"操作失败"
);
return
Result
.
buildSuccess
(
secondAudit
,
secondAudit
?
"操作成功"
:
"操作失败"
);
}
else
{
}
else
{
...
@@ -117,7 +116,7 @@ public class OrderController {
...
@@ -117,7 +116,7 @@ public class OrderController {
@Security
(
authorityId
=
"Order.cancelPreLoan"
)
@Security
(
authorityId
=
"Order.cancelPreLoan"
)
@PostMapping
(
"/cancel/loan"
)
@PostMapping
(
"/cancel/loan"
)
public
Result
<
Boolean
>
cancelPreLoan
(
@RequestBody
@Valid
String
channelOrderNumber
)
{
public
Result
<
Boolean
>
cancelPreLoan
(
@RequestBody
@Valid
String
channelOrderNumber
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
return
Result
.
buildSuccess
(
this
.
orderService
.
cancelPreLoan
(
channelOrderNumber
));
return
Result
.
buildSuccess
(
this
.
orderService
.
cancelPreLoan
(
channelOrderNumber
));
}
else
{
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
...
@@ -132,7 +131,7 @@ public class OrderController {
...
@@ -132,7 +131,7 @@ public class OrderController {
@Security
(
authorityId
=
"Order.cancelAfterLoan"
)
@Security
(
authorityId
=
"Order.cancelAfterLoan"
)
@PostMapping
(
"/cancel/after/loan"
)
@PostMapping
(
"/cancel/after/loan"
)
public
Result
<
Boolean
>
cancelAfterLoan
(
@RequestParam
@Valid
String
channelOrderNumber
)
{
public
Result
<
Boolean
>
cancelAfterLoan
(
@RequestParam
@Valid
String
channelOrderNumber
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
return
Result
.
buildSuccess
(
this
.
orderService
.
cancelAfterLoan
(
channelOrderNumber
));
return
Result
.
buildSuccess
(
this
.
orderService
.
cancelAfterLoan
(
channelOrderNumber
));
}
else
{
}
else
{
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
return
Result
.
buildSuccess
(
false
,
"无此操作"
);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/order/service/OrderService.java
View file @
15901576
...
@@ -96,10 +96,6 @@ public class OrderService {
...
@@ -96,10 +96,6 @@ public class OrderService {
private
ClfOrderMappingRepository
clfOrderMappingRepository
;
private
ClfOrderMappingRepository
clfOrderMappingRepository
;
@Value
(
"${debug.model}"
)
private
Boolean
debugModel
;
public
Page
<
OrderVo
>
orderList
(
Long
channelId
,
String
channelOrderNo
,
String
applyNo
,
Long
loanId
,
Integer
pageNumber
,
Integer
pageSize
)
{
public
Page
<
OrderVo
>
orderList
(
Long
channelId
,
String
channelOrderNo
,
String
applyNo
,
Long
loanId
,
Integer
pageNumber
,
Integer
pageSize
)
{
...
@@ -151,7 +147,7 @@ public class OrderService {
...
@@ -151,7 +147,7 @@ public class OrderService {
Tuple
<
String
,
List
<
OrderVo
.
OptButton
>>
currentStatusAndButtons
=
this
.
getCurrentStatusAndButtons
(
currentStatus
,
it
);
Tuple
<
String
,
List
<
OrderVo
.
OptButton
>>
currentStatusAndButtons
=
this
.
getCurrentStatusAndButtons
(
currentStatus
,
it
);
orderVo
.
setStatus
(
currentStatusAndButtons
.
getKey
());
orderVo
.
setStatus
(
currentStatusAndButtons
.
getKey
());
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
// 只有测试环境才需要订单操作
// 只有测试环境才需要订单操作
orderVo
.
setOpt
(
currentStatusAndButtons
.
getValue
());
orderVo
.
setOpt
(
currentStatusAndButtons
.
getValue
());
}
}
...
...
src/main/java/cn/quantgroup/cashloanflowboss/core/Application.java
View file @
15901576
...
@@ -75,6 +75,15 @@ public class Application implements ApplicationContextAware, ServletContextAware
...
@@ -75,6 +75,15 @@ public class Application implements ApplicationContextAware, ServletContextAware
return
Application
.
getValue
(
"${server.port}"
);
return
Application
.
getValue
(
"${server.port}"
);
}
}
/**
* 是否是测试环境
*
* @return
*/
public
static
Boolean
isDebug
()
{
return
"true"
.
equals
(
Application
.
getValue
(
"${debug.model}"
));
}
/**
/**
* 获取配置属性值
* 获取配置属性值
*
*
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/clotho/service/ClothoCenterService.java
View file @
15901576
...
@@ -24,10 +24,6 @@ public class ClothoCenterService {
...
@@ -24,10 +24,6 @@ public class ClothoCenterService {
@Autowired
@Autowired
private
ClothoCenter
clothoCenter
;
private
ClothoCenter
clothoCenter
;
@Value
(
"${debug.model}"
)
public
Boolean
debugModel
;
public
Boolean
orderAuditNotify
(
String
uuid
,
Long
loanId
,
boolean
auditResult
,
int
bizType
)
{
public
Boolean
orderAuditNotify
(
String
uuid
,
Long
loanId
,
boolean
auditResult
,
int
bizType
)
{
Map
notify
=
new
HashMap
();
Map
notify
=
new
HashMap
();
...
@@ -58,7 +54,7 @@ public class ClothoCenterService {
...
@@ -58,7 +54,7 @@ public class ClothoCenterService {
*/
*/
public
boolean
lending
(
Integer
fundId
,
BigDecimal
amountLimit
,
Integer
pepoleLimit
)
{
public
boolean
lending
(
Integer
fundId
,
BigDecimal
amountLimit
,
Integer
pepoleLimit
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
String
data
=
this
.
clothoCenter
.
lending
(
new
HashMap
(
4
)
{{
String
data
=
this
.
clothoCenter
.
lending
(
new
HashMap
(
4
)
{{
put
(
"fundingCorpId"
,
fundId
);
put
(
"fundingCorpId"
,
fundId
);
put
(
"amountLimit"
,
amountLimit
);
put
(
"amountLimit"
,
amountLimit
);
...
@@ -79,7 +75,7 @@ public class ClothoCenterService {
...
@@ -79,7 +75,7 @@ public class ClothoCenterService {
* @return
* @return
*/
*/
public
String
approve
(
Map
<
String
,
Object
>
approveData
)
{
public
String
approve
(
Map
<
String
,
Object
>
approveData
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
return
clothoCenter
.
approve
(
approveData
);
return
clothoCenter
.
approve
(
approveData
);
}
else
{
}
else
{
return
"error"
;
return
"error"
;
...
@@ -87,7 +83,7 @@ public class ClothoCenterService {
...
@@ -87,7 +83,7 @@ public class ClothoCenterService {
}
}
public
String
cancelPreLoan
(
Map
<
Object
,
Object
>
data
)
{
public
String
cancelPreLoan
(
Map
<
Object
,
Object
>
data
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
return
clothoCenter
.
cancelPreLoan
(
data
);
return
clothoCenter
.
cancelPreLoan
(
data
);
}
else
{
}
else
{
return
"error"
;
return
"error"
;
...
@@ -95,7 +91,7 @@ public class ClothoCenterService {
...
@@ -95,7 +91,7 @@ public class ClothoCenterService {
}
}
public
String
cancelAfterLoan
(
Map
<
Object
,
Object
>
data
)
{
public
String
cancelAfterLoan
(
Map
<
Object
,
Object
>
data
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
return
clothoCenter
.
cancelAfterLoan
(
data
);
return
clothoCenter
.
cancelAfterLoan
(
data
);
}
else
{
}
else
{
return
"error"
;
return
"error"
;
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/jolyne/JolyneCenter.java
View file @
15901576
src/main/java/cn/quantgroup/cashloanflowboss/spi/jolyne/JolyneUtil.java
View file @
15901576
package
cn
.
quantgroup
.
cashloanflowboss
.
spi
.
jolyne
;
package
cn
.
quantgroup
.
cashloanflowboss
.
spi
.
jolyne
;
import
cn.quantgroup.cashloanflowboss.utils.JSONTools
;
import
cn.quantgroup.cashloanflowboss.utils.JSONTools
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/xyqb/service/XYQBCenterService.java
View file @
15901576
...
@@ -2,6 +2,7 @@ package cn.quantgroup.cashloanflowboss.spi.xyqb.service;
...
@@ -2,6 +2,7 @@ package cn.quantgroup.cashloanflowboss.spi.xyqb.service;
import
cn.quantgroup.cashloanflowboss.api.order.model.XyqbCurrentOrderStatusServiceResultModel
;
import
cn.quantgroup.cashloanflowboss.api.order.model.XyqbCurrentOrderStatusServiceResultModel
;
import
cn.quantgroup.cashloanflowboss.api.order.model.XyqbHistoryOrderStatusServiceResultModel
;
import
cn.quantgroup.cashloanflowboss.api.order.model.XyqbHistoryOrderStatusServiceResultModel
;
import
cn.quantgroup.cashloanflowboss.core.Application
;
import
cn.quantgroup.cashloanflowboss.core.base.ServiceResult
;
import
cn.quantgroup.cashloanflowboss.core.base.ServiceResult
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.client.XYQBCenter
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.client.XYQBCenter
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.entity.*
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.entity.*
;
...
@@ -40,9 +41,6 @@ public class XYQBCenterService {
...
@@ -40,9 +41,6 @@ public class XYQBCenterService {
private
LoanApplicationHistoryRepository
loanApplicationHistoryRepository
;
private
LoanApplicationHistoryRepository
loanApplicationHistoryRepository
;
@Value
(
"${debug.model}"
)
public
Boolean
debugModel
;
@Autowired
@Autowired
private
XYQBCenter
xyqbCenter
;
private
XYQBCenter
xyqbCenter
;
...
@@ -188,7 +186,7 @@ public class XYQBCenterService {
...
@@ -188,7 +186,7 @@ public class XYQBCenterService {
* @return
* @return
*/
*/
public
boolean
payResultNotify
(
Long
loanId
,
Boolean
expectPayResult
)
{
public
boolean
payResultNotify
(
Long
loanId
,
Boolean
expectPayResult
)
{
if
(
debugModel
)
{
if
(
Application
.
isDebug
()
)
{
Map
paramMap
=
Maps
.
newHashMap
();
Map
paramMap
=
Maps
.
newHashMap
();
paramMap
.
put
(
"orderNo"
,
loanId
);
paramMap
.
put
(
"orderNo"
,
loanId
);
paramMap
.
put
(
"payOrderNo"
,
loanId
);
paramMap
.
put
(
"payOrderNo"
,
loanId
);
...
...
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