info get profile

This commit is contained in:
eson 2023-09-27 12:23:02 +08:00
parent b4f201eb98
commit fe57705286

View File

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