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
0ce7f327
Commit
0ce7f327
authored
May 08, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申请开票发送短信
parent
5df4192f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
0 deletions
+53
-0
pom.xml
gic-platform-finance-service/pom.xml
+5
-0
InvoiceManageApiServiceImpl.java
...nance/service/outer/impl/InvoiceManageApiServiceImpl.java
+43
-0
dubbo-gic-platform-finance-service.xml
...src/main/resources/dubbo-gic-platform-finance-service.xml
+5
-0
No files found.
gic-platform-finance-service/pom.xml
View file @
0ce7f327
...
...
@@ -123,6 +123,11 @@
<artifactId>
gic-open-platform-api
</artifactId>
<version>
${gic-open-platform-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-marketing-process-api
</artifactId>
<version>
${gic-marketing-process-api}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/InvoiceManageApiServiceImpl.java
View file @
0ce7f327
...
...
@@ -2,6 +2,9 @@ package com.gic.finance.service.outer.impl;
import
java.util.Date
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -35,6 +38,10 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
private
InvoiceManageService
invoiceManageService
;
@Autowired
private
InvoiceAccountService
invoiceAccountService
;
@Autowired
private
SmsSendApiService
smsSendApiService
;
@Autowired
private
UserApiService
userApiService
;
public
ServiceResponse
<
String
>
applyInvoiceInit
(
InvoiceManageDTO
invoiceManageDTO
)
{
ServiceResponse
paramResponse
=
ValidParamsUtils
.
allCheckValidate
(
invoiceManageDTO
,
...
...
@@ -119,6 +126,8 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
AsyncCallbackUtils
.
callBack
(
callbackDTO
,
"com.gic.open.api.service.market.InvoiceCallbackApiService"
,
"invoiceCallback"
);
}
sendSms
(
tabInvoiceManage
,
"GICJFZX010"
);
return
ServiceResponse
.
success
();
}
...
...
@@ -147,6 +156,8 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
AsyncCallbackUtils
.
callBack
(
callbackDTO
,
"com.gic.open.api.service.market.InvoiceCallbackApiService"
,
"invoiceCallback"
);
}
sendSms
(
tabInvoiceManage
,
"GICJFZX011"
);
return
ServiceResponse
.
success
();
}
...
...
@@ -204,4 +215,36 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
dto
.
setOperatorPhone
(
userInfo
.
getUserMobile
());
dto
.
setOperatorTime
(
new
Date
());
}
private
void
sendSms
(
TabInvoiceManage
tabInvoiceManage
,
String
smsSceneId
)
{
if
(
StringUtils
.
isNotBlank
(
tabInvoiceManage
.
getExpressMailName
()))
{
//如果是计费中心,则发起人数据 就是用户ID
if
(
StringUtils
.
isNotBlank
(
tabInvoiceManage
.
getInitiator
()))
{
Integer
userId
=
Integer
.
parseInt
(
tabInvoiceManage
.
getInitiator
());
ServiceResponse
<
UserDTO
>
userResponse
=
userApiService
.
getUserById
(
userId
);
if
(!
userResponse
.
isSuccess
())
{
LOGGER
.
warn
(
"发票审批完成发送短信:{},{}"
,
userResponse
.
getCode
(),
userResponse
.
getMessage
());
}
UserDTO
userDTO
=
userResponse
.
getResult
();
String
[]
smsArr
=
null
;
if
(
"GICJFZX010"
.
equals
(
smsSceneId
))
{
smsArr
=
new
String
[]{
tabInvoiceManage
.
getEnterpriseName
(),
tabInvoiceManage
.
getInvoiceApplySerial
(),
tabInvoiceManage
.
getExpressMailName
(),
tabInvoiceManage
.
getExpressMailNumber
()};
}
else
if
(
"GICJFZX011"
.
equals
(
smsSceneId
))
{
smsArr
=
new
String
[]{
tabInvoiceManage
.
getEnterpriseName
(),
tabInvoiceManage
.
getInvoiceApplySerial
(),
tabInvoiceManage
.
getRejectReason
()};
}
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
smsSceneId
,
tabInvoiceManage
.
getEnterpriseId
(),
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
}
}
gic-platform-finance-service/src/main/resources/dubbo-gic-platform-finance-service.xml
View file @
0ce7f327
...
...
@@ -26,4 +26,9 @@
<!--提现管理-->
<dubbo:service
interface=
"com.gic.finance.service.CashWithdrawalApiService"
ref=
"cashWithdrawalApiService"
timeout=
"6000"
/>
<!--短信发送-->
<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"
/>
</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