Commit 1ec9e80b authored by 黄奎's avatar 黄奎

页面修改

parent 0cf094ab
......@@ -30,6 +30,13 @@ namespace Mall.Module.User
{ nameof(RB_Member_User_Extend.Photo),extModel.Photo},
};
return member_UserRepository.Update(fileds, new WhereHelper(nameof(RB_Member_User_Extend.Id), extModel.Id));
//bool falg= member_UserRepository.UpdateMemberUserRepository(new RB_Member_User_Extend()
//{
// Name=extModel.AliasName,
// Photo=extModel.Photo,
// Id=extModel.Id
//});
//return falg;
}
}
}
......@@ -262,7 +262,10 @@ namespace Mall.Module.User
/// <returns></returns>
public int AddMemberUserInfo(RB_Member_User_Extend demodel)
{
return member_UserRepository.Insert(demodel);
int result = 0;
result= member_UserRepository.Insert(demodel);
//result = member_UserRepository.SetMemberUserRepository(demodel);
return result;
}
/// <summary>
......
......@@ -5,6 +5,7 @@ using Mall.Model.Entity.User;
using Mall.Model.Extend.User;
using System.Linq;
using Mall.Common.Enum.User;
using VT.FW.DB.Dapper;
namespace Mall.Repository.User
{
......@@ -922,5 +923,84 @@ LEFT JOIN (SELECT SuperiorId,COUNT(SuperiorId) as ChildrenNum from rb_member_use
}
#endregion
/// <summary>
/// 新增用户
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public int SetMemberUserRepository(RB_Member_User_Extend extModel)
{
int result = 0;
DynamicParameters dynamicParameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.Append(" SET NAMES utf8mb4; ");
builder.Append(@"
INSERT INTO rb_member_user(Name,AliasName,Photo,Source,OpenId,Moblie,MemberGrade,OrderNum,CouponsNum,CardVolumeNum,Balance,Integral,SuperiorId,Blacklist,ContactWay,Remark,TenantId,MallBaseId,CreateDate,UpdateDate,TotalConsumption,IsDistributor,SecretKey,DownlineCondition,IsBeDownline,WaitSuperiorId,BeDownlineDate,SmallShopId,CompanyProfitRate,PostId)
VALUES(@Name,@AliasName,@Photo,@Source,@OpenId,@Moblie,@MemberGrade,@OrderNum,@CouponsNum,@CardVolumeNum,@Balance,@Integral,@SuperiorId,@Blacklist,@ContactWay,@Remark
,@TenantId,@MallBaseId,@CreateDate,@UpdateDate,@TotalConsumption,@IsDistributor,@SecretKey,@DownlineCondition,@IsBeDownline,@WaitSuperiorId,@BeDownlineDate,@SmallShopId,@CompanyProfitRate,@PostId);
SELECT LAST_INSERT_ID();
");
dynamicParameters.Add("Name", extModel.Name);
dynamicParameters.Add("AliasName", extModel.AliasName);
dynamicParameters.Add("Photo", extModel.Photo);
dynamicParameters.Add("Source", extModel.Source);
dynamicParameters.Add("OpenId", extModel.OpenId);
dynamicParameters.Add("Moblie", extModel.Moblie);
dynamicParameters.Add("MemberGrade", extModel.MemberGrade);
dynamicParameters.Add("OrderNum", extModel.OrderNum);
dynamicParameters.Add("CouponsNum", extModel.CouponsNum);
dynamicParameters.Add("CardVolumeNum", extModel.CardVolumeNum);
dynamicParameters.Add("Balance", extModel.Balance);
dynamicParameters.Add("Integral", extModel.Integral);
dynamicParameters.Add("SuperiorId", extModel.SuperiorId);
dynamicParameters.Add("Blacklist", extModel.Blacklist);
dynamicParameters.Add("ContactWay", extModel.ContactWay);
dynamicParameters.Add("Remark", extModel.Remark);
dynamicParameters.Add("TenantId", extModel.TenantId);
dynamicParameters.Add("MallBaseId", extModel.MallBaseId);
dynamicParameters.Add("CreateDate", extModel.CreateDate);
dynamicParameters.Add("UpdateDate", extModel.UpdateDate);
dynamicParameters.Add("TotalConsumption", extModel.TotalConsumption);
dynamicParameters.Add("IsDistributor", extModel.IsDistributor);
dynamicParameters.Add("SecretKey", extModel.SecretKey);
dynamicParameters.Add("IsBeDownline", extModel.IsBeDownline);
dynamicParameters.Add("WaitSuperiorId", extModel.WaitSuperiorId);
dynamicParameters.Add("BeDownlineDate", extModel.BeDownlineDate);
dynamicParameters.Add("SmallShopId", extModel.SmallShopId);
dynamicParameters.Add("CompanyProfitRate", extModel.CompanyProfitRate);
dynamicParameters.Add("PostId", extModel.PostId);
var obj = base.ExecuteScalar(builder.ToString(), dynamicParameters);
if (obj != null && Convert.ToInt32(obj) > 0)
{
result = Convert.ToInt32(obj.ToString());
}
return result;
}
/// <summary>
/// 修改用户微信昵称和头像
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool UpdateMemberUserRepository(RB_Member_User_Extend extModel)
{
DynamicParameters dynamicParameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.Append(" SET NAMES utf8mb4; ");
builder.Append(@"
UPDATE rb_member_user SET
Name=@Name,Photo=@Photo
WHERE Id=@Id
");
dynamicParameters.Add("Name", extModel.Name);
dynamicParameters.Add("Photo", extModel.Photo);
dynamicParameters.Add("Id", extModel.Id);
var result = base.Execute(builder.ToString(), dynamicParameters);
return result > 0;
}
}
}
{
"ConnectionStrings": {
"DefaultConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall_3;CharSet=utf8; Convert Zero Datetime=true; ",
"DefaultConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall_3;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient",
"FinanceConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; ",
"FinanceConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"FinanceConnectionPName": "MySql.Data.MySqlClient",
"UserConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=reborn_user;CharSet=utf8; Convert Zero Datetime=true; ",
"UserConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=reborn_user;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"UserConnectionPName": "MySql.Data.MySqlClient",
"PropertyConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=test_property;CharSet=utf8; Convert Zero Datetime=true; ",
"PropertyConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=test_property;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"PropertyConnectionPName": "MySql.Data.MySqlClient"
},
"Logging": {
......
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