diff --git a/app/hdl/financial_center/hdl_withdraw.go b/app/hdl/financial_center/hdl_withdraw.go index aa3ecd1..fac0e71 100644 --- a/app/hdl/financial_center/hdl_withdraw.go +++ b/app/hdl/financial_center/hdl_withdraw.go @@ -344,6 +344,9 @@ func GetWithdrawApplyList(c *gin.Context) { PayAt: apply.UpdateAt, Memo: apply.Memo, } + if apply.CustomInviteCode != "" { + list[i].InviteCode = apply.CustomInviteCode + } if apply.Amount != "" && apply.Fee != "" { actualReceipt := utils.StrToFloat64(apply.Amount) - utils.StrToFloat64(apply.Fee) list[i].ActualReceipt = utils.Float64ToStr(actualReceipt) diff --git a/app/hdl/member_center/hdl_user_management.go b/app/hdl/member_center/hdl_user_management.go index 08352f2..be0fee9 100644 --- a/app/hdl/member_center/hdl_user_management.go +++ b/app/hdl/member_center/hdl_user_management.go @@ -131,6 +131,12 @@ func UserManagementGetUserList(c *gin.Context) { State: user.State, LastLoginAt: user.UpdateAt, } + if user.CustomInviteCode != "" { + list[i].InviteCode = user.CustomInviteCode + } + if user.ParentCustomInviteCode != "" { + list[i].ParentInviteCode = user.ParentCustomInviteCode + } var tempTagList []md.TagNode list[i].Tag = tempTagList userMap[user.Id] = i diff --git a/app/md/financial_center/md_withdraw.go b/app/md/financial_center/md_withdraw.go index 2c056a2..c30196b 100644 --- a/app/md/financial_center/md_withdraw.go +++ b/app/md/financial_center/md_withdraw.go @@ -87,6 +87,7 @@ type WithdrawApplyInfo struct { WxPayName string `xorm:"wx_user_name"` // 微信昵称 WxPayAccount string `xorm:"wx_user_id"` // 微信账号 InviteCode string `xorm:"system_invite_code"` // 邀请码 + CustomInviteCode string `xorm:"custom_invite_code"` // 自定义邀请码 } type GetWithdrawApplyListResp struct { diff --git a/app/svc/egg_energy/svc_egg_energy.go b/app/svc/egg_energy/svc_egg_energy.go index b5791d6..b88260f 100644 --- a/app/svc/egg_energy/svc_egg_energy.go +++ b/app/svc/egg_energy/svc_egg_energy.go @@ -72,8 +72,10 @@ func QueryElasticsearch(req md2.UserEggFlowReq, indexName string) (resp []md2.Us From((req.Page - 1) * req.PageSize).Size(req.PageSize). Pretty(true). Do(context.Background()) - if err != nil { + if strings.Contains(err.Error(), "no such index") { + return nil, 0, nil + } return } diff --git a/app/svc/financial_center/svc_withdraw.go b/app/svc/financial_center/svc_withdraw.go index 1e7f6b8..7199ccf 100644 --- a/app/svc/financial_center/svc_withdraw.go +++ b/app/svc/financial_center/svc_withdraw.go @@ -82,7 +82,9 @@ func WithDrawManagementGetApply(engine *xorm.Engine, req *md.GetWithdrawApplyLis if req.Level != "" { session = session.Where("usera.level = ?", req.Level) } - total, err := session.Select("apply.*, alipay.open_id as alipay_open_id, alipay.user_name as alipay_user_name, wx.user_id as wx_user_id, wx.user_name as wx_user_name, usera.system_invite_code as system_invite_code"). + total, err := session.Select("apply.*, alipay.open_id as alipay_open_id, alipay.user_name as alipay_user_name,"+ + " wx.user_id as wx_user_id, wx.user_name as wx_user_name,"+ + " usera.system_invite_code as system_invite_code, usera.custom_invite_code as custom_invite_code"). Limit(req.Limit, (req.Page-1)*req.Limit).Asc("apply.id").FindAndCount(&applies) if err != nil { return nil, 0, err