提交 034e23b8 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 999ba2a8
package com.zrqx.core.form.resource.bg.authorLibrary;
import java.util.List;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value="QueryAuthorLibraryForm",description="作者库")
public class QueryAuthorLibraryForm {
@ApiModelProperty("类别Code")
private String diytypeCode;
@ApiModelProperty(value = "自定义分类id")
private List<String> diyTypeId;
@ApiModelProperty("自定义分类code")
private String diyTypeCode;
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("机构名")
......
......@@ -56,32 +56,6 @@ public class AuthorLibraryController {
@ApiOperation(value = "查询专家库", notes = "按条件分页查询专家库")
@GetMapping(ResourceRequestPath.PAGE)
public CallBack<PageInfo<AuthorLibraryListVO>> getPageList(QueryAuthorLibraryForm entity, PageParam pageParam) {
if (null != entity) {
pageParam.setOrderBy("createTime desc");
if (StringUtils.isNotBlank(entity.getDiytypeCode())) {
entity.setDiytypeCode(entity.getDiytypeCode() + "%");
} else {
entity.setDiytypeCode(null);
}
if (StringUtils.isNotBlank(entity.getName())) {
entity.setName("%" + entity.getName() + "%");
} else {
entity.setName(null);
}
if(entity.getCreateTime()!=null && entity.getCreateTime()!=""){
if (entity.getCreateTime().equals("desc")){
pageParam.setOrderBy("createTime desc ");
}
if (entity.getCreateTime().equals("asc")){
pageParam.setOrderBy("createTime asc ");
}
}
if (StringUtils.isNotBlank(entity.getInstitutionName())) {
entity.setInstitutionName("%" + entity.getInstitutionName() + "%");
} else {
entity.setInstitutionName(null);
}
}
return CallBack.success(authorService.queryQueryAuthorLibraryList(entity, pageParam));
}
@ApiOperation(value = "按照专家名模糊查询", notes = "按照专家名模糊查询")
......
......@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -49,7 +50,23 @@ public class AuthorLibraryServiceImpl extends BaseServiceImpl<AuthorLibrary, Int
*/
@Override
public PageInfo<AuthorLibraryListVO> queryQueryAuthorLibraryList(QueryAuthorLibraryForm entity, PageParam pageParam) {
PageHelper.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getOrderBy());
if (StringUtils.isNotBlank(entity.getName())) {
entity.setName("%" + entity.getName() + "%");
} else {
entity.setName(null);
}
if(entity.getCreateTime()!=null && entity.getCreateTime()!=""){
if (entity.getCreateTime().equals("desc")){
pageParam.setOrderBy("createTime desc ");
}
if (entity.getCreateTime().equals("asc")){
pageParam.setOrderBy("createTime asc ");
}
}
startPage(pageParam);
List<AuthorLibraryListVO> list = authorMapper.queryAuthorLibraryByConditions(entity);
/*PageHelper.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getOrderBy());
List<AuthorLibraryListVO> list = authorMapper.queryAuthorLibraryByConditions(entity);
list.forEach(i -> {
if(i != null){
......@@ -67,7 +84,7 @@ public class AuthorLibraryServiceImpl extends BaseServiceImpl<AuthorLibrary, Int
i.setDiyTypeIds(diyTypeIds);
i.setDiyTypeCodes(diyTypeCodes);
}
});
});*/
return new PageInfo<AuthorLibraryListVO>(list);
}
......
......@@ -230,9 +230,10 @@ public class ClauseLibraryServiceImpl extends BaseServiceImpl<ClauseLibrary, Int
@Override
public PageInfo<ResourceRelationListVo> pageByTitleAndDiyType(QueryResourceForPoPForm form, PageParam pageParam) {
if (pageParam != null && StringUtils.isNotBlank(pageParam.getOrderBy())) {
/*if (pageParam != null && StringUtils.isNotBlank(pageParam.getOrderBy())) {
pageParam.setOrderBy("uploadTime desc");
}
}*/
pageParam.setOrderBy("uploadTime desc");
startPage(pageParam);
List<ResourceRelationListVo> list = mapper.queryByTileAndDiyType(form);
return new PageInfo<ResourceRelationListVo>(list);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论