fix: resource create time format for mysql (#3381)

This commit is contained in:
wzc90 2024-05-15 15:51:43 +08:00 committed by GitHub
parent c8ff3fa2ee
commit deb1deb14c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,7 +70,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st
where, args = append(where, "`storage_type` = ?"), append(args, find.StorageType.String())
}
fields := []string{"`id`", "`uid`", "`filename`", "`type`", "`size`", "`creator_id`", "`created_ts`", "`updated_ts`", "`memo_id`", "`storage_type`", "`reference`", "`payload`"}
fields := []string{"`id`", "`uid`", "`filename`", "`type`", "`size`", "`creator_id`", "UNIX_TIMESTAMP(`created_ts`)", "UNIX_TIMESTAMP(`updated_ts`)", "`memo_id`", "`storage_type`", "`reference`", "`payload`"}
if find.GetBlob {
fields = append(fields, "`blob`")
}