2021-11-25 21:46:05 +08:00
|
|
|
package com.api.aiyh_pcn.patentWall.controller;
|
|
|
|
|
|
|
|
import aiyh.utils.ApiResult;
|
2021-12-01 10:22:22 +08:00
|
|
|
import aiyh.utils.Util;
|
2021-11-29 10:15:16 +08:00
|
|
|
import com.api.aiyh_pcn.patentWall.dto.FilterWhere;
|
2021-11-25 21:46:05 +08:00
|
|
|
import com.api.aiyh_pcn.patentWall.service.PatentWallService;
|
|
|
|
import com.api.aiyh_pcn.patentWall.vo.PatentVO;
|
2021-12-01 10:22:22 +08:00
|
|
|
import com.api.aiyh_pcn.patentWall.vo.SearchInputVO;
|
2021-11-25 21:46:05 +08:00
|
|
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
2021-12-01 10:22:22 +08:00
|
|
|
import weaver.hrm.HrmUserVarify;
|
|
|
|
import weaver.hrm.User;
|
2021-11-25 21:46:05 +08:00
|
|
|
|
2021-12-01 10:22:22 +08:00
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.ws.rs.*;
|
|
|
|
import javax.ws.rs.core.Context;
|
|
|
|
import javax.ws.rs.core.MediaType;
|
2021-11-25 21:46:05 +08:00
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author EBU7-dev1-ayh
|
|
|
|
* @create 2021/11/25 0025 15:18
|
|
|
|
* 专利墙请求入口
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
@Path("/patten/")
|
|
|
|
public class PatentWallController {
|
|
|
|
private final PatentWallService patentWallService = new PatentWallService();
|
|
|
|
|
2021-12-01 10:22:22 +08:00
|
|
|
@Path("/getSearchList/{prefix}")
|
|
|
|
@GET
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
public String getPatentList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
@PathParam("prefix") String prefix){
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
int languageId = user.getLanguage();
|
|
|
|
List<SearchInputVO> result = patentWallService.getSearchList(prefix,languageId);
|
|
|
|
return ApiResult.success(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Path("/getList/{prefix}")
|
2021-11-25 21:46:05 +08:00
|
|
|
@POST
|
2021-12-01 10:22:22 +08:00
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
@Consumes(MediaType.APPLICATION_JSON)
|
|
|
|
public String getPatentList(@RequestBody List<FilterWhere> filterWheres, @PathParam("prefix") String prefix){
|
|
|
|
List<PatentVO> result = patentWallService.getList(filterWheres,prefix);
|
2021-11-25 21:46:05 +08:00
|
|
|
return ApiResult.success(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Path("/clearConf")
|
|
|
|
@GET
|
2021-12-01 10:22:22 +08:00
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
2021-11-25 21:46:05 +08:00
|
|
|
public String clearPatentWallConf(){
|
|
|
|
patentWallService.clearPatentWallConf();
|
2021-12-01 10:22:22 +08:00
|
|
|
patentWallService.clearPatentWallSerachConf();
|
2021-11-25 21:46:05 +08:00
|
|
|
return ApiResult.success("清除配置缓存成功!");
|
|
|
|
}
|
|
|
|
}
|