public static void SetLuaStatus(SysStatus status) { if (status != null) { billing = status.opencharge == (short)1; activation = status.openActvity == (short)1; cartoon = status.openComic == (short)1; firstCharge = status.openFirstCash == (short)1; downAward = status.openDownAward == (short)1; sevenAward = status.openSevenDay == (short)1; levelAward = status.openLevelAward == (short)1; fateAward = status.openFateAward == (short)1; festival = status.openFeast == (short)1; devil = status.openDevil == (short)1; signAward = status.openSign == (short)1; vipAward = status.openVipAward == (short)1; teamPlay = status.openTeamPlay == (short)1; chat = status.openChat == (short)1; weixin = status.openWeixin == (short)1; recruitStoneRole = status.openRecruitRoles == (short)1; recruitCoinRole = status.openRecruitRoles == (short)1; openStore = status.oepnStore == (short)1; } }
public static void fullfillByNetwork(BaseResponse response) { if (response != null && response.status != BaseResponse.ERROR) { LoginResponse resp = response as LoginResponse; if (resp != null && resp.data != null && resp.data.sysStatus != null) { SysStatus status = resp.data.sysStatus; billing = status.opencharge == (short)1; activation = status.openActvity == (short)1; cartoon = status.openComic == (short)1; firstCharge = status.openFirstCash == (short)1; downAward = status.openDownAward == (short)1; sevenAward = status.openSevenDay == (short)1; levelAward = status.openLevelAward == (short)1; fateAward = status.openFateAward == (short)1; festival = status.openFeast == (short)1; devil = status.openDevil == (short)1; signAward = status.openSign == (short)1; vipAward = status.openVipAward == (short)1; teamPlay = status.openTeamPlay == (short)1; chat = status.openChat == (short)1; weixin = status.openWeixin == (short)1; recruitStoneRole = status.openRecruitRoles == (short)1; recruitCoinRole = status.openRecruitRoles == (short)1; openStore = status.oepnStore == (short)1; openGuess = status.openGuess == (short)1; openLuckyWheel = status.openLuckWheel == (short)1; } } }
/// <summary> /// 获取状态 /// </summary> /// <param name="Source"></param> /// <returns></returns> public string GetStatusName(object Source) { if (Source != null) { int Status = Source.ToString().ToInt32(); SysStatus value = (SysStatus)Status; string name = DisplayNameExtension.GetDisplayNames(SysStatus.Enable, value.ToString()); return(name); } return(""); }
private void WriteToHistory(TEntity entity, SysStatus status, string user, DateTime now) { if (entity.SysStatus == SysStatus.Normal) { var historyEntity = JsonSerializer.Deserialize <THistoryEntity>(JsonSerializer.Serialize(entity)); historyEntity.SysStatus = status; historyEntity.SysUser = user; historyEntity.SysEnd = now.AddTicks(-1); Task.Run(() => { _dbContext.Add(historyEntity); _dbContext.SaveChanges(); }); } }