提交 27c5514c authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 2743b09a
......@@ -4,6 +4,8 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -88,8 +90,8 @@ public class BulletinContentController {
@ApiOperation(value = "批量删除", notes = "批量删除")
@PostMapping(value = "/batch/delete")
public CallBack<Boolean> deleteByIds(@RequestBody Integer[] ids) {
if (ids.length == 0) {
public CallBack<Boolean> deleteByIds(@RequestBody List<Integer> ids) {
if (ids.isEmpty()) {
throw new BaseException("没有选中任何数据,请重新选择");
}
Example example = new Example(BulletinContent.class);
......@@ -97,8 +99,9 @@ public class BulletinContentController {
if (!service.deleteByExample(example)) {
throw new BaseException("操作失败");
}
List<String> strings = ids.stream().map(x -> x + "").collect(Collectors.toList());
example= new Example(Adspace.class);
example.createCriteria().andIn("resourceId", Arrays.asList(ids));
example.createCriteria().andIn("resourceId", strings);
adspaceService.deleteByExample(example);
return CallBack.success(true);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论