package org.springblade.gateway.login_gateway.service.impl;

import org.springblade.gateway.login_gateway.service.LoginService;
import org.springblade.sing.user.entity.LoginUser;
import org.springblade.sing.user.service.ILoginUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.regex.Pattern;

@Service
public class LoginServiceImpl implements LoginService {
	@Autowired
	private ILoginUserService loginUserService;

	/**
	 * 判断是否是移动号码
	 * @param phone
	 * @return
	 */
	@Override
	public boolean isCMCC(String phone) {
		if (Pattern.matches("^1(3[4-9]|4[7]|5[012789]|6[5]|7[28]|8[23478]|9[8])\\d{8}$|(^170[356]\\d{7}&)",phone)){
			return true;
		}
		return false;
	}
}
