TASK:企业、教育版library元素共享、作品广场作品发布到公共gallery
This commit is contained in:
@@ -27,10 +27,7 @@ import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.io.File;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Api(tags = "library模块")
|
||||
@@ -210,4 +207,39 @@ public class LibraryController {
|
||||
return Response.success(libraryService.addSysModelToLib(sysModelId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将个人library元素添加到公共库")
|
||||
@GetMapping("addToPublicLibrary")
|
||||
public Response<String> addToPublicLibrary(@ApiParam("元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
boolean b = libraryService.saveToOrganizationLibrary(libraryId);
|
||||
if (b){
|
||||
return Response.success("success");
|
||||
}else {
|
||||
return Response.success("fail");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将个人library元素从公共库中删除")
|
||||
@GetMapping("deleteFromPublicLib")
|
||||
public Response<String> deleteFromPublicLib(@ApiParam("元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
libraryService.deleteFromPublicLib(libraryId);
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取公共库")
|
||||
@GetMapping("getPublicLib")
|
||||
public Response<PageBaseResponse<Library>> getPublicLib(@ApiParam("排序" ) @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@ApiParam("page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@ApiParam("size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
|
||||
return Response.success(libraryService.getPublicLib(order, page, size));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "管理员获取所有子账号lib元素")
|
||||
@GetMapping("getAllSubAccLib")
|
||||
public Response<PageBaseResponse<Library>> getAllSubAccLib(@ApiParam("排序") @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@ApiParam("page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@ApiParam("size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
return Response.success(libraryService.getAllSubAccLib(order, page, size));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user