From 36bf1e057a1a9fa2608af9afebda849dd02bf0d0 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Fri, 12 Apr 2024 15:47:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=90=8C=E6=AD=A5=E9=87=8D?= =?UTF-8?q?=E5=A4=8D,bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/op/system/service/impl/SysUserServiceImpl.java | 6 +++--- .../src/main/resources/mapper/system/SysUserMapper.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/op-modules/op-system/src/main/java/com/op/system/service/impl/SysUserServiceImpl.java b/op-modules/op-system/src/main/java/com/op/system/service/impl/SysUserServiceImpl.java index 3475cd68..d483ecf3 100644 --- a/op-modules/op-system/src/main/java/com/op/system/service/impl/SysUserServiceImpl.java +++ b/op-modules/op-system/src/main/java/com/op/system/service/impl/SysUserServiceImpl.java @@ -592,14 +592,14 @@ public class SysUserServiceImpl implements ISysUserService { int n = 0; //sap返回的供应商编码 - List codes = dtos.stream().map(HRInfo::getUserCode).collect(Collectors.toList()); + List codes = dtos.stream().map(HRInfo::getUserName).collect(Collectors.toList()); //sap返回的工作中心编码-本地已存在 List exsitCodes = userMapper.getExsitCodes(codes); //sap返回的工作中心编码-本地不存在// 差集 (list2 - list1) List noExsitCodes = codes.stream().filter(item -> !exsitCodes.contains(item)).collect(Collectors.toList()); List updates = dtos.stream() - .filter(item -> exsitCodes.contains(item.getUserCode())) + .filter(item -> exsitCodes.contains(item.getUserName())) .collect(Collectors.toList()); if(!CollectionUtils.isEmpty(updates)){ @@ -621,7 +621,7 @@ public class SysUserServiceImpl implements ISysUserService { System.out.println("人员更新成功条数:"+m); } List adds = dtos.stream() - .filter(item -> noExsitCodes.contains(item.getUserCode())) + .filter(item -> noExsitCodes.contains(item.getUserName())) .collect(Collectors.toList()); if(!CollectionUtils.isEmpty(adds)){ diff --git a/op-modules/op-system/src/main/resources/mapper/system/SysUserMapper.xml b/op-modules/op-system/src/main/resources/mapper/system/SysUserMapper.xml index 0739a7b6..22d19da5 100644 --- a/op-modules/op-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/op-modules/op-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -241,9 +241,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sex = #{item.sex}, del_flag = #{item.delFlag}, update_by = #{item.updateBy}, - update_time = #{updateTime} + update_time = #{item.updateTime} where - user_name = #{item.userCode} + user_name = #{item.userName}