| 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.MainModels;
- using LitJson;
- using Library;
- namespace MySystem.Areas.Api.Controllers.v1
- {
- [Area("Api")]
- [Route("Api/[controller]/[action]")]
- public class LisController : BaseController
- {
- public LisController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
- {
- }
- #region 设置押金
- public string SetDeposit(string value)
- {
- string content = "";
- try
- {
- JsonData data = JsonMapper.ToObject(value);
- string sn = data["sn"].ToString();
- int serviceFee = int.Parse(data["serviceFee"].ToString());
- content = PublicImportDataService.Instance.SetLiSDeposit(sn, serviceFee);
- }
- catch(Exception ex)
- {
- Utils.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "设置立刷押金异常");
- }
- return content;
- }
- #endregion
- #region 设置费率
- public string SetFee(string value)
- {
- string content = "";
- try
- {
- JsonData data = JsonMapper.ToObject(value);
- string sn = data["sn"].ToString();
- decimal fee = decimal.Parse(data["fee"].ToString());
- content = PublicImportDataService.Instance.SetLiSFee(sn, fee);
- }
- catch(Exception ex)
- {
- Utils.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "设置立刷费率异常");
- }
- return content;
- }
- #endregion
- }
- }
|