From 67904276196649ff26ea809c9713dcf6fcc2f265 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Mon, 22 Apr 2024 14:34:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hyp/web/controller/manager/ScoreInfoManager.java | 8 +++++--- .../hyp/web/controller/reward/ScoreInfoController.java | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java index 9cbf825..90a314f 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java @@ -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 */ - public List getScoreInfo(String applyId,Long createId){ + public List getScoreInfo(String applyId){ LambdaQueryWrapper 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); } diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java b/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java index 3ddabd6..d4072f1 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java @@ -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("评分提交")