info get profile

This commit is contained in:
eson 2023-09-27 12:18:16 +08:00
parent 943eba6f1a
commit b4f201eb98

View File

@ -2,6 +2,7 @@ package gmodel
import ( import (
"context" "context"
"fmt"
"time" "time"
"github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/logx"
@ -100,10 +101,11 @@ func (a *FsAddressModel) SettingUserDefaultAddress(ctx context.Context, userId i
return err 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 { if err != nil {
logx.Error(err) logx.Error(err)
} }
err = tx.Where("`user_id` = ? and `status` = 1 and `address_id` != ? and `ltime` > ?", userId, addressId, now.AddDate(10, 0, 0)). err = tx.Where("`user_id` = ? and `status` = 1 and `address_id` != ? and `ltime` > ?", userId, addressId, now.AddDate(10, 0, 0)).
UpdateColumn("ltime", now).Error UpdateColumn("ltime", now).Error
if err != nil { if err != nil {