Commit 9df04dde authored by liudong1993's avatar liudong1993

1

parent dbd6425f
......@@ -89,6 +89,19 @@ namespace Mall.Module.User
//根据OpenID 反查询 CustomerId
var CustomerModel = customer_IntegralRepository.GetCustomerToOpenId(extModel.CustomerOpenId);
if (!string.IsNullOrEmpty(extModel.CustomerOpenId) && extModel.CustomerOpenId.Length > 3 && extModel.CustomerOpenId.Substring(0, 3) == "lxy")
{
//根据 ID查询
try
{
int ChildId = Convert.ToInt32(extModel.CustomerOpenId.Replace("lxy", ""));
CustomerModel = customer_IntegralRepository.GetCustomerToChildId(ChildId);
}
catch (Exception e)
{
LogHelper.Write(e, "抓取旅小友ID失败");
}
}
if (CustomerModel == null) { return false; }
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
......
......@@ -116,6 +116,16 @@ namespace Mall.Repository.Customer
string sql = $@" SELECT InfoID CustomerId,ID as CustomerChildrenId FROM rb_customer_infochildren WHERE OpenId ='{OpenId}'";
return Get<RB_Customer_Integral_Extend>(sql).FirstOrDefault();
}
/// <summary>
/// 获取同业客户ID 通过联系人ID
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public RB_Customer_Integral_Extend GetCustomerToChildId(int Id)
{
string sql = $@" SELECT InfoID CustomerId,ID as CustomerChildrenId FROM rb_customer_infochildren WHERE ID ={Id}";
return Get<RB_Customer_Integral_Extend>(sql).FirstOrDefault();
}
/// <summary>
/// 获取同行员工信息
......
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