Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
a5f4fdae
Commit
a5f4fdae
authored
Mar 27, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志记录
parent
5f7ca850
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
LicenceOrderController.java
...manage/web/controller/licence/LicenceOrderController.java
+33
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/licence/LicenceOrderController.java
View file @
a5f4fdae
...
...
@@ -24,10 +24,15 @@ import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
import
com.gic.haoban.manage.api.service.licence.LicenceOrderApiService
;
import
com.gic.haoban.manage.web.config.Config
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.log.LogRecordUserServiceImpl
;
import
com.gic.haoban.manage.web.qo.licence.LicenceOrderPageQO
;
import
com.gic.haoban.manage.web.qo.licence.LicenceOrderQO
;
import
com.gic.haoban.manage.web.vo.licence.LicenceOrderPageVO
;
import
com.gic.haoban.manage.web.vo.licence.LicenceOrderVO
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
com.gic.thirdparty.api.dto.ScanPayReqDataDTO
;
import
com.gic.thirdparty.api.dto.ScanPayResDataDTO
;
import
com.gic.thirdparty.api.service.Pay4WXService
;
...
...
@@ -96,6 +101,8 @@ public class LicenceOrderController {
* 新增或者修改订单
*/
@RequestMapping
(
"licence-order-saveOrUpdate"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
HB_LICENCE_ORDER
,
optType
=
GicLogRecordOptTypeEnum
.
HB_1004_01
,
userFunc
=
LogRecordUserServiceImpl
.
class
,
optPage
=
"购买企业微信许可账号"
)
public
RestResponse
<
String
>
saveOrUpdateLicenceOrder
(
@RequestBody
LicenceOrderQO
licenceOrderQO
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
if
(
loginUser
==
null
||
StringUtils
.
isBlank
(
loginUser
.
getEnterpriseId
()))
{
...
...
@@ -114,6 +121,14 @@ public class LicenceOrderController {
licenceOrderQDTO
.
setCreatorId
(
loginUser
.
getClerkId
());
licenceOrderQDTO
.
setCreatorName
(
loginUser
.
getClerkName
());
String
result
=
licenceOrderApiService
.
saveOrUpdateLicenceOrder
(
licenceOrderQDTO
).
getResult
();
String
time
=
""
;
if
(
licenceOrderQO
.
getTimeType
()
==
1
){
time
=
licenceOrderQO
.
getTimeValue
()+
"个月"
;
}
else
{
time
=
licenceOrderQO
.
getTimeValue
()+
"天"
;
}
String
logValue
=
"【购买企微许可账号】:企业员工账号"
+
licenceOrderQO
.
getExternalContactCount
()+
"个,时长"
+
time
;
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logValue
);
return
RestResponse
.
successResult
(
result
);
}
...
...
@@ -142,15 +157,24 @@ public class LicenceOrderController {
* 取消订单/订单已经过期
*/
@RequestMapping
(
"licence-order-cancel"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
HB_LICENCE_ORDER
,
optType
=
GicLogRecordOptTypeEnum
.
HB_1004_02
,
userFunc
=
LogRecordUserServiceImpl
.
class
,
optPage
=
"取消订单"
)
public
RestResponse
<
Boolean
>
cancelLicenceOrder
(
@RequestParam
Long
orderId
,
Integer
type
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
if
(
loginUser
==
null
||
StringUtils
.
isBlank
(
loginUser
.
getEnterpriseId
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_4
.
getCode
()),
HaoBanErrCode
.
ERR_4
.
getMsg
());
}
ServiceResponse
<
LicenceOrderDTO
>
licenceOrderDetail
=
licenceOrderApiService
.
getLicenceOrderDetail
(
orderId
,
null
);
LicenceOrderDTO
dto
=
licenceOrderDetail
.
getResult
();
if
(
null
==
dto
){
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_5
.
getCode
()),
HaoBanErrCode
.
ERR_5
.
getMsg
());
}
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
clerkName
=
loginUser
.
getClerkName
();
Boolean
result
=
licenceOrderApiService
.
updateLicenceOrderType
(
orderId
,
type
,
enterpriseId
,
wxEnterpriseId
,
clerkName
,
1
).
getResult
();
String
logValue
=
"【取消购买企微许可账号订单】:订单编号"
+
dto
.
getTransactionId
()+
",取消时间"
+
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logValue
);
return
RestResponse
.
successResult
(
result
);
}
...
...
@@ -158,15 +182,24 @@ public class LicenceOrderController {
* 订单凭证上传
*/
@RequestMapping
(
"licence-order-voucher-upload"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
HB_LICENCE_ORDER
,
optType
=
GicLogRecordOptTypeEnum
.
HB_1004_03
,
userFunc
=
LogRecordUserServiceImpl
.
class
,
optPage
=
"上传凭证"
)
public
RestResponse
<
Boolean
>
uploadLicenceOrderVoucher
(
@RequestParam
Long
orderId
,
String
voucher
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
if
(
loginUser
==
null
||
StringUtils
.
isBlank
(
loginUser
.
getEnterpriseId
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_4
.
getCode
()),
HaoBanErrCode
.
ERR_4
.
getMsg
());
}
ServiceResponse
<
LicenceOrderDTO
>
licenceOrderDetail
=
licenceOrderApiService
.
getLicenceOrderDetail
(
orderId
,
null
);
LicenceOrderDTO
dto
=
licenceOrderDetail
.
getResult
();
if
(
null
==
dto
){
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_5
.
getCode
()),
HaoBanErrCode
.
ERR_5
.
getMsg
());
}
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
clerkName
=
loginUser
.
getClerkName
();
Boolean
result
=
licenceOrderApiService
.
uploadLicenceOrderVoucher
(
orderId
,
voucher
,
enterpriseId
,
wxEnterpriseId
,
clerkName
).
getResult
();
String
logValue
=
"【上传购买企微许可账号支付凭证】:订单编号"
+
dto
.
getTransactionId
()+
",上传时间"
+
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logValue
);
return
RestResponse
.
successResult
(
result
);
}
...
...
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