TestController.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * 测试
  3. */
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using Microsoft.AspNetCore.Mvc;
  8. using Microsoft.AspNetCore.Http;
  9. using Microsoft.Extensions.Logging;
  10. using Microsoft.Extensions.Options;
  11. using Microsoft.AspNetCore.Authorization;
  12. using MySystem.Service.Main;
  13. using System.Web;
  14. using MySystem.Models.Main;
  15. using LitJson;
  16. using Library;
  17. using System.Text.RegularExpressions;
  18. namespace MySystem.Areas.Api.Controllers.v1
  19. {
  20. [Area("Api")]
  21. [Route("/v1/kxsmain/[controller]/[action]")]
  22. public class TestController : BaseController
  23. {
  24. public TestController(IHttpContextAccessor accessor) : base(accessor)
  25. {
  26. }
  27. #region 测试方法
  28. /// <summary>
  29. /// 产品库列表
  30. /// </summary>
  31. /// <returns></returns>
  32. // [HttpPost]
  33. // [Authorize]
  34. [Route("/main/test/all")]
  35. public JsonResult List(string value)
  36. {
  37. value = PublicFunction.DesDecrypt(value);
  38. JsonData data = JsonMapper.ToObject(value);
  39. // SystemToolUtil.CheckMachineDo("ceshi", "K00132726", "00005702230118388360", 1, 0);
  40. // var userInfo = UsersService.Query(598);
  41. // var OrderCount = OrdersService.Count(" UserId=" + userInfo.Id + " and PayStatus=1 and TotalPrice=600");
  42. // string[] ParentNavList = userInfo.ParentNav.Trim(',').Replace(",,", ",").Split(',');
  43. // var topUserInfo = new Users();
  44. // var topUserInfo1 = new Users();
  45. // if (ParentNavList.Length > 1)
  46. // {
  47. // topUserInfo = BaseClass.GetTopUserInfo(userInfo.ParentNav, 1);
  48. // topUserInfo1 = UsersService.Query(int.Parse(ParentNavList[1]));
  49. // }
  50. // else
  51. // {
  52. // topUserInfo = BaseClass.GetTopUserInfo(userInfo.ParentNav, 0);
  53. // topUserInfo1 = UsersService.Query(int.Parse(ParentNavList[0]));
  54. // }
  55. // var TopUserInfo = topUserInfo.MakerCode + " " + topUserInfo.RealName;
  56. // var TopUserInfo1 = topUserInfo1.MakerCode + " " + topUserInfo1.RealName;
  57. // BaseClass.AddAccountRecord(598, 1, 100, "+BalanceAmount,+TotalAmount", 0);
  58. var CertMerchantName = "四川睿行文化传播有限公司";
  59. var BrandId = 1;
  60. var check = MerchantAddInfoService.Query(" CertMerchantName like '" + CertMerchantName + "%' and Status<1 and QueryCount<1 and BrandId=" + BrandId);
  61. return Json(new AppResultJson() { Status = "1", Info = "" });
  62. }
  63. #endregion
  64. }
  65. }