|
|
@@ -13,6 +13,7 @@ import com.jpsoft.enterprise.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.enterprise.modules.common.dto.Sort;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@@ -122,9 +123,10 @@ public class NewsInfoApiController {
|
|
|
@ApiImplicitParam(name = "id", value = "目录id", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "companyId", value = "公司id", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "topFlag", value = "是否主页轮播图", required = false, paramType = "form"),
|
|
|
- @ApiImplicitParam(name = "code",value = "代码",required = false,paramType = "form")
|
|
|
+ @ApiImplicitParam(name = "code",value = "代码",required = false,paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "key",value = "key",required = false,paramType = "form")
|
|
|
})
|
|
|
- public MessageResult<Map> newsList(String id,String companyId,String topFlag,String code,@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,@RequestParam(value="pageSize",defaultValue="10") int pageSize) {
|
|
|
+ public MessageResult<Map> newsList(String id,String companyId,String topFlag,String code,String key,@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,@RequestParam(value="pageSize",defaultValue="10") int pageSize) {
|
|
|
MessageResult<Map> messageResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
@@ -150,6 +152,10 @@ public class NewsInfoApiController {
|
|
|
if (StringUtils.isNotBlank(code)){
|
|
|
searchParams.put("code",code);
|
|
|
}
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(key)){
|
|
|
+ searchParams.put("title","%"+key+"%");
|
|
|
+ }
|
|
|
// searchParams.put("showFlag",1);
|
|
|
|
|
|
|
|
|
@@ -173,6 +179,9 @@ public class NewsInfoApiController {
|
|
|
if (StringUtils.isNotBlank(code)){
|
|
|
searchParams2.put("code",code);
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(key)){
|
|
|
+ searchParams2.put("title","%"+key+"%");
|
|
|
+ }
|
|
|
// searchParams2.put("showFlag",1);
|
|
|
List<Sort> sortList2 = new ArrayList<>();
|
|
|
sortList.add(new Sort("a.create_time","desc"));
|