Commit c1429dd3a0d395f79365202a054a262889a43098
1 parent
e7186768
✨ 增加售后日志列表 API
Showing
6 changed files
with
83 additions
and
5 deletions
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/vo/log/AfterSaleLogRespVO.java
| ... | ... | @@ -14,26 +14,21 @@ public class AfterSaleLogRespVO { |
| 14 | 14 | private Long id; |
| 15 | 15 | |
| 16 | 16 | @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22634") |
| 17 | - @NotNull(message = "用户编号不能为空") | |
| 18 | 17 | private Long userId; |
| 19 | 18 | |
| 20 | 19 | @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
| 21 | - @NotNull(message = "用户类型不能为空") | |
| 22 | 20 | private Integer userType; |
| 23 | 21 | |
| 24 | 22 | @Schema(description = "售后编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3023") |
| 25 | - @NotNull(message = "售后编号不能为空") | |
| 26 | 23 | private Long afterSaleId; |
| 27 | 24 | |
| 28 | 25 | @Schema(description = "售后状态(之前)", example = "2") |
| 29 | 26 | private Integer beforeStatus; |
| 30 | 27 | |
| 31 | 28 | @Schema(description = "售后状态(之后)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 32 | - @NotNull(message = "售后状态(之后)不能为空") | |
| 33 | 29 | private Integer afterStatus; |
| 34 | 30 | |
| 35 | 31 | @Schema(description = "操作明细", requiredMode = Schema.RequiredMode.REQUIRED, example = "维权完成,退款金额:¥37776.00") |
| 36 | - @NotNull(message = "操作明细不能为空") | |
| 37 | 32 | private String content; |
| 38 | 33 | |
| 39 | 34 | @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/AppAfterSaleController.java
| ... | ... | @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.trade.controller.app.aftersale; |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | +import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.log.AfterSaleLogRespVO; | |
| 6 | 7 | import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleCreateReqVO; |
| 7 | 8 | import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleDeliveryReqVO; |
| 8 | 9 | import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleRespVO; |
| ... | ... | @@ -17,6 +18,8 @@ import org.springframework.web.bind.annotation.*; |
| 17 | 18 | |
| 18 | 19 | import jakarta.annotation.Resource; |
| 19 | 20 | |
| 21 | +import java.util.List; | |
| 22 | + | |
| 20 | 23 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 21 | 24 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 22 | 25 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/AppAfterSaleLogController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.aftersale; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 4 | +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 5 | +import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.log.AppAfterSaleLogRespVO; | |
| 6 | +import cn.iocoder.yudao.module.trade.dal.dataobject.aftersale.AfterSaleLogDO; | |
| 7 | +import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleLogService; | |
| 8 | +import io.swagger.v3.oas.annotations.Operation; | |
| 9 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import lombok.extern.slf4j.Slf4j; | |
| 13 | +import org.springframework.validation.annotation.Validated; | |
| 14 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 16 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 17 | +import org.springframework.web.bind.annotation.RestController; | |
| 18 | + | |
| 19 | +import java.util.List; | |
| 20 | + | |
| 21 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +@Tag(name = "管理后台 - 售后日志") | |
| 24 | +@RestController | |
| 25 | +@RequestMapping("/trade/after-sale-log") | |
| 26 | +@Validated | |
| 27 | +@Slf4j | |
| 28 | +public class AppAfterSaleLogController { | |
| 29 | + | |
| 30 | + @Resource | |
| 31 | + private AfterSaleLogService afterSaleLogService; | |
| 32 | + | |
| 33 | + @GetMapping("/list") | |
| 34 | + @Operation(summary = "获得售后日志列表") | |
| 35 | + @Parameter(name = "afterSaleId", description = "售后编号", required = true, example = "1") | |
| 36 | + public CommonResult<List<AppAfterSaleLogRespVO>> getAfterSaleLogList( | |
| 37 | + @RequestParam("afterSaleId") Long afterSaleId) { | |
| 38 | + List<AfterSaleLogDO> logs = afterSaleLogService.getAfterSaleLogList(afterSaleId); | |
| 39 | + return success(BeanUtils.toBean(logs, AppAfterSaleLogRespVO.class)); | |
| 40 | + } | |
| 41 | + | |
| 42 | +} | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppAfterSaleRespVO.java
| ... | ... | @@ -35,6 +35,12 @@ public class AppAfterSaleRespVO { |
| 35 | 35 | @Schema(description = "补充凭证图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 36 | 36 | private List<String> applyPicUrls; |
| 37 | 37 | |
| 38 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 39 | + private LocalDateTime createTime; | |
| 40 | + | |
| 41 | + @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 42 | + private LocalDateTime updateTime; | |
| 43 | + | |
| 38 | 44 | // ========== 交易订单相关 ========== |
| 39 | 45 | |
| 40 | 46 | @Schema(description = "交易订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/log/AppAfterSaleLogRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.log; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | + | |
| 9 | +@Schema(description = "管理后台 - App 交易售后日志 Response VO") | |
| 10 | +@Data | |
| 11 | +public class AppAfterSaleLogRespVO { | |
| 12 | + | |
| 13 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20669") | |
| 14 | + private Long id; | |
| 15 | + | |
| 16 | + @Schema(description = "操作明细", requiredMode = Schema.RequiredMode.REQUIRED, example = "维权完成,退款金额:¥37776.00") | |
| 17 | + private String content; | |
| 18 | + | |
| 19 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + private LocalDateTime createTime; | |
| 21 | + | |
| 22 | +} | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderDetailRespVO.java
| 1 | 1 | package cn.iocoder.yudao.module.trade.controller.app.order.vo; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.module.trade.controller.app.order.vo.item.AppTradeOrderItemRespVO; |
| 4 | +import cn.iocoder.yudao.module.trade.enums.order.TradeOrderRefundStatusEnum; | |
| 4 | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | 6 | import lombok.Data; |
| 6 | 7 | |
| ... | ... | @@ -20,6 +21,9 @@ public class AppTradeOrderDetailRespVO { |
| 20 | 21 | @Schema(description = "订单流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1146347329394184195") |
| 21 | 22 | private String no; |
| 22 | 23 | |
| 24 | + @Schema(description = "订单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | |
| 25 | + private Integer type; | |
| 26 | + | |
| 23 | 27 | @Schema(description = "下单时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 24 | 28 | private LocalDateTime createTime; |
| 25 | 29 | |
| ... | ... | @@ -118,6 +122,12 @@ public class AppTradeOrderDetailRespVO { |
| 118 | 122 | |
| 119 | 123 | // ========== 售后基本信息 ========== |
| 120 | 124 | |
| 125 | + @Schema(description = "售后状态", example = "0") | |
| 126 | + private Integer refundStatus; | |
| 127 | + | |
| 128 | + @Schema(description = "退款金额,单位:分", example = "100") | |
| 129 | + private Integer refundPrice; | |
| 130 | + | |
| 121 | 131 | // ========== 营销基本信息 ========== |
| 122 | 132 | |
| 123 | 133 | @Schema(description = "优惠劵编号", example = "1024") | ... | ... |