package com.propertyManagement.business.support.util;

import com.propertyManagement.business.domain.vo.LoginWxUser;
import com.propertyManagement.common.constant.Constants;
import com.siashan.toolkit.core.thread.threadlocal.ThreadLocalMap;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 认证工具
 *
 * @author liushuai
 * @date 2025/05/19
 */
public class AuthUtil {


    /**
     * 获取登录的小程序用户
     *
     * @return 小程序用户
     */
    public static LoginWxUser getWxUser(){
        return (LoginWxUser) ThreadLocalMap.get(Constants.USER_AUTH);
    }


    public static void main(String[] args) {
        Pattern p = Pattern.compile("^[a-zA-Z0-9]{6,10}$");
        Matcher matcher = p.matcher("12345dddddd6");
        System.out.println(matcher.matches());
    }
}
