This commit is contained in:
Leufolium 2024-07-28 18:02:27 +08:00
parent e3ca244313
commit 341534b610
3 changed files with 37 additions and 5 deletions

View File

@ -668,11 +668,15 @@ func main() {
base64DecryptedBytes, _ := base64.StdEncoding.DecodeString(*account.MobilePhone)
phone, _ := cryptoService.DecryptByAES(base64DecryptedBytes)
phoneStr := string(phone)
mid := *account.Mid
name := *account.Name
userId := *account.UserId
zoneMomentCount, _ := client.GetZoneMomentCountByMid(ctx, mid)
str := fmt.Sprintf("%v %v %v %v %v\n", mid, name, userId, phoneStr, zoneMomentCount)
mid := account.GetMid()
name := account.GetName()
userId := account.GetUserId()
count := int64(0)
zone, ok := zoneMp[mid]
if ok {
count = zone.GetZoneMomentCount()
}
str := fmt.Sprintf("%v %v %v %v %v\n", mid, name, userId, phoneStr, count)
writer.WriteString(str)
}

View File

@ -31,3 +31,24 @@ type Account struct {
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记0-否1-是
}
func (p *Account) GetMid() int64 {
if p != nil && p.Mid != nil {
return *p.Mid
}
return 0
}
func (p *Account) GetName() string {
if p != nil && p.Name != nil {
return *p.Name
}
return ""
}
func (p *Account) GetUserId() int64 {
if p != nil && p.UserId != nil {
return *p.UserId
}
return 0
}

View File

@ -28,6 +28,13 @@ func (p *Zone) GetMid() int64 {
return 0
}
func (p *Zone) GetZoneMomentCount() int64 {
if p != nil && p.ZoneMomentCount != nil {
return *p.ZoneMomentCount
}
return 0
}
func (p *Zone) GetLastZoneMomentCt() int64 {
if p != nil && p.LastZoneMomentCt != nil {
return *p.LastZoneMomentCt