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
03adde0a
Commit
03adde0a
authored
Apr 02, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待办事项
parent
ca412e7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
12 deletions
+35
-12
BillingAccountServiceImpl.java
...ic/enterprise/service/impl/BillingAccountServiceImpl.java
+11
-0
BillingAccountApiServiceImpl.java
...rise/service/outer/impl/BillingAccountApiServiceImpl.java
+22
-12
BillingBalancePayApiServiceImpl.java
...e/service/outer/impl/BillingBalancePayApiServiceImpl.java
+2
-0
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/BillingAccountServiceImpl.java
View file @
03adde0a
package
com
.
gic
.
enterprise
.
service
.
impl
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.enterprise.constant.Constants
;
import
com.gic.enterprise.dao.mapper.TabBillingAccountMapper
;
import
com.gic.enterprise.entity.TabBillingAccount
;
import
com.gic.enterprise.service.BillingAccountService
;
import
com.gic.enterprise.service.TodoItemService
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -21,6 +24,11 @@ public class BillingAccountServiceImpl implements BillingAccountService{
private
Logger
logger
=
LogManager
.
getLogger
(
BillingAccountServiceImpl
.
class
);
@Autowired
private
TabBillingAccountMapper
tabBillingAccountMapper
;
@Autowired
private
TodoItemService
todoItemService
;
@Autowired
private
UserApiService
userApiService
;
@Override
public
TabBillingAccount
getByEnterpriseId
(
Integer
enterpriseId
)
{
return
tabBillingAccountMapper
.
selectByEnterpriseId
(
enterpriseId
);
...
...
@@ -42,6 +50,9 @@ public class BillingAccountServiceImpl implements BillingAccountService{
TabBillingAccount
tabBillingAccount
=
tabBillingAccountMapper
.
selectByEnterpriseId
(
enterpriseId
);
double
newTotal
=
new
BigDecimal
(
tabBillingAccount
.
getAccountBalance
().
toString
()).
add
(
new
BigDecimal
(
totalFee
+
""
)).
doubleValue
();
logger
.
info
(
"商户:{}, 充值/退款前余额:{}, 充值/退款金额:{}, 充值/退款后余额:{}"
,
enterpriseId
,
tabBillingAccount
.
getAccountBalance
(),
totalFee
,
newTotal
);
UserDTO
user
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
).
getResult
();
todoItemService
.
finishTodoItem
(
enterpriseId
,
user
.
getUserId
(),
Constants
.
TODO_ITEM_ACCOUNT_BALANCE
,
Constants
.
TODO_ITEM_ACCOUNT_BALANCE_URL
);
return
tabBillingAccountMapper
.
updateAccountAfterRechargeOrRefund
(
totalFee
,
enterpriseId
);
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingAccountApiServiceImpl.java
View file @
03adde0a
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.config.Config
;
import
com.gic.enterprise.constant.Constants
;
import
com.gic.enterprise.constant.billing.AutoRechargeEnum
;
import
com.gic.enterprise.constant.billing.AutoRechargeRedisConstant
;
import
com.gic.enterprise.dto.*
;
...
...
@@ -41,6 +44,8 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
@Autowired
private
TodoItemApiService
todoItemApiService
;
@Autowired
private
UserApiService
userApiService
;
@Autowired
private
Config
config
;
@Override
...
...
@@ -205,18 +210,7 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
this
.
pushMessageApiService
.
pushMessage
(
enterpriseId
,
"产品通知"
,
"商户欠费"
,
content
);
// 待办事项
TodoItemDTO
todoItemDTO
=
new
TodoItemDTO
();
// 商户
todoItemDTO
.
setEnterpriseId
(
1111
);
// 待办事项的userId
todoItemDTO
.
setUserId
(
12
);
// 事项详情
todoItemDTO
.
setItemContent
(
"风险模式申请"
);
// 事项code 在运维后台字典配置 类目:待办事项类型
todoItemDTO
.
setItemType
(
"audit"
);
// 跳转地址 待办事项点击后要跳转的地址
todoItemDTO
.
setItemInfoUrl
(
"www.baidu.com"
);
// todoItemApiService.saveTodoItem();
sendTotoItem
(
enterpriseId
);
}
return
ServiceResponse
.
success
(
i
);
}
else
{
...
...
@@ -224,6 +218,22 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
}
}
private
void
sendTotoItem
(
Integer
enterpriseId
)
{
TodoItemDTO
todoItemDTO
=
new
TodoItemDTO
();
UserDTO
userDTO
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
).
getResult
();
// 商户
todoItemDTO
.
setEnterpriseId
(
enterpriseId
);
// 待办事项的userId
todoItemDTO
.
setUserId
(
userDTO
.
getUserId
());
// 事项详情
todoItemDTO
.
setItemContent
(
"您的GIC商户余额已欠费"
);
// 事项code 在运维后台字典配置 类目:待办事项类型
todoItemDTO
.
setItemType
(
Constants
.
TODO_ITEM_ACCOUNT_BALANCE
);
// 跳转地址 待办事项点击后要跳转的地址
todoItemDTO
.
setItemInfoUrl
(
Constants
.
TODO_ITEM_ACCOUNT_BALANCE_URL
);
todoItemApiService
.
saveTodoItem
(
todoItemDTO
);
}
private
SmsPackageDTO
getSmsPackageDict
(
String
smsCode
)
{
ServiceResponse
<
List
<
SmsPackageDTO
>>
list
=
packageApiService
.
listAllSmsPackage
();
if
(
list
.
isSuccess
())
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingBalancePayApiServiceImpl.java
View file @
03adde0a
...
...
@@ -36,6 +36,8 @@ public class BillingBalancePayApiServiceImpl implements BillingBalancePayApiServ
private
BillingRefundService
billingRefundService
;
@Autowired
private
BillingAccountService
billingAccountService
;
@Autowired
private
BillingAccountApiService
billingAccountApiService
;
@Override
public
ServiceResponse
<
Double
>
queryAccount
(
Integer
enterpriseId
)
{
...
...
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