using Central.Control.Domain;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace MES.Production.Service.ServiceImp
{
///
/// Service 授权模块关系处理类
/// add 作者: 季健国 QQ:181589805 by 2016-05-22
///
public class PermissionManage : RepositoryBase, IService.IPermissionManage
{
///
/// 根据系统ID获取所有模块的权限ID集合
///
public List GetPermissionIdBySysId(string sysId)
{
try
{
string sql = "select p.id from sys_permission p where exists(select 1 from sys_module t where t.fk_belongsystem=@sysid and t.id=p.moduleid)";
DbParameter para = new SqlParameter("@sysid", sysId);
return this.SelectBySql(sql, para);
}
catch (Exception e)
{
throw e;
}
}
}
}