info get profile
This commit is contained in:
parent
943eba6f1a
commit
b4f201eb98
|
@ -2,6 +2,7 @@ package gmodel
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
@ -100,10 +101,11 @@ func (a *FsAddressModel) SettingUserDefaultAddress(ctx context.Context, userId i
|
|||
return err
|
||||
}
|
||||
|
||||
err = tx.Where("`user_id` = ? and `status` = 1 and `address_id` != ? and `ltime` > ?", userId, addressId, now.AddDate(10, 0, 0)).Take(nil).Error
|
||||
err = tx.Where(fmt.Sprintf("`user_id` = ? and `status` = 1 and `address_id` != ? and `ltime` > '%s'", now.AddDate(10, 0, 0)), userId, addressId).Take(nil).Error
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
}
|
||||
|
||||
err = tx.Where("`user_id` = ? and `status` = 1 and `address_id` != ? and `ltime` > ?", userId, addressId, now.AddDate(10, 0, 0)).
|
||||
UpdateColumn("ltime", now).Error
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user