update amo repo method

This commit is contained in:
Pavel 2024-04-30 00:28:44 +03:00
parent 283cc69264
commit 0a8ce824fe
2 changed files with 12 additions and 12 deletions

@ -210,10 +210,10 @@ const (
) )
type CheckUserUtm struct { type CheckUserUtm struct {
ID int64 `json:"ID"` ID int64 `json:"ID"`
Amofieldid int32 `json:"AmoFieldID"` Amofieldid int32 `json:"AmoFieldID"`
Quizid int32 `json:"QuizID"` Quizid int32 `json:"QuizID"`
Accountid int32 `json:"AccountID"` Accountid int32 `json:"AccountID"`
Name string `json:"Name"` Name string `json:"Name"`
Status bool AmoFieldName string
} }

@ -762,12 +762,12 @@ func (r *AmoRepository) CheckUserUtms(ctx context.Context, ids []int32) ([]model
var utmS []model.CheckUserUtm var utmS []model.CheckUserUtm
for _, row := range rows { for _, row := range rows {
utm := model.CheckUserUtm{ utm := model.CheckUserUtm{
ID: row.ID, ID: row.ID,
Amofieldid: row.Amofieldid, Amofieldid: row.Amofieldid,
Quizid: row.Quizid, Quizid: row.Quizid,
Accountid: row.Accountid, Accountid: row.Accountid,
Name: row.Name, Name: row.Name,
Status: row.Status, AmoFieldName: row.Name_2.String,
} }
utmS = append(utmS, utm) utmS = append(utmS, utm)