Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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-enterprise
Commits
7fea3c33
Commit
7fea3c33
authored
Oct 21, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
欠费提醒优化
parent
e2a615d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
20 deletions
+6
-20
BillingAccountApiServiceImpl.java
...rise/service/outer/impl/BillingAccountApiServiceImpl.java
+6
-20
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingAccountApiServiceImpl.java
View file @
7fea3c33
...
...
@@ -251,7 +251,7 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
if
(
cache
==
null
)
{
String
content
=
"您的达摩账户已欠费, 为避免您的业务受到影响,请及时<a href='"
+
config
.
getHost
()
+
"cost-center/billing-center/recharge'>充值</a>"
;
this
.
pushMessageApiService
.
pushMessage
(
enterpriseId
,
"系统消息"
,
"商户欠费"
,
content
);
send
ArrearsSms
(
enterpriseId
);
send
Sms
(
enterpriseId
,
"GICJFZX012"
);
// 待办事项
sendTotoItem
(
enterpriseId
,
"您的达摩账户已欠费"
);
RedisUtil
.
setCache
(
"message:"
+
enterpriseId
,
1
,
1L
,
TimeUnit
.
DAYS
);
...
...
@@ -261,7 +261,7 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
if
(
cache
==
null
)
{
String
content
=
"您的达摩账户余额已不足1000元,若账户欠费将中断部分正常业务,请及时<a href='"
+
config
.
getHost
()
+
"cost-center/billing-center/recharge'>充值</a>"
;
this
.
pushMessageApiService
.
pushMessage
(
enterpriseId
,
"系统消息"
,
"商户欠费"
,
content
);
send
AccountNotEnoughSms
(
enterpriseId
);
send
Sms
(
enterpriseId
,
"GICJFZX001"
);
// 待办事项
sendTotoItem
(
enterpriseId
,
"您的达摩账户余额已不足1000元"
);
RedisUtil
.
setCache
(
"message:"
+
enterpriseId
,
1
,
1L
,
TimeUnit
.
DAYS
);
...
...
@@ -278,28 +278,13 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
}
}
private
void
sendArrearsSms
(
Integer
enterpriseId
)
{
//查询所有的商户
TabEnterprise
enterprise
=
enterpriseService
.
getEnterpriseById
(
enterpriseId
);
if
(
isNotInWhiteList
(
enterpriseId
))
{
String
[]
smsArr
=
new
String
[]{
enterprise
.
getEnterpriseName
()};
ServiceResponse
<
UserDTO
>
userResult
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
);
UserDTO
userDTO
=
userResult
.
getResult
();
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GICJFZX012"
,
enterpriseId
,
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
private
void
sendAccountNotEnoughSms
(
Integer
enterpriseId
)
{
private
void
sendSms
(
Integer
enterpriseId
,
String
sceneId
)
{
TabEnterprise
enterprise
=
enterpriseService
.
getEnterpriseById
(
enterpriseId
);
if
(
isNotInWhiteList
(
enterpriseId
))
{
String
[]
smsArr
=
new
String
[]{
enterprise
.
getEnterpriseName
()};
ServiceResponse
<
UserDTO
>
userResult
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
);
UserDTO
userDTO
=
userResult
.
getResult
();
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GICJFZX001"
,
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
sceneId
,
enterpriseId
,
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
...
...
@@ -363,4 +348,4 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
return
null
;
}
}
}
\ 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