(b []byte)
| 105 | } |
| 106 | |
| 107 | func (db *DlBody) UnmarshalJSON(b []byte) error { |
| 108 | db.Type = DlType(jsoniter.Get(b, "type").ToString()) |
| 109 | if db.Type == "" { |
| 110 | return errors.New("'type' field is empty") |
| 111 | } |
| 112 | return db.RawMessage.UnmarshalJSON(b) |
| 113 | } |
| 114 | |
| 115 | func (j DlJobInfo) JobFinished() bool { |
| 116 | if cos.IsTimeZero(j.FinishedTime) { |