Commit 333a57de authored by 黄奎's avatar 黄奎
parents de67e2c1 c8defe09
......@@ -353,5 +353,16 @@ namespace Mall.Common
}
}
/// <summary>
/// 数据库地址
/// </summary>
public static string RebornDMC
{
get
{
return new ConfigurationBuilder().Add(new JsonConfigurationSource { Path = "appsettings.json" }).Build().GetSection("RebornDMC").Value;
}
}
}
}
\ No newline at end of file
......@@ -150,5 +150,9 @@ namespace Mall.Model.Entity.Product
get;
set;
}
/// <summary>
/// 是否对外分享 1是 2否
/// </summary>
public int? IsForeignShare { get; set; }
}
}
......@@ -202,5 +202,10 @@ namespace Mall.Model.Entity.User
/// 佣金是否提完 1是 2否
/// </summary>
public int? IsCommissionResidue { get; set; }
/// <summary>
/// 是否开启和平下线审核 1是 2否
/// </summary>
public int? HpReferralsGradeAudit { get; set; }
}
}
......@@ -2317,6 +2317,7 @@ namespace Mall.Module.Product
{ nameof(RB_Product_Category.IsShow),demodel.IsShow},
{ nameof(RB_Product_Category.Name),demodel.Name},
{ nameof(RB_Product_Category.Sort),demodel.Sort},
{ nameof(RB_Product_Category.IsForeignShare),demodel.IsForeignShare},
{ nameof(RB_Product_Category.UpdateDate),demodel.UpdateDate}
};
List<WhereHelper> wheres = new List<WhereHelper>() {
......
......@@ -89,7 +89,8 @@ namespace Mall.Module.User
UserNotes = "",
WithdrawFee = 0,
WithdrawWay = "[" + (int)Common.Enum.User.DistrbutorWithdrawWayEnum.ZDDK + "]",
IsCommissionResidue = 2
IsCommissionResidue = 2,
HpReferralsGradeAudit = 2
}) > 0;
}
else {
......
......@@ -734,7 +734,8 @@ namespace Mall.Module.User
{ nameof(RB_Distributor_Basics.UserNotes),demodel.UserNotes},
{ nameof(RB_Distributor_Basics.BackgroundImage),demodel.BackgroundImage},
{ nameof(RB_Distributor_Basics.IndexImage),demodel.IndexImage},
{ nameof(RB_Distributor_Basics.UpdateDate),demodel.UpdateDate}
{ nameof(RB_Distributor_Basics.UpdateDate),demodel.UpdateDate},
{ nameof(RB_Distributor_Basics.HpReferralsGradeAudit),demodel.HpReferralsGradeAudit},
};
List<WhereHelper> whereHelpers = new List<WhereHelper>() {
new WhereHelper(){
......@@ -1507,20 +1508,27 @@ namespace Mall.Module.User
return "用户上级分销商未绑定和平分销等级 ID:" + item.UserId;
}
var hpgmodel = distributor_HPGradeInfoRepository.GetEntity(pModel.HPGradeId);
if ((gmodel?.Grade ?? 0) == 3)
if ((hpgmodel.Grade ?? 0) == 2 && (gmodel?.Grade ?? 0) > 2)
{
if (hpgmodel.Grade != 1 && hpgmodel.Grade != 2)
{
return "用户分销等级与上级用户分销等级不是关联关系 ID:" + item.UserId;
}
}
else if ((gmodel?.Grade ?? 0) == 2 && hpgmodel.Grade != 1)
{
return "用户分销等级与上级用户分销等级不是上下级关系 ID:" + item.UserId;
//成立 特一级比较特殊
}
else if ((gmodel?.Grade ?? 0) - (hpgmodel.Grade ?? 0) != 1)
else
{
return "用户分销等级与上级用户分销等级不是上下级关系 ID:" + item.UserId;
if ((gmodel?.Grade ?? 0) == 3)
{
if (hpgmodel.Grade != 1 && hpgmodel.Grade != 2)
{
return "用户分销等级与上级用户分销等级不是关联关系 ID:" + item.UserId;
}
}
else if ((gmodel?.Grade ?? 0) == 2 && hpgmodel.Grade != 1)
{
return "用户分销等级与上级用户分销等级不是上下级关系 ID:" + item.UserId;
}
else if ((gmodel?.Grade ?? 0) - (hpgmodel.Grade ?? 0) != 1)
{
return "用户分销等级与上级用户分销等级不是上下级关系 ID:" + item.UserId;
}
}
}
}
......
using Mall.Common.Enum;
using Mall.Common;
using Mall.Common.Enum;
using Mall.Model.Entity.Finance;
using Mall.Model.Extend.Finance;
using System;
......@@ -28,36 +29,37 @@ namespace Mall.Repository.Finance
public List<RB_ClientBankAccount_Extend> GetPageList(int pageIndex, int pageSize, RB_ClientBankAccount_Extend model, out long count)
{
string where = " WHERE 1=1 ";
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.Status) + "={0}", (int)DateStateEnum.Normal);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.Status) + "={0}", (int)DateStateEnum.Normal);
if (model.RB_Group_Id > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.RB_Group_Id) + "={0}", model.RB_Group_Id);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.RB_Group_Id) + "={0}", model.RB_Group_Id);
}
if (model.RB_Branch_Id >= 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.RB_Branch_Id) + "={0}", model.RB_Branch_Id);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.RB_Branch_Id) + "={0}", model.RB_Branch_Id);
}
if (model.Type > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.Type) + "={0}", (int)model.Type);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.Type) + "={0}", (int)model.Type);
}
if (!string.IsNullOrEmpty(model.AccountAlias))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.AccountAlias) + " like '%{0}%' ", model.AccountAlias);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.AccountAlias) + " like '%{0}%' ", model.AccountAlias);
}
if (!string.IsNullOrEmpty(model.OpenBankName))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.OpenBankName) + " like '%{0}%' ", model.OpenBankName);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.OpenBankName) + " like '%{0}%' ", model.OpenBankName);
}
if (!string.IsNullOrEmpty(model.CardNum))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.CardNum) + " like '%{0}%' ", model.CardNum);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.CardNum) + " like '%{0}%' ", model.CardNum);
}
if (!string.IsNullOrEmpty(model.AccountHolder))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount_Extend.AccountHolder) + " like '%{0}%' ", model.AccountHolder);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount_Extend.AccountHolder) + " like '%{0}%' ", model.AccountHolder);
}
return GetPage<RB_ClientBankAccount_Extend>(pageIndex, pageSize, out count, " select * from " + TableName + "" + where).ToList();
string sql = $@"select a.*,b.name as BankName from {TableName} as a {TableName}";
return GetPage<RB_ClientBankAccount_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 获取客户账户列表
......@@ -69,44 +71,45 @@ namespace Mall.Repository.Finance
public List<RB_ClientBankAccount> GetList(RB_ClientBankAccount model, string AccountAlias = "", string ClientIdStr = "")
{
string where = " WHERE 1=1 ";
where += string.Format(" AND " + nameof(RB_ClientBankAccount.Status) + "={0} ", (int)DateStateEnum.Normal);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.Status) + "={0} ", (int)DateStateEnum.Normal);
if (model.RB_Group_Id > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.RB_Group_Id) + "={0} ", model.RB_Group_Id);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.RB_Group_Id) + "={0} ", model.RB_Group_Id);
}
if (model.RB_Branch_Id >= 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.RB_Branch_Id) + "={0} ", model.RB_Branch_Id);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.RB_Branch_Id) + "={0} ", model.RB_Branch_Id);
}
if (model.ID > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.ID) + "={0} ", model.ID);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.ID) + "={0} ", model.ID);
}
if (ClientIdStr != "")
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.ID) + " in({0}) ", ClientIdStr);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.ID) + " in({0}) ", ClientIdStr);
}
if (model.Type > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.Type) + "={0}", (int)model.Type);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.Type) + "={0}", (int)model.Type);
}
if (model.ObjID > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.ObjID) + "={0}", model.ObjID);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.ObjID) + "={0}", model.ObjID);
}
if (!string.IsNullOrEmpty(model.AccountAlias))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.AccountAlias) + "='{0}'", model.AccountAlias);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.AccountAlias) + "='{0}'", model.AccountAlias);
}
if (AccountAlias != "")
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.AccountAlias) + " like'%{0}%'", AccountAlias);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.AccountAlias) + " like'%{0}%'", AccountAlias);
}
if (!string.IsNullOrEmpty(model.CardNum))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.CardNum) + " like '%{0}%' ", model.CardNum);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.CardNum) + " like '%{0}%' ", model.CardNum);
}
return Get<RB_ClientBankAccount>("select * from " + TableName + " " + where).ToList();
string sql = $@"select a.*,b.name as BankName from {TableName} as a {TableName}";
return Get<RB_ClientBankAccount>(sql).ToList();
}
/// <summary>
......@@ -117,45 +120,46 @@ namespace Mall.Repository.Finance
public List<RB_ClientBankAccount> GetList(RB_ClientBankAccount_Extend model)
{
string where = " WHERE 1=1 ";
where += string.Format(" AND " + nameof(RB_ClientBankAccount.Status) + "={0} ", (int)DateStateEnum.Normal);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.Status) + "={0} ", (int)DateStateEnum.Normal);
if (model.RB_Group_Id > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.RB_Group_Id) + "={0} ", model.RB_Group_Id);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.RB_Group_Id) + "={0} ", model.RB_Group_Id);
}
if (model.RB_Branch_Id >= 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.RB_Branch_Id) + "={0} ", model.RB_Branch_Id);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.RB_Branch_Id) + "={0} ", model.RB_Branch_Id);
}
if (model.ID > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.ID) + "={0} ", model.ID);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.ID) + "={0} ", model.ID);
}
if (!string.IsNullOrWhiteSpace(model.ClientIdStr))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.ID) + " in({0}) ", model.ClientIdStr);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.ID) + " in({0}) ", model.ClientIdStr);
}
if (model.Type > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.Type) + "={0}", (int)model.Type);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.Type) + "={0}", (int)model.Type);
}
if (model.ObjID > 0)
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.ObjID) + "={0}", model.ObjID);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.ObjID) + "={0}", model.ObjID);
}
if (!string.IsNullOrWhiteSpace(model.ObjIdStr))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.ObjID) + " in({0})", model.ObjIdStr);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.ObjID) + " in({0})", model.ObjIdStr);
}
if (!string.IsNullOrEmpty(model.AccountAlias))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.AccountAlias) + "='{0}'", model.AccountAlias);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.AccountAlias) + "='{0}'", model.AccountAlias);
}
if (!string.IsNullOrEmpty(model.CardNum))
{
where += string.Format(" AND " + nameof(RB_ClientBankAccount.CardNum) + " like '%{0}%' ", model.CardNum);
where += string.Format(" AND a." + nameof(RB_ClientBankAccount.CardNum) + " like '%{0}%' ", model.CardNum);
}
return Get<RB_ClientBankAccount>("select * from " + TableName + " " + where).ToList();
string sql = $@"select a.*,b.name as BankName from {TableName} as a {TableName}";
return Get<RB_ClientBankAccount>(sql).ToList();
}
}
}
......@@ -43,7 +43,7 @@ namespace Mall.Repository.User
}
if (dmodel.Type > 0)
{
where += $@" and {nameof(RB_Member_Integral.Type)}={dmodel.Type}";
where += $@" and {nameof(RB_Member_Integral.Type)}={(int)dmodel.Type}";
}
if (dmodel.UserId > 0)
{
......
......@@ -438,6 +438,7 @@ namespace Mall.WebApi.Controllers.MallBase
model.Parent2Name,
model.TenantId,
model.MallBaseId,
model.IsForeignShare,
CreateDate = model.CreateDate.HasValue ? model.CreateDate.Value.ToString("yyyy-MM-dd") : ""
});
}
......@@ -478,6 +479,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.Enabled ??= 1;
demodel.IsShow ??= 1;
demodel.Status ??= 0;
demodel.IsForeignShare ??= 2;
demodel.CreateDate = DateTime.Now;
demodel.UpdateDate = DateTime.Now;
bool flag= productModule.SetProductCategoryInfo(demodel);
......
......@@ -748,6 +748,7 @@ namespace Mall.WebApi.Controllers.User
demodel.DailyWithdrawalLimit ??= 0;
demodel.BackgroundImage ??= 0;
demodel.IndexImage ??= 0;
demodel.HpReferralsGradeAudit ??= 2;
demodel.TenantId = Convert.ToInt32(requestParm.uid);
demodel.MallBaseId = requestParm.MallBaseId;
demodel.CreateDate = DateTime.Now;
......@@ -798,6 +799,7 @@ namespace Mall.WebApi.Controllers.User
model.IndexImage,
model.IndexImagePath,
model.IsCommissionResidue,
model.HpReferralsGradeAudit,
UpdateDate = model.UpdateDate.HasValue ? model.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""
});
}
......
......@@ -29,6 +29,7 @@
"ByteDanceSendTemplate": "https://developer.toutiao.com/api/apps/game/template/send",
"sTenpayNotify": "http://mallapi.oytour.com/api/WeChatNotify/Notify", //微信回调地址
"NetworkDirector": 1756, //网络主管的id,用于新建供应商账户的时候的创建人
"RebornDMC": "reborn_dmc",
"RedisSetting": {
"RedisServer": "192.168.2.214",
"RedisPort": "6379",
......
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