“xubinhui 3 jaren geleden
bovenliggende
commit
6118424313
1 gewijzigde bestanden met toevoegingen van 13 en 3 verwijderingen
  1. 13 3
      src/main/java/com/izouma/nineth/domain/RiceOperationRecord.java

+ 13 - 3
src/main/java/com/izouma/nineth/domain/RiceOperationRecord.java

@@ -28,11 +28,21 @@ public class RiceOperationRecord extends BaseEntity {
     private RiceOperationType type;
 
     @ApiModelProperty("数量")
-    private Long amount;
+    private Long amount=0L;
 
     @ApiModelProperty("操作前的数量")
-    private Long beforeAmount;
+    private Long beforeAmount=0L;
 
     @ApiModelProperty("操作后的数量")
-    private Long afterAmount;
+    private Long afterAmount=0L;
+
+    public Long getAfterAmount() {
+        return afterAmount == null ? 0L : afterAmount;
+    }
+    public Long getBeforeAmount() {
+        return beforeAmount == null ? 0L : beforeAmount;
+    }
+    public Long getAmount() {
+        return amount == null ? 0L : amount;
+    }
 }