From 65769b71d1f40647571a7cebb30fa3fad0ae33d1 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Tue, 31 Dec 2024 11:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=20?= =?UTF-8?q?=E4=B8=87=E8=83=BD=E9=AA=8C=E8=AF=81=E7=A0=81=20147258?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/service/impl/UserServiceImpl.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java b/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java index 306d5d47..6d2f289f 100644 --- a/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java +++ b/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java @@ -68,6 +68,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import weixin.popular.api.SnsAPI; @@ -116,6 +117,10 @@ public class UserServiceImpl extends ServiceImpl implements private DiscSpinningService discSpinningService; @Autowired private SysUserService sysUserService; + + @Value("${spring.profiles.active}") + private String profiles; + private ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock(true); @Override @@ -902,7 +907,14 @@ public class UserServiceImpl extends ServiceImpl implements if (StringUtils.isEmpty(msg)) { return Result.error("验证码不能为空!"); } - Msg msg1 = msgDao.findByPhoneAndCode(phone, msg); + Msg msg1 = null; + if (!"prod".equals(profiles) && !"147258".equals(msg)) { + msg1 = msgDao.findByPhoneAndCode(phone, msg); + if (msg1 == null) { + return Result.error("验证码不正确!"); + } + } + if (msg1 == null) { return Result.error("验证码不正确!"); } @@ -1509,7 +1521,7 @@ public class UserServiceImpl extends ServiceImpl implements userMoneyDetails.setMoneyType(1); boolean ret = userMoneyDetailsService.save(userMoneyDetails); if (ret) { - ThreadUtil.execAsync(()->{ + ThreadUtil.execAsync(() -> { discSpinningService.withdrawAsync(entity, money.doubleValue(), "[提现]"); }); }