fix
This commit is contained in:
@@ -22,7 +22,7 @@ func (a *FsAddressModel) GetUserAllAddress(ctx context.Context, userId int64) (r
|
||||
func (a *FsAddressModel) CreateOne(ctx context.Context, address *FsAddress) (result *FsAddress, err error) {
|
||||
|
||||
err = a.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||
// now := time.Now().Unix()
|
||||
// now := time.Now().UTC().Unix()
|
||||
result = &FsAddress{
|
||||
UserId: address.UserId,
|
||||
Name: address.Name,
|
||||
|
||||
@@ -39,7 +39,7 @@ func (p *FsCloudPickUpModel) GetCloudPickUpByIDAndUserID(ctx context.Context, us
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ctime := time.Now().Unix()
|
||||
ctime := time.Now().UTC().Unix()
|
||||
cs.Ctime = &ctime
|
||||
if constants.ConcactService(*cs.Type) == constants.TYPE_DEFAULT {
|
||||
*cs.RelationId = 0
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret uint64) (authKey string, err error) {
|
||||
|
||||
err = m.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||
now := time.Now().Unix()
|
||||
now := time.Now().UTC().Unix()
|
||||
var record = &FsGuest{}
|
||||
tx.Create(record)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ func (o *FsOrderModel) FindOneAndCreateServiceContact(ctx context.Context, userI
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ctime := time.Now().Unix()
|
||||
ctime := time.Now().UTC().Unix()
|
||||
cs.Ctime = &ctime
|
||||
if constants.ConcactService(*cs.Type) == constants.TYPE_DEFAULT {
|
||||
*cs.RelationId = 0
|
||||
|
||||
@@ -87,7 +87,7 @@ func (u *FsUserModel) RegisterByGoogleOAuth(ctx context.Context, token *auth.Reg
|
||||
if err != nil {
|
||||
// 没有找到在数据库就创建注册
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
createAt := time.Now().Unix()
|
||||
createAt := time.Now().UTC().Unix()
|
||||
user.Email = &token.Email
|
||||
user.CreatedAt = &createAt
|
||||
user.GoogleId = &token.Id
|
||||
@@ -129,7 +129,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
||||
if err != nil {
|
||||
// 没有找到在数据库就创建注册
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
createAt := time.Now().Unix()
|
||||
createAt := time.Now().UTC().Unix()
|
||||
user.Email = &token.Email
|
||||
user.CreatedAt = &createAt
|
||||
user.PasswordHash = &token.Password
|
||||
|
||||
Reference in New Issue
Block a user