|
|
@@ -0,0 +1,100 @@
|
|
|
+package com.zhongzheng.controller.recruit;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+import cn.hutool.poi.word.Word07Writer;
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
+import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
+import com.zhongzheng.modules.recruit.bo.RecruitResumeAddBo;
|
|
|
+import com.zhongzheng.modules.recruit.bo.RecruitResumeEditBo;
|
|
|
+import com.zhongzheng.modules.recruit.bo.RecruitResumeQueryBo;
|
|
|
+import com.zhongzheng.modules.recruit.service.IRecruitResumeService;
|
|
|
+import com.zhongzheng.modules.recruit.vo.RecruitResumeVo;
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.zhongzheng.common.annotation.Log;
|
|
|
+import com.zhongzheng.common.core.controller.BaseController;
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
+import com.zhongzheng.common.enums.BusinessType;
|
|
|
+import com.zhongzheng.common.utils.poi.ExcelUtil;
|
|
|
+import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 招聘用户简历Controller
|
|
|
+ *
|
|
|
+ * @author change
|
|
|
+ * @date 2021-08-24
|
|
|
+ */
|
|
|
+@Api(value = "招聘用户简历控制器", tags = {"招聘用户简历管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/recruit/resume")
|
|
|
+public class RecruitResumeController extends BaseController {
|
|
|
+
|
|
|
+ private final IRecruitResumeService iRecruitResumeService;
|
|
|
+
|
|
|
+ private final WxTokenService wxTokenService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询招聘用户简历列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询招聘用户简历列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('recruit:resume:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo<RecruitResumeVo> list(RecruitResumeQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<RecruitResumeVo> list = iRecruitResumeService.queryList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取招聘用户简历详细信息
|
|
|
+ */
|
|
|
+ @ApiOperation("获取招聘用户简历详细信息")
|
|
|
+ @PreAuthorize("@ss.hasPermi('recruit:resume:query')")
|
|
|
+ @GetMapping("/{resumeId}")
|
|
|
+ public AjaxResult<RecruitResumeVo> getInfo(@PathVariable("resumeId" ) Long resumeId) {
|
|
|
+ return AjaxResult.success(iRecruitResumeService.queryById(resumeId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增招聘用户简历
|
|
|
+ */
|
|
|
+ @ApiOperation("新增招聘用户简历")
|
|
|
+ @Log(title = "招聘用户简历", businessType = BusinessType.INSERT)
|
|
|
+ @PreAuthorize("@ss.hasPermi('recruit:template:add')")
|
|
|
+ @PostMapping()
|
|
|
+ public AjaxResult<Void> add(@RequestBody RecruitResumeAddBo bo) {
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
+ return toAjax(iRecruitResumeService.insertByAddBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改招聘用户简历
|
|
|
+ */
|
|
|
+ @ApiOperation("修改招聘用户简历")
|
|
|
+ @Log(title = "招聘用户简历", businessType = BusinessType.UPDATE)
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:template:edit')")
|
|
|
+ @PostMapping("/edit")
|
|
|
+ public AjaxResult<Void> edit(@RequestBody RecruitResumeEditBo bo) {
|
|
|
+ return toAjax(iRecruitResumeService.updateByEditBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|