提交 59dd25ad authored 作者: yucaiwei's avatar yucaiwei

--no commit message

上级 40c96e06
......@@ -423,7 +423,21 @@ public class EbookController {
*/
@ApiOperation(value = "批量上传解析epub", notes = "批量上传解析epub")
@PostMapping(value = ResourceRequestPath.UPLOADEPUB)
public CallBack<Boolean> uploadBook(String token) {
public CallBack<Boolean> uploadBook(List<String> tokenList) {
if(ArrayUtils.isNotEmpty(tokenList)){
tokenList.stream().forEach(token -> this.importEpub(token));
}
return CallBack.success();
}
/**
* 解析epub
* @param token
* @author ycw
* @date: 2019年7月25日 下午6:01:51
*/
private void importEpub(String token){
EpubVo ev = redis.getInfoObjectRedis(token, EpubVo.class);
if (ev == null) {
throw new BaseException("缓存中找不到该token");
......@@ -494,8 +508,6 @@ public class EbookController {
} catch (IOException e) {
throw new BaseException("无法删除该token");
}
return CallBack.success();
}
}
......@@ -64,12 +64,12 @@ public interface ArticleLibraryMapper extends BaseMapper<ArticleLibrary> {
@Select("<script>"
+ "<if test = 'form.diyTypeCode==null'>"
+ "select distinct a.id,a.title as name,a.author,a.source,a.bookName,a.resourceType as type,a.price,a.realPrice,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.status,a.img,a.saleStatus,a.resourceType,a.synopsis "
+ "from res_Article_Library a where 1=1 and a.isDelete=1 "
+ "from res_Article_Library a where 1=1 and a.status = 1 and a.isDelete=1 "
+ "</if>"
+ "<if test = '" + NOTBLANK + "(form.diyTypeCode)'>"
+ "select distinct a.id,a.title,a.author,a.source,a.bookName,a.price,a.realPrice,a.resourceType as type,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.status,a.img,a.saleStatus,a.resourceType,a.synopsis "
+ "from res_Article_Library a left join res_Article_Library_Diy_Type ad "
+ "on a.id = ad.alid where 1=1 and a.isDelete=1 "
+ "on a.id = ad.alid where 1=1 and a.status = 1 and a.isDelete=1 "
+ "</if>"
+ "<if test = '" + NOTBLANK + "(form.diyTypeCode)'>"
+ "and ad.code like concat(#{form.diyTypeCode},'%') "
......
......@@ -97,7 +97,7 @@ public interface EbookMapper extends BaseMapper<Ebook>{
+ "SELECT DISTINCT bb.id,bb.name,bb.author,bb.isbn,bb.resourceType as type,"
+ " be.bookCover,be.price,DATE_FORMAT(be.uploadTime,'%Y-%m-%d') uploadTime,DATE_FORMAT(be.updateTime,'%Y-%m-%d') updateTime,be.bookStatus as status"
+ " FROM res_book bb LEFT JOIN res_ebook be ON bb.id = be.id "
+ " WHERE 1 = 1 and bb.isDelete = 1 "
+ " WHERE 1 = 1 and be.bookStatus = 4 and bb.isDelete = 1 "
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.diyTypeCode)' >"
+ "SELECT DISTINCT bb.id,bb.name,bb.author,bb.isbn,bb.resourceType as type,"
......@@ -105,7 +105,7 @@ public interface EbookMapper extends BaseMapper<Ebook>{
+ " FROM res_book bb "
+ " LEFT JOIN res_ebook be ON bb.id = be.id "
+ " LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookid"
+ " WHERE 1 = 1 and bb.isDelete = 1 "
+ " WHERE 1 = 1 and be.bookStatus = 4 and bb.isDelete = 1 "
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.diyTypeCode)' >"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论