feat:增加老师额外的用户字段。
feat:增加了老师的导入,和导入的进度条。 feat:app分配次退款。 feat:上传人脸不需要审核。 feat:部门管理员导入用户不需要审核。
This commit is contained in:
1 parent
07028116c1
commit
5a7f8dcfbb
62 files changed
+3884
-760
No files matched your search
+62
@@ -0,0 +1,62 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.order.app;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* App 退款申请参数。
|
||||
*
|
||||
* <p>请求中未提交 {@code carList}、反序列化结果为 {@code null} 时,仅用于兼容从未发生部分退款的旧客户端整单申请;
|
||||
* 新客户端必须显式提交非空商品列表,空数组不会按旧版整单退款处理。</p>
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "App 退款申请参数")
|
||||
public class HardAppRefundApplyDto {
|
||||
|
||||
/**
|
||||
* 申请退款的订单 ID;服务端会再次校验当前登录用户是否为付款人。
|
||||
*/
|
||||
@NotNull(message = "订单ID不能为空")
|
||||
@Schema(description = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 售后方式协议编码;当前 App 仅提交仅退款编码 {@code 10}。
|
||||
*/
|
||||
@NotBlank(message = "售后方式不能为空")
|
||||
@Schema(description = "售后方式")
|
||||
private String way;
|
||||
|
||||
/**
|
||||
* 用户选择的申请原因文案,持久化到售后单快照。
|
||||
*/
|
||||
@NotBlank(message = "申请原因不能为空")
|
||||
@Schema(description = "申请原因")
|
||||
private String applyReason;
|
||||
|
||||
/**
|
||||
* 用户填写的问题描述,便于商户审核本次所选商品。
|
||||
*/
|
||||
@NotBlank(message = "相关描述不能为空")
|
||||
@Schema(description = "相关描述")
|
||||
private String applyDescription;
|
||||
|
||||
/**
|
||||
* 逗号分隔的凭证图片地址;为空表示用户未上传凭证。
|
||||
*/
|
||||
@Schema(description = "凭证图片地址,多个地址以逗号分隔")
|
||||
private String applyPicUrls;
|
||||
|
||||
/**
|
||||
* 本次选择的退款商品及份数;字段为 {@code null} 时才进入旧客户端整单兼容逻辑,显式空数组表示未选择商品;
|
||||
* 服务端忽略客户端额外提交的价格和名称字段,列表元素不允许为空。
|
||||
*/
|
||||
@Valid
|
||||
@Schema(description = "本次退款商品")
|
||||
private List<@NotNull(message = "退款商品不能为空") HardAppRefundItemDto> carList;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.order.app;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* App 逐商品退款明细。
|
||||
*
|
||||
* <p>客户端只提交商品标识和整数份数,商品名称、价格及退款金额均由服务端订单快照确定。</p>
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "App 逐商品退款明细")
|
||||
public class HardAppRefundItemDto {
|
||||
|
||||
/**
|
||||
* 原订单商品 ID,对应 {@code hard_car.product_id};长整型在客户端按字符串传输。
|
||||
*/
|
||||
@NotNull(message = "退款商品ID不能为空")
|
||||
@Schema(description = "原订单商品ID")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 本次申请退款的整数份数;称重商品不通过该字段申请在线退款。
|
||||
*/
|
||||
@NotNull(message = "退款商品数量不能为空")
|
||||
@Min(value = 1, message = "退款商品数量必须大于零")
|
||||
@Schema(description = "本次退款份数")
|
||||
private Integer productCount;
|
||||
}
|
||||
+10
@@ -39,6 +39,16 @@ public interface RemoteHardOrderService {
|
||||
@PostMapping("/hard-order/update-shop-status")
|
||||
R<Boolean> updateShopStatus(@RequestBody HardUpdateShopStatusDto dto);
|
||||
|
||||
/**
|
||||
* 第三方退款成功后触发硬件订单按全部售后单重新聚合退款金额和状态。
|
||||
*
|
||||
* @param orderId 原硬件订单 ID
|
||||
* @return 聚合刷新结果
|
||||
*/
|
||||
@NoToken
|
||||
@PostMapping("/hard-after-sale/inner/refresh-order-refund-state")
|
||||
R<Boolean> refreshOrderRefundState(@RequestParam Long orderId);
|
||||
|
||||
/**
|
||||
* 批量查询用户今天及以后的待核销预约订单数量。
|
||||
*
|
||||
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.order.app;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* App 退款申请页详情,聚合订单实付、售后占用和逐商品可退额度。
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "App 退款申请页详情")
|
||||
public class HardAppRefundApplyVo {
|
||||
|
||||
/**
|
||||
* 订单 ID;长整型响应统一序列化为字符串。
|
||||
*/
|
||||
@Schema(description = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 原订单实付金额,单位为分,是全部售后累计退款的绝对上限。
|
||||
*/
|
||||
@Schema(description = "订单实付金额,单位为分")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
/**
|
||||
* 已完成售后单的累计退款金额,单位为分。
|
||||
*/
|
||||
@Schema(description = "累计已退款金额,单位为分")
|
||||
private Integer completedRefundPrice;
|
||||
|
||||
/**
|
||||
* 待审核售后单占用金额,单位为分。
|
||||
*/
|
||||
@Schema(description = "申请中占用金额,单位为分")
|
||||
private Integer pendingRefundPrice;
|
||||
|
||||
/**
|
||||
* 扣除已完成和待审核售后后的剩余可退金额,单位为分。
|
||||
*/
|
||||
@Schema(description = "剩余可退金额,单位为分")
|
||||
private Integer remainingRefundPrice;
|
||||
|
||||
/**
|
||||
* 当前订单是否存在待审核申请;存在时禁止再次提交。
|
||||
*/
|
||||
@Schema(description = "是否存在待审核申请")
|
||||
private Boolean hasPending;
|
||||
|
||||
/**
|
||||
* 当前是否具备 App 在线申请条件,需同时满足无待审核、仍有金额和普通商品份数。
|
||||
*/
|
||||
@Schema(description = "是否可以继续在线申请")
|
||||
private Boolean canApply;
|
||||
|
||||
/**
|
||||
* 最新售后单 ID;没有历史申请时为空。
|
||||
*/
|
||||
@Schema(description = "最新售后单ID")
|
||||
private Long latestAfterSaleId;
|
||||
|
||||
/**
|
||||
* 最新售后单详细状态编码;没有历史申请时为空。
|
||||
*/
|
||||
@Schema(description = "最新售后状态")
|
||||
private String latestAfterSaleStatus;
|
||||
|
||||
/**
|
||||
* 最新售后单申请金额,单位为分;没有历史申请时为空。
|
||||
*/
|
||||
@Schema(description = "最新申请金额,单位为分")
|
||||
private Integer latestRefundPrice;
|
||||
|
||||
/**
|
||||
* 最新售后单创建时间;没有历史申请时为空。
|
||||
*/
|
||||
@Schema(description = "最新申请时间")
|
||||
private LocalDateTime latestCreateTime;
|
||||
|
||||
/**
|
||||
* 最新售后单更新时间,用于展示审核、取消或退款完成时间。
|
||||
*/
|
||||
@Schema(description = "最新状态更新时间")
|
||||
private LocalDateTime latestUpdateTime;
|
||||
|
||||
/**
|
||||
* 按原订单商品 ID 聚合后的退款商品列表。
|
||||
*/
|
||||
@Schema(description = "退款商品列表")
|
||||
private List<HardAppRefundProductVo> productList;
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.order.app;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* App 可退款商品及数量、金额占用信息。
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "App 可退款商品")
|
||||
public class HardAppRefundProductVo {
|
||||
|
||||
/**
|
||||
* 商品 ID,来源于原订单购物车快照;长整型响应统一序列化为字符串。
|
||||
*/
|
||||
@Schema(description = "商品ID")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 下单时保存的商品名称快照。
|
||||
*/
|
||||
@Schema(description = "商品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 下单时保存的商品图片快照地址。
|
||||
*/
|
||||
@Schema(description = "商品图片")
|
||||
private String productPic;
|
||||
|
||||
/**
|
||||
* 商品性质协议编码,{@code 1} 为普通数量商品,{@code 2} 为称重商品。
|
||||
*/
|
||||
@Schema(description = "商品性质")
|
||||
private String productNature;
|
||||
|
||||
/**
|
||||
* 下单成交单价快照,单位为分,仅用于页面展示。
|
||||
*/
|
||||
@Schema(description = "成交单价,单位为分")
|
||||
private Integer productPrice;
|
||||
|
||||
/**
|
||||
* 原订单购买总份数;同一商品在购物车出现多行时按商品 ID 合并。
|
||||
*/
|
||||
@Schema(description = "原购买份数")
|
||||
private Integer originalCount;
|
||||
|
||||
/**
|
||||
* 原订单购买重量,单位为千克;普通数量商品为空或零,称重商品用于只读展示。
|
||||
*/
|
||||
@Schema(description = "原购买重量,单位为千克")
|
||||
private BigDecimal originalWeight;
|
||||
|
||||
/**
|
||||
* 已完成售后占用的份数,取消和拒绝记录不计入。
|
||||
*/
|
||||
@Schema(description = "已退款份数")
|
||||
private Integer refundedCount;
|
||||
|
||||
/**
|
||||
* 待审核售后占用的份数,存在该数量时订单不能再次提交申请。
|
||||
*/
|
||||
@Schema(description = "申请中份数")
|
||||
private Integer applyingCount;
|
||||
|
||||
/**
|
||||
* 当前尚可申请的份数,等于购买份数减已退款和申请中份数。
|
||||
*/
|
||||
@Schema(description = "可退款份数")
|
||||
private Integer refundableCount;
|
||||
|
||||
/**
|
||||
* 原商品行合计金额快照,单位为分,用于解释实付分摊依据。
|
||||
*/
|
||||
@Schema(description = "商品快照合计金额,单位为分")
|
||||
private Long originalTotalPrice;
|
||||
|
||||
/**
|
||||
* 订单实付按商品快照金额占比分配后的整商品退款额度,单位为分。
|
||||
*/
|
||||
@Schema(description = "商品实付分摊金额,单位为分")
|
||||
private Integer allocatedPrice;
|
||||
|
||||
/**
|
||||
* 是否支持 App 在线逐份退款;称重商品固定为 {@code false}。
|
||||
*/
|
||||
@Schema(description = "是否支持在线逐份退款")
|
||||
private Boolean onlineRefundSupported;
|
||||
}
|
||||
Reference in new issue
Block a user