接口形参改为@RequestBody接收JSONObject
This commit is contained in:
+5
-10
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.compare.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -115,29 +116,23 @@ public class SarFileCompareItemCommentController extends JeroController<SarFileC
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款评论表-通过id删除")
|
||||
@ApiOperation(value = "文档对比信息条款评论表-通过id删除", notes = "文档对比信息条款评论表-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
sarFileCompareItemCommentService.deleteById(id);
|
||||
public Result<?> delete(@RequestBody JSONObject object) {
|
||||
sarFileCompareItemCommentService.deleteById(object.getString("id"));
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款评论表-批量删除")
|
||||
@ApiOperation(value = "文档对比信息条款评论表-批量删除", notes = "文档对比信息条款评论表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
this.sarFileCompareItemCommentService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
public Result<?> deleteBatch(@RequestBody JSONObject object) {
|
||||
this.sarFileCompareItemCommentService.deleteByIds(Arrays.asList(object.getString("ids").split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user