Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-finance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
base_platform_enterprise
gic-platform-finance
Commits
be3b3d30
Commit
be3b3d30
authored
Sep 12, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提现回调函数填写
parent
a4ad9cff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
0 deletions
+52
-0
CashWithdrawalApiServiceImpl.java
...ance/service/outer/impl/CashWithdrawalApiServiceImpl.java
+7
-0
AsynCallbackUtils.java
...src/main/java/com/gic/finance/util/AsynCallbackUtils.java
+43
-0
TabCashWithdrawalMapper.xml
...ice/src/main/resources/mapper/TabCashWithdrawalMapper.xml
+2
-0
No files found.
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/CashWithdrawalApiServiceImpl.java
View file @
be3b3d30
...
@@ -2,6 +2,7 @@ package com.gic.finance.service.outer.impl;
...
@@ -2,6 +2,7 @@ package com.gic.finance.service.outer.impl;
import
java.util.Date
;
import
java.util.Date
;
import
com.gic.finance.util.AsynCallbackUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -101,6 +102,9 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
...
@@ -101,6 +102,9 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
record
.
setCashWithdrawalStatus
(
WithdrawalStatusEnum
.
REJECT
.
getCode
());
record
.
setCashWithdrawalStatus
(
WithdrawalStatusEnum
.
REJECT
.
getCode
());
record
.
setRejectReason
(
rejectReason
);
record
.
setRejectReason
(
rejectReason
);
cashWithdrawalService
.
update
(
record
);
cashWithdrawalService
.
update
(
record
);
//回调
AsynCallbackUtils
.
callBack
(
record
,
"com.gic.open.api.service.market.PayCallbackApiService"
,
"callbackWithdraw"
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
@@ -128,6 +132,9 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
...
@@ -128,6 +132,9 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
record
.
setBankSerialNumber
(
bankSerialNumber
);
record
.
setBankSerialNumber
(
bankSerialNumber
);
record
.
setCashWithdrawalStatus
(
WithdrawalStatusEnum
.
COMPLETE
.
getCode
());
record
.
setCashWithdrawalStatus
(
WithdrawalStatusEnum
.
COMPLETE
.
getCode
());
cashWithdrawalService
.
update
(
record
);
cashWithdrawalService
.
update
(
record
);
//回调
AsynCallbackUtils
.
callBack
(
record
,
"com.gic.open.api.service.market.PayCallbackApiService"
,
"callbackWithdraw"
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
...
gic-platform-finance-service/src/main/java/com/gic/finance/util/AsynCallbackUtils.java
0 → 100644
View file @
be3b3d30
package
com
.
gic
.
finance
.
util
;
import
org.apache.dubbo.config.ReferenceConfig
;
import
org.apache.dubbo.config.RegistryConfig
;
import
org.apache.dubbo.rpc.service.GenericService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
com.alibaba.fastjson.JSONObject
;
/**
* 回调方法工具
* @ClassName: AsynCallbackUtils
* @Description:
* @author guojuxing
* @date 2019/9/12 1:52 PM
*/
public
class
AsynCallbackUtils
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
AsynCallbackUtils
.
class
);
/**
* 回调
* @Title: callBack
* @Description:
* @author guojuxing
* @param obj 需要传递的参数对象
* @param interfaceUrl 接口路径 例如com.gic.open.api.service.market.PayCallbackApiService
* @param method 方法名称 payCallbackTransfer
* @return void
*/
public
static
void
callBack
(
Object
obj
,
String
interfaceUrl
,
String
method
)
{
LOGGER
.
info
(
"转账审批回调:{},接口路径:{},接口方法名称:{}"
,
JSONObject
.
toJSONString
(
obj
),
interfaceUrl
,
method
);
RegistryConfig
registry
=
new
RegistryConfig
();
registry
.
setAddress
(
"zookeeper://10.105.220.75:2199"
);
registry
.
setCheck
(
false
);
ReferenceConfig
<
GenericService
>
reference
=
new
ReferenceConfig
<>();
reference
.
setInterface
(
interfaceUrl
);
reference
.
setRegistry
(
registry
);
reference
.
setGeneric
(
true
);
GenericService
genericService
=
reference
.
get
();
genericService
.
$invoke
(
method
,
new
String
[]{
String
.
class
.
getName
()},
new
String
[]{
JSONObject
.
toJSONString
(
obj
)});
}
}
gic-platform-finance-service/src/main/resources/mapper/TabCashWithdrawalMapper.xml
View file @
be3b3d30
...
@@ -369,5 +369,6 @@
...
@@ -369,5 +369,6 @@
<if
test=
"applyType != null"
>
<if
test=
"applyType != null"
>
and apply_type = #{applyType}
and apply_type = #{applyType}
</if>
</if>
order by create_time desc
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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