| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Http;
- using Microsoft.Extensions.Logging;
- using Microsoft.Extensions.Options;
- using Microsoft.AspNetCore.Authorization;
- using System.Web;
- using MySystem.Models.Main2;
- using MySystem.Service.Main2;
- using LitJson;
- using Library;
- namespace MySystem.Areas.Api.Controllers.v1.Main2
- {
- [Area("Api")]
- [Route("/v1/QrCodePlateMain/[controller]/[action]")]
- public class MerchantParamSetRecordController : BaseController
- {
- public MerchantParamSetRecordController(IHttpContextAccessor accessor) : base(accessor)
- {
- }
- #region 商户管理-商户管理-直连商户活动变更记录
- [Authorize]
- public JsonResult DirectMerchantParamSetRecordList(string value)
- {
- value = PublicFunction.DesDecrypt(value); ;
- JsonData data = JsonMapper.ToObject(value);
- List<Dictionary<string, object>> dataList = DirectMerchantParamSetRecordListDo(value);
- return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
- }
- private List<Dictionary<string, object>> DirectMerchantParamSetRecordListDo(string value)
- {
- JsonData data = JsonMapper.ToObject(value);
- string MerchantId = data["MerchantId"].ToString(); //商户Id
- int pageSize = int.Parse(function.CheckInt(data["page_size"].ToString()));
- int pageNum = int.Parse(function.CheckInt(data["page_num"].ToString()));
- string condition = "";
- List<RelationData> relationData = new List<RelationData>();
- List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
- List<Dictionary<string, object>> source = MerchantParamSetRecordService.List(relationData, condition, pageNum, pageSize);
- foreach (Dictionary<string, object> subdata in source)
- {
- Dictionary<string, object> curData = new Dictionary<string, object>();
- //商户Id
- var Id = int.Parse(subdata["MerchantId"].ToString());
- curData.Add("Id", int.Parse(subdata["Id"].ToString())); //变更记录Id
- curData.Add("Status", int.Parse(subdata["Status"].ToString())); //活动状态(1 使用中 -1 已失效 0 已关闭)
- // var merAddInfo = MerchantAddInfoService.Query(Id);
- curData.Add("MerchantName", MerchantAddInfoService.Query(Id).CertMerchantName); //商户名称
- curData.Add("CreateDate", subdata["AfterCreateDate"].ToString() == "" ? "" : DateTime.Parse(subdata["CreateDate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")); //最后操作时间
- curData.Add("GetPercent", subdata["AfterGetPercent"].ToString()); //实收比例
- curData.Add("DiviPersons", subdata["AfterDiviPersons"].ToString()); //分红人数
- curData.Add("ProfitDays", subdata["AfterProfitDays"].ToString()); //分红天数
- curData.Add("MinPayMoney", subdata["AfterMinPayMoney"].ToString()); //参与门槛
- curData.Add("DiviPercent", subdata["AfterDiviPercent"].ToString()); //最大分红比例
- dataList.Add(curData);
- }
- return dataList;
- }
- #endregion
- }
- }
|