parent
96a11998f3
commit
a9dd3c779e
|
|
@ -49,9 +49,6 @@ public class FrontController extends BaseController {
|
|||
@Autowired
|
||||
private IZoneDetailService zoneDetailService;
|
||||
|
||||
@Autowired
|
||||
private IZoneProjectTypeService zoneProjectTypeService;
|
||||
|
||||
/**
|
||||
* 查询我的资源列表
|
||||
*/
|
||||
|
|
@ -241,7 +238,7 @@ public class FrontController extends BaseController {
|
|||
/**
|
||||
* 下架资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:skill:edit")
|
||||
@RequiresPermissions("zone:front:resource:edit")
|
||||
@Log(title = "下架资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}/takeDown")
|
||||
@ApiOperation("下架资源")
|
||||
|
|
@ -254,7 +251,7 @@ public class FrontController extends BaseController {
|
|||
/**
|
||||
* 上架资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:skill:edit")
|
||||
@RequiresPermissions("zone:front:resource:edit")
|
||||
@Log(title = "上架资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}/takeUp")
|
||||
@ApiOperation("上架资源")
|
||||
|
|
@ -308,6 +305,102 @@ public class FrontController extends BaseController {
|
|||
return genericsSuccess(aiResourceParseService.parseUploadedZip(fileId));
|
||||
}
|
||||
|
||||
// ==================== 模型资源 ====================
|
||||
|
||||
/**
|
||||
* 创建Model资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:model:add")
|
||||
@Log(title = "创建Model资源", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/model")
|
||||
@ApiOperation("创建Model资源")
|
||||
public AjaxResult addModel(@RequestBody @Validated AiModelInputVo inputVo) {
|
||||
return success(zoneResourceService.insertAiModelResource(inputVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Model资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:model:edit")
|
||||
@Log(title = "修改Model资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/model")
|
||||
@ApiOperation("修改Model资源")
|
||||
public AjaxResult editModel(@RequestBody @Validated AiModelUpdateVo updateVo) {
|
||||
return success(zoneResourceService.updateAiModelResource(updateVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新提交被驳回的Model资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:model:add")
|
||||
@Log(title = "重新提交Model资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/modelResource/{id}/resubmit")
|
||||
@ApiOperation("重新提交被驳回的Model资源")
|
||||
public AjaxResult resubmitModelResource(
|
||||
@ApiParam(value = "资源ID", required = true) @PathVariable("id") Long id) {
|
||||
return toAjax(zoneResourceService.resubmitAiResource(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审核中的Model资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:model:edit")
|
||||
@Log(title = "撤回Model资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/modelResource/{id}/withdraw")
|
||||
@ApiOperation("撤回审核中的Model资源")
|
||||
public AjaxResult withdrawModelResource(
|
||||
@ApiParam(value = "资源ID", required = true) @PathVariable("id") Long id) {
|
||||
return toAjax(zoneResourceService.withdrawAiResource(id));
|
||||
}
|
||||
|
||||
// ==================== 数据集资源 ====================
|
||||
|
||||
/**
|
||||
* 创建Dataset资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:dataset:add")
|
||||
@Log(title = "创建Dataset资源", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/dataset")
|
||||
@ApiOperation("创建Dataset资源")
|
||||
public AjaxResult addDataset(@RequestBody @Validated AiDatasetInputVo inputVo) {
|
||||
return success(zoneResourceService.insertAiDatasetResource(inputVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Dataset资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:dataset:edit")
|
||||
@Log(title = "修改Dataset资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/dataset")
|
||||
@ApiOperation("修改Dataset资源")
|
||||
public AjaxResult editDataset(@RequestBody @Validated AiDatasetUpdateVo updateVo) {
|
||||
return success(zoneResourceService.updateAiDatasetResource(updateVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新提交被驳回的Dataset资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:dataset:add")
|
||||
@Log(title = "重新提交Dataset资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/datasetResource/{id}/resubmit")
|
||||
@ApiOperation("重新提交被驳回的Dataset资源")
|
||||
public AjaxResult resubmitDatasetResource(
|
||||
@ApiParam(value = "资源ID", required = true) @PathVariable("id") Long id) {
|
||||
return toAjax(zoneResourceService.resubmitAiResource(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审核中的Dataset资源
|
||||
*/
|
||||
@RequiresPermissions("zone:front:dataset:edit")
|
||||
@Log(title = "撤回Dataset资源", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/datasetResource/{id}/withdraw")
|
||||
@ApiOperation("撤回审核中的Dataset资源")
|
||||
public AjaxResult withdrawDatasetResource(
|
||||
@ApiParam(value = "资源ID", required = true) @PathVariable("id") Long id) {
|
||||
return toAjax(zoneResourceService.withdrawAiResource(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的资源详情
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue