|
|
@@ -30,8 +30,15 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
{
|
|
|
value = DesDecrypt(value);
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
+ string result = RedisDbconn.Instance.Get<string>("ActivityRedPackageTop10");
|
|
|
+ if(!string.IsNullOrEmpty(result))
|
|
|
+ {
|
|
|
+ return Json(new AppResultJson() { Status = "1", Info = "", Data = result });
|
|
|
+ }
|
|
|
List<Dictionary<string, object>> dataList = ListDo(value);
|
|
|
- return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
|
|
|
+ RedisDbconn.Instance.Set("ActivityRedPackageTop10", Newtonsoft.Json.JsonConvert.SerializeObject(dataList));
|
|
|
+ RedisDbconn.Instance.SetExpire("ActivityRedPackageTop10", 60);
|
|
|
+ return Json(new AppResultJson() { Status = "1", Info = "", Data = Newtonsoft.Json.JsonConvert.SerializeObject(dataList) });
|
|
|
}
|
|
|
public List<Dictionary<string, object>> ListDo(string value)
|
|
|
{
|