|
|
@@ -1,57 +0,0 @@ |
|
|
|
package svc |
|
|
|
|
|
|
|
import ( |
|
|
|
utils2 "applet/app/utils" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_system_rules.git/md" |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es" |
|
|
|
"fmt" |
|
|
|
) |
|
|
|
|
|
|
|
func CreateEsScoreAndAssignValuesDoc(index, id string, uid int64, kind int, value string, now string) error { |
|
|
|
m := md.EggEnergyUserEggScoreEs{ |
|
|
|
Uid: uid, |
|
|
|
CreatedAt: now, |
|
|
|
UpdatedAt: now, |
|
|
|
} |
|
|
|
switch kind { |
|
|
|
case 1: |
|
|
|
m.ScoreValue = utils2.StrToFloat64(value) |
|
|
|
case 2: |
|
|
|
m.ScoreValueKind = int32(utils2.StrToInt64(value)) |
|
|
|
case 3: |
|
|
|
m.Ecpm = utils2.StrToFloat64(value) |
|
|
|
case 4: |
|
|
|
m.InviteUserNums = utils2.StrToInt(value) |
|
|
|
case 5: |
|
|
|
m.TeamActivityNums = utils2.StrToInt(value) |
|
|
|
case 6: |
|
|
|
m.SignInNums = utils2.StrToInt(value) |
|
|
|
case 7: |
|
|
|
m.ImActivityNums = utils2.StrToInt(value) |
|
|
|
case 8: |
|
|
|
m.SendRedPackageNums = utils2.StrToInt(value) |
|
|
|
case 9: |
|
|
|
m.EggEnergyExchangeAccountBalance = utils2.StrToInt(value) |
|
|
|
case 10: |
|
|
|
m.AccountBalanceExchangeEggEnergyNums = utils2.StrToInt(value) |
|
|
|
case 11: |
|
|
|
m.SendCircleOfFriendNums = utils2.StrToInt(value) |
|
|
|
case 12: |
|
|
|
m.ForumCommentsNums = utils2.StrToInt(value) |
|
|
|
case 13: |
|
|
|
m.CollegeLearningNums = utils2.StrToInt(value) |
|
|
|
case 14: |
|
|
|
m.ViolateNums = utils2.StrToInt(value) |
|
|
|
case 15: |
|
|
|
m.BrowseInterfaceNums = utils2.StrToInt(value) |
|
|
|
case 16: |
|
|
|
m.PersonAddActivityValue = utils2.StrToInt(value) |
|
|
|
} |
|
|
|
createDoc, err1 := es.CreateDoc(index, id, m) |
|
|
|
if err1 != nil { |
|
|
|
fmt.Println("EggCanalPersonAddActivityValueConsumeCreateDoc_ERR::::", "kind===>", kind, "::::::", err1.Error()) |
|
|
|
return err1 |
|
|
|
} |
|
|
|
fmt.Println("createDoc==========>", createDoc) |
|
|
|
return nil |
|
|
|
} |