From 543f840aaad3261dc72200baf5f889989123ae88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E9=B9=8F=E8=BE=89?= <18322780655@163.com> Date: Fri, 31 May 2024 15:34:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=9A=E5=91=98=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cashierservice/service/LoginService.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java index 9ad5330..52e9ba9 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java @@ -116,6 +116,28 @@ public class LoginService { tbShopUserMapper.updateByPrimaryKey(tbShopUser); } } + + List tbShopUse= tbShopUserMapper.selectByPhone(telephone); + if(ObjectUtil.isNotNull(tbShopUse)){ + TbUserInfo finalUserInfo = userInfo; + tbShopUse.parallelStream().forEach(it->{ + if(ObjectUtil.isNull(it.getUserId())||ObjectUtil.isEmpty(it.getUserId())){ + it.setUserId(finalUserInfo.getId().toString()); + it.setUpdatedAt(System.currentTimeMillis()); + tbShopUserMapper.updateByPrimaryKey(it); + } + }); + } + + + + + + + + + + } } //生成token 信息