fix(订单服务): 修复操作日志记录中的字段缺失问题
在OrderApplicationService中,添加了操作日志记录的缺失字段,包括创建者ID、创建时间、更新者ID、更新时间以及删除状态,以确保日志记录的完整性
This commit is contained in:
parent
f8379c2b74
commit
9da261afca
|
@ -1,5 +1,6 @@
|
|||
package com.agileboot.api.controller;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.agileboot.common.constant.PayApiConstants;
|
||||
import com.agileboot.common.core.base.BaseController;
|
||||
import com.agileboot.domain.cabinet.operation.command.AddCabinetCellOperationCommand;
|
||||
|
@ -53,6 +54,7 @@ public class OrderController extends BaseController {
|
|||
@PostMapping("/openCabinet/{orderId}/{orderGoodsId}")
|
||||
public ResponseDTO<?> openCabinet(@PathVariable Long orderId, @PathVariable Long orderGoodsId,
|
||||
@RequestBody AddCabinetCellOperationCommand operationCommand) {
|
||||
// log.info("openCabinet orderId: {}, orderGoodsId: {}, operationCommand: {}", orderId, orderGoodsId, JSONUtil.toJsonStr(operationCommand));
|
||||
orderApplicationService.openOrderGoodsCabinet(orderId, orderGoodsId, operationCommand);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.agileboot.domain.shop.order;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.agileboot.common.constant.PayApiConstants;
|
||||
import com.agileboot.common.core.page.PageDTO;
|
||||
import com.agileboot.common.exception.ApiException;
|
||||
|
@ -120,6 +121,11 @@ public class OrderApplicationService {
|
|||
throw new ApiException(ErrorCode.Internal.INTERNAL_ERROR, "发送指令失败");
|
||||
} finally {
|
||||
// 记录操作日志
|
||||
operationCommand.setCreatorId(0L);
|
||||
operationCommand.setCreateTime(new Date());
|
||||
operationCommand.setUpdaterId(0L);
|
||||
operationCommand.setUpdateTime(new Date());
|
||||
operationCommand.setDeleted(false);
|
||||
cellOperationModel.loadAddCommand(operationCommand);
|
||||
cellOperationModel.insert();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue