From 8ab167f498cb4c5814edb348bc4db926c4549607 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 27 Jan 2025 13:22:46 +0800 Subject: [PATCH] login --- .../net/xnzn/core/customer/mapper/CustCasualMapper.java | 4 ++++ .../java/net/xnzn/core/customer/mapper/CustCasualMapper.xml | 6 ++++++ .../core/customer/service/impl/CustInfoBusinessImpl.java | 6 +++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.java index ca8d7a66..887bd62d 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.java @@ -19,4 +19,8 @@ public interface CustCasualMapper extends BaseMapper { @Select({"select casual_id, openid from cust_casual where cust_id = #{custId} and source_type = #{sourceType} and if_del = #{ifDel}"}) CustCasual selectCustCasualByCustId(@Param("custId") Long custId, @Param("sourceType") Integer sourceType, @Param("ifDel") Integer ifDel); + + int updateCustCasual(CustCasual custCasual); + + } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.xml index 80b74d18..e18057e0 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualMapper.xml @@ -56,4 +56,10 @@ + + update cust_casual + set openid = #{openId} + where casual_id = #{casualId} + + diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoBusinessImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoBusinessImpl.java index a52c86ee..410fa8bc 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoBusinessImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoBusinessImpl.java @@ -42,10 +42,10 @@ public class CustInfoBusinessImpl implements CustInfoBusiness { private SmsCodeApi smsCodeApi; @Autowired - private CustCasualMapper custCasualMapper; + private CustInfoMapper custInfoMapper; @Autowired - private CustInfoMapper custInfoMapper; + private CustCasualMapper custCasualMapper; public CustInfoAppIdLoginVO customLoginWithAppId(CustInfoAppIdLoginDTO content, Integer sourceType) { Integer loginType = content.getLoginType(); @@ -119,7 +119,7 @@ public class CustInfoBusinessImpl implements CustInfoBusiness { openid = custCasual.getOpenid(); if (StringUtils.isBlank(openid)) { openid = IdUtil.simpleUUID(); - //this.custCasualMapper.update((Object)null, (Wrapper)((LambdaUpdateWrapper)Wrappers.lambdaUpdate(CustCasual.class).eq(CustCasual::getCasualId, custCasual.getCasualId())).set(CustCasual::getOpenid, openid)); + this.custCasualMapper.updateCustCasual(custCasual); } }