admin
2020-07-16 be67478cae6bf9308f15949a21e7d0a57a3f0ecb
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
@@ -9,6 +9,8 @@
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.util.*;
import com.yeshi.fanli.vo.taobao.TaoBaoUser;
import org.springframework.context.annotation.Lazy;
@@ -64,9 +66,6 @@
    @Resource
    private RedisManager redisManager;
//    @Resource
//    private UserInfoMapper userInfoMapper;
    @Resource
    private UserInfoService userInfoService;
@@ -97,8 +96,9 @@
    @Resource
    private UserInfoDeleteRecordService userInfoDeleteRecordService;
    @Resource
    private JedisPool jedisPool;
    private ConfigService configService;
    @Lazy
    @Resource
@@ -120,9 +120,10 @@
        LogHelper.lgoinInfo(logInfo.toString());
        HttpSession session = request.getSession();
        if (first != null && first == true)
        if (first != null && first == true) {
            session.removeAttribute("LAST_LOGIN_USER");
        // 会话中上次登录的用户
        }
            // 会话中上次登录的用户
        if (wxinstall) {// 安装了微信的状态
            UserInfo lastUser = (UserInfo) session.getAttribute("LAST_LOGIN_USER");
            UserInfo userInfo = null;
@@ -808,12 +809,23 @@
            throw new UserAccountException(1, "请输入手机号码");
        }
        phone = phone.replaceAll(" ", "");
        boolean isDemo=false;
        //查询上线测试的号码与验证码
        String demoLogin = configService.getValue(ConfigKeyEnum.demoLoginUser, businessSystem.getSystem());
        if (!StringUtil.isNullOrEmpty(demoLogin)) {
            String demoPhone = demoLogin.split("#")[0];
            String demoCode = demoLogin.split("#")[1];
            if(phone.equalsIgnoreCase(demoPhone)&&demoCode.equalsIgnoreCase(vcode)){
                isDemo=true;
            }
        }
//        "17316780233".equalsIgnoreCase(phone) && "2581".equalsIgnoreCase(vcode);
        // 苹果应用商店上线测试号码
        if ("17316780233".equalsIgnoreCase(phone) && "2581".equalsIgnoreCase(vcode)) {
        if (isDemo) {//测试号码
            ;
        } else {
            if (StringUtil.isNullOrEmpty(vcode)) {
                throw new UserAccountException(1, "请输入验证码");
            }