|
|
@@ -57,27 +57,27 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public HttpResult updateOrderStatus(UpdateOrderStatusParam param) {
|
|
|
+ public void updateOrderStatus(UpdateOrderStatusParam param) {
|
|
|
log.info("更新订单状态入参:{}", JSON.toJSONString(param));
|
|
|
if (Objects.isNull(param.getUpdateBy()) || StringUtils.isBlank(param.getUpdateByName())) {
|
|
|
- return HttpResult.error("操作人信息不能为空!");
|
|
|
+ throw new BusinessException("操作人信息不能为空!");
|
|
|
}
|
|
|
KwoTradeOrder order = kwoTradeOrderService.getById(param.getTOrderId());
|
|
|
if (Objects.isNull(order)) {
|
|
|
- return HttpResult.error("订单不存在!");
|
|
|
+ throw new BusinessException("订单不存在!");
|
|
|
}
|
|
|
Integer status = param.getStatus();
|
|
|
Long updateBy = param.getUpdateBy();
|
|
|
if (Objects.equals(String.valueOf(status), DictEnum.TORDER_STATUS_6.getValue())) {
|
|
|
if (!Objects.equals(String.valueOf(status), DictEnum.TORDER_STATUS_5.getValue())) {
|
|
|
- return HttpResult.error("已完结的订单才可对账!");
|
|
|
+ throw new BusinessException("已完结的订单才可对账!");
|
|
|
}
|
|
|
} else if (Objects.equals(String.valueOf(status), DictEnum.TORDER_STATUS_7.getValue())) {
|
|
|
if (!Objects.equals(String.valueOf(status), DictEnum.TORDER_STATUS_6.getValue())) {
|
|
|
- return HttpResult.error("已对账的订单才可结算!");
|
|
|
+ throw new BusinessException("已对账的订单才可结算!");
|
|
|
}
|
|
|
} else {
|
|
|
- return HttpResult.error("非法订单状态操作!");
|
|
|
+ throw new BusinessException("非法订单状态操作!");
|
|
|
}
|
|
|
order.setStatus(status).setUpdateBy(updateBy);
|
|
|
kwoTradeOrderService.updateById(order);
|
|
|
@@ -91,7 +91,6 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
|
|
|
updateParam.setTOrderId(order.getId()).setStatus(order.getStatus()).setUpdateBy(param.getUpdateBy())
|
|
|
.setUpdateByName(param.getUpdateByName()).setUpdateTime(new Date());
|
|
|
saveMongoDb(updateParam);
|
|
|
- return HttpResult.ok();
|
|
|
}
|
|
|
|
|
|
@Override
|