1111111
This commit is contained in:
parent
1c5852af1c
commit
18ef5e5dbc
|
@ -660,7 +660,9 @@ namespace FLSystem.Forms
|
||||||
session.SaveOrUpdate(alimama);
|
session.SaveOrUpdate(alimama);
|
||||||
|
|
||||||
#region 获取查询时的比例
|
#region 获取查询时的比例
|
||||||
var query_item = session.FindSingle<fl_query_hist>("userid=@userid and itemid=@itemid and adzoneid = @adzoneid and crt_time > @time order by id", new { userid = alimama.db_userid, itemid = alimama.num_iid, adzoneid = alimama.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
|
||||||
|
var itemIdB = ApiClient.GetValidItemId(alimama.num_iid);
|
||||||
|
var query_item = session.FindSingle<fl_query_hist>("userid=@userid and itemid=@itemid and adzoneid = @adzoneid and crt_time > @time order by id", new { userid = alimama.db_userid, itemid = itemIdB, adzoneid = alimama.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query_item != null && !string.IsNullOrWhiteSpace(query_item.compute_configdic))
|
if (query_item != null && !string.IsNullOrWhiteSpace(query_item.compute_configdic))
|
||||||
{
|
{
|
||||||
if (alimama.id == 0)
|
if (alimama.id == 0)
|
||||||
|
|
|
@ -230,6 +230,8 @@ namespace TBRebate
|
||||||
|
|
||||||
if (order_tb == null) return;
|
if (order_tb == null) return;
|
||||||
|
|
||||||
|
var itemIdB = ApiClient.GetValidItemId(order_tb.num_iid);
|
||||||
|
|
||||||
if (e.Member != null)
|
if (e.Member != null)
|
||||||
{
|
{
|
||||||
//是否黑名单
|
//是否黑名单
|
||||||
|
@ -256,7 +258,7 @@ namespace TBRebate
|
||||||
#region 同一店铺多次购买(同一商品)
|
#region 同一店铺多次购买(同一商品)
|
||||||
if (Class1.Config.AShop_SameCommodity_Switch)
|
if (Class1.Config.AShop_SameCommodity_Switch)
|
||||||
{
|
{
|
||||||
var frequency = session.Find<fl_order_alimama>("select * from fl_order_alimama where db_userid = @db_userid and num_iid = @num_iid", new { db_userid = order_tb.db_userid, num_iid = order_tb.num_iid }).Count;//获取同价店铺同一件商品购买的次数
|
var frequency = session.Find<fl_order_alimama>("select * from fl_order_alimama where db_userid = @db_userid and num_iid = @num_iid", new { db_userid = order_tb.db_userid, num_iid = itemIdB }).Count;//获取同价店铺同一件商品购买的次数
|
||||||
if (Class1.Config.AShop_SameCommodity_Number <= frequency)
|
if (Class1.Config.AShop_SameCommodity_Number <= frequency)
|
||||||
{
|
{
|
||||||
if (Class1.Config.AShop_SameCommodity_OperateType == OperateType.拉入黑名单)
|
if (Class1.Config.AShop_SameCommodity_OperateType == OperateType.拉入黑名单)
|
||||||
|
@ -283,7 +285,7 @@ namespace TBRebate
|
||||||
prevent_theft_cache = new fl_prevent_theft_cache();
|
prevent_theft_cache = new fl_prevent_theft_cache();
|
||||||
prevent_theft_cache.operate_type = Class1.Config.AShop_SameCommodity_OperateType;
|
prevent_theft_cache.operate_type = Class1.Config.AShop_SameCommodity_OperateType;
|
||||||
prevent_theft_cache.member_id = e.Member.id;
|
prevent_theft_cache.member_id = e.Member.id;
|
||||||
prevent_theft_cache.item_id = order_tb.num_iid;
|
prevent_theft_cache.item_id = itemIdB;
|
||||||
prevent_theft_cache.mall_id = order_tb.seller_id;
|
prevent_theft_cache.mall_id = order_tb.seller_id;
|
||||||
prevent_theft_cache.order_id = order_tb.trade_id;
|
prevent_theft_cache.order_id = order_tb.trade_id;
|
||||||
prevent_theft_cache.cps_type = CpsType.阿里妈妈;
|
prevent_theft_cache.cps_type = CpsType.阿里妈妈;
|
||||||
|
@ -354,7 +356,7 @@ namespace TBRebate
|
||||||
prevent_theft_cache = new fl_prevent_theft_cache();
|
prevent_theft_cache = new fl_prevent_theft_cache();
|
||||||
prevent_theft_cache.operate_type = Class1.Config.AShop_DifferentCommodity_OperateType;
|
prevent_theft_cache.operate_type = Class1.Config.AShop_DifferentCommodity_OperateType;
|
||||||
prevent_theft_cache.member_id = e.Member.id;
|
prevent_theft_cache.member_id = e.Member.id;
|
||||||
prevent_theft_cache.item_id = order_tb.num_iid;
|
prevent_theft_cache.item_id = itemIdB;
|
||||||
prevent_theft_cache.mall_id = order_tb.seller_id;
|
prevent_theft_cache.mall_id = order_tb.seller_id;
|
||||||
prevent_theft_cache.order_id = order_tb.trade_id;
|
prevent_theft_cache.order_id = order_tb.trade_id;
|
||||||
prevent_theft_cache.cps_type = CpsType.阿里妈妈;
|
prevent_theft_cache.cps_type = CpsType.阿里妈妈;
|
||||||
|
@ -427,7 +429,7 @@ namespace TBRebate
|
||||||
prevent_theft_cache = new fl_prevent_theft_cache();
|
prevent_theft_cache = new fl_prevent_theft_cache();
|
||||||
prevent_theft_cache.operate_type = Class1.Config.ReceivingTimeCheck_OperateType;
|
prevent_theft_cache.operate_type = Class1.Config.ReceivingTimeCheck_OperateType;
|
||||||
prevent_theft_cache.member_id = e.Member.id;
|
prevent_theft_cache.member_id = e.Member.id;
|
||||||
prevent_theft_cache.item_id = order_tb.num_iid;
|
prevent_theft_cache.item_id = itemIdB;
|
||||||
prevent_theft_cache.mall_id = order_tb.seller_id;
|
prevent_theft_cache.mall_id = order_tb.seller_id;
|
||||||
prevent_theft_cache.order_id = order_tb.trade_id;
|
prevent_theft_cache.order_id = order_tb.trade_id;
|
||||||
prevent_theft_cache.cps_type = CpsType.阿里妈妈;
|
prevent_theft_cache.cps_type = CpsType.阿里妈妈;
|
||||||
|
@ -574,7 +576,7 @@ namespace TBRebate
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#region 多人查询通知消息
|
#region 多人查询通知消息
|
||||||
var querys = session.Find<queryhist_temp>("select robot_name,type,userid from fl_query_hist where itemid=@itemid and adzoneid = @adzoneid and userid > 0 and crt_time>@time and is_multiple=@is_multiple group by userid,type,robot_name", new { itemid = order_tb.num_iid, adzoneid = order_tb.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss"), is_multiple = false });
|
var querys = session.Find<queryhist_temp>("select robot_name,type,userid from fl_query_hist where itemid=@itemid and adzoneid = @adzoneid and userid > 0 and crt_time>@time and is_multiple=@is_multiple group by userid,type,robot_name", new { itemid = itemIdB, adzoneid = order_tb.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss"), is_multiple = false });
|
||||||
if (querys.Count > 0)
|
if (querys.Count > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < querys.Count; i++)
|
for (int i = 0; i < querys.Count; i++)
|
||||||
|
@ -601,8 +603,8 @@ namespace TBRebate
|
||||||
{
|
{
|
||||||
ApiClient.SendMessage(robot_info, member.username, Config.LotUserQueryBindTip.Replace("[商品标题]", order_tb.item_title));
|
ApiClient.SendMessage(robot_info, member.username, Config.LotUserQueryBindTip.Replace("[商品标题]", order_tb.item_title));
|
||||||
|
|
||||||
//session.ExcuteSQL("update fl_query_hist set userid = @newuserid where itemid = @itemid and adzoneid = @adzoneid and robot_name = @robotname and userid = @userid", new { newuserid = (i - querys.Count + 1), itemid = order_tb.num_iid, adzoneid = order_tb.adzone_id, robotname = robot_name, userid = member.id });
|
//session.ExcuteSQL("update fl_query_hist set userid = @newuserid where itemid = @itemid and adzoneid = @adzoneid and robot_name = @robotname and userid = @userid", new { newuserid = (i - querys.Count + 1), itemid = itemIdB, adzoneid = order_tb.adzone_id, robotname = robot_name, userid = member.id });
|
||||||
session.ExcuteSQL("update fl_query_hist set is_multiple = @is_multiple where itemid = @itemid and adzoneid = @adzoneid and robot_name = @robotname and userid = @userid", new { is_multiple = true, itemid = order_tb.num_iid, adzoneid = order_tb.adzone_id, robotname = robot_name, userid = member.id });
|
session.ExcuteSQL("update fl_query_hist set is_multiple = @is_multiple where itemid = @itemid and adzoneid = @adzoneid and robot_name = @robotname and userid = @userid", new { is_multiple = true, itemid = itemIdB, adzoneid = order_tb.adzone_id, robotname = robot_name, userid = member.id });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,8 @@ namespace TBRebate.Uses
|
||||||
var adzone = db.FindAdzoneInfos().FirstOrDefault(f => f.alliance_id == (int)CpsType.阿里妈妈 && f.custom_type == Resources.TbAllRebatesSoftwareType && f.adzone_pid.EndsWith("_" + order.adzone_id));
|
var adzone = db.FindAdzoneInfos().FirstOrDefault(f => f.alliance_id == (int)CpsType.阿里妈妈 && f.custom_type == Resources.TbAllRebatesSoftwareType && f.adzone_pid.EndsWith("_" + order.adzone_id));
|
||||||
if (adzone != null)
|
if (adzone != null)
|
||||||
{
|
{
|
||||||
var allrebatesactivity_infos = db.Find<fl_plugin_allrebatesactivity_info>("select * from fl_plugin_allrebatesactivity_info where goods_id = @goods_id", new { goods_id = order.num_iid });
|
var itemIdB = ApiClient.GetValidItemId(order.num_iid);
|
||||||
|
var allrebatesactivity_infos = db.Find<fl_plugin_allrebatesactivity_info>("select * from fl_plugin_allrebatesactivity_info where goods_id = @goods_id", new { goods_id = itemIdB });
|
||||||
if (allrebatesactivity_infos != null && allrebatesactivity_infos.Count != 0)
|
if (allrebatesactivity_infos != null && allrebatesactivity_infos.Count != 0)
|
||||||
{
|
{
|
||||||
var allrebatesactivity_info = allrebatesactivity_infos.FirstOrDefault(f => f.time_begin <= order.create_time && order.create_time <= f.time_end && f.groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(z => Convert.ToInt64(z.Trim())).ToList().Contains(memberTmp.group_id) && f.robots.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(z => z.Trim()).ToList().Contains(order.db_robotname));
|
var allrebatesactivity_info = allrebatesactivity_infos.FirstOrDefault(f => f.time_begin <= order.create_time && order.create_time <= f.time_end && f.groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(z => Convert.ToInt64(z.Trim())).ToList().Contains(memberTmp.group_id) && f.robots.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(z => z.Trim()).ToList().Contains(order.db_robotname));
|
||||||
|
@ -177,13 +178,8 @@ namespace TBRebate.Uses
|
||||||
var compute = db.FindQueryRatioHist(CpsType.阿里妈妈, order.id);
|
var compute = db.FindQueryRatioHist(CpsType.阿里妈妈, order.id);
|
||||||
if (compute == null)
|
if (compute == null)
|
||||||
{
|
{
|
||||||
var itemIdB = order.num_iid;
|
var itemIdB = ApiClient.GetValidItemId(order.num_iid);
|
||||||
if (order.num_iid.Contains("-"))
|
|
||||||
{
|
|
||||||
var split = order.num_iid.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
itemIdB = split[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
var query_item = db.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid order by id desc", new { userid = memberTmp.id, itemid = itemIdB, adzoneid = order.adzone_id });
|
var query_item = db.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid order by id desc", new { userid = memberTmp.id, itemid = itemIdB, adzoneid = order.adzone_id });
|
||||||
|
|
||||||
//计算公式不为空
|
//计算公式不为空
|
||||||
|
|
|
@ -57,6 +57,23 @@ namespace Api.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ApiClient
|
public class ApiClient
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取有效商品Id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="numIid"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetValidItemId(string numIid)
|
||||||
|
{
|
||||||
|
if (numIid.Contains("-"))
|
||||||
|
{
|
||||||
|
var split = numIid.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
var itemIdB = split[1];
|
||||||
|
return itemIdB;
|
||||||
|
}
|
||||||
|
|
||||||
|
return numIid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static Func<bool> BlackMemberFunc;
|
public static Func<bool> BlackMemberFunc;
|
||||||
|
|
||||||
|
|
|
@ -973,18 +973,18 @@ namespace Api.Framework.Timers
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (order["trade_parent_id"].ToString() == "3005578008913950205")
|
//if (order["trade_parent_id"].ToString() == "3005578008913950205")
|
||||||
{
|
//{
|
||||||
|
|
||||||
}
|
//}
|
||||||
else if (order["trade_parent_id"].ToString() == "3006644114425243017")
|
//else if (order["trade_parent_id"].ToString() == "3006644114425243017")
|
||||||
{
|
//{
|
||||||
|
|
||||||
}
|
//}
|
||||||
else if (order["trade_parent_id"].ToString() == "3010261971527788109")
|
//else if (order["trade_parent_id"].ToString() == "3010261971527788109")
|
||||||
{
|
//{
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (order.ContainsKey("alipay_total_price") && double.Parse(order["alipay_total_price"].ToString()) == 0d)//不处理赠品商品,直接跳过
|
if (order.ContainsKey("alipay_total_price") && double.Parse(order["alipay_total_price"].ToString()) == 0d)//不处理赠品商品,直接跳过
|
||||||
continue;
|
continue;
|
||||||
|
@ -1030,7 +1030,7 @@ namespace Api.Framework.Timers
|
||||||
|
|
||||||
if (db_order != null) //跳过相同状态
|
if (db_order != null) //跳过相同状态
|
||||||
{
|
{
|
||||||
if (db_order.total_commission_rate == 0 && (db_order.order_type != "饿了么" && db_order.order_type != "聚划算")) continue;
|
//if (db_order.total_commission_rate == 0 && (db_order.order_type != "饿了么" && db_order.order_type != "聚划算")) continue;
|
||||||
if (db_order.IsFinish()) continue;//是否完成
|
if (db_order.IsFinish()) continue;//是否完成
|
||||||
|
|
||||||
#region 预付定金处理
|
#region 预付定金处理
|
||||||
|
@ -1115,7 +1115,7 @@ namespace Api.Framework.Timers
|
||||||
if (db_order == null)
|
if (db_order == null)
|
||||||
{
|
{
|
||||||
db_order = order.ConvertToObj<fl_order_alimama>();
|
db_order = order.ConvertToObj<fl_order_alimama>();
|
||||||
if (db_order.total_commission_rate == 0 && (db_order.order_type != "饿了么" && db_order.order_type != "聚划算")) continue;
|
//if (db_order.total_commission_rate == 0 && (db_order.order_type != "饿了么" && db_order.order_type != "聚划算")) continue;
|
||||||
if (order.ContainsKey("subsidy_type"))
|
if (order.ContainsKey("subsidy_type"))
|
||||||
{
|
{
|
||||||
AlimamaOrderSubsidyType subsidyType;
|
AlimamaOrderSubsidyType subsidyType;
|
||||||
|
@ -1296,6 +1296,8 @@ namespace Api.Framework.Timers
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var itemIdB = ApiClient.GetValidItemId(db_order.num_iid);
|
||||||
|
|
||||||
if (db_order.id != 0)
|
if (db_order.id != 0)
|
||||||
{
|
{
|
||||||
lock (LockObj)
|
lock (LockObj)
|
||||||
|
@ -1359,7 +1361,7 @@ namespace Api.Framework.Timers
|
||||||
db_order.db_robottype = memberInfo.robot_type;
|
db_order.db_robottype = memberInfo.robot_type;
|
||||||
db_order.db_userid = memberInfo.id;
|
db_order.db_userid = memberInfo.id;
|
||||||
|
|
||||||
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time order by id", new { userid = db_order.db_userid, itemid = db_order.num_iid, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time order by id", new { userid = db_order.db_userid, itemid = itemIdB, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query_item != null)
|
if (query_item != null)
|
||||||
{
|
{
|
||||||
#region 绑定群号
|
#region 绑定群号
|
||||||
|
@ -1514,16 +1516,15 @@ namespace Api.Framework.Timers
|
||||||
{
|
{
|
||||||
if (db_order.num_iid.Contains("-"))
|
if (db_order.num_iid.Contains("-"))
|
||||||
{
|
{
|
||||||
var split = db_order.num_iid.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
var itemIdB = split[1];
|
|
||||||
var query = session.FindTable("select userid,count(*) as count from fl_query_hist where userid != 0 and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time group by userid ", new { itemid = itemIdB, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
var query = session.FindTable("select userid,count(*) as count from fl_query_hist where userid != 0 and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time group by userid ", new { itemid = itemIdB, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query != null && query.Rows.Count > 0)
|
if (query != null && query.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
if (query.Rows.Count == 1)
|
if (query.Rows.Count == 1)
|
||||||
{
|
{
|
||||||
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where itemid = @itemid and crt_time > @time order by id desc", new { itemid = itemIdB, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
var query_items = session.Find<fl_query_hist>("select * from fl_query_hist where itemid = @itemid and crt_time > @time order by id desc", new { itemid = itemIdB, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query_item != null)
|
if (query_items != null && query_items.Count == 1)
|
||||||
{
|
{
|
||||||
|
var query_item = query_items[0];
|
||||||
db_order.db_robotname = query_item.robot_name;
|
db_order.db_robotname = query_item.robot_name;
|
||||||
db_order.db_robottype = query_item.robot_type;
|
db_order.db_robottype = query_item.robot_type;
|
||||||
db_order.msg_groupid = query_item.groupid;
|
db_order.msg_groupid = query_item.groupid;
|
||||||
|
@ -1574,7 +1575,7 @@ namespace Api.Framework.Timers
|
||||||
//订单没有绑定用户 查询订单记录
|
//订单没有绑定用户 查询订单记录
|
||||||
if (db_order.db_userid == 0)
|
if (db_order.db_userid == 0)
|
||||||
{
|
{
|
||||||
var query = session.FindTable("select userid,count(*) as count from fl_query_hist where userid != 0 and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time group by userid ", new { itemid = db_order.num_iid, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
var query = session.FindTable("select userid,count(*) as count from fl_query_hist where userid != 0 and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time group by userid ", new { itemid = itemIdB, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query != null && query.Rows.Count > 0)
|
if (query != null && query.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
if (query.Rows.Count == 1)
|
if (query.Rows.Count == 1)
|
||||||
|
@ -1586,7 +1587,7 @@ namespace Api.Framework.Timers
|
||||||
{
|
{
|
||||||
db_order.db_userid = userid;//根据查询记录认领
|
db_order.db_userid = userid;//根据查询记录认领
|
||||||
|
|
||||||
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time order by id desc", new { userid = db_order.db_userid, itemid = db_order.num_iid, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time order by id desc", new { userid = db_order.db_userid, itemid = itemIdB, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query_item != null)
|
if (query_item != null)
|
||||||
{
|
{
|
||||||
db_order.msg_groupid = query_item.groupid;
|
db_order.msg_groupid = query_item.groupid;
|
||||||
|
@ -1643,7 +1644,7 @@ namespace Api.Framework.Timers
|
||||||
{
|
{
|
||||||
var last_item = last_num.FirstOrDefault().Value;
|
var last_item = last_num.FirstOrDefault().Value;
|
||||||
db_order.db_userid = last_item.userid;
|
db_order.db_userid = last_item.userid;
|
||||||
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and crt_time > @time order by id desc", new { userid = db_order.db_userid, itemid = db_order.num_iid, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and crt_time > @time order by id desc", new { userid = db_order.db_userid, itemid = itemIdB, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query_item != null)
|
if (query_item != null)
|
||||||
{
|
{
|
||||||
db_order.db_robotname = query_item.robot_name;
|
db_order.db_robotname = query_item.robot_name;
|
||||||
|
@ -1691,7 +1692,7 @@ namespace Api.Framework.Timers
|
||||||
#region 绑定群号
|
#region 绑定群号
|
||||||
if (string.IsNullOrWhiteSpace(db_order.msg_groupid))
|
if (string.IsNullOrWhiteSpace(db_order.msg_groupid))
|
||||||
{
|
{
|
||||||
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time order by id desc", new { userid = db_order.db_userid, itemid = db_order.num_iid, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
var query_item = session.FindSingle<fl_query_hist>("select * from fl_query_hist where userid = @userid and itemid = @itemid and adzoneid = @adzoneid and crt_time > @time order by id desc", new { userid = db_order.db_userid, itemid = itemIdB, adzoneid = db_order.adzone_id, time = DateTime.Now.AddHours(-24).ToString("yyyy-MM-dd HH:mm:ss") });
|
||||||
if (query_item != null)
|
if (query_item != null)
|
||||||
{
|
{
|
||||||
db_order.msg_groupid = query_item.groupid;
|
db_order.msg_groupid = query_item.groupid;
|
||||||
|
@ -1853,7 +1854,7 @@ namespace Api.Framework.Timers
|
||||||
var adzone = session.FindAdzoneInfos().FirstOrDefault(f => f.alliance_id == (int)CpsType.阿里妈妈 && f.custom_type == Resources.TbAllRebatesSoftwareType && f.adzone_pid.EndsWith("_" + db_order.adzone_id));
|
var adzone = session.FindAdzoneInfos().FirstOrDefault(f => f.alliance_id == (int)CpsType.阿里妈妈 && f.custom_type == Resources.TbAllRebatesSoftwareType && f.adzone_pid.EndsWith("_" + db_order.adzone_id));
|
||||||
if (adzone != null)
|
if (adzone != null)
|
||||||
{
|
{
|
||||||
var allrebatesactivity_infos = session.Find<fl_plugin_allrebatesactivity_info>("select * from fl_plugin_allrebatesactivity_info where goods_id = @goods_id", new { goods_id = db_order.num_iid });
|
var allrebatesactivity_infos = session.Find<fl_plugin_allrebatesactivity_info>("select * from fl_plugin_allrebatesactivity_info where goods_id = @goods_id", new { goods_id = itemIdB });
|
||||||
if (allrebatesactivity_infos != null && allrebatesactivity_infos.Count != 0)
|
if (allrebatesactivity_infos != null && allrebatesactivity_infos.Count != 0)
|
||||||
{
|
{
|
||||||
if (member != null)
|
if (member != null)
|
||||||
|
|
Loading…
Reference in New Issue