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
ca412e7a
Commit
ca412e7a
authored
Apr 02, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
21f17d10
39b982bc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
37 deletions
+70
-37
Constants.java
.../src/main/java/com/gic/enterprise/constant/Constants.java
+27
-6
AuditLogApiServiceImpl.java
...enterprise/service/outer/impl/AuditLogApiServiceImpl.java
+11
-11
BillingAccountApiServiceImpl.java
...rise/service/outer/impl/BillingAccountApiServiceImpl.java
+28
-16
DoubleCallingApiServiceImpl.java
...prise/service/outer/impl/DoubleCallingApiServiceImpl.java
+2
-2
RecordingStorageRecordApiServiceImpl.java
...vice/outer/impl/RecordingStorageRecordApiServiceImpl.java
+1
-1
VoiceCodeRecordApiServiceImpl.java
...ise/service/outer/impl/VoiceCodeRecordApiServiceImpl.java
+1
-1
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/Constants.java
View file @
ca412e7a
...
...
@@ -39,11 +39,6 @@ public interface Constants {
*/
String
TODO_ITEM_URL_KEY
=
"enterprise:todoItem"
;
/**
* 待办事项:审批事项的code
*/
String
TODO_ITEM_AUDIT
=
"audit"
;
String
BALANCE_PAY_REQUEST_CODE
=
"balance_pay_request_code"
;
/**
...
...
@@ -58,9 +53,35 @@ public interface Constants {
String
ENTERPRISE_BILLING_SMS_PACKAGE_COUNT_LOCK
=
"enterprise_billing_sms_package_count_lock"
;
//----------------------待办事项--------------------------------
/**
* 审批
*/
String
TODO_ITEM_AUDIT
=
"audit"
;
/**
* 账户余额不足
*/
String
TODO_ITEM_ACCOUNT_BALANCE
=
"account_balance"
;
/**
* 门店分组
*/
String
TODO_ITEM_STORE_GROUP
=
"store_group"
;
// -----------------------待办事项跳转url-------------------------------
/**
* 审批的url
*/
String
AUDIT_TODO_URL
=
"/damo-system/user/approve"
;
String
TODO_ITEM_AUDIT_URL
=
"/damo-system/user/approve"
;
/**
* 商户余额欠费
*/
String
TODO_ITEM_ACCOUNT_BALANCE_URL
=
"/billing-center/recharge"
;
/**
* 门店分组
*/
String
TODO_ITEM_STORE_GROUP_URL
=
"/damo-store/shop-management/shop-group-management"
;
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AuditLogApiServiceImpl.java
View file @
ca412e7a
...
...
@@ -139,7 +139,7 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
for
(
AuditorDTO
auditorDTO
:
auditorList
)
{
if
(
StringUtils
.
isNotBlank
(
auditorDTO
.
getOpenid
()))
{
//
todo
发送微信模板消息
// 发送微信模板消息
sendWxMessage
(
auditorDTO
,
auditLogDTO
);
}
if
(
auditorDTO
.
getUserId
()
!=
null
)
{
...
...
@@ -157,7 +157,7 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
// 事项code
todoItemDTO
.
setItemType
(
com
.
gic
.
enterprise
.
constant
.
Constants
.
TODO_ITEM_AUDIT
);
// todo 事项url
todoItemDTO
.
setItemInfoUrl
(
com
.
gic
.
enterprise
.
constant
.
Constants
.
AUDIT_TODO
_URL
+
"?auditLogId="
+
auditLogId
);
todoItemDTO
.
setItemInfoUrl
(
com
.
gic
.
enterprise
.
constant
.
Constants
.
TODO_ITEM_AUDIT
_URL
+
"?auditLogId="
+
auditLogId
);
todoItemApiService
.
saveTodoItem
(
todoItemDTO
);
}
}
...
...
@@ -165,7 +165,7 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
}
if
(
Constants
.
NORMAL_STATUS
.
equals
(
projectItem
.
getIsPlatform
()))
{
// todo 如果是平台审批项, 还要发送给实施
// todo 如果是平台审批项, 还要发送给实施
一期先不做
// sendWxMessage();
}
...
...
@@ -197,14 +197,14 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
// 记录审批流程
TabAuditProcess
auditProcess
=
getProcess
(
auditLog
,
auditLogDTO
,
projectItem
);
this
.
auditProcessService
.
save
(
auditProcess
);
//
如果是平台级审批项 要先判断是否实施和管理员都通过了
if
(
Constants
.
NORMAL_STATUS
.
equals
(
projectItem
.
getIsPlatform
()))
{
TabAuditProcess
otherTypeProcess
=
this
.
auditProcessService
.
getOtherTypeProcess
(
auditProcess
.
getEnterpriseId
(),
auditProcess
.
getAuditLogId
(),
auditProcess
.
getAuditorType
());
if
(
otherTypeProcess
==
null
)
{
// 实施和管理员没有都审批通过 直接返回
return
EnterpriseServiceResponse
.
success
();
}
}
//
todo 如果是平台级审批项 要先判断是否实施和管理员都通过了 一期先不做
//
if (Constants.NORMAL_STATUS.equals(projectItem.getIsPlatform())) {
//
TabAuditProcess otherTypeProcess = this.auditProcessService.getOtherTypeProcess(auditProcess.getEnterpriseId(), auditProcess.getAuditLogId(), auditProcess.getAuditorType());
//
if (otherTypeProcess == null) {
//
// 实施和管理员没有都审批通过 直接返回
//
return EnterpriseServiceResponse.success();
//
}
//
}
// 修改审批状态
auditLogService
.
updateAudit
(
auditLogDTO
);
// 回调
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingAccountApiServiceImpl.java
View file @
ca412e7a
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.gic.enterprise.config.Config
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.config.Config
;
import
com.gic.enterprise.constant.billing.AutoRechargeEnum
;
import
com.gic.enterprise.constant.billing.AutoRechargeRedisConstant
;
import
com.gic.enterprise.dto.BillingAccountDTO
;
import
com.gic.enterprise.dto.BillingEnterpriseSmsPackageDTO
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.SmsPackageDTO
;
import
com.gic.enterprise.dto.*
;
import
com.gic.enterprise.entity.TabBillingAccount
;
import
com.gic.enterprise.entity.TabEnterprise
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.enterprise.service.*
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
(
"billingAccountApiService"
)
public
class
BillingAccountApiServiceImpl
implements
BillingAccountApiService
{
...
...
@@ -43,6 +39,8 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
@Autowired
private
PushMessageApiService
pushMessageApiService
;
@Autowired
private
TodoItemApiService
todoItemApiService
;
@Autowired
private
Config
config
;
@Override
...
...
@@ -205,6 +203,20 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
if
(
account
.
getAccountBalance
()
<=
0
){
String
content
=
"您的GIC商户余额已欠费"
+(-
account
.
getAccountBalance
())+
"元,为了不影响业务的开展,请及时<a href='"
+
config
.
getHost
()+
"cost-center/billing-center/recharge'>充值</a>"
;
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();
}
return
ServiceResponse
.
success
(
i
);
}
else
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/DoubleCallingApiServiceImpl.java
View file @
ca412e7a
...
...
@@ -89,7 +89,7 @@ public class DoubleCallingApiServiceImpl implements DoubleCallingApiService {
// 缓存扣费
billingAccountService
.
deductAccountByCache
(
fee
,
pstnCallBillDTO
.
getEnterpriseId
());
//
todo
队列
// 队列
client
.
sendMessage
(
"doubleCallDealDbMq"
,
JSON
.
toJSONString
(
pstnCallBillDTO
));
// this.executeDatabase(JSON.toJSONString(pstnCallBillDTO));
}
catch
(
Exception
e
)
{
...
...
@@ -106,7 +106,7 @@ public class DoubleCallingApiServiceImpl implements DoubleCallingApiService {
// 缓存扣费
billingAccountService
.
deductAccountByCache
(
doubleCallingRecordDTO
.
getFee
(),
doubleCallingRecordDTO
.
getEnterpriseId
());
//
todo
队列
// 队列
// client.sendMessage("doubleCallDealDbMq", arg);
this
.
executeDatabase2
(
arg
);
}
catch
(
Exception
e
)
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/RecordingStorageRecordApiServiceImpl.java
View file @
ca412e7a
...
...
@@ -66,7 +66,7 @@ public class RecordingStorageRecordApiServiceImpl implements RecordingStorageRec
// Integer fee = accountStandardService.queryUnitFee(internationalSmsRecordDTO.getEnterpriseId(), AccountStandardEnum.SMS.getCode());
billingAccountService
.
deductAccountByCache
(
recordingStorageRecordDTO
.
getFee
(),
recordingStorageRecordDTO
.
getEnterpriseId
());
//
todo
队列
// 队列
client
.
sendMessage
(
"RecordingStorageDbMq"
,
arg
);
// this.executeDatabase(arg);
}
catch
(
Exception
e
)
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/VoiceCodeRecordApiServiceImpl.java
View file @
ca412e7a
...
...
@@ -66,7 +66,7 @@ public class VoiceCodeRecordApiServiceImpl implements VoiceCodeRecordApiService
// Integer fee = accountStandardService.queryUnitFee(internationalSmsRecordDTO.getEnterpriseId(), AccountStandardEnum.SMS.getCode());
billingAccountService
.
deductAccountByCache
(
voiceCodeRecordDTO
.
getFee
(),
voiceCodeRecordDTO
.
getEnterpriseId
());
//
todo
队列
// 队列
client
.
sendMessage
(
"VoiceCodeDbMq"
,
arg
);
// this.executeDatabase(arg);
}
catch
(
Exception
e
)
{
...
...
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