Commit e19a9939 by zwb

修改查询简历列表的用户登录校验

parent 01f5f1ee
package com.bkty.system.controller; package com.bkty.system.controller;
import com.bkty.system.api.model.LoginUser;
import com.bkty.system.domain.dto.ResumeByPdfDto; import com.bkty.system.domain.dto.ResumeByPdfDto;
import com.bkty.system.domain.dto.ResumeListItemCache; import com.bkty.system.domain.dto.ResumeListItemCache;
import com.bkty.system.domain.dto.ResumeMakeDto; import com.bkty.system.domain.dto.ResumeMakeDto;
...@@ -19,6 +20,7 @@ import org.dromara.common.core.domain.UserLoginInfo; ...@@ -19,6 +20,7 @@ import org.dromara.common.core.domain.UserLoginInfo;
import org.dromara.common.core.exception.JxgException; import org.dromara.common.core.exception.JxgException;
import org.dromara.common.core.exception.WarnException; import org.dromara.common.core.exception.WarnException;
import org.dromara.common.core.utils.SecurityUtils; import org.dromara.common.core.utils.SecurityUtils;
import org.dromara.common.satoken.utils.LoginHelper;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -99,10 +101,10 @@ public class NewEditionResumeController { ...@@ -99,10 +101,10 @@ public class NewEditionResumeController {
*/ */
@PostMapping("/resumeList") @PostMapping("/resumeList")
public R<List<ResumeListItemCache>> resumeList(){ public R<List<ResumeListItemCache>> resumeList(){
UserLoginInfo userLoginInfo = SecurityUtils.getUser(); LoginUser loginUser = LoginHelper.getLoginUser();
Long userId = 1L; Long userId = 1L;
if (null != userLoginInfo){ if (null != loginUser){
userId = userLoginInfo.getId(); userId = loginUser.getUserId();
} }
List<ResumeListItemCache> result = this.newEditionResumeService.resumeList(userId); List<ResumeListItemCache> result = this.newEditionResumeService.resumeList(userId);
return new R<>(result); return new R<>(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment