package com.sifang.modules.customer.utils;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.sifang.modules.sunshine.SystemSetting.utils.StringUtil;

import java.util.Map;

public class EmployeRoleUtils {


    public static void getRoleDataAuthority(String userId, Map<String, String> map) {

        Record rd = Db.findFirst("SELECT * FROM crm_platform_employee WHERE user_id=?", userId);
        map.put("projectNumber", rd.getStr("project_number"));
        map.put("province", rd.getStr("provices"));
        map.put("city", rd.getStr("city"));
        map.put("traderIds", rd.getStr("trader_id"));
    }


    public static void getUserDataAuthority(String userId, Map<String, String> map) {
        Record rd = Db.findFirst("SELECT * FROM crm_platform_employee WHERE user_id=?", userId);
        map.put("projectNumberE", rd.getStr("project_number"));
        map.put("provinceE", rd.getStr("provices"));
        map.put("cityE", rd.getStr("city"));
        map.put("traderIdsE", rd.getStr("trader_id"));
    }


}
