fix:添加用户id

dev
wangxy 12 months ago
parent 1c550a1acb
commit 6790427619

@ -2,6 +2,7 @@ package com.hyp.web.controller.manager;
import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hyp.common.core.domain.entity.SysUser;
import com.hyp.common.core.domain.model.LoginUser;
import com.hyp.common.enums.ApplyStatusEnum;
import com.hyp.common.utils.SecurityUtils;
@ -65,13 +66,14 @@ public class ScoreInfoManager {
*
*
* @param applyId
* @param createId
* @return java.util.List<com.hyp.system.domain.RewScoreInfo>
*/
public List<RewScoreInfo> getScoreInfo(String applyId,Long createId){
public List<RewScoreInfo> getScoreInfo(String applyId){
LambdaQueryWrapper<RewScoreInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(RewScoreInfo::getApplyId,applyId);
queryWrapper.eq(Objects.nonNull(createId), RewScoreInfo::getCreateId, createId);
if (!SysUser.isAdmin(SecurityUtils.getUserId())){
queryWrapper.eq(RewScoreInfo::getCreateId, SecurityUtils.getUserId());
}
return scoreInfoService.list(queryWrapper);
}

@ -59,9 +59,8 @@ public class ScoreInfoController extends BaseController {
@ApiOperation("评分查询")
@GetMapping("/getScoreInfo")
public AjaxResult getScoreInfo(@RequestParam String applyId,
@RequestParam(required = false) Long createId) {
return success(scoreInfoManager.getScoreInfo(applyId,createId));
public AjaxResult getScoreInfo(@RequestParam String applyId) {
return success(scoreInfoManager.getScoreInfo(applyId));
}
@ApiOperation("评分提交")

Loading…
Cancel
Save