12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Data;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.Extensions.Logging;
- using MySystem.PxcModels;
- using System.Threading;
- using Library;
- using LitJson;
- namespace MySystem.Controllers
- {
- public class HomeController : Controller
- {
- private readonly ILogger<HomeController> _logger;
- public HomeController(ILogger<HomeController> logger)
- {
- _logger = logger;
- }
- public IActionResult Index()
- {
- return View();
- }
- public IActionResult Error()
- {
- string isapi = Request.Headers["Api"].ToString();
- if (isapi != "1")
- {
- if (Response.StatusCode == 500)
- {
- return Redirect("/public/errpage/pc/500.html");
- }
- else if (Response.StatusCode == 502)
- {
- return Redirect("/public/errpage/pc/502.html");
- }
- else if (Response.StatusCode == 404)
- {
- return Redirect("/public/errpage/pc/404.html");
- }
- }
- return View();
- }
- public string test(int id = 0)
- {
- string txt = "ok";
- // txt = WeChatFunction.Instance.QueryProfitShare("1646405429","4200001807202306098649105270","2023060910241258564572510");
- // ProfitHelper.Instance.ReturnStat(Id, 2);
- WebCMSEntities db = new WebCMSEntities();
- List<int> oids = new List<int>();
- if(id > 0)
- {
- oids.Add(id);
- }
- else
- {
- oids.Add(15);
- oids.Add(16);
- oids.Add(17);
- oids.Add(18);
- oids.Add(19);
- oids.Add(20);
- }
- foreach(int oid in oids)
- {
- ConsumerOrders order = db.ConsumerOrders.FirstOrDefault(m => m.Id == oid);
- if(order != null)
- {
- RedisDbconn.Instance.AddList("ConsumerOrders:Divi:2:List", order.Id.ToString());
- // RedisDbconn.Instance.AddList("ConsumerOrders:Divi:2:" + order.MerchantId, order);
- }
- }
- db.Dispose();
- return txt;
- }
-
- }
- }
|