(improvement) Move out the datasource and merge the datasource with the model, and adapt the chat module (#423)

Co-authored-by: jolunoluo <jolunoluo@tencent.com>
This commit is contained in:
jipeli
2023-11-27 11:05:24 +08:00
committed by GitHub
parent 0534053ff9
commit 27bb1b322e
190 changed files with 3900 additions and 10561 deletions

View File

@@ -1,11 +1,13 @@
package com.tencent.supersonic.auth.api.authorization.request;
import com.google.common.collect.Lists;
import com.tencent.supersonic.auth.api.authorization.pojo.AuthRes;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import lombok.ToString;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
@Data
@ToString
@@ -16,4 +18,16 @@ public class QueryAuthResReq {
private List<AuthRes> resources;
private Long modelId;
private List<Long> modelIds;
public List<Long> getModelIds() {
if (!CollectionUtils.isEmpty(modelIds)) {
return modelIds;
}
if (modelId != null) {
return Lists.newArrayList(modelId);
}
return Lists.newArrayList();
}
}