Commit a6127327 by 田超

Merge branch 'feature/openapi' into 'master'

feat:[none]编辑书刊

See merge request rays/pcloud-book!1367
parents 775b1448 10a255e8
......@@ -15,6 +15,26 @@ public class AviserBookInfoParam implements Serializable {
private List<Long> adviserIds;
private Integer currentPage;
private Integer numPerPage;
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getNumPerPage() {
return numPerPage;
}
public void setNumPerPage(Integer numPerPage) {
this.numPerPage = numPerPage;
}
public List<Long> getBookIds() {
return bookIds;
}
......
......@@ -3,6 +3,7 @@
*/
package com.pcloud.book.book.service;
import com.pcloud.book.book.dto.AviserBookInfoParam;
import com.pcloud.book.book.dto.BookAdviserUpdateTimeDTO;
import com.pcloud.book.book.dto.BookDetialDTO;
import com.pcloud.book.book.dto.BookDto;
......@@ -12,6 +13,8 @@ import com.pcloud.book.book.dto.BookInfoAndAuthStatusDTO;
import com.pcloud.book.book.dto.BookMinimumSupportDTO4Service;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.page.PageBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
......@@ -306,4 +309,8 @@ public interface BookService {
@GetMapping("getWxworkGroupQrcodeIdsExceptBook")
ResponseEntity<ResponseDto<List<Long>>> getWxworkGroupQrcodeIdsExceptBook(@RequestParam(value = "sceneId", required = false) Long sceneId,
@RequestParam(value = "bookGroupId", required = false) Long bookGroupId);
@ApiOperation("编辑图书列表")
@PostMapping("listAdviserBook")
ResponseEntity<ResponseDto<PageBean>> listAdviserBook(@RequestBody AviserBookInfoParam aviserBookInfoParam);
}
......@@ -796,4 +796,12 @@ public interface BookBiz {
void updateCoverImg(SyncRelateDataToRaysVO vo);
boolean checkIsBookId(Long isbnNumber);
/**
* 编辑图书
* @author:zhuyajie
* @date:2021/7/28 11:21
* * @param null
*/
PageBean listAdviserBook(AviserBookInfoParam aviserBookInfoParam);
}
......@@ -4359,4 +4359,22 @@ public class BookBizImpl implements BookBiz {
public boolean checkIsBookId(Long isbnNumber) {
return bookDao.checkIsBookId(isbnNumber);
}
@Override
public PageBean listAdviserBook(AviserBookInfoParam aviserBookInfoParam) {
Integer currentPage = null == aviserBookInfoParam.getCurrentPage()?0:aviserBookInfoParam.getCurrentPage();
Integer numPerPage = null == aviserBookInfoParam.getNumPerPage()?10:aviserBookInfoParam.getNumPerPage();
PageBean pageBean = bookDao.listPage(new PageParam(currentPage,numPerPage), new HashMap<>(), "listBookClassify", "listBookClassifyCount");
if (pageBean != null) {
// 设置书刊分类
bookSet.setTemplateNameNew(pageBean.getRecordList());
// 设置出版社名称
bookSet.setAgentId4BookDto(pageBean.getRecordList());
//标签
bookSet.setProDepPurLabelNameList(pageBean.getRecordList());
} else {
pageBean = new PageBean();
}
return pageBean;
}
}
......@@ -7,6 +7,7 @@ import com.pcloud.book.book.biz.BookBiz;
import com.pcloud.book.book.biz.BookLabelBiz;
import com.pcloud.book.book.biz.BookQrcodeWxworkBiz;
import com.pcloud.book.book.biz.BookMinimumSupportBiz;
import com.pcloud.book.book.dto.AviserBookInfoParam;
import com.pcloud.book.book.dto.BookAdviserUpdateTimeDTO;
import com.pcloud.book.book.dto.BookDetialDTO;
import com.pcloud.book.book.dto.BookDto;
......@@ -18,6 +19,7 @@ import com.pcloud.book.book.dto.BookMinimumSupportDTO4Service;
import com.pcloud.book.book.service.BookService;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.page.PageBean;
import com.pcloud.common.utils.ResponseHandleUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -282,4 +284,10 @@ public class BookServiceImpl implements BookService {
@RequestParam(value = "bookGroupId", required = false) Long bookGroupId) {
return ResponseHandleUtil.toResponse(bookQrcodeWxworkBiz.getWxworkGroupQrcodeIdsExceptBook(sceneId, bookGroupId));
}
@Override
@PostMapping("listAdviserBook")
public ResponseEntity<ResponseDto<PageBean>> listAdviserBook(@RequestBody AviserBookInfoParam aviserBookInfoParam) {
return ResponseHandleUtil.toResponse(bookBiz.listAdviserBook(aviserBookInfoParam));
}
}
......@@ -2060,4 +2060,16 @@ public class BookSet {
bookDto.setUploadUserId(projectUploadUser.getUploadUserId());
bookDto.setUploadUserName(projectUploadUser.getUploadUserName());
}
public void setProDepPurLabelNameList(List<Object> objects) {
if(ListUtils.isEmpty(objects)) {
return;
}
List<BookDto> bookDtos = new ArrayList<>();
for (Object object : objects) {
BookDto bookDto = (BookDto) object;
bookDtos.add(bookDto);
}
this.setProDepPurLabelNames(bookDtos);
}
}
......@@ -1453,7 +1453,7 @@
bt.TYPE_NAME, ba.IS_PRINT isPrint,
ba.SECOND_TEMPLET_ID, ba.GRA_LABEL_ID,ba.SUB_LABEL_ID,ba.VER_LABEL_ID,ba.AREA_LABEL_ID,ba.vol_label_id,ba.is_approval,
la1.`name` graLabelName,la2.`name` subLabelName,la3.`name` verLabelName,la4.`name` areaLabelName,la5.`name` volLabelName,
ba.third_TEMPLET_ID
ba.third_TEMPLET_ID, ba.pro_label_id, ba.dep_label_id,ba.pur_label_id
FROM
BOOK_ADVISER ba
JOIN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment