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
2d33f521
Commit
2d33f521
authored
Sep 10, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转账审批添加两个字段:回调接口路径和回调接口名称。如果需要回调
parent
5fc3a761
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
17 deletions
+59
-17
TabTransferAccountsApproval.java
...a/com/gic/finance/entity/TabTransferAccountsApproval.java
+27
-0
TransferAccountsApprovalApiServiceImpl.java
...ce/outer/impl/TransferAccountsApprovalApiServiceImpl.java
+4
-13
TabTransferAccountsApprovalMapper.xml
...in/resources/mapper/TabTransferAccountsApprovalMapper.xml
+28
-4
No files found.
gic-platform-finance-service/src/main/java/com/gic/finance/entity/TabTransferAccountsApproval.java
View file @
2d33f521
...
...
@@ -121,6 +121,16 @@ public class TabTransferAccountsApproval {
*/
private
Integer
orderType
;
/**
* 回调接口路径,例如 com.gic.enterprise.service.BillingPayInfoApiService
*/
private
String
callbackInterface
;
/**
* 回调接口名称,例如 offlineCallBack
*/
private
String
callbackMethod
;
public
Integer
getTransferApprovalId
()
{
return
transferApprovalId
;
}
...
...
@@ -304,4 +314,20 @@ public class TabTransferAccountsApproval {
public
void
setOrderType
(
Integer
orderType
)
{
this
.
orderType
=
orderType
;
}
public
String
getCallbackInterface
()
{
return
callbackInterface
;
}
public
void
setCallbackInterface
(
String
callbackInterface
)
{
this
.
callbackInterface
=
callbackInterface
;
}
public
String
getCallbackMethod
()
{
return
callbackMethod
;
}
public
void
setCallbackMethod
(
String
callbackMethod
)
{
this
.
callbackMethod
=
callbackMethod
;
}
}
\ No newline at end of file
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/TransferAccountsApprovalApiServiceImpl.java
View file @
2d33f521
package
com
.
gic
.
finance
.
service
.
outer
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -230,19 +229,11 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
private
void
callBack
(
TabTransferAccountsApproval
tab
)
{
LOGGER
.
info
(
"转账审批回调:{}"
,
JSONObject
.
toJSONString
(
tab
));
int
orderType
=
tab
.
getOrderType
().
intValue
();
boolean
isBilling
=
orderType
==
OrderTypeEnum
.
RECHARGE
.
getCode
()
||
orderType
==
OrderTypeEnum
.
SHORT_MESSAGE_PACKAGE
.
getCode
();
String
interfaceUrl
=
""
;
String
method
=
""
;
if
(
isBilling
)
{
interfaceUrl
=
"com.gic.enterprise.service.BillingPayInfoApiService"
;
method
=
"offlineCallBack"
;
}
else
if
(
orderType
==
OrderTypeEnum
.
SERVICE
.
getCode
())
{
//服务类型
interfaceUrl
=
"com.gic.open.api.service.market.PayCallbackApiService"
;
method
=
"payCallbackTransfer"
;
String
interfaceUrl
=
tab
.
getCallbackInterface
();
String
method
=
tab
.
getCallbackMethod
();
if
(
StringUtils
.
isBlank
(
interfaceUrl
)
||
StringUtils
.
isBlank
(
method
))
{
return
;
}
RegistryConfig
registry
=
new
RegistryConfig
();
...
...
gic-platform-finance-service/src/main/resources/mapper/TabTransferAccountsApprovalMapper.xml
View file @
2d33f521
...
...
@@ -25,12 +25,15 @@
<result
column=
"company_name"
jdbcType=
"VARCHAR"
property=
"companyName"
/>
<result
column=
"logo"
jdbcType=
"VARCHAR"
property=
"logo"
/>
<result
column=
"order_type"
jdbcType=
"INTEGER"
property=
"orderType"
/>
<result
column=
"callback_interface"
jdbcType=
"VARCHAR"
property=
"callbackInterface"
/>
<result
column=
"callback_method"
jdbcType=
"VARCHAR"
property=
"callbackMethod"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
transfer_approval_id, order_number, platform_type, initiator_type, initiator_name,
enterprise_id, planned_amount, bad_amount, account_amount, verify_code, approval_number,
approval_status, approval_id, approval_name, approval_time, create_time, update_time,
approval_phone, approval_phone_area_code, enterprise_name, company_name, logo, order_type
approval_phone, approval_phone_area_code, enterprise_name, company_name, logo, order_type,
callback_interface, callback_method
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -50,7 +53,7 @@
approval_status, approval_id, approval_name,
approval_time, create_time, update_time,
approval_phone, approval_phone_area_code, enterprise_name,
company_name, logo, order_type
company_name, logo, order_type
, callback_interface, callback_method
)
values (#{transferApprovalId,jdbcType=INTEGER}, #{orderNumber,jdbcType=VARCHAR},
#{platformType,jdbcType=INTEGER}, #{initiatorType,jdbcType=INTEGER}, #{initiatorName,jdbcType=VARCHAR},
...
...
@@ -59,7 +62,8 @@
#{approvalStatus,jdbcType=INTEGER}, #{approvalId,jdbcType=VARCHAR}, #{approvalName,jdbcType=VARCHAR},
#{approvalTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{approvalPhone,jdbcType=VARCHAR}, #{approvalPhoneAreaCode,jdbcType=VARCHAR}, #{enterpriseName,jdbcType=VARCHAR},
#{companyName,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}
#{companyName,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER},
#{callbackInterface,jdbcType=VARCHAR}, #{callbackMethod,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.finance.entity.TabTransferAccountsApproval"
>
...
...
@@ -134,6 +138,12 @@
<if
test=
"orderType != null"
>
order_type,
</if>
<if
test=
"callbackInterface != null"
>
callback_interface,
</if>
<if
test=
"callbackMethod != null"
>
callback_method,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"transferApprovalId != null"
>
...
...
@@ -205,6 +215,12 @@
<if
test=
"orderType != null"
>
#{orderType,jdbcType=INTEGER},
</if>
<if
test=
"callbackInterface != null"
>
#{callbackInterface,jdbcType=VARCHAR},
</if>
<if
test=
"callbackMethod != null"
>
#{callbackMethod,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.finance.entity.TabTransferAccountsApproval"
>
...
...
@@ -276,6 +292,12 @@
<if
test=
"orderType != null"
>
order_type = #{orderType,jdbcType=INTEGER},
</if>
<if
test=
"callbackInterface != null"
>
callback_interface = #{callbackInterface,jdbcType=VARCHAR},
</if>
<if
test=
"callbackMethod != null"
>
callback_method = #{callbackMethod,jdbcType=VARCHAR},
</if>
</set>
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</update>
...
...
@@ -302,7 +324,9 @@
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
order_type = #{orderType,jdbcType=INTEGER}
order_type = #{orderType,jdbcType=INTEGER},
callback_interface = #{callbackInterface,jdbcType=VARCHAR},
callback_method = #{callbackMethod,jdbcType=VARCHAR}
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</update>
...
...
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