Browse Source

订单收益状态字段

xrh 2 months ago
parent
commit
1aa90143dc

+ 5 - 4
bex-cloud-staking-core/src/main/java/com/bex/staking/model/vo/StakingProfitItemVO.java

@@ -4,8 +4,9 @@ import lombok.Data;
 
 @Data
 public class StakingProfitItemVO {
-    private String profitStatus;    // 状态:收益待领取 / 等待10:00结算
-    private Long profitDate;       // 收益日期
-    private String profitAmount;     // 收益数量
-    private String remark;           // 备注文案
+    private String profitStatus;         // 状态:收益待领取 / 等待10:00结算
+    private String profitStatusValue;    // 原始状态字符:UNCLAIMED / CLAIMED
+    private Long profitDate;             // 收益日期
+    private String profitAmount;         // 收益数量
+    private String remark;               // 备注文案
 }

+ 1 - 0
bex-cloud-staking-service/src/main/java/com/bex/staking/converter/StakingProfitItemConverter.java

@@ -50,6 +50,7 @@ public interface StakingProfitItemConverter {
             target = "profitStatus",
             expression =
                     "java(assembly.settled() ? StatusMapping.displayOf(assembly.profitStatus()) : StatusMapping.waitSettleStatus())")
+    @Mapping(target = "profitStatusValue", expression = "java(assembly.settled() && assembly.profitStatus() != null ? assembly.profitStatus().getValue() : null)")
     @Mapping(target = "profitDate", expression = "java(assembly.settled() ? assembly.profitDate() : null)")
     @Mapping(
             target = "profitAmount",