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
e24ecea6
Commit
e24ecea6
authored
May 08, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础服务审批通过进行发短信给超级管理员
parent
0ce7f327
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
pom.xml
gic-platform-finance-service/pom.xml
+6
-0
TransferAccountsApprovalApiServiceImpl.java
...ce/outer/impl/TransferAccountsApprovalApiServiceImpl.java
+64
-0
dubbo-gic-platform-finance-service.xml
...src/main/resources/dubbo-gic-platform-finance-service.xml
+3
-0
No files found.
gic-platform-finance-service/pom.xml
View file @
e24ecea6
...
@@ -128,6 +128,12 @@
...
@@ -128,6 +128,12 @@
<artifactId>
gic-marketing-process-api
</artifactId>
<artifactId>
gic-marketing-process-api
</artifactId>
<version>
${gic-marketing-process-api}
</version>
<version>
${gic-marketing-process-api}
</version>
</dependency>
</dependency>
<!--开放平台-->
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-open-platform-api
</artifactId>
<version>
${gic-open-platform-api}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/TransferAccountsApprovalApiServiceImpl.java
View file @
e24ecea6
...
@@ -3,6 +3,13 @@ package com.gic.finance.service.outer.impl;
...
@@ -3,6 +3,13 @@ package com.gic.finance.service.outer.impl;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
com.gic.open.api.dto.ApplicationDTO
;
import
com.gic.open.api.dto.OrderDTO
;
import
com.gic.open.api.service.ApplicationApiService
;
import
com.gic.open.api.service.OrderApiService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -40,6 +47,14 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
...
@@ -40,6 +47,14 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
private
final
static
String
SERVICE_NAME
=
"转账审批"
;
private
final
static
String
SERVICE_NAME
=
"转账审批"
;
@Autowired
@Autowired
private
TransferAccountsApprovalService
transferAccountsApprovalService
;
private
TransferAccountsApprovalService
transferAccountsApprovalService
;
@Autowired
private
OrderApiService
orderApiService
;
@Autowired
private
ApplicationApiService
applicationApiService
;
@Autowired
private
SmsSendApiService
smsSendApiService
;
@Autowired
private
UserApiService
userApiService
;
/**
/**
* 发起审批
* 发起审批
...
@@ -156,6 +171,55 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
...
@@ -156,6 +171,55 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
callBack
(
tab
);
callBack
(
tab
);
transferAccountsApprovalService
.
updateTransferAccountsApproval
(
dto
);
transferAccountsApprovalService
.
updateTransferAccountsApproval
(
dto
);
//如果是商户基础服务,则进行短信发送给超级管理员
if
(
tab
.
getOrderType
().
intValue
()
==
OrderTypeEnum
.
SERVICE
.
getCode
())
{
//服务类型
String
orderNum
=
tab
.
getOrderNumber
();
ServiceResponse
<
OrderDTO
>
orderResult
=
orderApiService
.
getOrderForFinance
(
orderNum
);
if
(!
orderResult
.
isSuccess
())
{
LOGGER
.
warn
(
"财务审批通过-服务订单信息结果:{}, {}"
,
orderResult
.
getCode
(),
orderResult
.
getMessage
());
}
OrderDTO
orderDTO
=
orderResult
.
getResult
();
Long
applicationId
=
orderDTO
.
getApplicationId
();
ServiceResponse
<
ApplicationDTO
>
applicationResult
=
applicationApiService
.
getApplicationSimpleByApplicationId
(
applicationId
);
if
(!
applicationResult
.
isSuccess
())
{
LOGGER
.
warn
(
"财务审批通过-应用信息结果:{}, {}"
,
applicationResult
.
getCode
(),
applicationResult
.
getMessage
());
}
if
(
"gic"
.
equals
(
applicationResult
.
getResult
().
getModuleCode
()))
{
//是基础服务
ServiceResponse
<
UserDTO
>
userResult
=
userApiService
.
getUserByEnterpriseId
(
tab
.
getEnterpriseId
());
UserDTO
userDTO
=
userResult
.
getResult
();
Integer
relationOrderType
=
orderDTO
.
getOrderType
();
String
operationName
=
"开通"
;
switch
(
relationOrderType
)
{
case
1
:
operationName
=
"开通"
;
break
;
case
2
:
operationName
=
"续费"
;
break
;
case
3
:
operationName
=
"升级"
;
break
;
case
4
:
operationName
=
"扩容"
;
break
;
default
:
}
String
[]
smsArr
=
new
String
[]{
tab
.
getEnterpriseName
(),
operationName
};
if
(
userResult
.
isSuccess
())
{
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GICJFZX004"
,
tab
.
getEnterpriseId
(),
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
else
{
LOGGER
.
warn
(
"财务审批通过-不是基础服务"
);
}
}
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
...
gic-platform-finance-service/src/main/resources/dubbo-gic-platform-finance-service.xml
View file @
e24ecea6
...
@@ -31,4 +31,7 @@
...
@@ -31,4 +31,7 @@
<dubbo:reference
interface=
"com.gic.marketing.process.api.service.sms.SmsSendApiService"
id=
"smsSendApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.marketing.process.api.service.sms.SmsSendApiService"
id=
"smsSendApiService"
timeout=
"60000"
/>
<!--用户-->
<!--用户-->
<dubbo:reference
interface=
"com.gic.auth.service.UserApiService"
id=
"userApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.auth.service.UserApiService"
id=
"userApiService"
timeout=
"60000"
/>
<!--开放给平台订单详情-->
<dubbo:reference
interface=
"com.gic.open.api.service.OrderApiService"
id=
"orderApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.open.api.service.ApplicationApiService"
id=
"applicationApiService"
timeout=
"60000"
/>
</beans>
</beans>
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