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
24e633fe
Commit
24e633fe
authored
May 27, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志
parent
c62b561a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
1 deletions
+51
-1
WxPayStrategy.java
.../gic/enterprise/service/outer/impl/pay/WxPayStrategy.java
+50
-0
PackageController.java
.../com/gic/enterprise/web/controller/PackageController.java
+1
-1
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/pay/WxPayStrategy.java
View file @
24e633fe
...
...
@@ -9,6 +9,7 @@ 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
;
...
...
@@ -17,6 +18,10 @@ import com.gic.enterprise.entity.TabBillingPayInfo;
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
;
import
com.gic.thirdparty.api.dto.ScanPayReqDataDTO
;
import
com.gic.thirdparty.api.service.Pay4WXService
;
...
...
@@ -55,6 +60,9 @@ public class WxPayStrategy implements PayStrategy {
private
EnterpriseApiService
enterpriseApiService
;
@Autowired
SmsSendApiService
smsSendApiService
;
@Autowired
private
LogApiService
logApiService
;
@Override
public
ServiceResponse
<
BillingPayInfoDTO
>
savePrePayInfo
(
OutPayDTO
outPayDTO
)
{
...
...
@@ -121,10 +129,12 @@ 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
(
"充值"
,
"账户余额"
);
break
;
case
2
:
// 短信套餐包购买
this
.
billingOrderService
.
updateBySerialNumber
(
billingPayInfo
.
getOrderSerialNumber
(),
resData
.
getTotalFeePaid
(),
BillingAuditStatusEnum
.
PASS
.
getCode
(),
resData
.
getTimeEnd
());
createLog
(
"支付"
,
"订单内容"
);
break
;
default
:
break
;
...
...
@@ -198,4 +208,44 @@ public class WxPayStrategy implements PayStrategy {
}
}
public
void
createLog
(
String
content
,
String
operationObject
)
{
doLog
(
content
,
operationObject
,
null
,
null
);
}
private
void
doLog
(
String
content
,
String
operationObject
,
Integer
relationId
,
String
projectName
)
{
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
final
SystemSetLogDTO
logDTO
=
new
SystemSetLogDTO
();
//操作时间
logDTO
.
setLogTime
(
new
Date
());
logDTO
.
setCreateTime
(
new
Date
());
//操作人
logDTO
.
setUserId
(
Long
.
valueOf
(
userDetail
.
getUserInfo
().
getUserId
()));
logDTO
.
setUserName
(
userDetail
.
getUserInfo
().
getUserName
());
//操作内容
logDTO
.
setContent
(
content
);
//为了search查询,暂时用这个字段存
logDTO
.
setInterfaceName
(
content
);
////操作对象
logDTO
.
setBusinessName
(
operationObject
);
//操作模块
if
(
relationId
!=
null
)
{
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
);
}
}
//账号(手机号)
logDTO
.
setRemark1
(
userDetail
.
getUserInfo
().
getPhoneAreaCode
());
logDTO
.
setRemark2
(
userDetail
.
getUserInfo
().
getPhoneNumber
());
logDTO
.
setEnterpriseId
(
Long
.
valueOf
(
userDetail
.
getEnterpriseInfo
().
getEnterpriseId
()));
logDTO
.
setEnterpriseName
(
userDetail
.
getEnterpriseInfo
().
getEnterpriseName
());
logApiService
.
saveSystemSetLog
(
logDTO
);
}
}
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/PackageController.java
View file @
24e633fe
...
...
@@ -95,7 +95,7 @@ public class PackageController {
}
ServiceResponse
<
Integer
>
response
=
this
.
billingOrderApiService
.
saveSmsOrderBuyNow
(
orderDTO
,
itemDTO
);
if
(
response
.
isSuccess
()){
LogUtils
.
createLog
(
"
套餐包购买"
,
qo
.
getSmsPackageName
()
);
LogUtils
.
createLog
(
"
购买短信套餐包"
,
"短信套餐包"
);
return
RestResponse
.
success
(
response
.
getResult
());
}
return
EnterpriseRestResponse
.
failure
(
response
);
...
...
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