shenjiachi 2 giorni fa
parent
commit
589905bbda
5 ha cambiato i file con 16 aggiunte e 2 eliminazioni
  1. +3
    -0
      app/hdl/financial_center/hdl_withdraw.go
  2. +6
    -0
      app/hdl/member_center/hdl_user_management.go
  3. +1
    -0
      app/md/financial_center/md_withdraw.go
  4. +3
    -1
      app/svc/egg_energy/svc_egg_energy.go
  5. +3
    -1
      app/svc/financial_center/svc_withdraw.go

+ 3
- 0
app/hdl/financial_center/hdl_withdraw.go Vedi File

@@ -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)


+ 6
- 0
app/hdl/member_center/hdl_user_management.go Vedi File

@@ -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


+ 1
- 0
app/md/financial_center/md_withdraw.go Vedi File

@@ -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 {


+ 3
- 1
app/svc/egg_energy/svc_egg_energy.go Vedi File

@@ -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
}



+ 3
- 1
app/svc/financial_center/svc_withdraw.go Vedi File

@@ -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


Caricamento…
Annulla
Salva