提交 8e2bfd53 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 f3782365
package com.zrqx.resource.fg.controller.membercollection;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -14,6 +16,7 @@ import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.resource.commons.form.fg.membercollection.FgSaveOrCancelBookShelfForm;
import com.zrqx.resource.commons.model.membercollection.BookShelf;
import com.zrqx.resource.commons.model.record.ReadingRecord;
import com.zrqx.resource.commons.vo.fg.membercollection.FgBookShelfVo;
import com.zrqx.resource.fg.service.membercollection.FgBookShelfService;
......@@ -46,9 +49,11 @@ public class FgBookShelfController {
if(ArrayUtils.isNotEmpty(ids)){
Example ex = service.createExample();
ex.createCriteria().andIn("id", ids);
List<BookShelf>list = service.selectByExample(ex);
List<String>bookIds = list.stream().map(BookShelf :: getResourceId).collect(Collectors.toList());
service.deleteByExample(ex);
Example example = new Example(ReadingRecord.class);
example.createCriteria().andIn("bookId", ids);
example.createCriteria().andIn("bookId", bookIds);
readingRecordService.deleteByExample(example);
}
return CallBack.success();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论