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 cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.core.domain.model.LoginUser;
import com.hyp.common.enums.ApplyStatusEnum; import com.hyp.common.enums.ApplyStatusEnum;
import com.hyp.common.utils.SecurityUtils; import com.hyp.common.utils.SecurityUtils;
@ -65,13 +66,14 @@ public class ScoreInfoManager {
* *
* *
* @param applyId * @param applyId
* @param createId
* @return java.util.List<com.hyp.system.domain.RewScoreInfo> * @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<>(); LambdaQueryWrapper<RewScoreInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(RewScoreInfo::getApplyId,applyId); 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); return scoreInfoService.list(queryWrapper);
} }

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

Loading…
Cancel
Save