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
55fc946b
Commit
55fc946b
authored
May 27, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志
parent
24e633fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
WxPayStrategy.java
.../gic/enterprise/service/outer/impl/pay/WxPayStrategy.java
+23
-21
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/pay/WxPayStrategy.java
View file @
55fc946b
...
...
@@ -9,17 +9,15 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.enterprise.constant.BillingAuditStatusEnum
;
import
com.gic.enterprise.constant.PayTypeEnum
;
import
com.gic.enterprise.context.RequestContext
;
import
com.gic.enterprise.dto.ApprovalCallBackDTO
;
import
com.gic.enterprise.dto.BillingPayInfoDTO
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.OutPayDTO
;
import
com.gic.enterprise.entity.TabBillingPayInfo
;
import
com.gic.enterprise.entity.TabBillingRechargeRecord
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.*
;
import
com.gic.enterprise.utils.CreateRandomUtils
;
import
com.gic.enterprise.utils.UserDetail
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.log.api.dto.SystemSetLogDTO
;
import
com.gic.log.api.service.LogApiService
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
...
...
@@ -129,12 +127,16 @@ public class WxPayStrategy implements PayStrategy {
billingRechargeRecordService
.
updateBySerialNumber
(
resData
.
getEnterpriseId
(),
billingPayInfo
.
getOrderSerialNumber
(),
resData
.
getTotalFeePaid
(),
resData
.
getTotalFeePaid
(),
BillingAuditStatusEnum
.
PASS
.
getCode
(),
resData
.
getTimeEnd
(),
resData
.
getOnlineSerialNumber
());
this
.
pushMessageApiService
.
pushMessage
(
resData
.
getEnterpriseId
(),
"系统通知"
,
"余额充值"
,
"您的商户成功充值"
+
resData
.
getTotalFeePaid
()+
"元!感谢您的支持和使用!"
);
sendRechargeSuccessSms
(
resData
,
billingPayInfo
.
getEnterpriseId
());
createLog
(
"充值"
,
"账户余额"
);
TabBillingRechargeRecord
rechargeRecord
=
billingRechargeRecordService
.
getRechargeRecordBySerialNumber
(
billingPayInfo
.
getOrderSerialNumber
());
UserDTO
userDTO
=
userApiService
.
getUserById
(
rechargeRecord
.
getInitiatorUser
()).
getResult
();
createLog
(
"充值"
,
"账户余额"
,
userDTO
);
break
;
case
2
:
// 短信套餐包购买
this
.
billingOrderService
.
updateBySerialNumber
(
billingPayInfo
.
getOrderSerialNumber
(),
resData
.
getTotalFeePaid
(),
BillingAuditStatusEnum
.
PASS
.
getCode
(),
resData
.
getTimeEnd
());
createLog
(
"支付"
,
"订单内容"
);
TabBillingRechargeRecord
rechargeRecord2
=
billingRechargeRecordService
.
getRechargeRecordBySerialNumber
(
billingPayInfo
.
getOrderSerialNumber
());
UserDTO
userDTO2
=
userApiService
.
getUserById
(
rechargeRecord2
.
getInitiatorUser
()).
getResult
();
createLog
(
"支付"
,
"订单内容"
,
userDTO2
);
break
;
default
:
break
;
...
...
@@ -208,19 +210,18 @@ public class WxPayStrategy implements PayStrategy {
}
}
public
void
createLog
(
String
content
,
String
operationObject
)
{
doLog
(
content
,
operationObject
,
null
,
null
);
public
void
createLog
(
String
content
,
String
operationObject
,
UserDTO
userDTO
)
{
doLog
(
content
,
operationObject
,
null
,
null
,
userDTO
);
}
private
void
doLog
(
String
content
,
String
operationObject
,
Integer
relationId
,
String
projectName
)
{
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
private
void
doLog
(
String
content
,
String
operationObject
,
Integer
relationId
,
String
projectName
,
UserDTO
userDTO
)
{
final
SystemSetLogDTO
logDTO
=
new
SystemSetLogDTO
();
//操作时间
logDTO
.
setLogTime
(
new
Date
());
logDTO
.
setCreateTime
(
new
Date
());
//操作人
logDTO
.
setUserId
(
Long
.
valueOf
(
userD
etail
.
getUserInfo
()
.
getUserId
()));
logDTO
.
setUserName
(
userD
etail
.
getUserInfo
()
.
getUserName
());
logDTO
.
setUserId
(
Long
.
valueOf
(
userD
TO
.
getUserId
()));
logDTO
.
setUserName
(
userD
TO
.
getUserName
());
//操作内容
logDTO
.
setContent
(
content
);
//为了search查询,暂时用这个字段存
...
...
@@ -232,19 +233,20 @@ public class WxPayStrategy implements PayStrategy {
logDTO
.
setRelationId
(
Long
.
valueOf
(
relationId
));
logDTO
.
setProject
(
projectName
);
}
else
{
String
moduleMenuName
=
(
String
)
RequestContext
.
getContext
().
getRequest
().
getAttribute
(
"moduleMenuName"
);
Integer
moduleMenuId
=
(
Integer
)
RequestContext
.
getContext
().
getRequest
().
getAttribute
(
"moduleMenuId"
);
if
(
moduleMenuId
!=
null
)
{
logDTO
.
setRelationId
(
Long
.
valueOf
(
moduleMenuId
));
logDTO
.
setProject
(
moduleMenuName
);
}
//
String moduleMenuName = (String) RequestContext.getContext().getRequest().getAttribute("moduleMenuName");
//
Integer moduleMenuId = (Integer) RequestContext.getContext().getRequest().getAttribute("moduleMenuId");
//
if (moduleMenuId != null) {
//
logDTO.setRelationId(Long.valueOf(moduleMenuId));
logDTO
.
setProject
(
"企业-计费中心"
);
//
}
}
//账号(手机号)
logDTO
.
setRemark1
(
userD
etail
.
getUserInfo
()
.
getPhoneAreaCode
());
logDTO
.
setRemark2
(
userD
etail
.
getUserInfo
()
.
getPhoneNumber
());
logDTO
.
setRemark1
(
userD
TO
.
getPhoneAreaCode
());
logDTO
.
setRemark2
(
userD
TO
.
getPhoneNumber
());
logDTO
.
setEnterpriseId
(
Long
.
valueOf
(
userDetail
.
getEnterpriseInfo
().
getEnterpriseId
()));
logDTO
.
setEnterpriseName
(
userDetail
.
getEnterpriseInfo
().
getEnterpriseName
());
logDTO
.
setEnterpriseId
(
userDTO
.
getEnterpriseId
().
longValue
());
EnterpriseDTO
enterpriseDTO
=
enterpriseApiService
.
getEnterpriseById
(
userDTO
.
getEnterpriseId
()).
getResult
();
logDTO
.
setEnterpriseName
(
enterpriseDTO
.
getEnterpriseName
());
logApiService
.
saveSystemSetLog
(
logDTO
);
}
...
...
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