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);
     //    }
     //}
 }
Example #2
0
 public PowerService(WeixiaoSysContext context)
 {
     db = context;
 }
Example #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);
 }
Example #4
0
 public CompanyService(WeixiaoSysContext context)
 {
     db = context;
 }
Example #5
0
 public DepService(WeixiaoSysContext context)
 {
     db = context;
 }
Example #6
0
 public OperationService(WeixiaoSysContext context)
 {
     db = context;
 }
Example #7
0
 public MenuService(WeixiaoSysContext context)
 {
     db = new WeixiaoSysContext();
 }
Example #8
0
 public RoleController(WeixiaoSysContext db, IMapper mapper, IOptions <RSASettings> setting) : base(db, mapper, setting)
 {
     bll = new RoleService(db);
 }
Example #9
0
 public EmpGroupService(WeixiaoSysContext context)
 {
     db = context;
 }
Example #10
0
 public UploadController(WeixiaoSysContext db, IMapper mapper, IOptions <RSASettings> setting) : base(db, mapper, setting)
 {
 }
Example #11
0
 public RoleService(WeixiaoSysContext context)
 {
     db = context;
 }
Example #12
0
 public AreaService(WeixiaoSysContext context)
 {
     db = new WeixiaoSysContext();
 }
Example #13
0
 public PositionService(WeixiaoSysContext context)
 {
     db = context;
 }
Example #14
0
 // private readonly DepService bll;
 public FlowController(WeixiaoSysContext db, IMapper mapper, IOptions <RSASettings> setting) : base(db, mapper, setting)
 {
     // bll = new DepService(db);
 }