调用接口IPostService

    //岗位信息接口
    @Resource
    private IPostService postService;

内置方法

目前拥有7个接口

1. findPostByEntId
获取公司下的所有岗位>获取公司下的所有岗位

    /**
     * 获取公司下的所有岗位
     *
     * @param entId  企业id
     * @param enable 是否启用 true|false
     * @param page   页码
     * @param size   页数
     * @param search 搜索条件 (岗位名称)
     * @return
     */
Reply<?> findPostByEntId(@RequestParam("entId") String entId,@RequestParam(value = "enable", required = false) String enable,@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size,@RequestParam(value = "search", required = false) String search)

2. findPostById
根据岗位id获取岗位信息

    /**
     * 根据岗位id获取岗位信息
     *
     * @param postId 岗位id
     * @return
     */
Reply<PostEntity> findPostById(@PathVariable("postId") String postId)

响应示例:

{
  "code": "200",
  "data": {
    "createTime": "2020-11-19T01:37:32.000+0000",
    "updateTime": "2020-11-19T01:37:32.000+0000",
    "createBy": null,
    "updateBy": null,
    "remark": null,
    "postId": "1329237336441098240",
    "postName": "前端开发",
    "postLevel": 5,
    "entId": "0",
    "enable": 0
  },
  "time": 1617246324986,
  "msg": "操作成功",
  "annex": null,
  "success": true
}

3. findPostByIds
根据多个岗位id获取多个岗位信息

   /**
     * 根据多个岗位id获取多个岗位信息
     *
     * @param postIds 岗位id集合
     * @return
     */
Reply<List<PostEntity>> findPostByIds(@RequestBody List<String> postIds);

响应示例:

{
  "code": "200",
  "data": [
    {
      "createTime": "2020-11-19T01:37:32.000+0000",
      "updateTime": "2020-11-19T01:37:32.000+0000",
      "createBy": null,
      "updateBy": null,
      "remark": null,
      "postId": "1329237336441098240",
      "postName": "前端开发",
      "postLevel": 5,
      "entId": "0",
      "enable": 0
    },
    {
      "createTime": "2020-11-19T01:37:44.000+0000",
      "updateTime": "2020-11-19T01:37:44.000+0000",
      "createBy": null,
      "updateBy": null,
      "remark": null,
      "postId": "1329237387645161472",
      "postName": "后端开发",
      "postLevel": 5,
      "entId": "0",
      "enable": 0
    }
  ],
  "time": 1617246421725,
  "msg": "操作成功",
  "annex": null,
  "success": true
}

4. findPostByIdNoAuth
根据岗位id获取岗位信息-内部接口

   /**
     * 根据岗位id获取岗位信息-无鉴权
     *
     * @param postId 岗位id
     * @param from   内部调用凭证
     * @return
     */
Reply<PostEntity> findPostByIdNoAuth(@PathVariable("postId") String postId, @RequestHeader("from") String from)

5. findPostByIdsNoAuth
根据多个岗位id获取多个岗位信息-内部接口

    /**
     * 根据多个岗位id获取多个岗位信息-无鉴权
     *
     * @param postIds 岗位id集合
     * @param from    内部调用凭证
     * @return
     */
Reply<List<PostEntity>> findPostByIdsNoAuth(@RequestBody List<String> postIds, @RequestHeader("from") String from)

6. findSimplePostById
获取岗位名称

    /**
     * 获取岗位名称
     *
     * @param postId
     * @return
     */
Reply<String> findSimplePostById(@PathVariable("postId") String postId)

7. findSimplePostByIds
获取简单的岗位信息

    /**
     * 获取岗位信息 key(岗位id)-value(岗位名称)
     *
     * @param postIds
     * @return
     */
Reply<Map<String, String>> findSimplePostByIds(@RequestBody List<String> postIds)
文档更新时间: 2023-02-28 09:31   作者:欧阳少海