Commit eb93b272 authored by liqin's avatar liqin 💬

bug fixed

parent 04b1e785
......@@ -19,7 +19,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -50,12 +49,10 @@ public class AssetTypeController extends BaseController {
@Resource
private CopyrightOwnerService copyrightOwnerService;
@PostMapping(value = "/save",
headers = "content-type=multipart/form-data",
consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@PostMapping(value = "/save")
@RequiresPermissions("asset:type:save")
@ApiOperation(value = "添加视频分类", notes = "添加视频分类")
public Map<String, Object> saveAssetType(@Validated(value = {Add.class}) AssetType assetType) {
public Map<String, Object> saveAssetType(@RequestBody @Validated(value = {Add.class}) AssetType assetType) {
// 保存业务节点信息
boolean result = assetTypeService.save(assetType);
// 返回操作结果
......@@ -67,10 +64,7 @@ public class AssetTypeController extends BaseController {
}
}
@PutMapping(value = "/update",
headers = "content-type=multipart/form-data",
consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@RequiresPermissions("asset:type:update")
@PutMapping(value = "/update")
@ApiOperation(value = "修改视频分类信息", notes = "修改视频分类信息")
public Map<String, Object> updateAssetType(@Validated AssetType assetType) {
boolean flag = assetTypeService.updateById(assetType);
......@@ -80,9 +74,7 @@ public class AssetTypeController extends BaseController {
return getFailResult();
}
@DeleteMapping(value = "/delete/{id}",
headers = "content-type=multipart/form-data",
consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@DeleteMapping(value = "/delete/{id}")
@RequiresPermissions("asset:type:delete")
@ApiOperation(value = "根据ID删除视频分类", notes = "根据ID删除视频分类")
@ApiImplicitParams(value = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment