public async Task <ResponseBase> Login([FromBody] LoginRequest request) { try { var action = new LoginAction(_sysUserBll, _sysUserRoleBll, _sysUserLogBll, _areaBll); return(await action.ProcessAction(HttpContext, request)); } catch (Exception ex) { Log.Error(request, ex, this.GetType()); return(ResponseBase.CodeError()); } }
public ResponseBase GetLoginMenu() { try { var action = new GetLoginMenuAction(_sysUserRoleBll); return(action.ProcessAction(HttpContext)); } catch (Exception ex) { Log.Error(ex.Message, ex, this.GetType()); return(ResponseBase.CodeError()); } }
public async Task <ResponseBase> GetUser([FromBody] GetUserRequest request) { try { var action = new GetUserAction(_sysUserBll); return(await action.ProcessAction(request)); } catch (Exception ex) { Log.Error(request, ex, this.GetType()); return(ResponseBase.CodeError()); } }
public async Task <ResponseBase> GetShopRetailRankAboutKing([FromBody] GetShopRetailRankAboutKingRequest request) { try { var action = new GetShopRetailRankAboutKingAction(_shopRetailRankBll); return(await action.ProcessAction(request.ShopId)); } catch (Exception ex) { Log.Error(request, ex, this.GetType()); return(ResponseBase.CodeError()); } }
public async Task <ResponseBase> GetArea() { try { var action = new GetAreaAction(_areaBll); return(await action.ProcessAction()); } catch (Exception ex) { Log.Error(ex.Message, ex, this.GetType()); return(ResponseBase.CodeError()); } }
public async Task <ResponseBase> GetSystemStatistics() { try { var request = new GetSystemStatisticsRequest(); if (!ComLib.HandleRequest(HttpContext, request)) { return(ResponseBase.Success(new SystemStatisticsView())); } var data = await _systemBll.GetSystemStatistics(request); return(ResponseBase.Success(data)); } catch (Exception ex) { Log.Error(ex.Message, ex, this.GetType()); return(ResponseBase.CodeError()); } }
public async Task <ResponseBase> GetProvince() { try { var areas = await _areaBll.GetProvince(); return(ResponseBase.Success(areas.Select(p => new GetAreaView() { AreaId = p.AreaId, AreaName = p.AreaName, ParentId = p.ParentId, Level = p.Level } ))); } catch (Exception ex) { Log.Error(ex.Message, ex, this.GetType()); return(ResponseBase.CodeError()); } }