测试环境 万能验证码 147258

This commit is contained in:
wangw 2024-12-31 11:44:37 +08:00
parent 957682ef41
commit 65769b71d1
1 changed files with 14 additions and 2 deletions

View File

@ -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<UserDao, UserEntity> 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<UserDao, UserEntity> 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<UserDao, UserEntity> implements
userMoneyDetails.setMoneyType(1);
boolean ret = userMoneyDetailsService.save(userMoneyDetails);
if (ret) {
ThreadUtil.execAsync(()->{
ThreadUtil.execAsync(() -> {
discSpinningService.withdrawAsync(entity, money.doubleValue(), "[提现]");
});
}