订单:修改订单收货地址添加日志记录

This commit is contained in:
puhui999 2023-10-06 01:32:57 +08:00
parent 9d7285c4ed
commit 92da91a7dc
2 changed files with 6 additions and 2 deletions

View File

@ -16,6 +16,7 @@ public enum TradeOrderOperateTypeEnum {
MEMBER_CREATE(1, "用户下单"),
ADMIN_UPDATE_PRICE(2, "订单价格 {oldPayPrice} 修改,实际支付金额为 {newPayPrice} 元"),
MEMBER_PAY(10, "用户付款成功"),
SYSTEM_UP_ADDRESS(11, "订单 {orderId} 收货地址修改"),
ADMIN_DELIVERY(20, "已发货,快递公司:{deliveryName},快递单号:{logisticsNo}"),
MEMBER_RECEIVE(30, "用户已收货"),
SYSTEM_RECEIVE(31, "到期未收货,系统自动确认收货"),

View File

@ -738,16 +738,19 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
}
@Override
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.SYSTEM_UP_ADDRESS)
public void updateOrderAddress(TradeOrderUpdateAddressReqVO reqVO) {
// 校验交易订单
validateOrderExists(reqVO.getId());
TradeOrderDO order = validateOrderExists(reqVO.getId());
// TODO @puhui999是否需要校验订单是否发货
// TODO 发货后是否支持修改收货地址
// 更新
tradeOrderMapper.updateById(TradeOrderConvert.INSTANCE.convert(reqVO));
// TODO @puhui999操作日志
// 记录订单日志
TradeOrderLogUtils.setOrderInfo(order.getId(), order.getStatus(), order.getStatus(),
MapUtil.<String, Object>builder().put("orderId", order.getId()).build());
}
@Override