|
@@ -116,8 +116,17 @@ public class ContractLogController extends BladeController {
|
|
|
@ApiImplicitParam(name = "ids", value = "删除的数据ID", required = true)
|
|
|
public R<Boolean> removeByIds(@RequestBody JSONObject json){
|
|
|
if(json.containsKey("ids")){
|
|
|
- List<Long> ids = JSONArray.parseArray(JSONObject.toJSONString(json.get("ids")), Long.class);
|
|
|
- return R.status(this.contractLogService.deleteLogic(ids));
|
|
|
+ Object ids = json.get("ids");
|
|
|
+ List<Long> idList;
|
|
|
+ if(ids instanceof List){
|
|
|
+ //如果是集合,按集合处理
|
|
|
+ idList = JSONArray.parseArray(JSONObject.toJSONString(ids), Long.class);
|
|
|
+ } else {
|
|
|
+ //否则均按字符串处理
|
|
|
+ idList = Func.toLongList(ids.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ return R.status(this.contractLogService.deleteLogic(idList));
|
|
|
}
|
|
|
return R.data(300, false, "未找到具体数据");
|
|
|
}
|