From 5384ed07d0b3e982bebaf1427c33c481df719a5f Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 23 Aug 2023 11:14:07 +0800 Subject: [PATCH] =?UTF-8?q?debug=20=E5=91=98=E5=B7=A5code=20=E5=94=AF?= =?UTF-8?q?=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java index 49d5e0f..56c1d7b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java @@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.log.mapper.OptLogMapper; import com.ningdatech.log.model.domain.OptLog; +import com.ningdatech.pmapi.common.constant.BizConst; import com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper; import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; import com.ningdatech.pmapi.scheduler.task.model.CommonLog; @@ -79,7 +80,8 @@ public class CommonLogTask { String employeeCode = userInfo.getEmployeeCode(); if (StringUtils.isNotBlank(employeeCode)){ DingEmployeeInfo dingEmployeeInfo = dingEmployeeInfoMapper.selectOne(new LambdaQueryWrapper() - .eq(DingEmployeeInfo::getEmployeeCode,employeeCode)); + .eq(DingEmployeeInfo::getEmployeeCode,employeeCode) + .last(BizConst.LIMIT_1)); if (dingEmployeeInfo != null){ commonLog.setUserId(String.valueOf(dingEmployeeInfo.getAccountId())); }