12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Data;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Http;
- using Microsoft.Extensions.Logging;
- using Microsoft.Extensions.Options;
- using Microsoft.AspNetCore.Authorization;
- using MySystem.MainModels;
- using LitJson;
- using Library;
- using System.Security.Cryptography;
- using System.Text;
- namespace MySystem.Areas.Api.Controllers.v1
- {
- [Area("Api")]
- [Route("/v1/QrCodePlateMain/[controller]/[action]")]
- public class PageInfoController : ConsumersController
- {
- public PageInfoController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
- {
- }
- #region 我的-分红记录-列表
- [Authorize]
- public JsonResult AgreeMentInfo(string value)
- {
- value = DesDecrypt(value);
- JsonData data = JsonMapper.ToObject(value);
- Dictionary<string, object> Other = new Dictionary<string, object>();
- List<Dictionary<string, object>> dataList = AgreeMentInfoDo(value, out Other);
- return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList, Other = Other });
- }
- private List<Dictionary<string, object>> AgreeMentInfoDo(string value, out Dictionary<string, object> Other)
- {
- JsonData data = JsonMapper.ToObject(value);
- int Id = int.Parse(function.CheckInt(data["Id"].ToString())); //Id
- List<RelationData> relationData = new List<RelationData>();
- List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
- DataTable dt = CustomerSqlConn.dtable("SELECT Title,Contents FROM PageInfo WHERE Id=" + Id + "", AppConfig.Base.BsSqlConnStr);
- foreach (DataRow dr in dt.Rows)
- {
- Dictionary<string, object> curData = new Dictionary<string, object>();
- curData.Add("Title", dr["Title"].ToString()); //标题
- curData.Add("Contents", dr["Contents"].ToString()); //创建时间
- dataList.Add(curData);
- }
- Other = new Dictionary<string, object>();
- Other.Add("count", dt.Rows.Count);
- return dataList;
- }
- #endregion
- }
- }
|