fix(security): 工单取消日志区分操作来源
根据 operatorType 区分日志描述: - SYSTEM → "系统自动取消(原因)" - ADMIN → "管理员手动取消(原因)" - 其他 → "安保工单已取消(原因)" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -258,12 +258,23 @@ public class SecurityOrderEventListener {
|
||||
|
||||
private void handleCancelled(Long orderId, OrderStateChangedEvent event) {
|
||||
Long operatorId = event.getOperatorId();
|
||||
OperatorTypeEnum operatorType = event.getOperatorType();
|
||||
String remark = event.getRemark();
|
||||
String message = "安保工单已取消";
|
||||
if (remark != null && !remark.isEmpty()) {
|
||||
message += "(" + remark + ")";
|
||||
|
||||
// 区分取消来源
|
||||
String source;
|
||||
if (operatorType == OperatorTypeEnum.SYSTEM) {
|
||||
source = "系统自动取消";
|
||||
} else if (operatorType == OperatorTypeEnum.ADMIN) {
|
||||
source = "管理员手动取消";
|
||||
} else {
|
||||
source = "安保工单已取消";
|
||||
}
|
||||
|
||||
String message = remark != null && !remark.isEmpty()
|
||||
? source + "(" + remark + ")"
|
||||
: source;
|
||||
|
||||
recordLog(EventDomain.DISPATCH, LogType.ORDER_CANCELLED, message, orderId, operatorId);
|
||||
|
||||
// 取消后自动派发下一个等待工单
|
||||
|
||||
Reference in New Issue
Block a user