Commit 098b817c authored by 黄奎's avatar 黄奎

页面修改

parent c5028a10
......@@ -146,6 +146,16 @@ namespace Mall.Model.Extend.User
/// 是否直接下级[1-是]
/// </summary>
public int IsDirect { get; set; }
/// <summary>
/// 店铺Id
/// </summary>
public int ShopId { get; set; }
/// <summary>
/// 店铺名称
/// </summary>
public string ShopName { get; set; }
}
......
......@@ -33,6 +33,12 @@ namespace Mall.Module.User
/// 用户管理
/// </summary>
private readonly RB_Member_UserRepository member_UserRepository = new RB_Member_UserRepository();
/// <summary>
/// 用户管理
/// </summary>
private readonly RB_Member_UserRepository2 member_UserRepository2 = new RB_Member_UserRepository2();
/// <summary>
/// 会员等级
/// </summary>
......@@ -6570,5 +6576,15 @@ namespace Mall.Module.User
};
return distributor_InfoRepository.Update(fileds, new WhereHelper(nameof(RB_Distributor_Info_Extend.UserId), UserId));
}
/// <summary>
/// 获取商户用户列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Member_User_Extend> GetMemberUserListExtModule(RB_Member_User_Extend dmodel)
{
return member_UserRepository2.GetMemberUserListExtRepository(dmodel);
}
}
}
......@@ -12,7 +12,7 @@ namespace Mall.Repository.User
/// <summary>
/// 商户用户仓储层
/// </summary>
public class RB_Member_UserRepository : BaseRepository<RB_Member_User>
public partial class RB_Member_UserRepository : BaseRepository<RB_Member_User>
{
/// <summary>
......
using Mall.Model.Extend.User;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Mall.Model.Entity.User;
using VT.FW.DB.Dapper;
namespace Mall.Repository.User
{
/// <summary>
/// 商户用户仓储层
/// </summary>
public partial class RB_Member_UserRepository2 : BaseRepository<RB_Member_User>
{
/// <summary>
/// 获取商户用户列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Member_User_Extend> GetMemberUserListExtRepository(RB_Member_User_Extend dmodel)
{
DynamicParameters dynamicParameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT IFNULL(B.Id,0) AS ShopId,IFNULL(B.Name,'') AS ShopName,A.*
FROM rb_member_user AS A LEFT JOIN rb_smallshops_info AS B ON A.Id=B.UserId
WHERE 1=1
");
if (dmodel.TenantId > 0)
{
builder.AppendFormat($@" and A.{nameof(RB_Member_User.TenantId)}={dmodel.TenantId}");
}
if (dmodel.MallBaseId > 0)
{
builder.AppendFormat($@" and A.{nameof(RB_Member_User.MallBaseId)}={dmodel.MallBaseId}");
}
if (!string.IsNullOrEmpty(dmodel.Name.Trim()))
{
builder.AppendFormat($@" and A.Name like @Name ");
dynamicParameters.Add("Name", "%" + dmodel.Name.Trim() + "%");
}
return Get<RB_Member_User_Extend>(builder.ToString(), dynamicParameters).ToList();
}
}
}
......@@ -169,16 +169,20 @@ namespace Mall.WebApi.Controllers.MallBase
}
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Goods_Extend demodel = JsonConvert.DeserializeObject<RB_Goods_Extend>(parms.msg.ToString());
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
demodel.GoodsStatus = 1;//只查询销售中的
demodel.SmallShopsId = parms.SmallShopsId;
JObject newParms = JObject.Parse(parms.msg.ToString());
int UserId = parms.UserId;
if (newParms.GetInt("ERPUserId") > 0)
{
UserId = newParms.GetInt("ERPUserId");
}
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
demodel.GoodsStatus = 1;//只查询销售中的
demodel.SmallShopsId = parms.SmallShopsId;
if (newParms.GetInt("ERPSmallShopId") > 0)
{
demodel.SmallShopsId = newParms.GetInt("ERPSmallShopId");
}
demodel.UserId = UserId;
//HK2020-09-07新增
int IsGetShare = newParms.GetInt("IsGetShare");
......
......@@ -3346,5 +3346,29 @@ namespace Mall.WebApi.Controllers.User
}
}
#endregion
#region 获取用户列表
[HttpPost]
[AllowAnonymous]
public ApiResult GetMemberUserListExt()
{
var re = RequestParm;
var parms = JObject.Parse(re.msg.ToString());
RB_Member_User_Extend query = new RB_Member_User_Extend()
{
Name = parms.GetStringValue("Name"),
};
query.TenantId = Convert.ToInt32(re.uid);
query.MallBaseId = re.MallBaseId;
var list = userModule.GetMemberUserListExtModule(query);
return ApiResult.Success(data: list.Select(qitem => new
{
qitem.Id,
qitem.Name,
qitem.ShopId,
qitem.ShopName
}));
}
#endregion
}
}
\ No newline at end of file
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