From cb4a3126fbb99cc1cca883bba41514ee128d7682 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Mon, 4 Jan 2021 22:12:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90org=E3=80=91=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=81=8C=E5=8A=A1=E6=94=B9=E4=B8=BAupdateById=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/service/impl/HrPositionServiceImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrPositionServiceImpl.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrPositionServiceImpl.java index 118787998..d9686405c 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrPositionServiceImpl.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrPositionServiceImpl.java @@ -16,7 +16,6 @@ import cn.stylefeng.roses.kernel.system.modular.organization.mapper.HrPositionMa import cn.stylefeng.roses.kernel.system.modular.organization.service.HrPositionService; import cn.stylefeng.roses.kernel.system.pojo.organization.HrPositionRequest; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; @@ -86,11 +85,9 @@ public class HrPositionServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper<>(); - updateWrapper.eq(HrPosition::getPositionId, sysPosition.getPositionId()); - updateWrapper.set(HrPosition::getStatusFlag, hrPositionRequest.getStatusFlag()); + sysPosition.setStatusFlag(hrPositionRequest.getStatusFlag()); - this.update(updateWrapper); + this.updateById(sysPosition); } @Override