Commit 0b530ab1 authored by maliang's avatar maliang

上传bug修复

parent ee77bcef
......@@ -41,6 +41,6 @@ public class CopyrightBookController {
@ApiOperation(value = "获取书籍上架信息")
@ResponseBody
public String getBookInfo(@RequestBody PageTableRequest request) {
return copyrightBookService.selectBookInfo(request.getCopyrightIds());
return copyrightBookService.selectBookInfo(request.getCopyrightIds(),request.getPage(),request.getLimit());
}
}
......@@ -13,7 +13,7 @@ public interface CopyrightDao {
Integer selectTableListMonthCount(@Param("copyrightId") Integer copyrightId);
List<BaseSettlement> selectBookInfo(@Param("copyrightId") Integer copyrightId);
List<BaseSettlement> selectBookInfo(@Param("copyrightId") Integer copyrightId,@Param("page") Integer page,@Param("limit")Integer limit);
Integer selectBookInfoCount(@Param("copyrightId") Integer copyrightId);
......
......@@ -5,5 +5,5 @@ import com.boot.security.server.model.BaseSettlement;
public interface CopyrightBookService {
String selectSettlement(Integer copyrightId,Integer page,Integer limit);
String getAllCopyright();
String selectBookInfo(Integer copyrightId);
String selectBookInfo(Integer copyrightId,Integer page,Integer limit);
}
......@@ -114,11 +114,11 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
}
@Override
public String selectBookInfo(Integer copyrightId) {
public String selectBookInfo(Integer copyrightId,Integer page,Integer limit) {
if(copyrightId==null||copyrightId==0){
copyrightId=null;
}
List<BaseSettlement> baseSettlements = copyrightDao.selectBookInfo(copyrightId);
List<BaseSettlement> baseSettlements = copyrightDao.selectBookInfo(copyrightId,page,limit);
Integer count = copyrightDao.selectBookInfoCount(copyrightId);
return PageTableHandler.getJSONObject(baseSettlements,count);
}
......
......@@ -40,16 +40,19 @@
<select id="selectBookInfo" resultType="com.boot.security.server.model.BaseSettlement" >
SELECT book_id bookId,cp_id cpId,book_name bookName,authors
FROM bi_report.books_api
where book_id is not null
<if test="copyrightId != null">
where copyright_id=#{copyrightId}
and copyright_id=#{copyrightId}
</if>
limit #{page},#{limit};
</select>
<select id="selectBookInfoCount" resultType="Integer" >
SELECT count(*)
FROM bi_report.books_api
where book_id is not null
<if test="copyrightId != null">
where copyright_id=#{copyrightId}
and copyright_id=#{copyrightId}
</if>
</select>
......
......@@ -56,7 +56,7 @@
,{field: 'cpId', title: 'CPookId'}
,{field: 'bookName', title: '书名'}
,{field: 'authors', title: '作者',fixed:'right'}
]] //设置表头
]]
});
});
......
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