mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(improvement)(Headless) Obtain model list of domain and subDomain (#982)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.tencent.supersonic.headless.server.rest;
|
package com.tencent.supersonic.headless.server.rest;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||||
import com.tencent.supersonic.auth.api.authentication.utils.UserHolder;
|
import com.tencent.supersonic.auth.api.authentication.utils.UserHolder;
|
||||||
import com.tencent.supersonic.common.pojo.enums.AuthType;
|
import com.tencent.supersonic.common.pojo.enums.AuthType;
|
||||||
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -80,6 +82,11 @@ public class ModelController {
|
|||||||
return modelService.getModelList(modelFilter);
|
return modelService.getModelList(modelFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getAllModelByDomainId")
|
||||||
|
public List<ModelResp> getAllModelByDomainId(@RequestParam("domainId") Long domainId) {
|
||||||
|
return modelService.getAllModelByDomainIds(Lists.newArrayList(domainId));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/getModelDatabase/{modelId}")
|
@GetMapping("/getModelDatabase/{modelId}")
|
||||||
public DatabaseResp getModelDatabase(@PathVariable("modelId") Long modelId) {
|
public DatabaseResp getModelDatabase(@PathVariable("modelId") Long modelId) {
|
||||||
return modelService.getDatabaseByModelId(modelId);
|
return modelService.getDatabaseByModelId(modelId);
|
||||||
|
|||||||
Reference in New Issue
Block a user