Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
on-site-service
Project
Project
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
external
on-site-service
Commits
a6ef853a
Commit
a6ef853a
authored
Jul 14, 2022
by
lining
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: order log表添加操作来源
parent
5d266c16
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
34 deletions
+82
-34
ServiceOrderService.java
.../com/onsiteservice/service/order/ServiceOrderService.java
+14
-13
ServiceOrderOpSourceEnum.java
...nsiteservice/constant/enums/ServiceOrderOpSourceEnum.java
+37
-0
RecordComponent.java
...java/com/onsiteservice/dao/component/RecordComponent.java
+5
-3
ServiceOrderLog.java
...ava/com/onsiteservice/entity/service/ServiceOrderLog.java
+6
-0
ServiceOrderController.java
...vice/miniapp/controller/order/ServiceOrderController.java
+11
-10
ServiceOrderBizService.java
...service/miniapp/service/order/ServiceOrderBizService.java
+9
-8
No files found.
common/src/main/java/com/onsiteservice/service/ServiceOrderService.java
→
common/src/main/java/com/onsiteservice/service/
order/
ServiceOrderService.java
View file @
a6ef853a
package
com
.
onsiteservice
.
service
;
package
com
.
onsiteservice
.
service
.
order
;
import
com.onsiteservice.common.order.dto.DispatchServiceOrderDTO
;
import
com.onsiteservice.common.order.dto.FinishServiceOrderDTO
;
...
...
@@ -6,6 +6,7 @@ import com.onsiteservice.common.order.dto.SendServiceOrderDTO;
import
com.onsiteservice.common.order.dto.ValuationServiceOrderDTO
;
import
com.onsiteservice.constant.constant.BizConstants
;
import
com.onsiteservice.constant.enums.BizCodeEnum
;
import
com.onsiteservice.constant.enums.ServiceOrderOpSourceEnum
;
import
com.onsiteservice.constant.enums.ServiceOrderStatusEnum
;
import
com.onsiteservice.constant.enums.ServiceUserTypeEnum
;
import
com.onsiteservice.core.exception.ServiceException
;
...
...
@@ -69,7 +70,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
/**
* 指派估价员 管理员操作
*/
public
int
valuation
(
ValuationServiceOrderDTO
dto
,
Long
userId
)
{
public
int
valuation
(
ValuationServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"order valuation dto: {}, userId: {}"
,
dto
,
userId
);
User
user
=
checkAuth
(
userId
,
BizCodeEnum
.
NO_AUTH_VALUATION_ORDER
);
...
...
@@ -93,14 +94,14 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
if
(
result
==
1
)
{
String
description
=
String
.
format
(
ServiceOrderStatusEnum
.
VALUATION
.
getMsg
(),
user
.
getUserName
(),
serviceValuator
.
getName
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
VALUATION
.
getStatus
(),
description
,
serviceValuator
.
getId
(),
dto
.
getRemark
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
VALUATION
.
getStatus
(),
description
,
s
ourceEnum
,
s
erviceValuator
.
getId
(),
dto
.
getRemark
());
}
return
result
;
}
public
int
revaluation
(
ValuationServiceOrderDTO
dto
,
Long
userId
)
{
public
int
revaluation
(
ValuationServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"order revaluation dto: {}, userId: {}"
,
dto
,
userId
);
User
user
=
checkAuth
(
userId
,
BizCodeEnum
.
NO_AUTH_REVALUATION_ORDER
);
...
...
@@ -121,7 +122,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
if
(
result
==
1
)
{
String
description
=
String
.
format
(
ServiceOrderStatusEnum
.
REVALUATION
.
getMsg
(),
user
.
getUserName
(),
serviceValuator
.
getName
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
REVALUATION
.
getStatus
(),
description
,
serviceValuator
.
getId
(),
dto
.
getRemark
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
REVALUATION
.
getStatus
(),
description
,
s
ourceEnum
,
s
erviceValuator
.
getId
(),
dto
.
getRemark
());
}
return
result
;
...
...
@@ -131,7 +132,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
/**
* 发送订单 管理员操作
*/
public
int
sendOrder
(
SendServiceOrderDTO
dto
,
Long
userId
)
{
public
int
sendOrder
(
SendServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"sendOrder dto: {}, userId: {}"
,
dto
,
userId
);
// 判断发送者权限 只有客服和估价员可以发送订单
...
...
@@ -169,14 +170,14 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
if
(
result
==
1
)
{
boolean
isAdmin
=
user
.
getRoleType
().
equals
(
ServiceUserTypeEnum
.
ADMIN
.
getId
());
String
description
=
String
.
format
(
ServiceOrderStatusEnum
.
SEND
.
getMsg
(),
(
isAdmin
?
ServiceUserTypeEnum
.
ADMIN
.
getName
()
:
ServiceUserTypeEnum
.
VALUATOR
.
getName
())
+
user
.
getUserName
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
SEND
.
getStatus
(),
description
,
null
,
null
);
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
SEND
.
getStatus
(),
description
,
sourceEnum
,
null
,
null
);
}
return
result
;
}
public
int
dispatch
(
DispatchServiceOrderDTO
dto
,
Long
userId
)
{
public
int
dispatch
(
DispatchServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"order dispatch dto: {}, userId: {}"
,
dto
,
userId
);
User
user
=
checkAuth
(
userId
,
BizCodeEnum
.
NO_AUTH_DISPATCH_ORDER
);
...
...
@@ -204,14 +205,14 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
if
(
result
==
1
)
{
String
description
=
String
.
format
(
ServiceOrderStatusEnum
.
DISPATCH
.
getMsg
(),
user
.
getUserName
(),
serviceWorker
.
getName
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
DISPATCH
.
getStatus
(),
description
,
serviceWorker
.
getId
(),
dto
.
getRemark
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
DISPATCH
.
getStatus
(),
description
,
s
ourceEnum
,
s
erviceWorker
.
getId
(),
dto
.
getRemark
());
}
return
result
;
}
public
int
redispatch
(
DispatchServiceOrderDTO
dto
,
Long
userId
)
{
public
int
redispatch
(
DispatchServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"order redispatch dto: {}, userId: {}"
,
dto
,
userId
);
User
user
=
checkAuth
(
userId
,
BizCodeEnum
.
NO_AUTH_REDISPATCH_ORDER
);
...
...
@@ -236,7 +237,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
if
(
result
==
1
)
{
String
description
=
String
.
format
(
ServiceOrderStatusEnum
.
REDISPATCH
.
getMsg
(),
user
.
getUserName
(),
serviceWorker
.
getName
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
REDISPATCH
.
getStatus
(),
description
,
serviceWorker
.
getId
(),
dto
.
getRemark
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
REDISPATCH
.
getStatus
(),
description
,
s
ourceEnum
,
s
erviceWorker
.
getId
(),
dto
.
getRemark
());
}
return
result
;
...
...
@@ -246,7 +247,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
/**
* 完成
*/
public
int
finishOrder
(
FinishServiceOrderDTO
dto
,
Long
userId
)
{
public
int
finishOrder
(
FinishServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"finishOrder dto: {}, userId: {}"
,
dto
,
userId
);
ServiceOrder
serviceOrder
=
checkOrder
(
dto
.
getId
(),
null
);
...
...
@@ -271,7 +272,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
if
(
result
==
1
)
{
String
description
=
String
.
format
(
ServiceOrderStatusEnum
.
FINISH
.
getMsg
(),
isUser
?
ServiceUserTypeEnum
.
USER
.
getName
()
:
ServiceUserTypeEnum
.
ADMIN
.
getName
()
+
user
.
getUserName
());
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
FINISH
.
getStatus
(),
description
,
null
,
null
);
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
FINISH
.
getStatus
(),
description
,
sourceEnum
,
null
,
null
);
}
return
result
;
...
...
constant/src/main/java/com/onsiteservice/constant/enums/ServiceOrderOpSourceEnum.java
0 → 100644
View file @
a6ef853a
package
com
.
onsiteservice
.
constant
.
enums
;
import
lombok.Getter
;
/**
* <P>接口操作来源, db默认为APP</P>
*
* @author 李宁
* @version v1.0
* @since 2022/7/14 15:14
*/
public
enum
ServiceOrderOpSourceEnum
{
/**
* 小程序
*/
MINI_APP
(
1
,
"小程序"
),
/**
* web端
*/
WEB
(
2
,
"WEB端"
);
@Getter
private
Integer
id
;
@Getter
private
String
name
;
ServiceOrderOpSourceEnum
(
Integer
id
,
String
name
)
{
this
.
id
=
id
;
this
.
name
=
name
;
}
}
\ No newline at end of file
dao/src/main/java/com/onsiteservice/dao/component/RecordComponent.java
View file @
a6ef853a
package
com
.
onsiteservice
.
dao
.
component
;
import
com.onsiteservice.constant.enums.ServiceOrderOpSourceEnum
;
import
com.onsiteservice.dao.mapper.service.ServiceOrderImgMapper
;
import
com.onsiteservice.dao.mapper.service.ServiceOrderLogMapper
;
import
com.onsiteservice.entity.order.ServiceOrder
;
...
...
@@ -58,14 +59,15 @@ public class RecordComponent {
@Async
public
void
recordProcess
(
Long
orderId
,
Integer
processId
,
String
description
,
Long
hostId
,
String
remark
)
{
log
.
info
(
"recordProcess orderId: {}, processId: {}, description: {}, hostId: {}, remark: {}"
,
orderId
,
processId
,
description
,
hostId
,
remark
);
public
void
recordProcess
(
Long
orderId
,
Integer
processId
,
String
description
,
ServiceOrderOpSourceEnum
sourceEnum
,
Long
hostId
,
String
remark
)
{
log
.
info
(
"recordProcess orderId: {}, processId: {}, description: {},
sourceEnum: {},
hostId: {}, remark: {}"
,
orderId
,
processId
,
description
,
sourceEnum
,
hostId
,
remark
);
ServiceOrderLog
serviceOrderLog
=
new
ServiceOrderLog
();
serviceOrderLog
.
setOrderId
(
orderId
);
serviceOrderLog
.
setProcessId
(
processId
);
serviceOrderLog
.
setDescription
(
description
);
serviceOrderLog
.
setSource
(
sourceEnum
.
getId
());
serviceOrderLog
.
setHostId
(
hostId
);
serviceOrderLog
.
setRemark
(
remark
);
...
...
entity/src/main/java/com/onsiteservice/entity/service/ServiceOrderLog.java
View file @
a6ef853a
...
...
@@ -63,5 +63,11 @@ public class ServiceOrderLog implements Serializable {
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 接口发生来源
*/
@ApiModelProperty
(
"接口发生来源"
)
private
Integer
source
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
mini-app/src/main/java/com/onsiteservice/miniapp/controller/order/ServiceOrderController.java
View file @
a6ef853a
...
...
@@ -4,6 +4,7 @@ import com.onsiteservice.common.annotation.user.CurrentUserId;
import
com.onsiteservice.common.order.dto.*
;
import
com.onsiteservice.common.order.vo.ServiceOrderLogVO
;
import
com.onsiteservice.common.order.vo.ServiceOrderVO
;
import
com.onsiteservice.constant.enums.ServiceOrderOpSourceEnum
;
import
com.onsiteservice.core.result.Result
;
import
com.onsiteservice.dao.common.page.PageInfoVO
;
import
com.onsiteservice.miniapp.controller.order.dto.CancelServiceOrderDTO
;
...
...
@@ -11,7 +12,7 @@ import com.onsiteservice.miniapp.controller.order.dto.PageServiceOrderDTO;
import
com.onsiteservice.miniapp.controller.order.dto.PayServiceOrderDTO
;
import
com.onsiteservice.miniapp.controller.order.dto.ReserveServiceOrderDTO
;
import
com.onsiteservice.miniapp.service.order.ServiceOrderBizService
;
import
com.onsiteservice.service.ServiceOrderService
;
import
com.onsiteservice.service.
order.
ServiceOrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -62,19 +63,19 @@ public class ServiceOrderController {
@ApiOperation
(
value
=
"订单预约"
)
@PostMapping
(
"reserve"
)
public
Result
reserve
(
@RequestBody
@NonNull
@Validated
ReserveServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderBizService
.
reserve
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"已预约"
);
return
serviceOrderBizService
.
reserve
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"已预约"
);
}
@ApiOperation
(
value
=
"订单估价"
)
@PostMapping
(
"valuation"
)
public
Result
valuation
(
@RequestBody
@NonNull
@Validated
ValuationServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderService
.
valuation
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"估价失败"
);
return
serviceOrderService
.
valuation
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"估价失败"
);
}
@ApiOperation
(
value
=
"修改估价"
)
@PostMapping
(
"revaluation"
)
public
Result
revaluation
(
@RequestBody
@NonNull
@Validated
ValuationServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderService
.
revaluation
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"修改估价失败"
);
return
serviceOrderService
.
revaluation
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"修改估价失败"
);
}
/**
...
...
@@ -83,25 +84,25 @@ public class ServiceOrderController {
@ApiOperation
(
value
=
"发送订单"
)
@PostMapping
(
"send"
)
public
Result
valuation
(
@RequestBody
@NonNull
@Validated
SendServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderService
.
sendOrder
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"发送失败"
);
return
serviceOrderService
.
sendOrder
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"发送失败"
);
}
@ApiOperation
(
value
=
"支付订单"
)
@PostMapping
(
"pay"
)
public
Result
pay
(
@RequestBody
@NonNull
@Validated
PayServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderBizService
.
pay
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"支付失败"
);
return
serviceOrderBizService
.
pay
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"支付失败"
);
}
@ApiOperation
(
value
=
"派单"
)
@PostMapping
(
"dispatch"
)
public
Result
dispatch
(
@RequestBody
@NonNull
@Validated
DispatchServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderService
.
dispatch
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"派单失败"
);
return
serviceOrderService
.
dispatch
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"派单失败"
);
}
@ApiOperation
(
value
=
"修改派单"
)
@PostMapping
(
"redispatch"
)
public
Result
redispatch
(
@RequestBody
@NonNull
@Validated
DispatchServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderService
.
redispatch
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"修改派单失败"
);
return
serviceOrderService
.
redispatch
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"修改派单失败"
);
}
/**
...
...
@@ -110,7 +111,7 @@ public class ServiceOrderController {
@ApiOperation
(
value
=
"完成订单"
)
@PostMapping
(
"finish"
)
public
Result
finish
(
@RequestBody
@NonNull
@Validated
FinishServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderService
.
finishOrder
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"取消失败"
);
return
serviceOrderService
.
finishOrder
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"取消失败"
);
}
/**
...
...
@@ -128,7 +129,7 @@ public class ServiceOrderController {
@ApiOperation
(
value
=
"取消订单"
)
@PostMapping
(
"cancel"
)
public
Result
cancel
(
@RequestBody
@NonNull
@Validated
CancelServiceOrderDTO
dto
,
@CurrentUserId
Long
userId
)
{
return
serviceOrderBizService
.
cancelOrder
(
dto
,
userId
)
==
1
?
success
()
:
fail
(
"取消失败"
);
return
serviceOrderBizService
.
cancelOrder
(
dto
,
userId
,
ServiceOrderOpSourceEnum
.
MINI_APP
)
==
1
?
success
()
:
fail
(
"取消失败"
);
}
@ApiOperation
(
value
=
"订单流程图"
)
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/service/order/ServiceOrderBizService.java
View file @
a6ef853a
package
com
.
onsiteservice
.
miniapp
.
service
.
order
;
import
com.github.pagehelper.PageHelper
;
import
com.onsiteservice.miniapp.controller.order.dto.PayServiceOrderDTO
;
import
com.onsiteservice.common.order.vo.ServiceOrderLogVO
;
import
com.onsiteservice.common.order.vo.ServiceOrderVO
;
import
com.onsiteservice.constant.constant.BizConstants
;
import
com.onsiteservice.constant.enums.BizCodeEnum
;
import
com.onsiteservice.constant.enums.ServiceOrderOpSourceEnum
;
import
com.onsiteservice.constant.enums.ServiceOrderStatusEnum
;
import
com.onsiteservice.core.exception.ServiceException
;
import
com.onsiteservice.core.result.Result
;
...
...
@@ -22,8 +22,9 @@ import com.onsiteservice.entity.service.ServiceOrderImg;
import
com.onsiteservice.entity.service.ServiceOrderLog
;
import
com.onsiteservice.miniapp.controller.order.dto.CancelServiceOrderDTO
;
import
com.onsiteservice.miniapp.controller.order.dto.PageServiceOrderDTO
;
import
com.onsiteservice.miniapp.controller.order.dto.PayServiceOrderDTO
;
import
com.onsiteservice.miniapp.controller.order.dto.ReserveServiceOrderDTO
;
import
com.onsiteservice.service.ServiceOrderService
;
import
com.onsiteservice.service.
order.
ServiceOrderService
;
import
com.onsiteservice.util.AttrCopyUtils
;
import
com.onsiteservice.util.RandomUtils
;
import
com.onsiteservice.util.aliyun.SmsUtils
;
...
...
@@ -101,7 +102,7 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> {
}
public
int
reserve
(
ReserveServiceOrderDTO
dto
,
Long
userId
)
{
public
int
reserve
(
ReserveServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"order reserve dto: {}, userId: {}"
,
dto
,
userId
);
ServiceSubclass
serviceSubclass
=
serviceSubclassMapper
.
selectByPrimaryKey
(
dto
.
getSubclassId
());
...
...
@@ -139,14 +140,14 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> {
// 记录流程
if
(
result
==
1
)
{
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
RESERVE
.
getStatus
(),
ServiceOrderStatusEnum
.
RESERVE
.
getMsg
(),
null
,
null
);
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
RESERVE
.
getStatus
(),
ServiceOrderStatusEnum
.
RESERVE
.
getMsg
(),
sourceEnum
,
null
,
null
);
}
return
result
;
}
public
int
pay
(
PayServiceOrderDTO
dto
,
Long
userId
)
{
public
int
pay
(
PayServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"order pay dto: {}, userId: {}"
,
dto
,
userId
);
// 判断能发送的状态
...
...
@@ -163,14 +164,14 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> {
// TODO 调用微信支付接口
if
(
result
==
1
)
{
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
PAY
.
getStatus
(),
ServiceOrderStatusEnum
.
PAY
.
getMsg
(),
null
,
null
);
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
PAY
.
getStatus
(),
ServiceOrderStatusEnum
.
PAY
.
getMsg
(),
sourceEnum
,
null
,
null
);
}
return
result
;
}
public
int
cancelOrder
(
CancelServiceOrderDTO
dto
,
Long
userId
)
{
public
int
cancelOrder
(
CancelServiceOrderDTO
dto
,
Long
userId
,
ServiceOrderOpSourceEnum
sourceEnum
)
{
log
.
info
(
"cancelOrder dto: {}, userId: {}"
,
dto
,
userId
);
ServiceOrder
serviceOrder
=
serviceOrderService
.
checkOrder
(
dto
.
getId
(),
userId
);
...
...
@@ -186,7 +187,7 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> {
int
result
=
serviceOrderMapper
.
updateByPrimaryKeySelective
(
serviceOrder
);
if
(
result
==
1
)
{
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
CANCEL
.
getStatus
(),
ServiceOrderStatusEnum
.
CANCEL
.
getMsg
(),
null
,
null
);
recordComponent
.
recordProcess
(
serviceOrder
.
getId
(),
ServiceOrderStatusEnum
.
CANCEL
.
getStatus
(),
ServiceOrderStatusEnum
.
CANCEL
.
getMsg
(),
sourceEnum
,
null
,
null
);
}
return
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