From 5cfadeca9366d0194f149559a18acefb42ef21e0 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 8 May 2025 20:19:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/customer/mapper/CustInfoMapper.java | 31 ++++++++++--------- .../service/impl/CustInfoServiceImpl.java | 8 ++--- .../mapper/customer/CustInfoMapper.xml | 4 +-- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java index 64021b3b..0106c34a 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java @@ -25,31 +25,32 @@ import java.util.List; public interface CustInfoMapper extends BaseMapper { CustInfo selectOne(CustInfo custInfo); - int updateById(CustInfo custInfo); + + int updateCustPwdByCustId(@Param("pwd") String pwd, @Param("custId") Long custId); CustInfoVo queryCustInfoDetail(@Param("info") CustInfo info); CustInfoVo queryCustInfo(@Param("info") CustInfoDTO info); - @Select({"select c.cust_id, c.cust_name, c.mobile from cust_info c inner join acc_card a on c.cust_id = a.cust_id where a.serial_num = #{serialNum}"}) - CustInfo queryCustBySerialNum(String serialNum); - - - @Select({"select cust_id from cust_info where cust_num = #{custNum} and cust_state=1"}) - Long selectCustIdByCustNum(String custNum); - - @Select({"SELECT cust_id FROM cust_info where cust_third_id = #{custThirdId} and cust_state = 1"}) - Long queryCustIdByCustThirdId(String custThirdId); - - @Select({"select cust_num, cust_name, org_full_name, cust_photo_url, ai.acc_bal from cust_info ci left join acc_info ai on ci.cust_id = ai.cust_id where ci.cust_id = #{custId} "}) - MacOrdCurrWriteOffVO getCustAccInfoByCustId(@Param("custId") Long custId); +// @Select({"select c.cust_id, c.cust_name, c.mobile from cust_info c inner join acc_card a on c.cust_id = a.cust_id where a.serial_num = #{serialNum}"}) +// CustInfo queryCustBySerialNum(String serialNum); +// +// +// @Select({"select cust_id from cust_info where cust_num = #{custNum} and cust_state=1"}) +// Long selectCustIdByCustNum(String custNum); +// +// @Select({"SELECT cust_id FROM cust_info where cust_third_id = #{custThirdId} and cust_state = 1"}) +// Long queryCustIdByCustThirdId(String custThirdId); +// +// @Select({"select cust_num, cust_name, org_full_name, cust_photo_url, ai.acc_bal from cust_info ci left join acc_info ai on ci.cust_id = ai.cust_id where ci.cust_id = #{custId} "}) +// MacOrdCurrWriteOffVO getCustAccInfoByCustId(@Param("custId") Long custId); CustInfoForRechargeVO getCustInfoForRechargeByCustNum(@Param("custNum") String custNum, @Param("custState") Integer custState); List listCustInfoForRechargeByCustNums(@Param("custNumList") List custNumList, @Param("custState") Integer custState); - @Select({"SELECT DISTINCT t1.cust_num FROM cust_info t1 LEFT JOIN cust_photo t2 ON t1.cust_id = t2.cust_id WHERE t1.cust_state = 1 AND t2.features_build_status IS NULL OR t2.features_build_status = 1"}) - List listCustNumNonFeatures(); +// @Select({"SELECT DISTINCT t1.cust_num FROM cust_info t1 LEFT JOIN cust_photo t2 ON t1.cust_id = t2.cust_id WHERE t1.cust_state = 1 AND t2.features_build_status IS NULL OR t2.features_build_status = 1"}) +// List listCustNumNonFeatures(); Long queryOrgManagerCustIdByCustId(@Param("custId") Long custId); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java index 9052e8cc..599d244a 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java @@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.bonus.canteen.core.customer.constants.*; +import com.bonus.canteen.core.customer.mapper.CustInfoMapper; import com.bonus.canteen.core.customer.po.CustomerNumByOrgIdMapperPO; import com.bonus.canteen.core.customer.vo.PageCustInfoPhotoVO; import com.bonus.common.core.constant.CacheConstants; @@ -29,7 +30,6 @@ import com.bonus.canteen.core.common.utils.LogUtil; import com.bonus.canteen.core.customer.api.CustCasualApi; import com.bonus.canteen.core.customer.business.CustInfoBurialPointBusiness; import com.bonus.canteen.core.customer.dto.*; -import com.bonus.canteen.core.customer.mapper.CustInfoMapper; import com.bonus.canteen.core.customer.model.CustAccTemp; import com.bonus.canteen.core.customer.model.CustErrorToLead; import com.bonus.canteen.core.customer.model.CustInfo; @@ -497,8 +497,7 @@ public class CustInfoServiceImpl extends ServiceImpl i } BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder(); String password = bCrypt.encode(newPassword); - custInfo.setPwd(password); - custInfoMapper.updateById(custInfo); + custInfoMapper.updateCustPwdByCustId(password, custInfo.getCustId()); ajaxResult.put("msg", "修改成功"); ajaxResult.put("code", "200"); } @@ -541,7 +540,8 @@ public class CustInfoServiceImpl extends ServiceImpl i public boolean verifySmsCode(SmsCodeVerifyDTO smsCodeVerifyDTO, String cacheKey) { String key = cacheKey + smsCodeVerifyDTO.getTelephoneNumber(); String code = redisService.getCacheObject(key); //RedisUtil.getString(key); - log.info("redis缓存验证码code : {}", code); + log.info("redis缓存验证码code: {}, 输入的验证码: {}, 检验结果1: {}, 检验结果2: {}", code, smsCodeVerifyDTO.getCode(), + ObjectUtil.isNotEmpty(code), ObjectUtil.equal(code, smsCodeVerifyDTO.getCode())); return ObjectUtil.isNotEmpty(code) && ObjectUtil.equal(code, smsCodeVerifyDTO.getCode()); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml index a44ef7b3..f987096c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml @@ -25,9 +25,9 @@ - + update cust_info - set cust_name = #{custName}, cust_num = #{custNum}, mobile = #{mobile}, id_card = #{idCard}, pwd = #{pwd} + set pwd = #{pwd} where cust_id = #{custId}