using Cksoft.Data; using Cksoft.Data.Repository; using Cksoft.Unity; using Cksoft.Unity.Log4NetConfig; using DllUfpDal; using DllUfpEntity; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; namespace WebApplet.Controllers { [Route("eap/api/[controller]/[action]")] public class BtnFuncController : ControllerBase {/// /// 判断是否有操作权限 /// /// public EapResponse GetIsPermitted(string btnCode) { string errorinfo = string.Empty; string userCode = Request.Headers["usercode"]; using (IDatabase ufpDb = DbFactory.Base("ufp")) { var btnFuncDal = new BtnFuncDal(ufpDb); var res = btnFuncDal.IsPermitted(userCode, btnCode, ref errorinfo); return new EapResponse { Code = res ? 1 : 0 }; } } } }