|
@@ -89,7 +89,7 @@ public class MaterialInfoController {
|
|
|
@ApiOperation(value = "素材信息-添加", notes = "素材信息-添加")
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<MaterialInfo> add(@RequestBody MaterialInfo materialInfo) {
|
|
|
- Result<MaterialInfo> result = new Result<MaterialInfo>();
|
|
|
+ Result<MaterialInfo> result = new Result<>();
|
|
|
try {
|
|
|
materialInfoService.save(materialInfo);
|
|
|
result.success("添加成功!");
|
|
@@ -110,7 +110,7 @@ public class MaterialInfoController {
|
|
|
@ApiOperation(value = "素材信息-编辑", notes = "素材信息-编辑")
|
|
|
@PutMapping(value = "/edit")
|
|
|
public Result<MaterialInfo> edit(@RequestBody MaterialInfo materialInfo) {
|
|
|
- Result<MaterialInfo> result = new Result<MaterialInfo>();
|
|
|
+ Result<MaterialInfo> result = new Result<>();
|
|
|
MaterialInfo materialInfoEntity = materialInfoService.getById(materialInfo.getId());
|
|
|
if (materialInfoEntity == null) {
|
|
|
result.error500("未找到对应实体");
|
|
@@ -153,7 +153,7 @@ public class MaterialInfoController {
|
|
|
@ApiOperation(value = "素材信息-批量删除", notes = "素材信息-批量删除")
|
|
|
@DeleteMapping(value = "/deleteBatch")
|
|
|
public Result<MaterialInfo> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
|
|
- Result<MaterialInfo> result = new Result<MaterialInfo>();
|
|
|
+ Result<MaterialInfo> result = new Result<>();
|
|
|
if (ids == null || "".equals(ids.trim())) {
|
|
|
result.error500("参数不识别!");
|
|
|
} else {
|