订单管理

This commit is contained in:
gaowdong 2025-06-06 10:15:47 +08:00
parent cbe0db51ec
commit 8ecc17b6cc
3 changed files with 5 additions and 5 deletions

View File

@ -167,7 +167,7 @@ public class OrderInfoController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult refund(@PathVariable("orderId") Long orderId) public AjaxResult refund(@PathVariable("orderId") Long orderId)
{ {
orderInfoService.refund(orderId, StringUtils.EMPTY); orderInfoService.refund(orderId, StringUtils.EMPTY, true);
return AjaxResult.success(); return AjaxResult.success();
} }
@ -177,7 +177,7 @@ public class OrderInfoController extends BaseController
public AjaxResult deviceRefund(@RequestBody @Valid DeviceRefundParam param) public AjaxResult deviceRefund(@RequestBody @Valid DeviceRefundParam param)
{ {
OrderInfo orderInfo = orderInfoService.selectOrderInfoBydeviceOrderId(param.getDeviceOrderId()); OrderInfo orderInfo = orderInfoService.selectOrderInfoBydeviceOrderId(param.getDeviceOrderId());
orderInfoService.refund(orderInfo.getOrderId(), param.getOperationUser()); orderInfoService.refund(orderInfo.getOrderId(), param.getOperationUser(), false);
return AjaxResult.success(); return AjaxResult.success();
} }

View File

@ -66,7 +66,7 @@ public interface IOrderInfoService
*/ */
public int deleteOrderInfoByOrderId(Long orderId); public int deleteOrderInfoByOrderId(Long orderId);
public void refund(Long orderId, String operationUser); public void refund(Long orderId, String operationUser, boolean isSendDeviceRefundMQ);
public void pay(Long orderId); public void pay(Long orderId);
List<OrderRefundHistoryVO> orderRefundHistory(OrderRefundHistoryParam param); List<OrderRefundHistoryVO> orderRefundHistory(OrderRefundHistoryParam param);
public void writeOffOrderByOrderIds(OrderWriteOffParam param); public void writeOffOrderByOrderIds(OrderWriteOffParam param);

View File

@ -358,7 +358,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
@Override @Override
@Transactional(rollbackFor = {Exception.class}) @Transactional(rollbackFor = {Exception.class})
public void refund(Long orderId, String operationUser) { public void refund(Long orderId, String operationUser, boolean isSendDeviceRefundMQ) {
if(Objects.isNull(orderId) || orderId <= 0) { if(Objects.isNull(orderId) || orderId <= 0) {
throw new ServiceException("订单ID不能为空"); throw new ServiceException("订单ID不能为空");
} }
@ -427,7 +427,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
String jsonString = JacksonUtil.writeValueAsString(bean); String jsonString = JacksonUtil.writeValueAsString(bean);
log.info("账户变动发送mq内容{}", jsonString); log.info("账户变动发送mq内容{}", jsonString);
MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4); MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4);
if(StringUtils.isNotBlank(orderInfo.getDeviceOrderId())) { if(StringUtils.isNotBlank(orderInfo.getDeviceOrderId()) && isSendDeviceRefundMQ) {
DeviceRefundOrderBO deviceRefundOrderBO = new DeviceRefundOrderBO(); DeviceRefundOrderBO deviceRefundOrderBO = new DeviceRefundOrderBO();
deviceRefundOrderBO.setDeviceOrderId(orderInfo.getDeviceOrderId()); deviceRefundOrderBO.setDeviceOrderId(orderInfo.getDeviceOrderId());
String deviceJsonString = JacksonUtil.writeValueAsString(deviceRefundOrderBO); String deviceJsonString = JacksonUtil.writeValueAsString(deviceRefundOrderBO);