package com.ylx.common.component;

import cn.hutool.core.util.ObjectUtil;
import com.ylx.common.utils.SecurityUtils;
import org.springframework.stereotype.Component;

/**
 * 自定义客户权限校验类
 */
@Component("customerAuth")
public class CustomerAuth {

    private static final Integer CUSTOMER = 0;

    public boolean isCustomer() {
        Integer role = SecurityUtils.getWxLoginUser().getRole();
        return ObjectUtil.equals(CUSTOMER, role);
    }

}
