From 423f0e1aa0731a6e7f20fea5800607cbfe7921b5 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 8 May 2025 20:45:25 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=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 This reverts commit 5cfadeca9366d0194f149559a18acefb42ef21e0. --- .../core/customer/mapper/CustInfoMapper.java | 31 +++++++++---------- .../service/impl/CustInfoServiceImpl.java | 8 ++--- .../mapper/customer/CustInfoMapper.xml | 4 +-- 3 files changed, 21 insertions(+), 22 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 0106c34a..64021b3b 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,32 +25,31 @@ import java.util.List; public interface CustInfoMapper extends BaseMapper { CustInfo selectOne(CustInfo custInfo); - - int updateCustPwdByCustId(@Param("pwd") String pwd, @Param("custId") Long custId); + int updateById(CustInfo custInfo); 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 599d244a..9052e8cc 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,7 +13,6 @@ 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; @@ -30,6 +29,7 @@ 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,7 +497,8 @@ public class CustInfoServiceImpl extends ServiceImpl i } BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder(); String password = bCrypt.encode(newPassword); - custInfoMapper.updateCustPwdByCustId(password, custInfo.getCustId()); + custInfo.setPwd(password); + custInfoMapper.updateById(custInfo); ajaxResult.put("msg", "修改成功"); ajaxResult.put("code", "200"); } @@ -540,8 +541,7 @@ 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: {}, 输入的验证码: {}, 检验结果1: {}, 检验结果2: {}", code, smsCodeVerifyDTO.getCode(), - ObjectUtil.isNotEmpty(code), ObjectUtil.equal(code, smsCodeVerifyDTO.getCode())); + log.info("redis缓存验证码code : {}", code); 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 f987096c..a44ef7b3 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 pwd = #{pwd} + set cust_name = #{custName}, cust_num = #{custNum}, mobile = #{mobile}, id_card = #{idCard}, pwd = #{pwd} where cust_id = #{custId}