Exemplo n.º 1
0
 public BacsicsController(WeixiaoSysContext db, IMapper mapper, IOptions <RSASettings> setting)
 {
     rsa = new RSAHelper(RSAType.RSA2, Encoding.UTF8, setting.Value.PrivateKey, setting.Value.PublicKey, setting.Value.AppKey, setting.Value.SplitStr);
     // res = new RsaResponseDto();
     result      = new ResponseDto();
     result.data = null;
     if (_db == null)
     {
         lock (this)
         {
             if (_db == null)
             {
                 _db = db;
             }
         }
     }
     if (_mapper == null)
     {
         lock (this)
         {
             if (_mapper == null)
             {
                 _mapper = mapper;
             }
         }
     }
     //if (_user==null)
     //{
     //    lock (this)
     //    {
     //        var auth = Request.HttpContext.AuthenticateAsync();
     //        var userData = auth.Result.Principal.Claims.FirstOrDefault(x => x.Type.Equals(ClaimTypes.UserData)).Value;
     //        _user = JsonSerializer.Deserialize<EmployeeDto>(userData);
     //    }
     //}
 }
Exemplo n.º 2
0
 public PowerService(WeixiaoSysContext context)
 {
     db = context;
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="db"></param>
 /// <param name="mapper"></param>
 /// <param name="_jwtSettingsAccesser"></param>
 /// <param name="setting"></param>
 /// <returns></returns>
 public UserController(WeixiaoSysContext db, IMapper mapper, IOptions <JwtSettings> _jwtSettingsAccesser, IOptions <RSASettings> setting) : base(db, mapper, setting)
 {
     _jwtSettings = _jwtSettingsAccesser.Value;
     bll          = new EmpService(db);
 }
Exemplo n.º 4
0
 public CompanyService(WeixiaoSysContext context)
 {
     db = context;
 }
Exemplo n.º 5
0
 public DepService(WeixiaoSysContext context)
 {
     db = context;
 }
Exemplo n.º 6
0
 public OperationService(WeixiaoSysContext context)
 {
     db = context;
 }
Exemplo n.º 7
0
 public MenuService(WeixiaoSysContext context)
 {
     db = new WeixiaoSysContext();
 }
Exemplo n.º 8
0
 public RoleController(WeixiaoSysContext db, IMapper mapper, IOptions <RSASettings> setting) : base(db, mapper, setting)
 {
     bll = new RoleService(db);
 }
Exemplo n.º 9
0
 public EmpGroupService(WeixiaoSysContext context)
 {
     db = context;
 }
Exemplo n.º 10
0
 public UploadController(WeixiaoSysContext db, IMapper mapper, IOptions <RSASettings> setting) : base(db, mapper, setting)
 {
 }
Exemplo n.º 11
0
 public RoleService(WeixiaoSysContext context)
 {
     db = context;
 }
Exemplo n.º 12
0
 public AreaService(WeixiaoSysContext context)
 {
     db = new WeixiaoSysContext();
 }
Exemplo n.º 13
0
 public PositionService(WeixiaoSysContext context)
 {
     db = context;
 }
Exemplo n.º 14
0
 // private readonly DepService bll;
 public FlowController(WeixiaoSysContext db, IMapper mapper, IOptions <RSASettings> setting) : base(db, mapper, setting)
 {
     // bll = new DepService(db);
 }