Commit e20a0f60 authored by 吴春's avatar 吴春

提交代码

parent 54782cc6
......@@ -415,6 +415,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
extModel.CreateByName = UserReidsCache.GetUserLoginInfo(extModel.CreateBy)?.Name ?? "";
extModel.IsJoinActivity = 0;
if (userInfo == null)
{
userInfo = new AppletUserInfo
{
UserId = RequestParm.UserId,
MallBaseId = RequestParm.MallBaseId,
TenantId = RequestParm.TenantId
};
}
if (userInfo != null && userInfo.UserId > 0)
{
var list = consultModule.GetCommerceConsultListModule(new RB_Commerce_Consult_Extend() { ActivityId = Id, UserId = userInfo.UserId });
......
......@@ -417,22 +417,26 @@ namespace Mall.WebApi.Controllers.User
var req = RequestParm;
var userInfo = AppletUserInfo;
RB_Distributor_Info_Extend demodel = JsonConvert.DeserializeObject<RB_Distributor_Info_Extend>(req.msg.ToString());
if (string.IsNullOrEmpty(demodel.Name))
{
return ApiResult.ParamIsNull("请输入名称");
}
if (string.IsNullOrEmpty(demodel.Mobile))
var model = userModule.GetDistributorBasicsInfo(userInfo.TenantId.ToString(), userInfo.MallBaseId);
if (model.ApplyFor == DistributorApplyForEnum.TWX || model.ApplyFor == DistributorApplyForEnum.TX)
{
return ApiResult.ParamIsNull("请输入手机号码");
if (string.IsNullOrEmpty(demodel.Name))
{
return ApiResult.ParamIsNull("请输入名称");
}
if (string.IsNullOrEmpty(demodel.Mobile))
{
return ApiResult.ParamIsNull("请输入手机号码");
}
}
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId;
demodel.UserId = userInfo.UserId;
demodel.TotalCommission ??= 0;
demodel.CommissionWithdrawal ??= 0;
demodel.GradeId ??= 0;
demodel.AuditStatus ??= DistributorAuditStatusEnum.Auditing;
demodel.AuditStatus ??= (model.ApplyFor == DistributorApplyForEnum.BTWX || model.ApplyFor == DistributorApplyForEnum.TWX) ? DistributorAuditStatusEnum.Audited : DistributorAuditStatusEnum.Auditing;
demodel.Status = 0;
demodel.HPGradeId ??= 0;
demodel.FXGradeId ??= 1;
......
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