package com.engine.organization.transmethod;

import org.apache.commons.lang3.StringUtils;
import weaver.hrm.roles.RolesComInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author weaver_cl
 * @Description:
 * @Date 2022/11/9
 * @Version V1.0
 **/
public class SystemTransMethod {

    public static String getRoleName(String roleIds) {
        RolesComInfo rolesComInfo = new RolesComInfo();
        List<String> list = new ArrayList<>();
        if (StringUtils.isNotBlank(roleIds)) {
            for (String roleId : roleIds.split(",")) {
                list.add(rolesComInfo.getRolesRemark(roleId));
            }
        }
        return StringUtils.join(list,",");
    }

}
