|
@@ -267,6 +267,7 @@ namespace MySystem
|
|
}
|
|
}
|
|
if (GetMoney > minProfit)
|
|
if (GetMoney > minProfit)
|
|
{
|
|
{
|
|
|
|
+ decimal TmpCurDivi = suborder.CurDivi;
|
|
suborder.CurDivi += GetMoney;
|
|
suborder.CurDivi += GetMoney;
|
|
if (DiffMoney > 0)
|
|
if (DiffMoney > 0)
|
|
{
|
|
{
|
|
@@ -277,14 +278,14 @@ namespace MySystem
|
|
{
|
|
{
|
|
string RefundNo = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
|
|
string RefundNo = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
|
|
int Status = 1;
|
|
int Status = 1;
|
|
- if(order.PayMode == 1)
|
|
|
|
- {
|
|
|
|
- string result = AlipayFunction.Instance.Refund(suborder.SeoTitle, RefundNo, Math.Round(GetMoney, 2).ToString(), "门店消费补贴", merchantAdd.AlipayAuthToken);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- Dictionary<string, string> dic = WeChatFunction.Instance.Refund(merchantAdd.SubMchid, Math.Round(GetMoney, 2), suborder.PayMoney, suborder.OrderNo, RefundNo, "门店消费补贴");
|
|
|
|
- }
|
|
|
|
|
|
+ // if(order.PayMode == 1)
|
|
|
|
+ // {
|
|
|
|
+ // string result = AlipayFunction.Instance.Refund(suborder.SeoTitle, RefundNo, Math.Round(GetMoney, 2).ToString(), "门店消费补贴", merchantAdd.AlipayAuthToken);
|
|
|
|
+ // }
|
|
|
|
+ // else
|
|
|
|
+ // {
|
|
|
|
+ // Dictionary<string, string> dic = WeChatFunction.Instance.Refund(merchantAdd.SubMchid, Math.Round(GetMoney, 2), suborder.PayMoney, suborder.OrderNo, RefundNo, "门店消费补贴");
|
|
|
|
+ // }
|
|
if(Status == 1)
|
|
if(Status == 1)
|
|
{
|
|
{
|
|
db.ConsumerProfit.Add(new ConsumerProfit()
|
|
db.ConsumerProfit.Add(new ConsumerProfit()
|
|
@@ -314,7 +315,15 @@ namespace MySystem
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- RedisDbconn.Instance.DelFromList("ConsumerOrders:Divi:" + PayMode + ":" + MerchantId, suborder);
|
|
|
|
|
|
+ suborder.CurDivi = TmpCurDivi;
|
|
|
|
+ RedisDbconn.Instance.RemoveFromList("ConsumerOrders:Divi:" + PayMode + ":" + MerchantId, suborder);
|
|
|
|
+ ConsumerOrders editOrder = db.ConsumerOrders.FirstOrDefault(m => m.Id == suborder.Id);
|
|
|
|
+ if (editOrder != null)
|
|
|
|
+ {
|
|
|
|
+ editOrder.ReturnFlag = 0;
|
|
|
|
+ editOrder.CurDivi = editOrder.MaxDivi;
|
|
|
|
+ db.SaveChanges();
|
|
|
|
+ }
|
|
OutCount += 1;
|
|
OutCount += 1;
|
|
}
|
|
}
|
|
RedisDbconn.Instance.AddList("ConsumerOrdersSetDivi", "{\"OrderId\":\"" + suborder.Id + "\",\"DiviAmt\":\"" + suborder.CurDivi + "\"}");
|
|
RedisDbconn.Instance.AddList("ConsumerOrdersSetDivi", "{\"OrderId\":\"" + suborder.Id + "\",\"DiviAmt\":\"" + suborder.CurDivi + "\"}");
|