public object GetStoreWeightGameList(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; string storeId = dicParas.ContainsKey("storeId") ? (dicParas["storeId"] + "") : string.Empty; if (string.IsNullOrEmpty(storeId)) { errMsg = "门店ID不能为空"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } IData_GameInfoService data_GameInfoService = BLLContainer.Resolve <IData_GameInfoService>(resolveNew: true); IBase_StoreWeight_GameService base_StoreWeight_GameService = BLLContainer.Resolve <IBase_StoreWeight_GameService>(resolveNew: true); var result = from a in data_GameInfoService.GetModels(p => p.StoreID.Equals(storeId, StringComparison.OrdinalIgnoreCase)) join b in base_StoreWeight_GameService.GetModels() on a.ID equals b.GameID into b1 from b in b1.DefaultIfEmpty() where b.GameID == (int?)null select new { GameName = a.GameName, GameID = a.ID }; return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, result)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
public object GetStoreWeightUserGameList(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; string storeId = dicParas.ContainsKey("storeId") ? (dicParas["storeId"] + "") : string.Empty; string userId = dicParas.ContainsKey("userId") ? (dicParas["userId"] + "") : string.Empty; if (string.IsNullOrEmpty(storeId)) { errMsg = "门店ID不能为空"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } if (string.IsNullOrEmpty(userId)) { errMsg = "用户ID不能为空"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } int iUserId = Convert.ToInt32(userId); IBase_StoreWeightService base_StoreWeightService = BLLContainer.Resolve <IBase_StoreWeightService>(resolveNew: true); IBase_StoreWeight_GameService base_StoreWeight_GameService = BLLContainer.Resolve <IBase_StoreWeight_GameService>(resolveNew: true); IData_GameInfoService data_GameInfoService = BLLContainer.Resolve <IData_GameInfoService>(resolveNew: true); var result = from a in base_StoreWeightService.GetModels(p => p.StoreID.Equals(storeId, StringComparison.OrdinalIgnoreCase) && p.BossID == iUserId) join b in base_StoreWeight_GameService.GetModels() on a.ID equals b.WeightID join c in data_GameInfoService.GetModels() on b.GameID equals c.ID select new { GameName = c.GameName, GameID = c.ID }; return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, result)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }