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
b26c8691
Commit
b26c8691
authored
Aug 28, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回调调整
parent
a9f6d3b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
51 deletions
+0
-51
TransferAccountsApprovalApiServiceImpl.java
...ce/outer/impl/TransferAccountsApprovalApiServiceImpl.java
+0
-51
No files found.
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/TransferAccountsApprovalApiServiceImpl.java
View file @
b26c8691
package
com
.
gic
.
finance
.
service
.
outer
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.dubbo.util.DubboContextUtil
;
import
com.gic.dubbo.util.DubboInvokeUtil
;
import
org.apache.dubbo.config.ApplicationConfig
;
import
org.apache.dubbo.config.ReferenceConfig
;
import
org.apache.dubbo.config.RegistryConfig
;
import
org.apache.dubbo.config.utils.ReferenceConfigCache
;
import
org.apache.dubbo.rpc.service.GenericService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -202,46 +193,4 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
dto
.
setApprovalStatus
(
TransferAccountApprovalStatusEnum
.
CANCEL
.
getCode
());
transferAccountsApprovalService
.
updateTransferAccountsApproval
(
dto
);
}
private
void
callBack
(
TabTransferAccountsApproval
tab
,
Double
accountAmount
,
int
status
)
{
LOGGER
.
info
(
"回调了"
);
ApplicationConfig
applicationConfig
=
new
ApplicationConfig
();
applicationConfig
.
setName
(
"dubbo-job"
);
RegistryConfig
registryConfig
=
new
RegistryConfig
();
registryConfig
.
setAddress
(
"zookeeper://10.105.220.75:2199"
);
registryConfig
.
setProtocol
(
"dubbo"
);
registryConfig
.
setId
(
"customRegistry"
);
registryConfig
.
setTimeout
(
30000
);
ReferenceConfig
<
GenericService
>
reference
=
new
ReferenceConfig
<
GenericService
>();
reference
.
setApplication
(
applicationConfig
);
reference
.
setRegistry
(
registryConfig
);
reference
.
setInterface
(
"com.gic.enterprise.service.BillingPayInfoApiService"
);
reference
.
setGeneric
(
true
);
reference
.
setCheck
(
false
);
reference
.
setAsync
(
false
);
reference
.
setTimeout
(
50000
);
reference
.
setRetries
(
0
);
reference
.
setGeneric
(
true
);
ReferenceConfigCache
cache
=
ReferenceConfigCache
.
getCache
();
GenericService
genericService
=
cache
.
get
(
reference
);
boolean
isBilling
=
tab
.
getOrderType
().
intValue
()
==
OrderTypeEnum
.
RECHARGE
.
getCode
()
||
tab
.
getOrderType
().
intValue
()
==
OrderTypeEnum
.
SHORT_MESSAGE_PACKAGE
.
getCode
();
//回调计费中心、短信套餐包
if
(
isBilling
)
{
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"orderSerialNumber"
,
tab
.
getOrderNumber
());
param
.
put
(
"buyType"
,
tab
.
getOrderType
());
param
.
put
(
"totalFeePaid"
,
accountAmount
);
param
.
put
(
"auditStatus"
,
status
);
param
.
put
(
"timeEnd"
,
new
SimpleDateFormat
(
"yyyyMMdd"
).
format
(
new
Date
()));
//DubboContextUtil.initRegistryConfig("10.105.220.75", 2199);
Object
name
=
genericService
.
$invoke
(
"offlineCallBack"
,
new
String
[]{
String
.
class
.
getName
()},
new
String
[]{
param
.
toJSONString
()});
}
}
}
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