提交 7029b55b authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 53ed7474
......@@ -48,7 +48,7 @@ public interface ArticleLibraryMapper extends BaseMapper<ArticleLibrary> {
+ "</script>")
List<ArticleLibraryListVO> query(@Param("form")QueryArticleLibraryForm form);
@Select("<script>"
+ "select a.id,a.name,a.resourceType,a.author,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.status,"
+ "select a.id,a.name,a.resourceType,a.author,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.status "
+ "from res_Article_Library a "
+ "where 1=1 and a.status = 1 "
+ "<if test = '" + NOTBLANK + "(form.name)'>"
......
......@@ -2,6 +2,7 @@ package com.zrqx.resource.bg.mapper.ebook;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.zrqx.core.form.resource.bg.QueryResourceForPoPForm;
......@@ -23,7 +24,7 @@ public interface BookMapper extends BaseMapper<Book> {
+ " and bb.resourceType like concat('%',#{form.resourceType},'%') "
+ " </if>"
+ "</script>")
List<ResourceRelationListVo> queryByTileAndDiyType(QueryResourceForPoPForm form);
List<ResourceRelationListVo> queryByTileAndDiyType(@Param("form")QueryResourceForPoPForm form);
@Select("<script>"
+"select id,name,DATE_FORMAT(uploadTime,'%Y-%m-%d') uploadTime,browseNum from res_book where DATE_SUB(CURDATE(), INTERVAL 7 DAY) &lt; date(uploadTime) ORDER BY uploadTime desc"
+ "</script>")
......
......@@ -30,6 +30,16 @@ public interface YearLibraryMapper extends BaseMapper<YearLibrary> {
+ " order by a.sort asc,a.uploadTime desc "
+ "</script>")
List<YearLibrary> queryByList();
/* @Select("<script>"
+ "select * from res_year_library "
+ "<if test='str != null and str.size > 0'>"
+ "and bb.id not in "
+ " <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+ "#{id}"
+ "</foreach>"
+ " ORDER BY name asc "
+ "</script>")*/
List<YearLibrary> queryByUploadAsc(String str);
}
......@@ -127,6 +127,11 @@ public class YearLibrarySerivceImpl extends BaseServiceImpl<YearLibrary,String>
List<YearLibrary> list = mapper.queryByList();
return list;
}
@Override
public List<YearLibrary> queryByUploadAsc(String str) {
List<YearLibrary> list = mapper.queryByUploadAsc(str);
return list;
}
}
......@@ -55,5 +55,7 @@ public interface YearLibraryService extends BaseService<YearLibrary,String>{
*/
public List<YearLibrary> queryByList();
public List<YearLibrary> queryByUploadAsc(String str);
}
package com.zrqx.resource.fg.controller.ebook;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
......@@ -11,9 +12,11 @@ import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.constant.resource.ResourceRequestPath;
import com.zrqx.core.model.resource.ebook.EbookMainBody;
import com.zrqx.core.model.resource.year.YearLibrary;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.core.vo.resource.fg.ebook.FgEbookMainBodyVO;
import com.zrqx.resource.bg.service.ebook.EbookMainBodyService;
import com.zrqx.resource.bg.service.year.YearLibraryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -30,6 +33,8 @@ public class FgEbookMainBodyController {
@Autowired
private EbookMainBodyService ebookMainBodyService;
@Autowired
private YearLibraryService yearLibraryService;
@ApiOperation("查询杂志主体名称")
@GetMapping(ResourceRequestPath.LIST)
......@@ -40,14 +45,15 @@ public class FgEbookMainBodyController {
/* @ApiOperation("查询杂志主体下年份")
@GetMapping(ResourceRequestPath.LIST)
public CallBack<FgEbookMainBodyVO> getBookMainBodYear(@PathVariable String oid) {
List<Object> list = new ArrayList<Object>();
EbookMainBody mainBody = ebookMainBodyService.selectByPrimaryKey(oid);
FgEbookMainBodyVO vo = new FgEbookMainBodyVO();
String[] str1 = mainBody.getPeriodsNumber().split(",");
for (String str : str1) {
from..add(str);
Collections.sort(list1);
YearLibrary library = yearLibraryService.queryByUploadAsc(str);
list.add(library);
}
vo.setYear(list);
return CallBack.success();
}*/
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论