You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.4 KiB
Java
43 lines
1.4 KiB
Java
3 years ago
|
package com.engine.organization.web;
|
||
|
|
||
|
import com.alibaba.fastjson.JSON;
|
||
|
import com.alibaba.fastjson.JSONObject;
|
||
|
import com.engine.common.util.ParamUtil;
|
||
|
import com.engine.common.util.ServiceUtil;
|
||
|
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||
|
import com.engine.organization.wrapper.JobWrapper;
|
||
|
import weaver.hrm.HrmUserVarify;
|
||
|
import weaver.hrm.User;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
import javax.ws.rs.GET;
|
||
|
import javax.ws.rs.Path;
|
||
|
import javax.ws.rs.Produces;
|
||
|
import javax.ws.rs.core.Context;
|
||
|
import javax.ws.rs.core.MediaType;
|
||
|
import java.util.Map;
|
||
|
|
||
|
/**
|
||
|
* @description: TODO
|
||
|
* @author:dxfeng
|
||
|
* @createTime: 2022/05/27
|
||
|
* @version: 1.0
|
||
|
*/
|
||
|
public class JobController {
|
||
|
public JobWrapper getJobWrapper(User user) {
|
||
|
return ServiceUtil.getService(JobWrapper.class, user);
|
||
|
}
|
||
|
|
||
|
@GET
|
||
|
@Path("/getSearchTree")
|
||
|
@Produces(MediaType.APPLICATION_JSON)
|
||
|
public Map<String, Object> getSearchTree(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||
|
User user = HrmUserVarify.getUser(request, response);
|
||
|
Map<String, Object> map = ParamUtil.request2Map(request);
|
||
|
SearchTreeParams params = JSONObject.toJavaObject((JSON) JSONObject.toJSON(map), SearchTreeParams.class);
|
||
|
return getJobWrapper(user).getSearchTree(params);
|
||
|
|
||
|
}
|
||
|
}
|