Commit e41509dd authored by 黄奎's avatar 黄奎

页面修改

parent 56c1f811
...@@ -3980,12 +3980,19 @@ namespace Mall.Module.User ...@@ -3980,12 +3980,19 @@ namespace Mall.Module.User
/// 获取粉象我的团队标题列表 /// 获取粉象我的团队标题列表
/// </summary> /// </summary>
/// <param name="userInfo"></param> /// <param name="userInfo"></param>
/// <param name="IsDirect">默认查询直属下线</param>
/// <returns></returns> /// <returns></returns>
public object GerUserMyTeamTitelListForFX(AppletUserInfo userInfo) public object GerUserMyTeamTitelListForFX(AppletUserInfo userInfo,int IsDirect=1)
{ {
string UserIds = member_UserRepository.GetMemberChildIdStr(userInfo.UserId); string UserIds = member_UserRepository.GetMemberChildIdStr(userInfo.UserId);
//获取下级所有等级 //获取下级所有等级
var disList = distributor_InfoRepository.GetFXGreadeListForMyTeam(new RB_Distributor_Info_Extend() { UserIds = UserIds, TenantId = userInfo.TenantId, MallBaseId = userInfo.MallBaseId }); var disList = distributor_InfoRepository.GetFXGreadeListForMyTeam(new RB_Distributor_Info_Extend()
{
UserIds = UserIds,
TenantId = userInfo.TenantId,
MallBaseId = userInfo.MallBaseId,
IsDirect = IsDirect
});
var fxList = new List<RB_Distributor_FXGrade_Extend>(); var fxList = new List<RB_Distributor_FXGrade_Extend>();
if (disList.Where(x => x.FXGradeId > 0).Any()) if (disList.Where(x => x.FXGradeId > 0).Any())
{ {
......
...@@ -177,10 +177,19 @@ where {where} order by di.CreateDate desc"; ...@@ -177,10 +177,19 @@ where {where} order by di.CreateDate desc";
{ {
where += $@" and di.{nameof(RB_Distributor_Info.AuditStatus)}={(int)dmodel.AuditStatus}"; where += $@" and di.{nameof(RB_Distributor_Info.AuditStatus)}={(int)dmodel.AuditStatus}";
} }
if (!string.IsNullOrEmpty(dmodel.UserIds)) if (dmodel.IsDirect == 1)
{ {
where += $@" and di.{nameof(RB_Distributor_Info.UserId)} in({dmodel.UserIds})"; //查找直属下级
where += $@" and u.{nameof(RB_Member_User.SuperiorId)}={dmodel.Id}";
}
else
{
if (!string.IsNullOrEmpty(dmodel.UserIds))
{
where += $@" and di.{nameof(RB_Distributor_Info.UserId)} in({dmodel.UserIds})";
}
} }
if (dmodel.GradeId >= 0) if (dmodel.GradeId >= 0)
{ {
where += $@" and di.{nameof(RB_Distributor_Info.GradeId)}={dmodel.GradeId}"; where += $@" and di.{nameof(RB_Distributor_Info.GradeId)}={dmodel.GradeId}";
...@@ -190,7 +199,10 @@ where {where} order by di.CreateDate desc"; ...@@ -190,7 +199,10 @@ where {where} order by di.CreateDate desc";
where += $@" and di.{nameof(RB_Distributor_Info.Name)} like '%{dmodel.Name}%'"; where += $@" and di.{nameof(RB_Distributor_Info.Name)} like '%{dmodel.Name}%'";
} }
string sql = $@"select di.FXGradeId,count(0) as OneNum from RB_Distributor_Info di where {where} group by di.FXGradeId"; string sql = $@"
select di.FXGradeId,count(0) as OneNum
from RB_Distributor_Info di LEFT JOIN rb_member_user AS u ON di.UserId=u.Id
where {where} group by di.FXGradeId";
return Get<RB_Distributor_Info_Extend>(sql).ToList(); return Get<RB_Distributor_Info_Extend>(sql).ToList();
} }
......
...@@ -671,8 +671,11 @@ namespace Mall.WebApi.Controllers.User ...@@ -671,8 +671,11 @@ namespace Mall.WebApi.Controllers.User
public ApiResult GerUserMyTeamTitelListForFX() public ApiResult GerUserMyTeamTitelListForFX()
{ {
var userInfo = AppletUserInfo; var userInfo = AppletUserInfo;
var req = RequestParm;
var obj = userModule.GerUserMyTeamTitelListForFX(userInfo); JObject parms = JObject.Parse(req.msg.ToString());
//是否直属
int IsDirect= parms.GetInt("IsDirect", 1);
var obj = userModule.GerUserMyTeamTitelListForFX(userInfo, IsDirect: IsDirect);
return ApiResult.Success("", obj); return ApiResult.Success("", obj);
} }
......
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