Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
ka-code-generator
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
QG
ka-code-generator
Commits
abd84ff5
Commit
abd84ff5
authored
Jun 12, 2020
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v
parent
ca6c9738
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
266 additions
and
651 deletions
+266
-651
codegenerator.iml
codegenerator.iml
+0
-72
FreemarkerTool.java
...java/cn/quantgroup/codegenerator/util/FreemarkerTool.java
+6
-6
XmlParseUtil.java
...n/java/cn/quantgroup/codegenerator/util/XmlParseUtil.java
+1
-1
GenerateConf.xml
src/main/resources/GenerateConf.xml
+6
-6
SignStatusEnum.ftl
...sources/templates/code-generator/enums/SignStatusEnum.ftl
+0
-13
UserAccessResultEnum.ftl
...s/templates/code-generator/enums/UserAccessResultEnum.ftl
+0
-14
EventHandler.ftl
...es/templates/code-generator/eventhandler/EventHandler.ftl
+107
-142
ApplyLoanRequest.ftl
...urces/templates/code-generator/model/ApplyLoanRequest.ftl
+5
-0
CreditApplyRequest.ftl
...ces/templates/code-generator/model/CreditApplyRequest.ftl
+4
-4
VerifyBindSmsResult.ftl
...es/templates/code-generator/model/VerifyBindSmsResult.ftl
+0
-2
Service.ftl
...in/resources/templates/code-generator/service/Service.ftl
+12
-12
ServiceImpl.ftl
...esources/templates/code-generator/service/ServiceImpl.ftl
+118
-132
CodeEnum.ftl
...main/resources/templates/code-generator/util/CodeEnum.ftl
+7
-172
ResultUtils.ftl
...n/resources/templates/code-generator/util/ResultUtils.ftl
+0
-75
No files found.
codegenerator.iml
deleted
100644 → 0
View file @
ca6c9738
<?xml version="1.0" encoding="UTF-8"?>
<module
org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=
"true"
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"FacetManager"
>
<facet
type=
"Spring"
name=
"Spring"
>
<configuration
/>
</facet>
</component>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_8"
>
<output
url=
"file://$MODULE_DIR$/target/classes"
/>
<output-test
url=
"file://$MODULE_DIR$/target/test-classes"
/>
<content
url=
"file://$MODULE_DIR$"
>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/resources"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/target"
/>
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-context:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-aop:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-expression:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter-logging:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: ch.qos.logback:logback-classic:1.2.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: ch.qos.logback:logback-core:1.2.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.logging.log4j:log4j-api:2.13.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.slf4j:jul-to-slf4j:1.7.30"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: jakarta.annotation:jakarta.annotation-api:1.3.5"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-core:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-jcl:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.yaml:snakeyaml:1.26"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter-freemarker:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.freemarker:freemarker:2.3.30"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-context-support:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-beans:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.commons:commons-lang3:3.8"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: cn.hutool:hutool-all:5.0.6"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.projectlombok:lombok:1.18.12"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework.boot:spring-boot-starter-test:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework.boot:spring-boot-test:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: com.jayway.jsonpath:json-path:2.4.0"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.minidev:json-smart:2.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.minidev:accessors-smart:1.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.ow2.asm:asm:5.0.4"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.slf4j:slf4j-api:1.7.30"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: jakarta.activation:jakarta.activation-api:1.2.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.assertj:assertj-core:3.16.1"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.hamcrest:hamcrest:2.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.jupiter:junit-jupiter:5.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.jupiter:junit-jupiter-api:5.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.apiguardian:apiguardian-api:1.1.0"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.opentest4j:opentest4j:1.2.0"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.platform:junit-platform-commons:1.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.jupiter:junit-jupiter-params:5.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.platform:junit-platform-engine:1.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.mockito:mockito-core:3.3.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.bytebuddy:byte-buddy:1.10.10"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.bytebuddy:byte-buddy-agent:1.10.10"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.objenesis:objenesis:2.6"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.mockito:mockito-junit-jupiter:3.3.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.skyscreamer:jsonassert:1.5.0"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework:spring-test:5.2.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.xmlunit:xmlunit-core:2.7.0"
level=
"project"
/>
</component>
</module>
\ No newline at end of file
src/main/java/cn/quantgroup/codegenerator/util/FreemarkerTool.java
View file @
abd84ff5
...
@@ -66,12 +66,12 @@ public class FreemarkerTool {
...
@@ -66,12 +66,12 @@ public class FreemarkerTool {
}
}
public
void
processFile
(){
public
void
processFile
(){
String
modelPath
=
System
.
getProperty
(
"user.dir"
)
+
"
\\src\\main\\resources\\templates\\code-generator\\
model"
;
String
modelPath
=
System
.
getProperty
(
"user.dir"
)
+
"
/src/main/resources/templates/code-generator/
model"
;
String
servicePath
=
System
.
getProperty
(
"user.dir"
)
+
"
\\src\\main\\resources\\templates\\code-generator\\
service"
;
String
servicePath
=
System
.
getProperty
(
"user.dir"
)
+
"
/src/main/resources/templates/code-generator/
service"
;
String
callbackPath
=
System
.
getProperty
(
"user.dir"
)
+
"
\\src\\main\\resources\\templates\\code-generator\\
callback"
;
String
callbackPath
=
System
.
getProperty
(
"user.dir"
)
+
"
/src/main/resources/templates/code-generator/
callback"
;
String
eventHandlerPath
=
System
.
getProperty
(
"user.dir"
)
+
"
\\src\\main\\resources\\templates\\code-generator\\
eventhandler"
;
String
eventHandlerPath
=
System
.
getProperty
(
"user.dir"
)
+
"
/src/main/resources/templates/code-generator/
eventhandler"
;
String
enumsPath
=
System
.
getProperty
(
"user.dir"
)
+
"
\\src\\main\\resources\\templates\\code-generator\\
enums"
;
String
enumsPath
=
System
.
getProperty
(
"user.dir"
)
+
"
/src/main/resources/templates/code-generator/
enums"
;
String
utilPath
=
System
.
getProperty
(
"user.dir"
)
+
"
\\src\\main\\resources\\templates\\code-generator\\
util"
;
String
utilPath
=
System
.
getProperty
(
"user.dir"
)
+
"
/src/main/resources/templates/code-generator/
util"
;
try
{
try
{
...
...
src/main/java/cn/quantgroup/codegenerator/util/XmlParseUtil.java
View file @
abd84ff5
...
@@ -22,7 +22,7 @@ public class XmlParseUtil {
...
@@ -22,7 +22,7 @@ public class XmlParseUtil {
Map
<
String
,
String
>
node
=
new
HashMap
<>();
Map
<
String
,
String
>
node
=
new
HashMap
<>();
File
xmlFile
=
new
File
(
System
.
getProperty
(
"user.dir"
),
"
\\src\\main\\resources\\
GenerateConf.xml"
);
File
xmlFile
=
new
File
(
System
.
getProperty
(
"user.dir"
),
"
/src/main/resources/
GenerateConf.xml"
);
DocumentBuilderFactory
builderFactory
=
DocumentBuilderFactory
.
newInstance
();
DocumentBuilderFactory
builderFactory
=
DocumentBuilderFactory
.
newInstance
();
DocumentBuilder
builder
=
builderFactory
.
newDocumentBuilder
();
DocumentBuilder
builder
=
builderFactory
.
newDocumentBuilder
();
Document
doc
=
builder
.
parse
(
xmlFile
);
Document
doc
=
builder
.
parse
(
xmlFile
);
...
...
src/main/resources/GenerateConf.xml
View file @
abd84ff5
...
@@ -6,27 +6,27 @@
...
@@ -6,27 +6,27 @@
<author>
WangXiangwei
</author>
<author>
WangXiangwei
</author>
<prefix>
TestChannel
</prefix>
<prefix>
TestChannel
</prefix>
<model
path=
"
E:\testchannel\dto\
model"
>
<model
path=
"
/Users/chenxiaozhe/quantgroup/ka-code-generator/testchannel/dto/
model"
>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.model
</packageName>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.model
</packageName>
</model>
</model>
<util
path=
"
E:\testchannel\dto\
util"
>
<util
path=
"
/Users/chenxiaozhe/quantgroup/ka-code-generator/testchannel/dto/
util"
>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.util
</packageName>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.util
</packageName>
</util>
</util>
<enums
path=
"
E:\testchannel\dto\
enums"
>
<enums
path=
"
/Users/chenxiaozhe/quantgroup/ka-code-generator/testchannel/dto/
enums"
>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.enums
</packageName>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.enums
</packageName>
</enums>
</enums>
<callback
path=
"
E:\testchannel\dto\
callback"
>
<callback
path=
"
/Users/chenxiaozhe/quantgroup/ka-code-generator/testchannel/dto/
callback"
>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.callback
</packageName>
<packageName>
cn.quantgroup.clf.api.testchannel.dto.callback
</packageName>
</callback>
</callback>
<service
path=
"
E:\testchannel\
service"
>
<service
path=
"
/Users/chenxiaozhe/quantgroup/ka-code-generator/testchannel/
service"
>
<packageName>
cn.quantgroup.clf.api.testchannel.service
</packageName>
<packageName>
cn.quantgroup.clf.api.testchannel.service
</packageName>
</service>
</service>
<eventHandler
path=
"
E:\testchannel\
eventhandler"
>
<eventHandler
path=
"
/Users/chenxiaozhe/quantgroup/ka-code-generator/testchannel/
eventhandler"
>
<packageName>
cn.quantgroup.clf.api.testchannel.eventhandler
</packageName>
<packageName>
cn.quantgroup.clf.api.testchannel.eventhandler
</packageName>
</eventHandler>
</eventHandler>
...
...
src/main/resources/templates/code-generator/enums/SignStatusEnum.ftl
deleted
100644 → 0
View file @
ca6c9738
package
${
enumsPackage
};
/**
*
绑卡状态:
*
SUCCESS
:成功
;
*
FAIL
:
失败
*
*
@
author
${
author
}
*
@
date
${.
now
?
string
(
'yyyy-MM-dd HH:mm:ss'
)}
*/
public
enum
${
prefix
}
SignStatusEnum
{
SUCCESS
,
FAIL
}
\ No newline at end of file
src/main/resources/templates/code-generator/enums/UserAccessResultEnum.ftl
deleted
100644 → 0
View file @
ca6c9738
package
${
enumsPackage
};
/**
*
准入接口返回值
*
包括
“
CONTINUE
”
和
“
BREAK
”
两种返回结果。
*
CONTINUE
代表该用户可以继续进行后面的注册等操作,
*
BREAK
代表该用户不予以接受,不能进行后续的注册等操作
*
@
author
${
author
}
*
@
date
${.
now
?
string
(
'yyyy-MM-dd HH:mm:ss'
)}
*/
public
enum
${
prefix
}
UserAccessResultEnum
{
CONTINUE
,
BREAK
;
}
\ No newline at end of file
src/main/resources/templates/code-generator/eventhandler/EventHandler.ftl
View file @
abd84ff5
package
${
eventhandlerPackage
};
package
${
eventhandlerPackage
};
import
${
enumsPackage
}.${
prefix
}
CreditResultEnum
;
import
${
enumsPackage
}.${
prefix
}
CreditStatusCallBackEnum
;
import
${
enumsPackage
}.${
prefix
}
RepayStatusEnum
;
import
${
callbackPackage
}.${
prefix
}
QueryCreditApplyCallback
;
import
${
callbackPackage
}.${
prefix
}
QueryRepayCallback
;
import
${
callbackPackage
}.${
prefix
}
QueryLoanCallback
;
import
${
callbackPackage
}.${
prefix
}
QuotaExpired
;
import
${
callbackPackage
}.${
prefix
}
QuotaExpiredCallback
;
import
${
enumsPackage
}.${
prefix
}
LoanApplyStatusEnum
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanOrderMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanOrderMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
RepayFlowNoMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
RepayFlowNoMapping
;
...
@@ -24,7 +15,6 @@ import cn.quantgroup.cashloanflow.service.cashloanflow.ILoanOrderMappingService;
...
@@ -24,7 +15,6 @@ import cn.quantgroup.cashloanflow.service.cashloanflow.ILoanOrderMappingService;
import
cn
.
quantgroup
.
cashloanflow
.
service
.
cashloanflow
.
IUserMappingService
;
import
cn
.
quantgroup
.
cashloanflow
.
service
.
cashloanflow
.
IUserMappingService
;
import
cn
.
quantgroup
.
cashloanflow
.
service
.
cashloanflow
.
LoanMappingService
;
import
cn
.
quantgroup
.
cashloanflow
.
service
.
cashloanflow
.
LoanMappingService
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
DateUtil
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
DateUtil
;
import
cn
.
quantgroup
.
clf
.
api
.
jinshan
.
dto
.
callback
.
OrderAndUserMapping
;
import
cn
.
quantgroup
.
clf
.
util
.
JSONTools
;
import
cn
.
quantgroup
.
clf
.
util
.
JSONTools
;
import
cn
.
quantgroup
.
loanflow
.
application
.
StandardApplicationService
;
import
cn
.
quantgroup
.
loanflow
.
application
.
StandardApplicationService
;
import
cn
.
quantgroup
.
loanflow
.
asynctask
.
executor
.
config
.
BizAppId
;
import
cn
.
quantgroup
.
loanflow
.
asynctask
.
executor
.
config
.
BizAppId
;
...
@@ -91,29 +81,24 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -91,29 +81,24 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
KANoticeType
noticeType
=
auditRejectEvent
.
getNoticeType
();
KANoticeType
noticeType
=
auditRejectEvent
.
getNoticeType
();
String
applyNo
=
extraDto
.
getData
().
getApplyNo
();
String
applyNo
=
extraDto
.
getData
().
getApplyNo
();
String
channelOrderNo
=
auditRejectEvent
.
getChannelOrderNo
();
String
channelOrderNo
=
auditRejectEvent
.
getChannelOrderNo
();
QuotaRefuseNoticeExtraData
extraData
=
JSONTools
.
deserialize
(
extraDto
.
getExtraData
(),
QuotaRefuseNoticeExtraData
.
class
);
Long
nextApplyTime
=
auditRejectEvent
.
getNextApplyTime
();
String
reason
=
auditRejectEvent
.
getReason
();
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUserMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
orderAndUserMapping
.
getOrderMapping
();
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
String
channelUserId
=
userMapping
.
getChannelUserId
();
String
callbackUrl
=
getOrderCallbackUrl
(
channelId
,
noticeType
);
String
callbackUrl
=
getOrderCallbackUrl
(
channelId
,
noticeType
);
if
(
StringUtils
.
isEmpty
(
callbackUrl
))
{
if
(
StringUtils
.
isEmpty
(
callbackUrl
))
{
log
.
error
(
"{},回调地址无配置,channelId:{},applyNo:{},noticeType:{}"
,
logPrefix
,
channelId
,
applyNo
,
noticeType
.
name
());
log
.
error
(
"{},回调地址无配置,channelId:{},applyNo:{},noticeType:{}"
,
logPrefix
,
channelId
,
applyNo
,
noticeType
.
name
());
throw
new
CommonBizException
(
"回调地址无配置"
);
throw
new
CommonBizException
(
"回调地址无配置"
);
}
}
${
prefix
}
QueryCreditApplyCallback
callback
=
new
${
prefix
}
QueryCreditApplyCallback
();
LoanOrderMapping
orderMapping
=
getOrderMapping
(
channelOrderNo
,
channelId
);
Long
userId
=
orderMapping
.
getQgUserId
();
callback
.
setChannelUserId
(
channelUserId
);
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
callback
.
setChannelOrderNo
(
orderMapping
.
getChannelOrderNo
());
String
channelUserId
=
userMapping
.
getChannelUserId
();
callback
.
setApplyNo
(
orderMapping
.
getApplyNo
());
callback
.
setCreditResult
(${
prefix
}
CreditResultEnum
.
REFUSE
);
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>();
callback
.
setNextApplyTime
(
DateUtil
.
format
(
extraData
.
getNextOperateDate
(),
DateUtil
.
YYYY_MM_DD
));
callback
.
setCreditInfo
(
extraData
.
getRefuseReason
());
Map
<
String
,
String
>
postParam
=
getPostParam
(
callback
,
channelUserId
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
publishTask
(
post
Param
,
callbackUrl
,
queueNotice
);
publishTask
(
callback
Param
,
callbackUrl
,
queueNotice
);
}
}
@
Override
@
Override
...
@@ -132,9 +117,12 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -132,9 +117,12 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
throw
new
CommonBizException
(
"回调地址无配置"
);
throw
new
CommonBizException
(
"回调地址无配置"
);
}
}
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUserMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
getOrderMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
orderAndUserMapping
.
getOrderMapping
();
Long
userId
=
orderMapping
.
getQgUserId
();
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
String
channelUserId
=
userMapping
.
getChannelUserId
();
ChannelOrder
channelOrderQueryCreditStatus
=
ChannelOrder
.
builder
()
ChannelOrder
channelOrderQueryCreditStatus
=
ChannelOrder
.
builder
()
.
channelOrderNo
(
channelOrderNo
)
.
channelOrderNo
(
channelOrderNo
)
.
channelId
(
channelId
)
.
channelId
(
channelId
)
...
@@ -148,11 +136,11 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -148,11 +136,11 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
throw
new
CommonBizException
(
"审批推送,查询授信结果失败或无数据"
);
throw
new
CommonBizException
(
"审批推送,查询授信结果失败或无数据"
);
}
}
${
prefix
}
QueryCreditApplyCallback
callback
=
${
prefix
}
QueryCreditApplyCallback
.
getSuccessResult
(
orderMapping
,
userMapping
,
creditInfo
);
Map
<
String
,
String
>
postParam
=
getPostParam
(
callback
,
userMapping
.
getChannelUserId
()
);
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>(
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
publishTask
(
post
Param
,
callbackUrl
,
queueNotice
);
publishTask
(
callback
Param
,
callbackUrl
,
queueNotice
);
}
}
...
@@ -179,25 +167,24 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -179,25 +167,24 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
throw
new
CommonBizException
(
"回调地址无配置"
);
throw
new
CommonBizException
(
"回调地址无配置"
);
}
}
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUs
erMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
getOrd
erMapping
(
channelOrderNo
,
channelId
);
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
Long
userId
=
orderMapping
.
getQgUserId
();
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
String
channelUserId
=
userMapping
.
getChannelUserId
();
String
channelUserId
=
userMapping
.
getChannelUserId
();
LoanMapping
loanMapping
=
loanMappingService
.
findByLoanIdAndChannelId
(
loanId
,
channelId
);
LoanMapping
loanMapping
=
loanMappingService
.
findByLoanIdAndChannelId
(
loanId
,
channelId
);
if
(
Objects
.
isNull
(
loanMapping
))
{
if
(
Objects
.
isNull
(
loanMapping
))
{
log
.
error
(
"{}通过loanId查询LoanMapping为空, loanId={}, channelId={}"
,
logPrefix
,
loanId
,
channelId
);
log
.
error
(
"{}通过loanId查询LoanMapping为空, loanId={}, channelId={}"
,
logPrefix
,
loanId
,
channelId
);
throw
new
CommonBizException
(
"通过loanId查询LoanMapping为空"
);
throw
new
CommonBizException
(
"通过loanId查询LoanMapping为空"
);
}
}
${
prefix
}
QueryLoanCallback
callback
=
new
${
prefix
}
QueryLoanCallback
();
callback
.
setChannelUserId
(
channelUserId
);
String
channelLoanNo
=
loanMapping
.
getChannelLoanNo
();
callback
.
setLoanNo
(
String
.
valueOf
(
loanMapping
.
getLoanId
()));
callback
.
setChannelLoanNo
(
loanMapping
.
getChannelLoanNo
());
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>();
callback
.
setLoanApplyStatus
(${
prefix
}
LoanApplyStatusEnum
.
SUCCESS
);
Map
<
String
,
String
>
postParam
=
getPostParam
(
callback
,
channelUserId
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
publishTask
(
post
Param
,
callbackUrl
,
queueNotice
);
publishTask
(
callback
Param
,
callbackUrl
,
queueNotice
);
}
}
...
@@ -213,41 +200,31 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -213,41 +200,31 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
String
applyNo
=
extraDto
.
getData
().
getApplyNo
();
String
applyNo
=
extraDto
.
getData
().
getApplyNo
();
String
channelOrderNo
=
fundFailEvent
.
getChannelOrderNo
();
String
channelOrderNo
=
fundFailEvent
.
getChannelOrderNo
();
Long
changeTime
=
fundFailEvent
.
getChangeTime
();
Long
changeTime
=
fundFailEvent
.
getChangeTime
();
String
reason
=
fundFailEvent
.
getReason
();
String
callbackUrl
=
getOrderCallbackUrl
(
channelId
,
noticeType
);
String
callbackUrl
=
getOrderCallbackUrl
(
channelId
,
noticeType
);
if
(
StringUtils
.
isEmpty
(
callbackUrl
))
{
if
(
StringUtils
.
isEmpty
(
callbackUrl
))
{
log
.
error
(
"{},回调地址无配置,channelId:{},applyNo:{},noticeType:{}"
,
logPrefix
,
channelId
,
applyNo
,
noticeType
.
name
());
log
.
error
(
"{},回调地址无配置,channelId:{},applyNo:{},noticeType:{}"
,
logPrefix
,
channelId
,
applyNo
,
noticeType
.
name
());
throw
new
CommonBizException
(
"回调地址无配置"
);
throw
new
CommonBizException
(
"回调地址无配置"
);
}
}
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUs
erMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
getOrd
erMapping
(
channelOrderNo
,
channelId
);
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
Long
userId
=
orderMapping
.
getQgUserId
();
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
String
channelUserId
=
userMapping
.
getChannelUserId
();
String
channelUserId
=
userMapping
.
getChannelUserId
();
LoanMapping
loanMapping
=
loanMappingService
.
findByLoanIdAndChannelId
(
loanId
,
channelId
);
LoanMapping
loanMapping
=
loanMappingService
.
findByLoanIdAndChannelId
(
loanId
,
channelId
);
if
(
Objects
.
isNull
(
loanMapping
))
{
if
(
Objects
.
isNull
(
loanMapping
))
{
log
.
error
(
"{}通过loanId查询LoanMapping为空, loanId={}, channelId={}"
,
logPrefix
,
loanId
,
channelId
);
log
.
error
(
"{}通过loanId查询LoanMapping为空, loanId={}, channelId={}"
,
logPrefix
,
loanId
,
channelId
);
throw
new
CommonBizException
(
"通过loanId查询LoanMapping为空"
);
throw
new
CommonBizException
(
"通过loanId查询LoanMapping为空"
);
}
}
${
prefix
}
QueryLoanCallback
callback
=
new
${
prefix
}
QueryLoanCallback
();
String
channelLoanNo
=
loanMapping
.
getChannelLoanNo
();
callback
.
setChannelUserId
(
channelUserId
);
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>();
callback
.
setLoanNo
(
String
.
valueOf
(
loanMapping
.
getLoanId
()));
callback
.
setChannelLoanNo
(
loanMapping
.
getChannelLoanNo
());
callback
.
setLoanApplyStatus
(${
prefix
}
LoanApplyStatusEnum
.
FAIL
);
callback
.
setApplyResult
(
fundFailEvent
.
getReason
());
Map
<
String
,
String
>
postParam
=
getPostParam
(
callback
,
channelUserId
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
publishTask
(
postParam
,
callbackUrl
,
queueNotice
);
publishTask
(
callbackParam
,
callbackUrl
,
queueNotice
);
//
通知渠道额度失效
${
prefix
}
QuotaExpired
quotaExpired
=
new
${
prefix
}
QuotaExpired
();
quotaExpired
.
setChannelId
(
channelId
);
quotaExpired
.
setChannelUserId
(
channelUserId
);
quotaExpired
.
setExtraDto
(
extraDto
);
quotaExpired
.
setLimitExpireDate
(
changeTime
);
quotaExpiredPublishTask
(
quotaExpired
);
}
}
@
Override
@
Override
...
@@ -258,18 +235,24 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -258,18 +235,24 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
Long
channelId
=
cancelLoanEvent
.
getChannelId
();
Long
channelId
=
cancelLoanEvent
.
getChannelId
();
String
channelOrderNo
=
cancelLoanEvent
.
getChannelOrderNo
();
String
channelOrderNo
=
cancelLoanEvent
.
getChannelOrderNo
();
Long
closeTime
=
cancelLoanEvent
.
getChangeTime
();
Long
closeTime
=
cancelLoanEvent
.
getChangeTime
();
KANoticeType
noticeType
=
cancelLoanEvent
.
getNoticeType
();
String
applyNo
=
extraDto
.
getData
().
getApplyNo
();
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUserMapping
(
channelOrderNo
,
channelId
);
String
callbackUrl
=
getOrderCallbackUrl
(
channelId
,
noticeType
);
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
if
(
StringUtils
.
isEmpty
(
callbackUrl
))
{
log
.
error
(
"{},回调地址无配置,channelId:{},applyNo:{},noticeType:{}"
,
logPrefix
,
channelId
,
applyNo
,
noticeType
.
name
());
throw
new
CommonBizException
(
"回调地址无配置"
);
}
LoanOrderMapping
orderMapping
=
getOrderMapping
(
channelOrderNo
,
channelId
);
Long
userId
=
orderMapping
.
getQgUserId
();
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
String
channelUserId
=
userMapping
.
getChannelUserId
();
String
channelUserId
=
userMapping
.
getChannelUserId
();
//
通知渠道额度失效
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>();
${
prefix
}
QuotaExpired
quotaExpired
=
new
${
prefix
}
QuotaExpired
();
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
quotaExpired
.
setChannelId
(
channelId
);
publishTask
(
callbackParam
,
callbackUrl
,
queueNotice
);
quotaExpired
.
setChannelUserId
(
channelUserId
);
quotaExpired
.
setExtraDto
(
extraDto
);
quotaExpired
.
setLimitExpireDate
(
closeTime
);
quotaExpiredPublishTask
(
quotaExpired
);
}
}
...
@@ -282,20 +265,30 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -282,20 +265,30 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
Long
channelId
=
settleUpEvent
.
getChannelId
();
Long
channelId
=
settleUpEvent
.
getChannelId
();
String
channelOrderNo
=
settleUpEvent
.
getChannelOrderNo
();
String
channelOrderNo
=
settleUpEvent
.
getChannelOrderNo
();
Long
changeTime
=
settleUpEvent
.
getChangeTime
();
Long
changeTime
=
settleUpEvent
.
getChangeTime
();
KANoticeType
noticeType
=
settleUpEvent
.
getNoticeType
();
Long
loanId
=
settleUpEvent
.
getLoanId
();
String
applyNo
=
extraDto
.
getData
().
getApplyNo
();
String
callbackUrl
=
getOrderCallbackUrl
(
channelId
,
noticeType
);
if
(
StringUtils
.
isEmpty
(
callbackUrl
))
{
log
.
error
(
"{},回调地址无配置,channelId:{},loanId:{},noticeType:{}"
,
logPrefix
,
channelId
,
loanId
,
noticeType
.
name
());
throw
new
CommonBizException
(
"回调地址无配置"
);
}
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUserMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
getOrderMapping
(
channelOrderNo
,
channelId
);
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
Long
userId
=
orderMapping
.
getQgUserId
();
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
String
channelUserId
=
userMapping
.
getChannelUserId
();
String
channelUserId
=
userMapping
.
getChannelUserId
();
//
通知渠道额度失效
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>();
${
prefix
}
QuotaExpired
quotaExpired
=
new
${
prefix
}
QuotaExpired
();
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
quotaExpired
.
setChannelId
(
channelId
);
publishTask
(
callbackParam
,
callbackUrl
,
queueNotice
);
quotaExpired
.
setChannelUserId
(
channelUserId
);
quotaExpired
.
setExtraDto
(
extraDto
);
processSettleUp
(
settleUpEvent
);
quotaExpired
.
setLimitExpireDate
(
changeTime
);
quotaExpiredPublishTask
(
quotaExpired
);
}
}
@
Override
@
Override
public
void
repaySuccessPublish
(
RepaySuccessEvent
repaySuccessEvent
)
{
public
void
repaySuccessPublish
(
RepaySuccessEvent
repaySuccessEvent
)
{
String
logPrefix
=
"[${prefix}EventHandler][repaySuccessPublish]"
;
String
logPrefix
=
"[${prefix}EventHandler][repaySuccessPublish]"
;
...
@@ -314,8 +307,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -314,8 +307,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
throw
new
CommonBizException
(
"回调地址无配置"
);
throw
new
CommonBizException
(
"回调地址无配置"
);
}
}
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUserMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
getOrderMapping
(
channelOrderNo
,
channelId
);
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
Long
userId
=
orderMapping
.
getQgUserId
();
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
String
channelUserId
=
userMapping
.
getChannelUserId
();
String
channelUserId
=
userMapping
.
getChannelUserId
();
//
查询借据信息
//
查询借据信息
...
@@ -326,10 +321,12 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -326,10 +321,12 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
}
}
String
channelLoanNo
=
loanMapping
.
getChannelLoanNo
();
String
channelLoanNo
=
loanMapping
.
getChannelLoanNo
();
//
查询渠道的还款流水号
//
查询渠道的还款流水号
String
kingsoftRepaymentNo
=
null
;
String
channelRepaymentNo
=
null
;
BigDecimal
repaymentAmount
=
null
;
RepayFlowNoMapping
repayFlowNoMapping
=
repayFlowNoMappingRepository
.
findByXyqbRepayFlowNoOne
(
businessFlowNo
);
RepayFlowNoMapping
repayFlowNoMapping
=
repayFlowNoMappingRepository
.
findByXyqbRepayFlowNoOne
(
businessFlowNo
);
if
(
Objects
.
nonNull
(
repayFlowNoMapping
))
{
if
(
Objects
.
nonNull
(
repayFlowNoMapping
))
{
kingsoftRepaymentNo
=
repayFlowNoMapping
.
getChannelRepayFlowNo
();
channelRepaymentNo
=
repayFlowNoMapping
.
getChannelRepayFlowNo
();
repaymentAmount
=
new
BigDecimal
(
repayFlowNoMapping
.
getRepayAmount
());
}
}
//
查询还款计划
//
查询还款计划
ServiceResult
<
OrderRepaymentRepresentation
>
serviceResult
=
standardApplicationService
.
repaymentPlanQueryByCycleQuota
(
loanId
);
ServiceResult
<
OrderRepaymentRepresentation
>
serviceResult
=
standardApplicationService
.
repaymentPlanQueryByCycleQuota
(
loanId
);
...
@@ -340,10 +337,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -340,10 +337,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
throw
new
CommonBizException
(
"还款成功,查询还款计划返回错误或无数据"
);
throw
new
CommonBizException
(
"还款成功,查询还款计划返回错误或无数据"
);
}
}
List
<
RepaymentPlanItem
>
repaymentPlans
=
serviceResult
.
getData
().
getRepaymentPlans
();
List
<
RepaymentPlanItem
>
repaymentPlans
=
serviceResult
.
getData
().
getRepaymentPlans
();
${
prefix
}
QueryRepayCallback
callback
=
${
prefix
}
QueryRepayCallback
.
getSuccessResult
(
channelUserId
,
repaySuccessEvent
,
channelLoanNo
,
kingsoftRepaymentNo
,
repaymentPlans
);
Map
<
String
,
String
>
postParam
=
getPostParam
(
callback
,
channelUserId
);
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>(
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
publishTask
(
post
Param
,
callbackUrl
,
queueNotice
);
publishTask
(
callback
Param
,
callbackUrl
,
queueNotice
);
super
.
processRepay
(
repaySuccessEvent
.
getQueueNotice
());
super
.
processRepay
(
repaySuccessEvent
.
getQueueNotice
());
}
}
...
@@ -365,8 +362,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -365,8 +362,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
throw
new
CommonBizException
(
"回调地址无配置"
);
throw
new
CommonBizException
(
"回调地址无配置"
);
}
}
OrderAndUserMapping
orderAndUserMapping
=
getOrderAndUserMapping
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
getOrderMapping
(
channelOrderNo
,
channelId
);
UserMapping
userMapping
=
orderAndUserMapping
.
getUserMapping
();
Long
userId
=
orderMapping
.
getQgUserId
();
UserMapping
userMapping
=
getUserMapping
(
userId
,
channelId
);
String
channelUserId
=
userMapping
.
getChannelUserId
();
String
channelUserId
=
userMapping
.
getChannelUserId
();
//
根据核心系统还款流水号查询渠道的还款流水号
//
根据核心系统还款流水号查询渠道的还款流水号
...
@@ -377,18 +376,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -377,18 +376,10 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
channelRepayFlowNo
=
repayFlowNoMapping
.
getChannelRepayFlowNo
();
channelRepayFlowNo
=
repayFlowNoMapping
.
getChannelRepayFlowNo
();
repaymentAmount
=
new
BigDecimal
(
repayFlowNoMapping
.
getRepayAmount
());
repaymentAmount
=
new
BigDecimal
(
repayFlowNoMapping
.
getRepayAmount
());
}
}
${
prefix
}
QueryRepayCallback
callback
=
new
${
prefix
}
QueryRepayCallback
();
Map
<
String
,
String
>
callbackParam
=
new
HashMap
<>();
callback
.
setChannelUserId
(
channelUserId
);
callback
.
setBusinessFlowNo
(
businessFlowNo
);
callback
.
setChannelRepayFlowNo
(
channelRepayFlowNo
);
callback
.
setRepaymentAmount
(
repaymentAmount
);
callback
.
setRepayStatus
(${
prefix
}
RepayStatusEnum
.
FAIL
);
callback
.
setFailMsg
(
failMsg
);
callback
.
setFailCode
(
"2000000"
);
Map
<
String
,
String
>
postParam
=
getPostParam
(
callback
,
channelUserId
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
publishTask
(
post
Param
,
callbackUrl
,
queueNotice
);
publishTask
(
callback
Param
,
callbackUrl
,
queueNotice
);
super
.
processRepay
(
repayFailEvent
.
getQueueNotice
());
super
.
processRepay
(
repayFailEvent
.
getQueueNotice
());
}
}
...
@@ -419,28 +410,36 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -419,28 +410,36 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
}
}
/**
/**
*
根据
channelOrderNo
+
channelId
查询出渠道授信信息和渠道用户信息
*
根据
channelOrderNo
,
channelId
查询出渠道授信订单
*
*
*
@
param
channelOrderNo
*
@
param
channelOrderNo
*
@
param
channelId
*
@
param
channelId
*
@
return
*
@
return
*/
*/
private
OrderAndUserMapping
getOrderAndUserMapping
(
String
channelOrderNo
,
Long
channelId
)
{
private
LoanOrderMapping
getOrderMapping
(
String
channelOrderNo
,
Long
channelId
)
{
OrderAndUserMapping
mappingReturn
=
new
OrderAndUserMapping
();
LoanOrderMapping
orderMapping
=
orderMappingService
.
findByChannelOrderNoAndRegisteredFromLastOne
(
channelOrderNo
,
channelId
);
LoanOrderMapping
orderMapping
=
orderMappingService
.
findByChannelOrderNoAndRegisteredFromLastOne
(
channelOrderNo
,
channelId
);
if
(
Objects
.
isNull
(
orderMapping
))
{
if
(
Objects
.
isNull
(
orderMapping
))
{
log
.
error
(
"${prefix}渠道回调通知,查询授信订单为空, channelOrderNo={}, channelId={}"
,
channelOrderNo
,
channelId
);
log
.
error
(
"${prefix}渠道回调通知,查询授信订单为空, channelOrderNo={}, channelId={}"
,
channelOrderNo
,
channelId
);
throw
new
CommonBizException
(
"查询授信订单为空"
);
throw
new
CommonBizException
(
"查询授信订单为空"
);
}
}
Long
userId
=
orderMapping
.
getQgUserId
();
return
orderMapping
;
}
/**
*
根据
userId
,
channelId
查询
UserMapping
*
*
@
param
userId
*
@
param
channelId
*
@
return
*/
private
UserMapping
getUserMapping
(
Long
userId
,
Long
channelId
)
{
UserMapping
userMapping
=
userMappingService
.
findByQgUserIdAndRegisteredFrom
(
userId
,
channelId
);
UserMapping
userMapping
=
userMappingService
.
findByQgUserIdAndRegisteredFrom
(
userId
,
channelId
);
if
(
Objects
.
isNull
(
userMapping
))
{
if
(
Objects
.
isNull
(
userMapping
))
{
log
.
error
(
"${prefix}渠道回调通知,通过qgUserId查询渠道用户id为空, qgUserId={}, channelId={}"
,
userId
,
channelId
);
log
.
error
(
"${prefix}渠道回调通知,通过qgUserId查询渠道用户id为空, qgUserId={}, channelId={}"
,
userId
,
channelId
);
throw
new
CommonBizException
(
"通过qgUserId查询渠道用户id为空"
);
throw
new
CommonBizException
(
"通过qgUserId查询渠道用户id为空"
);
}
}
mappingReturn
.
setOrderMapping
(
orderMapping
);
return
userMapping
;
mappingReturn
.
setUserMapping
(
userMapping
);
return
mappingReturn
;
}
}
/**
/**
...
@@ -470,11 +469,11 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -470,11 +469,11 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
*/
*/
private
HttpTaskBody
buildTaskBody
(
Map
<
String
,
String
>
paraMap
,
String
url
,
QueueNotice
queueNotice
)
{
private
HttpTaskBody
buildTaskBody
(
Map
<
String
,
String
>
paraMap
,
String
url
,
QueueNotice
queueNotice
)
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"
success"
,
"Y
"
);
jsonObject
.
put
(
"
"
,
"
"
);
String
assetRule
=
jsonObject
.
toJSONString
();
String
assetRule
=
jsonObject
.
toJSONString
();
Map
<
String
,
String
>
header
=
new
HashMap
<>(
2
);
Map
<
String
,
String
>
header
=
new
HashMap
<>(
2
);
header
.
put
(
"Content-Type"
,
"
application/json
"
);
header
.
put
(
"Content-Type"
,
""
);
HttpTaskBody
taskBody
=
new
HttpTaskBody
();
HttpTaskBody
taskBody
=
new
HttpTaskBody
();
taskBody
.
setHeaders
(
header
);
taskBody
.
setHeaders
(
header
);
taskBody
.
setUrl
(
url
);
taskBody
.
setUrl
(
url
);
...
@@ -484,39 +483,5 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
...
@@ -484,39 +483,5 @@ public class ${prefix}EventHandler extends AbstractEventHandler implements IEven
return
taskBody
;
return
taskBody
;
}
}
/**
*
额度失效通知
*
*
@
param
quotaExpired
*/
private
void
quotaExpiredPublishTask
(${
prefix
}
QuotaExpired
quotaExpired
)
{
String
logPrefix
=
"[${prefix}EventHandler][quotoExpiredPublishTask]"
;
QuotaNoticeExtraDto
extraDto
=
quotaExpired
.
getExtraDto
();
String
channelUserId
=
quotaExpired
.
getChannelUserId
();
Long
channelId
=
quotaExpired
.
getChannelId
();
Long
limitExpireDate
=
quotaExpired
.
getLimitExpireDate
();
KANoticeType
noticeType
=
KANoticeType
.
QUOTA_EXPIRED
;
String
callbackUrl
=
getOrderCallbackUrl
(
channelId
,
noticeType
);
if
(
StringUtils
.
isEmpty
(
callbackUrl
))
{
log
.
error
(
"{},回调地址无配置,channelId:{},applyNo:{},noticeType:{}"
,
logPrefix
,
channelId
,
noticeType
.
name
());
throw
new
CommonBizException
(
"回调地址无配置"
);
}
${
prefix
}
QuotaExpiredCallback
callback
=
new
${
prefix
}
QuotaExpiredCallback
();
callback
.
setCreditStatus
(${
prefix
}
CreditStatusCallBackEnum
.
EXPIRED
);
callback
.
setChannelUserId
(
channelUserId
);
callback
.
setCreditAmount
(
BigDecimal
.
ZERO
);
callback
.
setLimitExpireDate
(
DateUtil
.
format
(
limitExpireDate
,
DateUtil
.
YYYY_MM_DD
));
Map
<
String
,
String
>
postParam
=
getPostParam
(
callback
,
channelUserId
);
QueueNotice
queueNotice
=
new
QueueNotice
(
noticeType
,
extraDto
);
publishTask
(
postParam
,
callbackUrl
,
queueNotice
);
}
private
HashMap
<
String
,
String
>
getPostParam
(
Object
param
,
String
channelUserId
){
HashMap
<
String
,
String
>
paramMap
=
new
HashMap
<>(
12
);
String
paramJsonStr
=
JSON
.
toJSONString
(
param
);
paramMap
.
put
(
"channelUserId"
,
channelUserId
);
paramMap
.
put
(
"requestId"
,
DateUtil
.
format
(
new
Date
(),
DateUtil
.
YYYYMMDDHHMMSS
));
paramMap
.
put
(
"timestamp"
,
DateUtil
.
get13LongTimeFormLong
());
paramMap
.
put
(
"data"
,
paramJsonStr
);
return
paramMap
;
}
}
}
src/main/resources/templates/code-generator/model/ApplyLoanRequest.ftl
View file @
abd84ff5
...
@@ -24,6 +24,11 @@ public class ${prefix}ApplyLoanRequest {
...
@@ -24,6 +24,11 @@ public class ${prefix}ApplyLoanRequest {
*/
*/
private
String
channelOrderNo
;
private
String
channelOrderNo
;
/**
*
渠道借款订单号
*/
private
String
channelLoanNo
;
/**
/**
*
绑卡
Id
*
绑卡
Id
*/
*/
...
...
src/main/resources/templates/code-generator/model/CreditApplyRequest.ftl
View file @
abd84ff5
...
@@ -5,7 +5,7 @@ import cn.quantgroup.cashloanflow.model.standard.apply.StandardApplyLoanData;
...
@@ -5,7 +5,7 @@ import cn.quantgroup.cashloanflow.model.standard.apply.StandardApplyLoanData;
import
cn
.
quantgroup
.
cashloanflow
.
model
.
standard
.
apply
.
StandardpicModelTypeEnum
;
import
cn
.
quantgroup
.
cashloanflow
.
model
.
standard
.
apply
.
StandardpicModelTypeEnum
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
RegisterFrom
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
RegisterFrom
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
Utils
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
Utils
;
import
cn
.
quantgroup
.
loanflow
.
application
.
model
.
ApplyLoanData
;
import
cn
.
quantgroup
.
loanflow
.
risk
.
model
.
RiskInfo
;
import
cn
.
quantgroup
.
loanflow
.
risk
.
model
.
RiskInfo
;
import
cn
.
quantgroup
.
loanflow
.
risk
.
model
.
StandardOcrData
;
import
cn
.
quantgroup
.
loanflow
.
risk
.
model
.
StandardOcrData
;
...
@@ -184,15 +184,14 @@ public class ${prefix}CreditApplyRequest {
...
@@ -184,15 +184,14 @@ public class ${prefix}CreditApplyRequest {
/**
/**
*
标准
API
转换
*
标准
API
转换
*
*
*
@
param
registerFrom
*
@
param
data
*
@
param
data
*/
*/
public
static
ApplyLoanData
getApplyLoanData
(${
prefix
}
CreditApplyRequest
data
)
{
public
static
ApplyLoanData
getApplyLoanData
(${
prefix
}
CreditApplyRequest
data
)
{
ApplyLoanData
applyLoanData
=
new
ApplyLoanData
();
ApplyLoanData
applyLoanData
=
new
ApplyLoanData
();
applyLoanData
.
setRegisterFrom
(
RegisterFrom
.
JINSHAN
)
applyLoanData
.
setRegisterFrom
(
RegisterFrom
.
JINSHAN
)
;
applyLoanData
.
setUserName
(
data
.
getUserName
());
applyLoanData
.
setUserName
(
data
.
getUserName
());
applyLoanData
.
setPhone
(
data
.
getPhone
());
applyLoanData
.
setPhone
No
(
data
.
getPhoneNo
());
applyLoanData
.
setIdNo
(
data
.
getIdNo
());
applyLoanData
.
setIdNo
(
data
.
getIdNo
());
applyLoanData
.
setChannelUserId
(
data
.
getChannelUserId
());
applyLoanData
.
setChannelUserId
(
data
.
getChannelUserId
());
applyLoanData
.
setQq
(
data
.
getQq
());
applyLoanData
.
setQq
(
data
.
getQq
());
...
@@ -219,6 +218,7 @@ public class ${prefix}CreditApplyRequest {
...
@@ -219,6 +218,7 @@ public class ${prefix}CreditApplyRequest {
applyLoanData
.
setPurposeEnum
(
data
.
getPurposeEnum
());
applyLoanData
.
setPurposeEnum
(
data
.
getPurposeEnum
());
applyLoanData
.
setOrderExtData
(
data
.
getOrderExtData
());
applyLoanData
.
setOrderExtData
(
data
.
getOrderExtData
());
applyLoanData
.
setRiskInfo
(
data
.
getRiskInfo
());
applyLoanData
.
setRiskInfo
(
data
.
getRiskInfo
());
return
applyLoanData
;
}
}
...
...
src/main/resources/templates/code-generator/model/VerifyBindSmsResult.ftl
View file @
abd84ff5
package
${
modelPackage
};
package
${
modelPackage
};
import
${
enumsPackage
}.${
prefix
}
SignStatusEnum
;
import
lombok
.
Data
;
import
lombok
.
Data
;
/**
/**
...
@@ -12,7 +11,6 @@ import lombok.Data;
...
@@ -12,7 +11,6 @@ import lombok.Data;
@
Data
@
Data
public
class
${
prefix
}
VerifyBindSmsResult
{
public
class
${
prefix
}
VerifyBindSmsResult
{
private
${
prefix
}
SignStatusEnum
signStatus
;
private
String
bindId
;
private
String
bindId
;
}
}
\ No newline at end of file
src/main/resources/templates/code-generator/service/Service.ftl
View file @
abd84ff5
package
${
servicePackage
};
package
${
servicePackage
};
import
${
modelPackage
}.${
prefix
}
CreditApplyRequest
;
import
${
modelPackage
}.${
prefix
}
QueryCreditApplyRequest
;
import
${
modelPackage
}.${
prefix
}
QueryCreditApplyRequest
;
import
${
modelPackage
}.${
prefix
}
UserAccessRequest
;
import
${
modelPackage
}.${
prefix
}
UserAccessRequest
;
import
${
modelPackage
}.${
prefix
}
QuerySupportBankcardsRequest
;
import
${
modelPackage
}.${
prefix
}
QuerySupportBankcardsRequest
;
...
@@ -28,7 +28,7 @@ public interface ${prefix}Service {
...
@@ -28,7 +28,7 @@ public interface ${prefix}Service {
*
@
param
userAccessRequest
*
@
param
userAccessRequest
*
@
return
*
@
return
*/
*/
String
userAccess
(${
prefix
}
UserAccessRequest
userAccessRequest
);
void
userAccess
(${
prefix
}
UserAccessRequest
userAccessRequest
);
/**
/**
*
提交授信
*
提交授信
...
@@ -36,7 +36,7 @@ public interface ${prefix}Service {
...
@@ -36,7 +36,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
creditApply
(
ApplyLoanData
request
);
void
creditApply
(${
prefix
}
CreditApplyRequest
request
);
...
@@ -46,7 +46,7 @@ public interface ${prefix}Service {
...
@@ -46,7 +46,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
queryCreditApply
(${
prefix
}
QueryCreditApplyRequest
request
);
void
queryCreditApply
(${
prefix
}
QueryCreditApplyRequest
request
);
/**
/**
...
@@ -55,7 +55,7 @@ public interface ${prefix}Service {
...
@@ -55,7 +55,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
querySupportBankcards
(${
prefix
}
QuerySupportBankcardsRequest
request
);
void
querySupportBankcards
(${
prefix
}
QuerySupportBankcardsRequest
request
);
/**
/**
*
借款试算
*
借款试算
...
@@ -63,7 +63,7 @@ public interface ${prefix}Service {
...
@@ -63,7 +63,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
queryLoanTrial
(${
prefix
}
QueryLoanTrialRequest
request
);
void
queryLoanTrial
(${
prefix
}
QueryLoanTrialRequest
request
);
/**
/**
...
@@ -72,7 +72,7 @@ public interface ${prefix}Service {
...
@@ -72,7 +72,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
bindBankCardSms
(${
prefix
}
BindBankCardSmsRequest
request
);
void
bindBankCardSms
(${
prefix
}
BindBankCardSmsRequest
request
);
/**
/**
*
验卡
*
验卡
...
@@ -80,7 +80,7 @@ public interface ${prefix}Service {
...
@@ -80,7 +80,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
verifyBindSms
(${
prefix
}
VerifyBindSmsRequest
request
);
void
verifyBindSms
(${
prefix
}
VerifyBindSmsRequest
request
);
/**
/**
...
@@ -89,7 +89,7 @@ public interface ${prefix}Service {
...
@@ -89,7 +89,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
applyWithdraw
(${
prefix
}
ApplyLoanRequest
request
);
void
applyWithdraw
(${
prefix
}
ApplyLoanRequest
request
);
/**
/**
...
@@ -98,7 +98,7 @@ public interface ${prefix}Service {
...
@@ -98,7 +98,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
queryLoanResult
(${
prefix
}
QueryLoanRequest
request
);
void
queryLoanResult
(${
prefix
}
QueryLoanRequest
request
);
/**
/**
...
@@ -107,7 +107,7 @@ public interface ${prefix}Service {
...
@@ -107,7 +107,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
repayByPlan
(${
prefix
}
RepayByPlanRequest
request
);
void
repayByPlan
(${
prefix
}
RepayByPlanRequest
request
);
/**
/**
*
查询还款结果
*
查询还款结果
...
@@ -115,7 +115,7 @@ public interface ${prefix}Service {
...
@@ -115,7 +115,7 @@ public interface ${prefix}Service {
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
String
queryRepayResult
(${
prefix
}
QueryRepayRequest
request
);
void
queryRepayResult
(${
prefix
}
QueryRepayRequest
request
);
}
}
...
...
src/main/resources/templates/code-generator/service/ServiceImpl.ftl
View file @
abd84ff5
...
@@ -16,10 +16,10 @@ import ${modelPackage}.${prefix}QueryLoanRequest;
...
@@ -16,10 +16,10 @@ import ${modelPackage}.${prefix}QueryLoanRequest;
import
${
modelPackage
}.${
prefix
}
RepayByPlanRequest
;
import
${
modelPackage
}.${
prefix
}
RepayByPlanRequest
;
import
${
modelPackage
}.${
prefix
}
QueryRepayRequest
;
import
${
modelPackage
}.${
prefix
}
QueryRepayRequest
;
import
${
modelPackage
}.${
prefix
}
CreditApplyRequest
;
import
${
modelPackage
}.${
prefix
}
CreditApplyRequest
;
import
${
enumsPackage
}.${
prefix
}
SignStatusEnum
;
import
${
enumsPackage
}.${
prefix
}
UserAccessResultEnum
;
import
${
utilPackage
}.${
prefix
}
ResultUtils
;
import
${
utilPackage
}.${
prefix
}
CodeEnum
;
import
${
utilPackage
}.${
prefix
}
CodeEnum
;
import
${
enumsPackage
}.${
prefix
}
LoanPurposesEnum
;
import
cn
.
quantgroup
.
cashloanflow
.
model
.
standard
.
response
.
credit
.
CreditStatusEnum
;
import
cn
.
quantgroup
.
loanflow
.
application
.
model
.
ApplyLoanRequestData
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanOrderMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
entity
.
cashloanflow
.
LoanOrderMapping
;
import
cn
.
quantgroup
.
cashloanflow
.
model
.
standard
.
apply
.
ApplyLoanCheckData
;
import
cn
.
quantgroup
.
cashloanflow
.
model
.
standard
.
apply
.
ApplyLoanCheckData
;
...
@@ -34,9 +34,8 @@ import cn.quantgroup.cashloanflow.util.DateUtil;
...
@@ -34,9 +34,8 @@ import cn.quantgroup.cashloanflow.util.DateUtil;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
IpUtil
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
IpUtil
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
JsonUtil
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
JsonUtil
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
loan
.
ProductUtil
;
import
cn
.
quantgroup
.
cashloanflow
.
util
.
loan
.
ProductUtil
;
import
cn
.
quantgroup
.
clf
.
api
.
jinshan
.
util
.
JinShanUtil
;
import
cn
.
quantgroup
.
loanflow
.
infrastructure
.
utils
.
ChannelUtils
;
import
cn
.
quantgroup
.
loanflow
.
exception
.
CommonBizException
;
import
cn
.
quantgroup
.
clf
.
applyloancheck
.
CheckResponse
;
import
cn
.
quantgroup
.
loanflow
.
application
.
StandardApplicationService
;
import
cn
.
quantgroup
.
loanflow
.
application
.
StandardApplicationService
;
import
cn
.
quantgroup
.
loanflow
.
application
.
model
.
ApplyLoanData
;
import
cn
.
quantgroup
.
loanflow
.
application
.
model
.
ApplyLoanData
;
import
cn
.
quantgroup
.
loanflow
.
infrastructure
.
code
.
UserCode
;
import
cn
.
quantgroup
.
loanflow
.
infrastructure
.
code
.
UserCode
;
...
@@ -100,13 +99,12 @@ import java.util.Objects;
...
@@ -100,13 +99,12 @@ import java.util.Objects;
*/
*/
@
Service
@
Service
@
Slf4j
@
Slf4j
public
class
${
prefix
}
ServiceImpl
implements
${
prefix
}
Service
,
IAsyncApplyService
{
public
class
${
prefix
}
ServiceImpl
implements
${
prefix
}
Service
{
private
static
final
String
LOG_PRE
=
"[${prefix}ServiceImpl]"
;
private
static
final
String
LOG_PRE
=
"[${prefix}ServiceImpl]"
;
@
Resource
(
name
=
"standardApplicationMoService"
)
@
Resource
(
name
=
"standardApplicationMoService"
)
private
StandardApplicationService
standardApplicationService
;
private
StandardApplicationService
standardApplicationService
;
@
Autowired
@
Autowired
private
MoOrderRepresentationService
moOrderRepresentationService
;
private
MoOrderRepresentationService
moOrderRepresentationService
;
@
Autowired
@
Autowired
...
@@ -115,11 +113,7 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -115,11 +113,7 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
private
LoanMappingService
loanMappingService
;
private
LoanMappingService
loanMappingService
;
@
Autowired
@
Autowired
private
ILoanOrderMappingService
loanOrderMappingService
;
private
ILoanOrderMappingService
loanOrderMappingService
;
@
Autowired
@
Qualifier
(
"rabbitDelaySenderImpl"
)
private
DelaySender
delaySender
;
@
Value
(
"1,30000,60000"
)
private
String
scheduleStr
;
/**
/**
*
预审
*
预审
...
@@ -127,7 +121,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -127,7 +121,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
userAccessRequest
*
@
param
userAccessRequest
*
@
return
*
@
return
*/
*/
public
String
userAccess
(${
prefix
}
UserAccessRequest
userAccessRequest
){
@
Override
public
void
userAccess
(${
prefix
}
UserAccessRequest
userAccessRequest
){
String
logPre
=
LOG_PRE
+
"[userAccess][${prefix}预审]"
;
String
logPre
=
LOG_PRE
+
"[userAccess][${prefix}预审]"
;
log
.
info
(
"{} userAccessRequest={}"
,
logPre
,
userAccessRequest
);
log
.
info
(
"{} userAccessRequest={}"
,
logPre
,
userAccessRequest
);
PretrialAuditQuery
query
=
new
PretrialAuditQuery
();
PretrialAuditQuery
query
=
new
PretrialAuditQuery
();
...
@@ -137,17 +132,11 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -137,17 +132,11 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ServiceResult
<
PretrialAuditRepresentation
>
serviceResult
=
standardApplicationService
.
queryPretrialAudit
(
query
);
ServiceResult
<
PretrialAuditRepresentation
>
serviceResult
=
standardApplicationService
.
queryPretrialAudit
(
query
);
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{},错误{}"
,
logPre
,
serviceResult
.
getMessage
());
log
.
error
(
"{},错误{}"
,
logPre
,
serviceResult
.
getMessage
());
throw
new
CommonBizException
(
"调用预审服务异常"
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
getUserAccessCode
(
serviceResult
.
getCode
().
getCode
())).
toString
();
}
}
PretrialAuditRepresentation
pretrialAuditRepresentation
=
serviceResult
.
getData
();
${
prefix
}
UserAccessResult
result
=
new
${
prefix
}
UserAccessResult
();
if
(
serviceResult
.
getData
().
getAuditResult
())
{
result
.
setAccessResult
(${
prefix
}
UserAccessResultEnum
.
CONTINUE
.
name
());
}
else
{
result
.
setAccessResult
(${
prefix
}
UserAccessResultEnum
.
BREAK
.
name
());
}
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
/**
/**
...
@@ -156,17 +145,18 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -156,17 +145,18 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
creditApply
(${
prefix
}
CreditApplyRequest
request
){
@
Override
public
void
creditApply
(${
prefix
}
CreditApplyRequest
request
){
String
logPre
=
LOG_PRE
+
"[creditApply][授信申请]"
;
String
logPre
=
LOG_PRE
+
"[creditApply][授信申请]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
ApplyLoanData
applyLoanData
=
${
prefix
}
CreditApplyRequest
.
getApplyLoanData
(
request
);
ApplyLoanData
applyLoanData
=
${
prefix
}
CreditApplyRequest
.
getApplyLoanData
(
request
);
ServiceResult
<
ApplyLoanRequestData
>
serviceResult
=
standardApplicationService
.
applyLoan
(
applyLoanData
);
ServiceResult
<
ApplyLoanRequestData
>
serviceResult
=
standardApplicationService
.
applyLoan
(
applyLoanData
);
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{},进件失败,result={}"
,
logPre
,
serviceResult
);
log
.
error
(
"{},进件失败,result={}"
,
logPre
,
serviceResult
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"调用进件服务异常"
);
}
}
${
prefix
}
CreditApplyResult
result
=
new
${
prefix
}
CreditApplyResult
(
serviceResult
.
getData
().
getApplyNo
()
);
ApplyLoanRequestData
applyResult
=
serviceResult
.
getData
(
);
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
...
@@ -178,7 +168,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -178,7 +168,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
queryCreditApply
(${
prefix
}
QueryCreditApplyRequest
request
){
@
Override
public
void
queryCreditApply
(${
prefix
}
QueryCreditApplyRequest
request
){
String
logPre
=
LOG_PRE
+
"[queryCreditApply][${prefix}查询授信结果]"
;
String
logPre
=
LOG_PRE
+
"[queryCreditApply][${prefix}查询授信结果]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
...
@@ -186,46 +177,50 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -186,46 +177,50 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ServiceResult
<
LoanOrderMapping
>
orderMappingServiceResult
=
moOrderRepresentationService
.
queryChannelOrderByOrderNoAndChannelId
(
channelOrderNo
,
channelId
);
ServiceResult
<
LoanOrderMapping
>
orderMappingServiceResult
=
moOrderRepresentationService
.
queryChannelOrderByOrderNoAndChannelId
(
channelOrderNo
,
channelId
);
if
(
!orderMappingServiceResult.isSuccess() || Objects.isNull(orderMappingServiceResult.getData())) {
if
(
!orderMappingServiceResult.isSuccess() || Objects.isNull(orderMappingServiceResult.getData())) {
log
.
error
(
"{}查询授信订单失败, result={}, request={}"
,
logPre
,
orderMappingServiceResult
,
request
);
log
.
error
(
"{}查询授信订单失败, result={}, request={}"
,
logPre
,
orderMappingServiceResult
,
request
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
orderMappingServiceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"查询授信订单失败"
);
}
}
LoanOrderMapping
orderMapping
=
orderMappingServiceResult
.
getData
();
LoanOrderMapping
orderMapping
=
orderMappingServiceResult
.
getData
();
${
prefix
}
QueryCreditApplyResult
result
=
new
${
prefix
}
QueryCreditApplyResult
();
LoanMapping
loanMapping
=
loanMappingService
.
findByOrderMappingIdAndChannelId
(
orderMapping
.
getId
(),
channelId
);
ServiceResult
<
OrderStatus
>
orderStatusServiceResult
=
standardApplicationService
.
queryOrderStatus
(
orderMapping
.
getChannelOrderNo
(),
null
,
channelId
,
null
);
String
channelLoanNo
=
null
;
if
(
loanMapping
!= null) {
channelLoanNo
=
loanMapping
.
getChannelLoanNo
();
}
ServiceResult
<
OrderStatus
>
orderStatusServiceResult
=
standardApplicationService
.
queryOrderStatus
(
orderMapping
.
getChannelOrderNo
(),
channelLoanNo
,
channelId
,
null
);
if
(
!orderStatusServiceResult.isSuccess()) {
if
(
!orderStatusServiceResult.isSuccess()) {
log
.
error
(
"{},查询订单状态错误
.
, serviceResult={}, channelOrderNo={}"
,
logPre
,
orderStatusServiceResult
,
orderMapping
.
getChannelOrderNo
());
log
.
error
(
"{},查询订单状态错误
, serviceResult={}, channelOrderNo={}"
,
logPre
,
orderStatusServiceResult
,
orderMapping
.
getChannelOrderNo
());
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
orderStatusServiceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"查询订单状态错误"
);
}
}
OrderStatus
orderStatus
=
orderStatusServiceResult
.
getData
();
OrderStatus
orderStatus
=
orderStatusServiceResult
.
getData
();
OrderStatusEnums
orderStatusEnums
=
orderStatusServiceResult
.
getData
().
getStatus
();
OrderStatusEnums
orderStatusEnums
=
orderStatusServiceResult
.
getData
().
getStatus
();
Long
updateTime
=
orderStatus
.
getUpdateTime
();
Long
updateTime
=
orderStatus
.
getUpdateTime
();
if
(
JinShanUtil
.
finalStatus
(
orderStatusEnums
))
{
if
(
ChannelUtils
.
finalStatus
(
orderStatusEnums
))
{
//
放款失败、关单、结清的订单返回授信已失效
//
放款失败、关单、结清的订单情况
result
.
setCreditResult
(${
prefix
}
CreditResultEnum
.
CREDIT_INVALID
);
result
.
setCreditExpireDate
(
DateUtil
.
format
(
updateTime
,
DateUtil
.
YYYY_MM_DD
));
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
if
(
OrderStatusEnums
.
APPROVE_ING
.
equals
(
orderStatusEnums
)
||
OrderStatusEnums
.
CREDIT_ORDER_SUBMITTING
.
equals
(
orderStatusEnums
))
{
if
(
OrderStatusEnums
.
APPROVE_ING
.
equals
(
orderStatusEnums
)
||
OrderStatusEnums
.
CREDIT_ORDER_SUBMITTING
.
equals
(
orderStatusEnums
))
{
result
.
setCreditResult
(${
prefix
}
CreditResultEnum
.
CREDIT_APPROVAL
);
//
审核中的情况
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
if
(
OrderStatusEnums
.
REJECT
.
equals
(
orderStatusEnums
))
{
if
(
OrderStatusEnums
.
REJECT
.
equals
(
orderStatusEnums
))
{
result
.
setCreditResult
(${
prefix
}
CreditResultEnum
.
REFUSE
);
//
审核拒绝的情况
result
.
setNextApplyTime
(
DateUtil
.
format
(
updateTime
*
1000
+
JinShanUtil
.
LIMIT_EXPIRE_DAY
*
DateUtil
.
ONE_DAY_MILLISECONDS
,
DateUtil
.
YYYY_MM_DD
));
result
.
setCreditInfo
(
"授信拒绝"
);
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
String
productId
=
ProductUtil
.
getProductId
(
channelId
);
String
productId
=
ProductUtil
.
getProductId
(
channelId
);
ChannelOrder
channelOrderQueryCreditStatus
=
ChannelOrder
.
builder
()
ChannelOrder
channelOrderQueryCreditStatus
=
ChannelOrder
.
builder
()
.
channelOrderNo
(
channelOrderNo
)
.
channelOrderNo
(
channelOrderNo
)
.
channelId
(
channelId
)
.
channelId
(
channelId
)
.
build
();
.
build
();
ServiceResult
<
QueryCreditStatusResponseModel
>
creditStatus
=
standardApplicationService
.
queryCreditStatus
(
channelOrderQueryCreditStatus
);
ServiceResult
<
QueryCreditStatusResponseModel
>
creditStatusServiceResult
=
standardApplicationService
.
queryCreditStatus
(
channelOrderQueryCreditStatus
);
if
(
!creditStatus.isSuccess()) {
if
(
!creditStatusServiceResult.isSuccess()) {
log
.
error
(
"{}查询失败,serviceResult={}, userId={}, productId={}"
,
logPre
,
creditStatus
,
orderMapping
.
getQgUserId
(),
productId
);
log
.
error
(
"{}查询失败,serviceResult={}, userId={}, productId={}"
,
logPre
,
creditStatusServiceResult
,
orderMapping
.
getQgUserId
(),
productId
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
creditStatus
.
getMessage
()).
toString
();
throw
new
CommonBizException
(
"查询授信订单状态服务异常"
);
}
QueryCreditStatusResponseModel
queryCreditStatusResponse
=
creditStatusServiceResult
.
getData
();
String
creditStatus
=
queryCreditStatusResponse
.
getCreditStatus
();
if
(
CreditStatusEnum
.
CANCEL_LOAN
.
getValue
().
equals
(
creditStatus
))
{
//
授信订单为取消的情况
}
}
result
=
${
prefix
}
QueryCreditApplyResult
.
getSuccessResult
(
creditStatus
.
getData
());
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
...
@@ -235,7 +230,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -235,7 +230,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
querySupportBankcards
(${
prefix
}
QuerySupportBankcardsRequest
request
){
@
Override
public
void
querySupportBankcards
(${
prefix
}
QuerySupportBankcardsRequest
request
){
String
logPre
=
LOG_PRE
+
"[querySupportBankcards][${prefix}查询支持的银行列表]"
;
String
logPre
=
LOG_PRE
+
"[querySupportBankcards][${prefix}查询支持的银行列表]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
...
@@ -246,10 +242,10 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -246,10 +242,10 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ServiceResult
<
List
<
MoSimpleBank
>>
serviceResult
=
standardApplicationService
.
querySupportBank
(
channelOrder
);
ServiceResult
<
List
<
MoSimpleBank
>>
serviceResult
=
standardApplicationService
.
querySupportBank
(
channelOrder
);
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{},查询失败,result={} param={}"
,
logPre
,
serviceResult
,
channelOrder
);
log
.
error
(
"{},查询失败,result={} param={}"
,
logPre
,
serviceResult
,
channelOrder
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"查询支持的银行列表服务异常"
);
}
}
${
prefix
}
QuerySupportBankcardsResult
result
=
${
prefix
}
QuerySupportBankcardsResult
.
getSuccessResult
(
serviceResult
.
getData
()
);
List
<
MoSimpleBank
>
supportBankList
=
serviceResult
.
getData
(
);
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
/**
/**
...
@@ -258,7 +254,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -258,7 +254,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
queryLoanTrial
(${
prefix
}
QueryLoanTrialRequest
request
){
@
Override
public
void
queryLoanTrial
(${
prefix
}
QueryLoanTrialRequest
request
){
String
logPre
=
LOG_PRE
+
"[queryLoanTrial][${prefix}查询试算数据]"
;
String
logPre
=
LOG_PRE
+
"[queryLoanTrial][${prefix}查询试算数据]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
...
@@ -269,10 +266,10 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -269,10 +266,10 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ServiceResult
<
TrialRepaymentRepresentation
>
serviceResult
=
standardApplicationService
.
trialRepayment
(
channelOrder
,
request
.
getLoanAmount
(),
request
.
getLoanTerm
());
ServiceResult
<
TrialRepaymentRepresentation
>
serviceResult
=
standardApplicationService
.
trialRepayment
(
channelOrder
,
request
.
getLoanAmount
(),
request
.
getLoanTerm
());
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{}失败,serviceResult={},request={}"
,
logPre
,
serviceResult
,
request
);
log
.
error
(
"{}失败,serviceResult={},request={}"
,
logPre
,
serviceResult
,
request
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"借款试算服务异常"
);
}
}
${
prefix
}
QueryLoanTrialResult
result
=
${
prefix
}
QueryLoanTrialResult
.
getCoverResult
(
serviceResult
.
getData
()
);
TrialRepaymentRepresentation
trialRepaymentRepresentation
=
serviceResult
.
getData
(
);
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
...
@@ -282,7 +279,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -282,7 +279,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
bindBankCardSms
(${
prefix
}
BindBankCardSmsRequest
request
){
@
Override
public
void
bindBankCardSms
(${
prefix
}
BindBankCardSmsRequest
request
){
String
logPre
=
LOG_PRE
+
"[bindBankCardSms][${prefix}绑卡发短信]"
;
String
logPre
=
LOG_PRE
+
"[bindBankCardSms][${prefix}绑卡发短信]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
...
@@ -293,10 +291,10 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -293,10 +291,10 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ServiceResult
<
BindCardVerifyInfo
>
serviceResult
=
standardApplicationService
.
bindCard
(
channelId
,
request
.
getChannelOrderNo
(),
command
);
ServiceResult
<
BindCardVerifyInfo
>
serviceResult
=
standardApplicationService
.
bindCard
(
channelId
,
request
.
getChannelOrderNo
(),
command
);
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{}错误,serviceResult={}, request={}"
,
logPre
,
serviceResult
,
request
);
log
.
error
(
"{}错误,serviceResult={}, request={}"
,
logPre
,
serviceResult
,
request
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"绑卡服务异常"
);
}
}
${
prefix
}
BindBankCardSmsResult
result
=
new
${
prefix
}
BindBankCardSmsResult
(
serviceResult
.
getData
().
getVerificationId
()
);
BindCardVerifyInfo
bindCardVerifyInfo
=
serviceResult
.
getData
(
);
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
/**
/**
...
@@ -305,7 +303,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -305,7 +303,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
verifyBindSms
(${
prefix
}
VerifyBindSmsRequest
request
){
@
Override
public
void
verifyBindSms
(${
prefix
}
VerifyBindSmsRequest
request
){
String
logPre
=
LOG_PRE
+
"[verifyBindSms][${prefix}验卡]"
;
String
logPre
=
LOG_PRE
+
"[verifyBindSms][${prefix}验卡]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
...
@@ -313,16 +312,13 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -313,16 +312,13 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
command
.
setVerificationId
(
request
.
getVerifyId
());
command
.
setVerificationId
(
request
.
getVerifyId
());
command
.
setVerificationCode
(
request
.
getSmsCode
());
command
.
setVerificationCode
(
request
.
getSmsCode
());
ServiceResult
<
BindCardConfirm
>
serviceResult
=
standardApplicationService
.
bindCardVerify
(
channelId
,
request
.
getChannelOrderNo
(),
command
);
ServiceResult
<
BindCardConfirm
>
serviceResult
=
standardApplicationService
.
bindCardVerify
(
channelId
,
request
.
getChannelOrderNo
(),
command
);
${
prefix
}
VerifyBindSmsResult
result
=
new
${
prefix
}
VerifyBindSmsResult
();
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{},错误, serviceResult={}, request={}"
,
logPre
,
serviceResult
,
request
);
log
.
error
(
"{},错误, serviceResult={}, request={}"
,
logPre
,
serviceResult
,
request
);
result
.
setSignStatus
(${
prefix
}
SignStatusEnum
.
FAIL
);
throw
new
CommonBizException
(
"验卡服务异常"
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
(),
result
).
toString
();
}
}
result
.
setSignStatus
(${
prefix
}
SignStatusEnum
.
SUCCESS
);
BindCardConfirm
bindCardConfirm
=
serviceResult
.
getData
();
result
.
setBindId
(
serviceResult
.
getData
().
getBankCardId
());
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
...
@@ -332,14 +328,15 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -332,14 +328,15 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
applyWithdraw
(${
prefix
}
ApplyLoanRequest
request
){
@
Override
public
void
applyWithdraw
(${
prefix
}
ApplyLoanRequest
request
){
String
logPre
=
LOG_PRE
+
"[applyWithdraw][${prefix}申请提现]"
;
String
logPre
=
LOG_PRE
+
"[applyWithdraw][${prefix}申请提现]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
ServiceResult
<
MoBankCardInfoOutput
>
bankInfoResult
=
moOrderRepresentationService
.
queryBankCardInfoByBindCardId
(
request
.
getBindId
());
ServiceResult
<
MoBankCardInfoOutput
>
bankInfoResult
=
moOrderRepresentationService
.
queryBankCardInfoByBindCardId
(
request
.
getBindId
());
if
(
!bankInfoResult.isSuccess()) {
if
(
!bankInfoResult.isSuccess()) {
log
.
error
(
"{},错误,bankInfoResult={} bindId={}"
,
logPre
,
bankInfoResult
,
request
.
getBindId
());
log
.
error
(
"{},错误,bankInfoResult={} bindId={}"
,
logPre
,
bankInfoResult
,
request
.
getBindId
());
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
"根据bindId未查询到银行卡信息"
).
toString
(
);
throw
new
CommonBizException
(
"查询卡信息服务异常"
);
}
}
MoBankCardInfoOutput
bankCardInfoOutput
=
bankInfoResult
.
getData
();
MoBankCardInfoOutput
bankCardInfoOutput
=
bankInfoResult
.
getData
();
WithDrawCommand
command
=
new
WithDrawCommand
();
WithDrawCommand
command
=
new
WithDrawCommand
();
...
@@ -348,15 +345,15 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -348,15 +345,15 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ChannelOrder
order
=
ChannelOrder
.
builder
()
ChannelOrder
order
=
ChannelOrder
.
builder
()
.
channelId
(
channelId
)
.
channelId
(
channelId
)
.
channelOrderNo
(
request
.
getChannelOrderNo
())
.
channelOrderNo
(
request
.
getChannelOrderNo
())
.
channelLoanNo
(
request
.
getChannelLoanNo
())
.
build
();
.
build
();
ServiceResult
<
WithdrawResult
>
serviceResult
=
standardApplicationService
.
withdraw
(
order
,
command
);
ServiceResult
<
WithdrawResult
>
serviceResult
=
standardApplicationService
.
withdraw
(
order
,
command
);
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{},申请提现失败,serviceResult={}, request={}"
,
logPre
,
serviceResult
,
command
);
log
.
error
(
"{},申请提现失败,serviceResult={}, request={}"
,
logPre
,
serviceResult
,
command
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"申请提现服务异常"
);
}
}
${
prefix
}
ApplyLoanResult
result
=
new
${
prefix
}
ApplyLoanResult
();
result
.
setLoanNo
(
serviceResult
.
getData
().
getLoanId
());
WithdrawResult
withdrawResult
=
serviceResult
.
getData
();
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
...
@@ -367,7 +364,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -367,7 +364,8 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
queryRepayResult
(${
prefix
}
QueryRepayRequest
request
){
@
Override
public
void
queryRepayResult
(${
prefix
}
QueryRepayRequest
request
){
String
logPre
=
LOG_PRE
+
"[queryRepayResult][${prefix}查询还款结果]"
;
String
logPre
=
LOG_PRE
+
"[queryRepayResult][${prefix}查询还款结果]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
...
@@ -377,7 +375,7 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -377,7 +375,7 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ServiceResult
<
QueryNormalRepayRepresentation
>
serviceResult
=
standardApplicationService
.
normalRepayResultQuery
(
channelOrder
,
request
.
getBusinessFlowNo
());
ServiceResult
<
QueryNormalRepayRepresentation
>
serviceResult
=
standardApplicationService
.
normalRepayResultQuery
(
channelOrder
,
request
.
getBusinessFlowNo
());
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{},失败,serviceResult={}, request={}"
,
logPre
,
serviceResult
,
request
);
log
.
error
(
"{},失败,serviceResult={}, request={}"
,
logPre
,
serviceResult
,
request
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"查询还款结果服务异常"
);
}
}
QueryNormalRepayRepresentation
repayResult
=
serviceResult
.
getData
();
QueryNormalRepayRepresentation
repayResult
=
serviceResult
.
getData
();
Long
loanId
=
Long
.
valueOf
(
repayResult
.
getLoanId
());
Long
loanId
=
Long
.
valueOf
(
repayResult
.
getLoanId
());
...
@@ -385,35 +383,67 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -385,35 +383,67 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
LoanMapping
loanMapping
=
loanMappingService
.
findByLoanIdAndChannelId
(
loanId
,
channelId
);
LoanMapping
loanMapping
=
loanMappingService
.
findByLoanIdAndChannelId
(
loanId
,
channelId
);
if
(
Objects
.
isNull
(
loanMapping
))
{
if
(
Objects
.
isNull
(
loanMapping
))
{
log
.
error
(
"{}通过loanId查询LoanMapping为空, loanId={}, channelId={}"
,
logPre
,
loanId
,
channelId
);
log
.
error
(
"{}通过loanId查询LoanMapping为空, loanId={}, channelId={}"
,
logPre
,
loanId
,
channelId
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
"通过loanId查询LoanMapping为空"
).
toString
(
);
throw
new
CommonBizException
(
"查询借据信息异常"
);
}
}
String
channelLoanNo
=
loanMapping
.
getChannelLoanNo
();
String
channelLoanNo
=
loanMapping
.
getChannelLoanNo
();
//
查询还款计划
//
查询还款计划
ServiceResult
<
OrderRepaymentRepresentation
>
repaymentServiceResult
=
standardApplicationService
.
repaymentPlanQueryByCycleQuota
(
loanId
);
ServiceResult
<
OrderRepaymentRepresentation
>
repaymentServiceResult
=
standardApplicationService
.
repaymentPlanQueryByCycleQuota
(
loanId
);
if
(
!repaymentServiceResult.isSuccess()) {
if
(
!repaymentServiceResult.isSuccess()) {
log
.
error
(
"{},查询还款计划返回错误或无数据,loanId={}"
,
logPre
,
loanId
);
log
.
error
(
"{},查询还款计划返回错误或无数据,loanId={}"
,
logPre
,
loanId
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
repaymentServiceResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"查询还款计划异常"
);
}
}
List
<
RepaymentPlanItem
>
repaymentPlans
=
repaymentServiceResult
.
getData
().
getRepaymentPlans
();
List
<
RepaymentPlanItem
>
repaymentPlans
=
repaymentServiceResult
.
getData
().
getRepaymentPlans
();
${
prefix
}
QueryRepayResult
result
=
${
prefix
}
QueryRepayResult
.
getSuccessResult
(
channelLoanNo
,
repayResult
,
repaymentPlans
);
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
}
/**
*
借款结果查询
*
*
@
param
request
*
@
return
*/
public
void
queryLoanResult
(${
prefix
}
QueryLoanRequest
request
){
String
logPre
=
LOG_PRE
+
"[queryLoanResult][${prefix}查询借款结果]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
String
channelLoanNo
=
request
.
getChannelLoanNo
();
LoanMapping
loanMapping
=
loanMappingService
.
findByChannelLoanNoAndChannelId
(
channelLoanNo
,
channelId
);
if
(
Objects
.
isNull
(
loanMapping
))
{
log
.
error
(
"{},查询借款订单为空,channelLoan={}"
,
logPre
,
channelLoanNo
);
throw
new
CommonBizException
(
"查询借据信息异常"
);
}
LoanOrderMapping
orderMapping
=
loanOrderMappingService
.
findById
(
loanMapping
.
getOrderMappingId
());
if
(
Objects
.
isNull
(
orderMapping
))
{
log
.
error
(
"{}查询授信订单失败, result为空, request={}"
,
logPre
,
request
);
throw
new
CommonBizException
(
"查询授信订单异常"
);
}
ServiceResult
<
OrderStatus
>
serviceResult
=
standardApplicationService
.
queryOrderStatus
(
orderMapping
.
getChannelOrderNo
(),
channelLoanNo
,
channelId
,
null
);
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{}查询订单状态失败, result={}, request={}"
,
logPre
,
serviceResult
,
request
);
throw
new
CommonBizException
(
"查询订单状态服务异常"
);
}
OrderStatus
orderStatus
=
serviceResult
.
getData
();
}
/**
/**
*
主动还款
*
主动还款
*
*
*
@
param
request
*
@
param
request
*
@
return
*
@
return
*/
*/
public
String
repayByPlan
(${
prefix
}
RepayByPlanRequest
request
){
@
Override
public
void
repayByPlan
(${
prefix
}
RepayByPlanRequest
request
){
String
logPre
=
LOG_PRE
+
"[repayByPlan][{prefix}发起主动还款]"
;
String
logPre
=
LOG_PRE
+
"[repayByPlan][{prefix}发起主动还款]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
Long
channelId
=
request
.
getChannelId
();
ServiceResult
<
MoBankCardInfoOutput
>
bankInfoResult
=
moOrderRepresentationService
.
queryBankCardInfoByBindCardId
(
request
.
getBindId
());
ServiceResult
<
MoBankCardInfoOutput
>
bankInfoResult
=
moOrderRepresentationService
.
queryBankCardInfoByBindCardId
(
request
.
getBindId
());
if
(
!bankInfoResult.isSuccess()) {
if
(
!bankInfoResult.isSuccess()) {
log
.
error
(
"{},错误,bankInfoResult={}"
,
logPre
,
bankInfoResult
);
log
.
error
(
"{},错误,bankInfoResult={}"
,
logPre
,
bankInfoResult
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
bankInfoResult
.
getMessage
()).
toString
(
);
throw
new
CommonBizException
(
"查询卡信息服务异常"
);
}
}
MoBankCardInfoOutput
bankCardInfoOutput
=
bankInfoResult
.
getData
();
MoBankCardInfoOutput
bankCardInfoOutput
=
bankInfoResult
.
getData
();
...
@@ -432,58 +462,14 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
...
@@ -432,58 +462,14 @@ public class ${prefix}ServiceImpl implements ${prefix}Service,IAsyncApplyService
ServiceResult
<
RepayResultRepresentation
>
serviceResult
=
standardApplicationService
.
normalRepayByCycleQuota
(
channelOrder
,
command
);
ServiceResult
<
RepayResultRepresentation
>
serviceResult
=
standardApplicationService
.
normalRepayByCycleQuota
(
channelOrder
,
command
);
if
(
!serviceResult.isSuccess()) {
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{},失败, serviceResult={}, channelOrder={}, NormalRepayCommand={}"
,
logPre
,
serviceResult
,
channelOrder
,
command
);
log
.
error
(
"{},失败, serviceResult={}, channelOrder={}, NormalRepayCommand={}"
,
logPre
,
serviceResult
,
channelOrder
,
command
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
serviceResult
.
getMessage
()).
toString
();
throw
new
CommonBizException
(
"还款服务异常"
);
}
${
prefix
}
RepayByPlanResult
result
=
new
${
prefix
}
RepayByPlanResult
(
serviceResult
.
getData
().
getRepaymentNo
());
return
${
prefix
}
ResultUtils
.
success
(
result
).
toString
();
}
/**
*
借款结果查询
*
*
@
param
request
*
@
return
*/
public
String
queryLoanResult
(${
prefix
}
QueryLoanRequest
request
){
String
logPre
=
LOG_PRE
+
"[queryLoanResult][${prefix}查询借款结果]"
;
log
.
info
(
"{} request={}"
,
logPre
,
request
);
Long
channelId
=
request
.
getChannelId
();
String
channelLoanNo
=
request
.
getChannelLoanNo
();
LoanMapping
loanMapping
=
loanMappingService
.
findByChannelLoanNoAndChannelId
(
channelLoanNo
,
channelId
);
if
(
Objects
.
isNull
(
loanMapping
))
{
log
.
error
(
"{},查询借款订单为空,channelLoan={}"
,
logPre
,
channelLoanNo
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
"参数错误"
).
toString
();
}
LoanOrderMapping
orderMapping
=
loanOrderMappingService
.
findById
(
loanMapping
.
getOrderMappingId
());
if
(
Objects
.
isNull
(
orderMapping
))
{
log
.
error
(
"{}查询授信订单失败, result为空, request={}"
,
logPre
,
request
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
"参数错误"
).
toString
();
}
ServiceResult
<
OrderStatus
>
serviceResult
=
standardApplicationService
.
queryOrderStatus
(
orderMapping
.
getChannelOrderNo
(),
channelLoanNo
,
channelId
,
null
);
if
(
!serviceResult.isSuccess()) {
log
.
error
(
"{}查询订单状态失败, result={}, request={}"
,
logPre
,
serviceResult
,
request
);
return
${
prefix
}
ResultUtils
.
fail
(${
prefix
}
CodeEnum
.
ERROR
.
getCode
(),
"参数错误"
).
toString
();
}
}
return
${
prefix
}
ResultUtils
.
success
(
serviceResult
.
getData
()).
toString
();
RepayResultRepresentation
repayResultRepresentation
=
serviceResult
.
getData
();
}
}
@
Override
public
ApplyLoanData
getApplyLoanData
(
Object
taskBody
)
{
${
prefix
}
CreditApplyRequest
request
=
(${
prefix
}
CreditApplyRequest
)
taskBody
;
return
${
prefix
}
CreditApplyRequest
.
getApplyLoanData
(
request
);
}
@
Override
public
void
failCallBack
(
Object
taskBody
)
{
}
@
Override
public
StandardApplicationService
getStandardApplicationService
()
{
return
standardApplicationService
;
}
}
}
\ No newline at end of file
src/main/resources/templates/code-generator/util/CodeEnum.ftl
View file @
abd84ff5
...
@@ -9,181 +9,16 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -9,181 +9,16 @@ import org.apache.commons.lang3.StringUtils;
*
@
date
${.
now
?
string
(
'yyyy-MM-dd HH:mm:ss'
)}
*
@
date
${.
now
?
string
(
'yyyy-MM-dd HH:mm:ss'
)}
*/
*/
public
enum
${
prefix
}
CodeEnum
implements
ApplicationServiceCode
{
public
enum
${
prefix
}
CodeEnum
implements
ApplicationServiceCode
{
SUCCESS
(
"100000"
,
"成功"
),
ERROR
(
"200000"
,
"异常"
),
SIGN_ERROR
(
"200001"
,
"加签失败"
),
VERIFY_SIGN_ERROR
(
"200002"
,
"验签失败"
),
DECRYPT_ERROR
(
"200003"
,
"解密失败"
),
ENCRYPTION_ERROR
(
"200004"
,
"加密失败"
),
TIME_OUT_ERROR
(
"200005"
,
"系统超时"
),
SYSTEM_ERROR
(
"200006"
,
"系统异常"
),
PARAM_ERROR
(
"200007"
,
"无效的请求参数"
),
AGREEMENT_NULL
(
"200900"
,
"查询没有数据"
),
//
准入
USER_ACCESS_NO
(
"200100"
,
"准入失败"
),
USER_REPEAT
(
"200101"
,
"重复用户"
),
//
联合注册
USER_REGISTER_ERROR
(
"200200"
,
"注册失败(非准入失败导致)"
),
USER_REGISTER_ACCESS_ERROR
(
"200201"
,
"注册失败(准入失败导致)"
),
//
绑卡
BIND_PHONE_ERROR
(
"200300"
,
"预留手机号错误"
),
BIND_IDNO_ERROR
(
"200301"
,
"身份证验证失败"
),
BIND_BANKCARDNO_ERROR
(
"200302"
,
"银行卡已绑定"
),
BIND_OVERDUE_ERROR
(
"200303"
,
"验证码过期"
),
BIND_NAME_ERROR
(
"301204"
,
"实名认证不通过"
),
BIND_NAME_AND_ID_ERROR
(
"301205"
,
"姓名身份证号码不一致"
),
BIND_BANKCARDNO_PHONE_ERROR
(
"301206"
,
"银行卡预留手机不一致"
),
BIND_BANKCARDNO_SUPPORT_ERROR
(
"301207"
,
"银行卡不支持"
),
BIND_SEND_FREQUENTLY_ERROR
(
"301208"
,
"发送短信过于频繁"
),
//
提现
;
;
@
Getter
@
Override
private
String
code
;
public
String
getCode
()
{
@
Getter
return
null
;
private
String
msg
;
${
prefix
}
CodeEnum
(
String
value
,
String
msg
)
{
this
.
code
=
value
;
this
.
msg
=
msg
;
}
}
/**
@
Override
*
预审
public
String
getMsg
()
{
*
REVIEW_USER_ERROR
(
"0100"
,
"复申用户"
),
return
null
;
*
BLACKLIST_USER_ERROR
(
"0200"
,
"黑名单用户"
),
*
EXIST_LOAN_USER_ERROR
(
"0300"
,
"在贷用户,不允许进件"
),
*
OVERDUE_ERROR
(
"0400"
,
"逾期记录"
),
*
REFUSE_ERROR
(
"0500"
,
"30天内拒绝"
),
*
EXIST_LOANING_ERROR
(
"0600"
,
"存在申请订单"
),
*
AGE_ERROR
(
"0701"
,
"年龄不符合要求"
),
*
NOT_WITHDRAW_ERROR
(
"0702"
,
"审核已通过未提现"
),
*
BLACKLIST_USERS_ERROR
(
"0703"
,
"黑名单用户"
),
*
*
@
param
code
*
@
return
*/
public
static
ApplicationServiceCode
getUserAccessCode
(
String
code
)
{
if
(
StringUtils
.
isEmpty
(
code
))
{
return
USER_ACCESS_NO
;
}
switch
(
code
)
{
case
"0300"
:
return
USER_REPEAT
;
case
"0100"
:
case
"0200"
:
case
"0400"
:
case
"0500"
:
case
"0600"
:
case
"0701"
:
case
"0702"
:
case
"0703"
:
return
USER_ACCESS_NO
;
default
:
return
USER_ACCESS_NO
;
}
}
}
/**
}
*
绑卡
*
*
@
param
code
*
@
return
*/
public
static
ApplicationServiceCode
getBindSmsCode
(
String
code
)
{
if
(
StringUtils
.
isEmpty
(
code
))
{
return
ERROR
;
}
switch
(
code
)
{
case
"0010"
:
return
ERROR
;
case
"0011"
:
return
ERROR
;
case
"0100"
:
return
ERROR
;
case
"0101"
:
return
BIND_BANKCARDNO_SUPPORT_ERROR
;
case
"0102"
:
return
BIND_PHONE_ERROR
;
case
"0103"
:
return
ERROR
;
default
:
return
ERROR
;
}
}
/**
*
验卡
*
*
@
param
code
*
@
return
*/
public
static
ApplicationServiceCode
getVerifySmsCode
(
String
code
)
{
if
(
StringUtils
.
isEmpty
(
code
))
{
return
ERROR
;
}
switch
(
code
)
{
case
"0101"
:
return
ERROR
;
case
"0010"
:
return
BIND_OVERDUE_ERROR
;
default
:
return
ERROR
;
}
}
/**
*
提现
*
200500
*
借款金额超限
*
<
p
>
*
200501
*
当日放款总额超限
*
<
p
>
*
200502
*
贷款期数不支持
*
<
p
>
*
200503
*
额度审批未通过
*
*
@
param
code
*
@
return
*/
public
static
ApplicationServiceCode
getApplyWithdraw
(
String
code
)
{
switch
(
code
)
{
case
"0003"
:
case
"1001"
:
return
ERROR
;
case
"0004"
:
return
ERROR
;
case
"0101"
:
return
ERROR
;
case
"0200"
:
return
ERROR
;
default
:
return
ERROR
;
}
}
/**
*
如果
code
==
ERROR
(
"200000"
,
"异常"
),
则取内部系统具体的错误信息
*
*
@
param
code
根据内部系统返回的
code
转换成金山的
code
*
@
param
msg
内部系统详细的
msg
*
@
return
返回给金山的
msg
*/
public
static
String
getReturnMsg
(
ApplicationServiceCode
code
,
String
msg
)
{
if
(${
prefix
}
CodeEnum
.
ERROR
.
equals
(
code
))
{
return
msg
;
}
return
code
.
getMsg
();
}
}
src/main/resources/templates/code-generator/util/ResultUtils.ftl
deleted
100644 → 0
View file @
ca6c9738
package
${
utilPackage
};
import
cn
.
quantgroup
.
loanflow
.
infrastructure
.
code
.
ApplicationServiceCode
;
import
lombok
.
Data
;
import
java
.
io
.
Serializable
;
public
class
${
prefix
}
ResultUtils
{
public
static
ResultDTO
success
(
String
msg
,
Object
data
)
{
return
new
ResultDTO
(
msg
,
data
);
}
public
static
ResultDTO
success
(
Object
data
)
{
return
new
ResultDTO
(
data
);
}
public
static
ResultDTO
success
()
{
return
new
ResultDTO
();
}
public
static
ResultDTO
fail
(
String
code
,
String
msg
,
Object
data
)
{
return
new
ResultDTO
(
code
,
msg
,
data
);
}
public
static
ResultDTO
fail
(
String
code
,
String
msg
)
{
return
new
ResultDTO
(
code
,
msg
,
null
);
}
public
static
ResultDTO
fail
(
ApplicationServiceCode
code
)
{
return
new
ResultDTO
(
code
.
getCode
(),
code
.
getMsg
(),
null
);
}
@
Data
public
static
class
ResultDTO
implements
Serializable
{
private
String
code
;
private
String
message
;
private
Object
data
;
public
ResultDTO
()
{
this
.
code
=
"100000"
;
this
.
message
=
"成功"
;
}
public
ResultDTO
(
Object
data
)
{
this
.
data
=
data
;
this
.
code
=
"100000"
;
this
.
message
=
"成功"
;
}
public
ResultDTO
(
String
msg
)
{
this
.
code
=
"100000"
;
this
.
message
=
msg
;
}
public
ResultDTO
(
String
message
,
Object
data
)
{
this
.
code
=
"100000"
;
this
.
message
=
message
;
this
.
data
=
data
;
}
public
ResultDTO
(
String
code
,
String
message
,
Object
data
)
{
this
.
code
=
code
;
this
.
message
=
message
;
this
.
data
=
data
;
}
public
boolean
checkSuccess
()
{
return
"100000"
.
equals
(
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