1
This commit is contained in:
parent
c03212df1c
commit
9e77777f81
@ -163,27 +163,20 @@ func (this *User) UpdateName() error {
|
||||
|
||||
func (this *User) AddAwardGrid(gridid int32) error {
|
||||
awardGridsList := this.GetAwardGrids()
|
||||
if len(awardGridsList) > 1 {
|
||||
if len(awardGridsList) > 0 {
|
||||
this.awardGrids += ","
|
||||
}
|
||||
|
||||
this.awardGrids += q5.SafeToString(gridid)
|
||||
if err := this.UpdateFields([]string{"award_grids"}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return this.UpdateFields([]string{"award_grids"})
|
||||
}
|
||||
|
||||
func (this *User) ClearAwardGrid() error {
|
||||
this.awardGrids = ""
|
||||
if err := this.UpdateFields([]string{"award_grids"}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return this.UpdateFields([]string{"award_grids"})
|
||||
}
|
||||
|
||||
func (this *User) GetAwardGrids() []int32 {
|
||||
|
||||
gridstr := strings.Split(this.awardGrids, ",")
|
||||
awardGridsList := []int32{}
|
||||
for _, item := range gridstr {
|
||||
|
Loading…
x
Reference in New Issue
Block a user