|
@@ -1,8 +1,11 @@
|
|
package cn.iocoder.yudao.module.trade.controller.app.aftersale;
|
|
package cn.iocoder.yudao.module.trade.controller.app.aftersale;
|
|
|
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppTradeAfterSaleCreateReqVO;
|
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppTradeAfterSaleCreateReqVO;
|
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppTradeAfterSaleDeliveryReqVO;
|
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppTradeAfterSaleDeliveryReqVO;
|
|
|
|
+import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppTradeAfterSalePageItemRespVO;
|
|
|
|
+import cn.iocoder.yudao.module.trade.controller.app.base.property.AppProductPropertyValueDetailRespVO;
|
|
import cn.iocoder.yudao.module.trade.service.aftersale.TradeAfterSaleService;
|
|
import cn.iocoder.yudao.module.trade.service.aftersale.TradeAfterSaleService;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
@@ -12,6 +15,8 @@ import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
|
+import java.util.Arrays;
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
|
@@ -26,6 +31,51 @@ public class AppTradeAfterSaleController {
|
|
@Resource
|
|
@Resource
|
|
private TradeAfterSaleService afterSaleService;
|
|
private TradeAfterSaleService afterSaleService;
|
|
|
|
|
|
|
|
+ // TODO 芋艿:待实现
|
|
|
|
+ @GetMapping(value = "/page")
|
|
|
|
+ @Operation(summary = "获得售后分页")
|
|
|
|
+ public CommonResult<PageResult<AppTradeAfterSalePageItemRespVO>> getAfterSalePage() {
|
|
|
|
+ AppTradeAfterSalePageItemRespVO vo = new AppTradeAfterSalePageItemRespVO();
|
|
|
|
+ vo.setId(1L);
|
|
|
|
+ vo.setNo("1146347329394184195");
|
|
|
|
+ vo.setStatus(61);
|
|
|
|
+ vo.setWay(10);
|
|
|
|
+ vo.setType(10);
|
|
|
|
+ vo.setApplyReason("不想要了");
|
|
|
|
+ vo.setApplyDescription("这个商品我不喜欢,想退款");
|
|
|
|
+ vo.setApplyPicUrls(Arrays.asList("pic_url_1", "pic_url_2", "pic_url_3"));
|
|
|
|
+
|
|
|
|
+ // 设置订单相关信息
|
|
|
|
+ vo.setOrderId(2001L);
|
|
|
|
+ vo.setOrderNo("23456789009876");
|
|
|
|
+ vo.setOrderItemId(3001L);
|
|
|
|
+ vo.setSpuId(4001L);
|
|
|
|
+ vo.setSpuName("商品名");
|
|
|
|
+ vo.setSkuId(5001L);
|
|
|
|
+ vo.setProperties(Arrays.asList(
|
|
|
|
+ new AppProductPropertyValueDetailRespVO().setPropertyId(6001L).setPropertyName("颜色").setValueId(7001L).setValueName("红色"),
|
|
|
|
+ new AppProductPropertyValueDetailRespVO().setPropertyId(6002L).setPropertyName("尺寸").setValueId(7002L).setValueName("XL")));
|
|
|
|
+ vo.setPicUrl("https://cdn.pixabay.com/photo/2022/12/06/06/21/lavender-7638368_1280.jpg");
|
|
|
|
+ vo.setCount(2);
|
|
|
|
+
|
|
|
|
+ // 设置审批相关信息
|
|
|
|
+ vo.setAuditReason("审核通过");
|
|
|
|
+
|
|
|
|
+ // 设置退款相关信息
|
|
|
|
+ vo.setRefundPrice(1000);
|
|
|
|
+ vo.setRefundTime(LocalDateTime.now());
|
|
|
|
+
|
|
|
|
+ // 设置退货相关信息
|
|
|
|
+ vo.setLogisticsId(7001L);
|
|
|
|
+ vo.setLogisticsNo("LAGN101010101001");
|
|
|
|
+ vo.setDeliveryTime(LocalDateTime.now());
|
|
|
|
+ vo.setReceiveTime(LocalDateTime.now());
|
|
|
|
+ vo.setReceiveReason("收货正常");
|
|
|
|
+
|
|
|
|
+ return success(new PageResult<>(Arrays.asList(vo), 1L));
|
|
|
|
+// return success(afterSaleService.getAfterSalePage(getLoginUserId()));
|
|
|
|
+ }
|
|
|
|
+
|
|
@PostMapping(value = "/create")
|
|
@PostMapping(value = "/create")
|
|
@Operation(summary = "申请售后")
|
|
@Operation(summary = "申请售后")
|
|
public CommonResult<Long> createAfterSale(@RequestBody AppTradeAfterSaleCreateReqVO createReqVO) {
|
|
public CommonResult<Long> createAfterSale(@RequestBody AppTradeAfterSaleCreateReqVO createReqVO) {
|