瀏覽代碼

Update Leave.java

ouchuangxin 5 年之前
父節點
當前提交
ce7e4ca1f2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      leave-service/src/main/java/ddd/leave/domain/leave/entity/Leave.java

+ 2 - 2
leave-service/src/main/java/ddd/leave/domain/leave/entity/Leave.java

@@ -34,7 +34,7 @@ public class Leave {
     }
 
     public Leave addHistoryApprovalInfo(ApprovalInfo approvalInfo) {
-        if (historyApprovalInfos == null)
+        if (null == historyApprovalInfos)
             historyApprovalInfos = new ArrayList<>();
         this.historyApprovalInfos.add(approvalInfo);
         return this;
@@ -66,4 +66,4 @@ public class Leave {
         this.setDuration(this.getEndTime().getTime() - this.getStartTime().getTime());
         return this;
     }
-}
+}