Commit e401ddc1 authored by 吴春's avatar 吴春

提交修改的信息

parent 751f6769
using Mall.CacheManager.DataStatistic;
using Mall.Common.Plugin.Redis;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.CacheManager.AppletWeChat
{
public class OrderPayReidsCache
{
static RedisHelper redis = new RedisHelper(DataStatistic.DataConstant.REDIS_DB2, DataStatistic.DataConstant.DATA_OrderPayId);
/// <summary>
/// 设置缓存
/// </summary>
/// <param name="value"></param>
public static void Set(string cacheKey, string value, TimeSpan ts)
{
try
{
// TimeSpan ts = DateTime.Now.AddMinutes(10) - DateTime.Now;
redis.StringSet(cacheKey, value, ts);
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "DATA_OrderPayId");
}
}
/// <summary>
/// 获取缓存
/// </summary>
/// <returns></returns>
public static string Get(string Key)
{
string cacheKey = DataConstant.DATA_OrderPayId + Key;
try
{
Object obj = redis.Get(cacheKey);
if (obj != null)
{
return obj.ToString();
}
}
catch (Exception ex)
{
//再获取一次缓存
try
{
System.Threading.Thread.Sleep(500);
Object obj = redis.Get(cacheKey);
if (obj != null)
{
return obj.ToString();
}
}
catch (Exception ex2)
{
Common.Plugin.LogHelper.Write(ex2, "DATA_OrderPayId2");
}
Common.Plugin.LogHelper.Write(ex, "DATA_OrderPayId");
}
return "";
}
}
}
......@@ -21,5 +21,11 @@ namespace Mall.CacheManager.DataStatistic
/// 微信小程序token
/// </summary>
public static readonly string DATA_WeiXinToken = "DATA_WeiXinToken_";
/// <summary>
///订单支付缓存
/// </summary>
public static readonly string DATA_OrderPayId = "DATA_OrderPayId_";
}
}
......@@ -30,6 +30,12 @@ namespace Mall.Model.Entity.MarketingCenter
public DateTime CreateDate { get; set; }
public DateTime UpdateDate { get; set; }
/// <summary>
/// 是否显示充值余额按钮0-否,1-是 2020-07-01 add By:w
/// </summary>
public int IsOpenBtn { get; set; }
/// <summary>
/// 开启余额功能0-否,1-是
/// </summary>
......
......@@ -121,7 +121,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice;
item.NoPaid = item.ALLCommission - item.Paid;
item.GrossProfit = item.AllPrice - item.ALLCommission;
item.GrossProfitRate = item.AllPrice == 0 ? 0 : item.GrossProfit / item.AllPrice;
item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list;
......@@ -183,7 +183,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice;
item.NoPaid = item.ALLCommission - item.Paid;
item.GrossProfit = item.AllPrice - item.ALLCommission;
item.GrossProfitRate = item.AllPrice == 0 ? 0 : item.GrossProfit / item.AllPrice;
item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
#region 组装数据
int Num = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment