diff --git a/Mtxfw.DAL/MemberStatistics_huiyuan.cs b/Mtxfw.DAL/MemberStatistics_huiyuan.cs
index c9f0fb2..1432a44 100644
--- a/Mtxfw.DAL/MemberStatistics_huiyuan.cs
+++ b/Mtxfw.DAL/MemberStatistics_huiyuan.cs
@@ -31,10 +31,11 @@ namespace Mtxfw.DAL
///
///
///
- ///
+ /// 付款金额
+ /// 消费值
///
///
- ///
+ /// 0热卖推荐,1会员商城
///
///
///
@@ -43,7 +44,7 @@ namespace Mtxfw.DAL
///
///
///
- public static void UpdteYJ(Mtxfw.Utility.Config config, Model.user_info umodel, Double pv, int gtype, DateTime dt, int ttype,int ptype, int peitype, string orderid, int OId, string Province, string City, string County, string Tradingarea)
+ public static void UpdteYJ(Mtxfw.Utility.Config config, Model.user_info umodel, Double pv, Double xfz, int gtype, DateTime dt, int ttype,int ptype, int peitype, string orderid, int OId, string Province, string City, string County, string Tradingarea)
{
Model.User_Errlog mo;
string mindt = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
@@ -60,7 +61,7 @@ namespace Mtxfw.DAL
mjl2.Cutmoney = 0;
mjl2.Totalmoney = umodel.umoney20 + pv;
mjl2.addtime = dt;
- mjl2.BZContent = "购买套餐";
+ mjl2.BZContent = ttype == 0 ? "购买热卖商品" : "购买商城商品";
mjl2.PayID = "";
mjl2.OrdersIDs = "";
mjl2.OrdersID = 0;
@@ -92,8 +93,12 @@ namespace Mtxfw.DAL
//}
#endregion
- ///如果符合条件更新自己的等级
- var uplevel = UpdteSelfuLevel(gtype, umodel, config, ptype, pv);
+ ///如果热卖推荐且符合条件更新自己的等级
+ if(ttype == 0)
+ {
+ var uplevel = UpdteSelfuLevel(gtype, umodel, config, ptype, pv);
+ }
+
/// umodel.ContactIDS 值的格式如下:",68,160021,160023,160024,"
string[] ASuperiorsIDS = (umodel.ContactIDS).Split(',');
@@ -131,8 +136,15 @@ namespace Mtxfw.DAL
daoUser.UpdateMoney("umoney19", pv, dID);
var isLast = ak == 1;
- //先更新业绩
- yfbl = JiangJinJS(config, umodel, ds.Tables[0].Rows[0], YContactID, YContactIDS, pv, yfbl);
+ //热卖商品,且遍历到当前会员是付款仁直接推荐人,则计算佣金
+ if(ttype == 0 && YuLevel == YContactID)
+ {
+ //计算佣金
+ YongJinJS(config, umodel, ds.Tables[0].Rows[0], YContactID, YContactIDS, pv, xfz, yfbl, ttype);
+ }
+
+ //结算奖金(按等级算批发差价)
+ yfbl = JiangJinJS(config, umodel, ds.Tables[0].Rows[0], YContactID, YContactIDS, pv, xfz, yfbl, ttype);
}
@@ -140,8 +152,8 @@ namespace Mtxfw.DAL
/////如果符合条件更新自己的等级 移到上面了,这里 注释掉了,如果今后没影响,记得删掉,留着没意义
//var uplevel = UpdteSelfuLevel(gtype, umodel, config, ptype, pv);
- ///更新上级的等级
- if (uplevel > 0)
+ ///如果热卖商城的商品,更新上级的等级
+ if (uplevel > 0 && ttype == 0)
{
UpdteContacttLevel(gtype, umodel, config, ds.Tables[0].Rows[0], YContactID, YContactIDS, uplevel);
///上面更新金额和等级的几个方法顺序不能颠倒,否则会出错
@@ -910,16 +922,18 @@ namespace Mtxfw.DAL
#endregion
///
- /// 奖金结算
+ /// 奖金结算(批发差价)
///
/// 配置文件
/// 支付客户数据
/// 一条支付链条用户数据
/// 支付客户直接上级
/// 支付链条
- /// 消费金额
+ /// 付款金额
+ /// 消费值
/// 已分奖金比例
- public static Double JiangJinJS(Mtxfw.Utility.Config config, Model.user_info umodel, DataRow ContactRow, int YContactID,string YContactIDS, Double pv,double yfbl)
+ /// 0热卖推荐,1会员商城
+ public static Double JiangJinJS(Mtxfw.Utility.Config config, Model.user_info umodel, DataRow ContactRow, int YContactID,string YContactIDS, Double pv, Double xfz, double yfbl,int ttype)
{
Model.User_Errlog mo;
DateTime dt = DateTime.Now;
@@ -933,23 +947,60 @@ namespace Mtxfw.DAL
int buyerlevel = umodel.uLevel;
var buyerlevelname = Mtxfw.Utility.Common.GetuLevelname(buyerlevel);
var Contactlevelname = Mtxfw.Utility.Common.GetuLevelname(ContactLevel); ;
+ var BZContent = "";//备注
+ if (ttype == 0)
+ {
+ BZContent = "热卖商品批发差价"
+ }
+ else
+ {
+ BZContent = "商城商品批发差价"
+ }
//当前奖金比例
Double fixed_bonus = 0;
//当前级别对应的最大奖金比例 - 下级已分比例 等于当前等级剩余可分奖金比例
- switch (ContactLevel)
+ //热卖商品分配方案
+ if (ttype == 0)
{
- case 1:
- fixed_bonus = config.level1_fixed_bonus - yfbl;
- break;
- case 2:
- fixed_bonus = config.level2_fixed_bonus - yfbl;
- break;
- case 3:
- fixed_bonus = config.level3_fixed_bonus - yfbl;
- break;
- case 4:
- fixed_bonus = config.level4_fixed_bonus - yfbl;
- break;
+ //直接推荐人获得业务佣金
+ if (ContactLevel == YContactID)
+ {
+ var yjbl
+ }
+ switch (ContactLevel)
+ {
+ case 1:
+ fixed_bonus = config.level1_fixed_bonus - yfbl;
+ break;
+ case 2:
+ fixed_bonus = config.level2_fixed_bonus - yfbl;
+ break;
+ case 3:
+ fixed_bonus = config.level3_fixed_bonus - yfbl;
+ break;
+ case 4:
+ fixed_bonus = config.level4_fixed_bonus - yfbl;
+ break;
+ }
+ }
+ //商城商品分配方案
+ else
+ {
+ switch (ContactLevel)
+ {
+ case 1:
+ fixed_bonus = config.level1_fixed_bonus - yfbl;
+ break;
+ case 2:
+ fixed_bonus = config.level2_fixed_bonus - yfbl;
+ break;
+ case 3:
+ fixed_bonus = config.level3_fixed_bonus - yfbl;
+ break;
+ case 4:
+ fixed_bonus = config.level4_fixed_bonus - yfbl;
+ break;
+ }
}
if (fixed_bonus > 0)
{
@@ -965,7 +1016,7 @@ namespace Mtxfw.DAL
mjl2.Cutmoney = 0;
mjl2.Totalmoney = -(Yumoney17 - jaingjin);
mjl2.addtime = dt;
- mjl2.BZContent = "奖金结算";
+ mjl2.BZContent = BZContent;
mjl2.PayID = "";
mjl2.OrdersIDs = "";
mjl2.OrdersID = 0;
@@ -1002,6 +1053,88 @@ namespace Mtxfw.DAL
return result;
}
+
+ ///
+ /// 佣金结算
+ ///
+ /// 配置文件
+ /// 支付客户数据
+ /// 一条支付链条用户数据
+ /// 支付客户直接上级
+ /// 支付链条
+ /// 付款金额
+ /// 消费值
+ /// 已分奖金比例
+ /// 0热卖推荐,1会员商城
+ public static Double YongJinJS(Mtxfw.Utility.Config config, Model.user_info umodel, DataRow ContactRow, int YContactID, string YContactIDS, Double pv, Double xfz, double yfbl, int ttype)
+ {
+ Model.User_Errlog mo;
+ DateTime dt = DateTime.Now;
+ double result = yfbl;
+ try
+ {
+ int dID = Convert.ToInt32(ContactRow["ID"].ToString());
+ //Yumoney17就是余额,而且写成负数
+ Double Yumoney17 = Convert.ToDouble(Convert.ToDouble(ContactRow["umoney17"]).ToString("f4"));
+ int ContactLevel = Convert.ToInt32(ContactRow["uLevel"].ToString());
+ int buyerlevel = umodel.uLevel;
+ var buyerlevelname = Mtxfw.Utility.Common.GetuLevelname(buyerlevel);
+ var Contactlevelname = Mtxfw.Utility.Common.GetuLevelname(ContactLevel); ;
+ var BZContent = "业务佣金";//备注
+
+ Double fixed_bonus = 0//config.level3_fixed_bonus
+ if (fixed_bonus > 0)
+ {
+ if (pv > 0)
+ {
+ Double jaingjin = Convert.ToDouble((fixed_bonus * pv).ToString("f4"));
+ if (jaingjin > 0.0000)
+ {
+ var mjl2 = new Model.user_Results_jl2();
+ mjl2.MemberId = dID;
+ mjl2.MemberId2 = 0;
+ mjl2.Addmoney = jaingjin;
+ mjl2.Cutmoney = 0;
+ mjl2.Totalmoney = -(Yumoney17 - jaingjin);
+ mjl2.addtime = dt;
+ mjl2.BZContent = BZContent;
+ mjl2.PayID = "";
+ mjl2.OrdersIDs = "";
+ mjl2.OrdersID = 0;
+ mjl2.utype = 1;
+ mjl2.utype2 = 0;
+ mjl2.Seef = 0;
+ mjl2.seeftime = dt;
+ mjl2.gtype = 0;
+ daojl2.Add(mjl2);
+ }
+ var flag = daoUser.UpdateMoney("umoney17", -jaingjin, dID);
+ if (flag > 0)
+ {
+ //增加已分比例
+ return result += fixed_bonus;
+ }
+
+ }
+
+ }
+ }
+ catch (Exception ex)
+ {
+ mo = new Model.User_Errlog();
+
+ mo.DLID = 0;
+ mo.ErrType = "奖金结算,JiangJinJS";
+ mo.addtime = dt;
+ mo.ErrBody = ex.ToString();
+ mo.ErrBody2 = ex.Message;
+ new DAL.User_Errlog().Add(mo);
+
+ }
+ return result;
+ }
+
+
#region 更新奖金
public static void UpdteJJ(Mtxfw.Utility.Config config, int YID, Int64 ResultId, string ContactIDS, string UserName, Double umoney26, Double pv, ref Double FHMoney0, int gtype, DateTime dt, int ifxy)
{
diff --git a/Mtxfw.Model/P_Guige.cs b/Mtxfw.Model/P_Guige.cs
index 6c3c0fe..8ccb3d1 100644
--- a/Mtxfw.Model/P_Guige.cs
+++ b/Mtxfw.Model/P_Guige.cs
@@ -19,7 +19,7 @@ namespace Mtxfw.Model
private Double _G_JG1;//
private Double _G_JG2;//ԭ
private Double _G_JG3;//ɱ
- private Double _G_JG4;//ֵ//ֵ
+ private Double _G_JG4;//ֵ//ֵ/ֵƷģʽ2ϰΪۣ
private Double _G_JG5;///ֱƽ
private Double _G_JG6;//˰/ƽ
private Double _G_JG7;//ֱƽ
diff --git a/Mtxfw.Model/order_info.cs b/Mtxfw.Model/order_info.cs
index 620ffbd..86196c7 100644
--- a/Mtxfw.Model/order_info.cs
+++ b/Mtxfw.Model/order_info.cs
@@ -11,7 +11,7 @@ namespace Mtxfw.Model
{ }
#region Model
private int _id;
- private int _pid;//直播ID或拼单商品ID
+ private int _pid;//直播ID或拼单商品ID 明明就是规格id
private int _poid;//拼单父ID
private int _pcount;//需拼单数量/已转售数量
private int _ypcount;//已拼单数量/已提货数量
diff --git a/Mtxfw.VipSite/Admin_Member_Products_add1.aspx b/Mtxfw.VipSite/Admin_Member_Products_add1.aspx
index 1c3a264..8e9de8d 100644
--- a/Mtxfw.VipSite/Admin_Member_Products_add1.aspx
+++ b/Mtxfw.VipSite/Admin_Member_Products_add1.aspx
@@ -461,7 +461,7 @@
var len = 1;
function onaddgg() {
//var html = '
';
- var html = '';
+ var html = '';
@@ -500,7 +500,7 @@
var jg0 = "";
var jg1 = "";//fTrim($("#addggbox_box" + id + " #textjg1").val());
var jg3 = "";
- var jg4 = "";
+ jg4 = fTrim($("#addggbox_box" + id + " #textjg4").val());
var jg5 = "";
var jg6 = "";
@@ -1005,13 +1005,13 @@
- - 规格
- 会员价
- 零售价
+
<%=guige%>
<%if (guige == "")
{%>
-
+
<%} %>
diff --git a/Mtxfw.VipSite/Admin_Member_Products_add1.aspx.cs b/Mtxfw.VipSite/Admin_Member_Products_add1.aspx.cs
index 778f40e..9809dc8 100644
--- a/Mtxfw.VipSite/Admin_Member_Products_add1.aspx.cs
+++ b/Mtxfw.VipSite/Admin_Member_Products_add1.aspx.cs
@@ -106,7 +106,7 @@ namespace Mtxfw.VipSite
int G_KC = int.Parse(Dr["G_KC"].ToString());
string colors = Dr["G_Color"].ToString();
string tps = Dr["G_Images"].ToString();
- guige += "";
+ guige += "";
@@ -213,7 +213,7 @@ namespace Mtxfw.VipSite
string colors = Dr["G_Color"].ToString();
string tps = Dr["G_Images"].ToString();
//guige += "";
- guige += "";
+ guige += "";
diff --git a/Mtxfw.VipSite/GetFiles.ashx.cs b/Mtxfw.VipSite/GetFiles.ashx.cs
index 6315eee..d2318e6 100644
--- a/Mtxfw.VipSite/GetFiles.ashx.cs
+++ b/Mtxfw.VipSite/GetFiles.ashx.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Web;
using System.IO;
@@ -92,23 +92,32 @@ namespace Mtxfw.VipSite
///
protected string CheckRequestSizeIsExists(string itsize, string filepath)
{
- string _path = Path.Combine(config.webUpPath, itsize);
- if (filepath.IndexOf("/Files/grimage/") == -1)
+ try
{
- _path = Path.Combine(_path, filepath);
+ string _path = Path.Combine(config.webUpPath, itsize);
+ if (filepath.IndexOf("/Files/grimage/") == -1)
+ {
+ _path = Path.Combine(_path, filepath);
+ }
+ else
+ {
+ _path = _path.Replace("\\", "/") + filepath;
+ }
+ //_path = _path.Replace("\\", "/");
+ if (File.Exists(HttpContext.Current.Server.MapPath(_path)))
+ {
+ return _path;
+ }
+ else
+ {
+ return "";
+ }
}
- else
+ catch (Exception ex)
{
- _path = _path.Replace("\\", "/") + filepath;
- }
- if (File.Exists(HttpContext.Current.Server.MapPath(_path)))
- {
- return _path;
- }
- else
- {
- return "";
+
}
+ return "";
}
///
@@ -135,6 +144,20 @@ namespace Mtxfw.VipSite
string itsize = Query.Get("itsize", "");
if (Mtxfw.Utility.Common.Is_ThumbNail_AllowSizes(itsize)) //是否为允许的尺寸
{
+ //https://fv.pmhapp.cn/ksd2023/20260309225240.png
+ //如果包含https,则只取域名之后的部分
+ //if (ate_FilePath.StartsWith("http://", StringComparison.OrdinalIgnoreCase) ||
+ // ate_FilePath.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
+ //{
+ // Uri uri = new Uri(ate_FilePath);
+ // ate_FilePath = uri.AbsolutePath;
+ // // 移除开头的斜杠(如果有)
+ // if (ate_FilePath.StartsWith("/"))
+ // {
+ // ate_FilePath = ate_FilePath.Substring(1);
+ // }
+ //}
+
//获取已存在的缩略图
string existfilepath = CheckRequestSizeIsExists(itsize, ate_FilePath);
//没有该尺寸已生成好的图,创建缩略图
@@ -151,8 +174,8 @@ namespace Mtxfw.VipSite
{
saveFilePath = saveFilePath.Replace("\\", "/") + ate_FilePath;
}
-
- string savepath = Path.GetDirectoryName(saveFilePath);
+ saveFilePath = saveFilePath.Replace("\\", "/")
+; string savepath = Path.GetDirectoryName(saveFilePath);
if (!Directory.Exists(HttpContext.Current.Server.MapPath(savepath)))
{
Directory.CreateDirectory(HttpContext.Current.Server.MapPath(savepath));
diff --git a/Mtxfw.VipSite/pay/hfpay_notify_url_huiyuan.aspx.cs b/Mtxfw.VipSite/pay/hfpay_notify_url_huiyuan.aspx.cs
index 88c6aa7..a22e7ab 100644
--- a/Mtxfw.VipSite/pay/hfpay_notify_url_huiyuan.aspx.cs
+++ b/Mtxfw.VipSite/pay/hfpay_notify_url_huiyuan.aspx.cs
@@ -888,6 +888,8 @@ namespace Mtxfw.VipSite
}
Mtxfw.Utility.Common.WriteHtml("/weixin/8", i.ToString());
///lym修改
+ Mtxfw.Model.P_Guige ggmodel = new DAL.P_Guige().GetModel(Convert.ToInt32(OrderModel.pid));
+ var xfz = ggmodel.G_JG4;
DAL.MemberStatistics_huiyuan.UpdteYJ(config, umodel, money, gtype, dt, OrderModel.ttype, OrderModel.ptype, peitype, OrderModel.orderid, OrderModel.Id, OrderModel.Province, OrderModel.City, OrderModel.County, OrderModel.Tradingarea);
daoorder.UpdateqyState(0, "1", dt, OrderModel.Id);
diff --git a/Mtxfw.VipSite/xapiajax.ashx.cs b/Mtxfw.VipSite/xapiajax.ashx.cs
index 0ecc6fc..1ba243d 100644
--- a/Mtxfw.VipSite/xapiajax.ashx.cs
+++ b/Mtxfw.VipSite/xapiajax.ashx.cs
@@ -16445,16 +16445,19 @@ namespace Mtxfw.VipSite
if (utype == 0)
{
DAL.MemberStatistics.UpdteYJ(config, umodel, money, money0, money2, money3, gtype, dt, OrderModel.ttype, OrderModel.ptype, peitype, OrderModel.orderid, OrderModel.Id, OrderModel.Province, OrderModel.City, OrderModel.County, OrderModel.Tradingarea);
- }
+ }
else if (utype == 2)
{
if (ycount0 > 0)
{
money0 = money1;
}
- ///lym修改
+
+ Mtxfw.Model.P_Guige ggmodel = new DAL.P_Guige().GetModel(Convert.ToInt32(OrderModel.pid));
+ var xfz = ggmodel.G_JG4;
+ ///lym修改 这里变成热卖商城余额支付了,看得我懵逼了
//DAL.MemberStatistics.UpdteYJ(config, umodel, money, money0, money2, money3, gtype, dt, OrderModel.ttype, OrderModel.ptype, peitype, OrderModel.orderid, OrderModel.Id, OrderModel.Province, OrderModel.City, OrderModel.County, OrderModel.Tradingarea);
- DAL.MemberStatistics_huiyuan.UpdteYJ(config, umodel, money, gtype, dt, OrderModel.ttype, OrderModel.ptype, peitype, OrderModel.orderid, OrderModel.Id, OrderModel.Province, OrderModel.City, OrderModel.County, OrderModel.Tradingarea);
+ DAL.MemberStatistics_huiyuan.UpdteYJ(config, umodel, money, xfz, gtype, dt, OrderModel.ttype, OrderModel.ptype, peitype, OrderModel.orderid, OrderModel.Id, OrderModel.Province, OrderModel.City, OrderModel.County, OrderModel.Tradingarea);
}
if (utype == 14)
{
|