- 添加退货详情
This commit is contained in:
@@ -85,7 +85,7 @@ public class OrderController {
|
||||
remark, HttpUtil.getIp(request),
|
||||
cartItems, couponCardId);
|
||||
// 创建订单
|
||||
CommonResult<OrderCreateBO> createResult= orderService.createOrder(orderCreateDTO);
|
||||
CommonResult<OrderCreateBO> createResult = orderService.createOrder(orderCreateDTO);
|
||||
if (createResult.isError()) {
|
||||
return CommonResult.error(createResult);
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class OrderController {
|
||||
CommonResult<OrderInfoBO> commonResult = orderService.info(userId, orderId);
|
||||
|
||||
OrderInfoBO orderInfoBO = commonResult.getData();
|
||||
if(orderInfoBO != null) {
|
||||
if (orderInfoBO != null) {
|
||||
CommonResult<DataDictBO> dictResult = dataDictService
|
||||
.getDataDict(DictKeyConstants.ORDER_STATUS, orderInfoBO.getStatus());
|
||||
orderInfoBO.setStatusText(dictResult.getData().getDisplayName());
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.admin.api.DataDictService;
|
||||
import cn.iocoder.mall.admin.api.bo.DataDictBO;
|
||||
import cn.iocoder.mall.order.api.OrderReturnService;
|
||||
import cn.iocoder.mall.order.api.bo.OrderReturnInfoBO;
|
||||
import cn.iocoder.mall.order.api.constant.DictKeyConstants;
|
||||
import cn.iocoder.mall.order.api.dto.OrderReturnApplyDTO;
|
||||
import cn.iocoder.mall.order.application.convert.OrderReturnConvert;
|
||||
@@ -41,4 +42,23 @@ public class OrderReturnController {
|
||||
OrderReturnApplyDTO applyDTO = OrderReturnConvert.INSTANCE.convert(orderReturnApplyPO);
|
||||
return orderReturnService.orderReturnApply(applyDTO);
|
||||
}
|
||||
|
||||
@GetMapping("info")
|
||||
@ApiOperation("订单售后详细")
|
||||
public CommonResult<OrderReturnInfoBO> orderApplyInfo(@RequestParam("orderId") Integer orderId) {
|
||||
CommonResult<OrderReturnInfoBO> commonResult = orderReturnService.orderApplyInfo(orderId);
|
||||
|
||||
// 转换 字典值
|
||||
if (commonResult.isSuccess()) {
|
||||
CommonResult<DataDictBO> dataDictResult = dataDictService.getDataDict(
|
||||
DictKeyConstants.ORDER_RETURN_SERVICE_TYPE,
|
||||
commonResult.getData().getReturnInfo().getServiceType());
|
||||
|
||||
if (dataDictResult.isSuccess()) {
|
||||
commonResult.getData().getReturnInfo().setServiceTypeText(dataDictResult.getData().getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
return commonResult;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user