Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
4cd2e1ce65
|
@ -68,7 +68,7 @@ func (a *FsAddressModel) CreateOne(ctx context.Context, address *FsAddress) (res
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *FsAddressModel) UpdateAddAddress(ctx context.Context, address *FsAddress) (err error) {
|
func (a *FsAddressModel) UpdateAddress(ctx context.Context, address *FsAddress) (err error) {
|
||||||
err = a.db.WithContext(ctx).Model(&FsAddress{}).Transaction(func(tx *gorm.DB) error {
|
err = a.db.WithContext(ctx).Model(&FsAddress{}).Transaction(func(tx *gorm.DB) error {
|
||||||
err = tx.
|
err = tx.
|
||||||
Where("user_id = ? and address_id = ? and status = 1 ", address.UserId, address.AddressId).
|
Where("user_id = ? and address_id = ? and status = 1 ", address.UserId, address.AddressId).
|
||||||
|
|
|
@ -2,6 +2,7 @@ package gmodel
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fs_guest 游客表
|
// fs_guest 游客表
|
||||||
|
@ -10,8 +11,8 @@ type FsGuest struct {
|
||||||
AuthKey *string `gorm:"default:'';" json:"auth_key"` // jwt token
|
AuthKey *string `gorm:"default:'';" json:"auth_key"` // jwt token
|
||||||
Status *int64 `gorm:"index;default:1;" json:"status"` // 1正常 0不正常
|
Status *int64 `gorm:"index;default:1;" json:"status"` // 1正常 0不正常
|
||||||
IsDel *int64 `gorm:"index;default:0;" json:"is_del"` // 是否删除 1删除
|
IsDel *int64 `gorm:"index;default:0;" json:"is_del"` // 是否删除 1删除
|
||||||
CreatedAt *int64 `gorm:"index;default:0;" json:"created_at"` // 添加时间
|
Ctime *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||||
UpdatedAt *int64 `gorm:"default:0;" json:"updated_at"` // 更新时间
|
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||||
IsOpenRender *int64 `gorm:"default:0;" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
IsOpenRender *int64 `gorm:"default:0;" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||||
IsThousandFace *int64 `gorm:"default:0;" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
IsThousandFace *int64 `gorm:"default:0;" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||||
IsLowRendering *int64 `gorm:"default:0;" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
IsLowRendering *int64 `gorm:"default:0;" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||||
|
|
|
@ -12,11 +12,11 @@ import (
|
||||||
func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret uint64) (authKey string, err error) {
|
func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret uint64) (authKey string, err error) {
|
||||||
|
|
||||||
err = m.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
err = m.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||||
now := time.Now().UTC().Unix()
|
now := time.Now().UTC()
|
||||||
var record = &FsGuest{}
|
var record = &FsGuest{}
|
||||||
tx.Create(record)
|
tx.Create(record)
|
||||||
|
|
||||||
authKey, err = auth.GenerateJwtTokenUint64(AccessSecret, now, 31536000, 0, int64(record.GuestId))
|
authKey, err = auth.GenerateJwtTokenUint64(AccessSecret, now.Unix(), 31536000, 0, int64(record.GuestId))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
err = tx.Rollback().Error
|
err = tx.Rollback().Error
|
||||||
|
@ -26,7 +26,7 @@ func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret uint64)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
record.AuthKey = &authKey
|
record.AuthKey = &authKey
|
||||||
record.CreatedAt = &now
|
record.Ctime = &now
|
||||||
err = tx.Updates(record).Error
|
err = tx.Updates(record).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
|
|
|
@ -29,7 +29,7 @@ type FsProductModel3d struct {
|
||||||
IsCloudRender *int64 `gorm:"default:0;" json:"is_cloud_render"` // 是否设置为云渲染模型
|
IsCloudRender *int64 `gorm:"default:0;" json:"is_cloud_render"` // 是否设置为云渲染模型
|
||||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||||
StepPrice *[]byte `gorm:"default:'';" json:"step_price"` //
|
StepPrice *[]byte `gorm:"default:'';" json:"step_price"` //
|
||||||
PackedUnit *int64 `gorm:"default:0;" json:"packed_unit"` //
|
PackedUnit *int64 `gorm:"default:0;" json:"packed_unit"` // 被打包的数量单位
|
||||||
}
|
}
|
||||||
type FsProductModel3dModel struct {
|
type FsProductModel3dModel struct {
|
||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
|
|
|
@ -2,6 +2,7 @@ package gmodel
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fs_user 用户表
|
// fs_user 用户表
|
||||||
|
@ -21,16 +22,8 @@ type FsUser struct {
|
||||||
Type *int64 `gorm:"default:0;" json:"type"` // 1普通餐厅 2连锁餐厅
|
Type *int64 `gorm:"default:0;" json:"type"` // 1普通餐厅 2连锁餐厅
|
||||||
Status *int64 `gorm:"default:1;" json:"status"` // 1正常 0不正常
|
Status *int64 `gorm:"default:1;" json:"status"` // 1正常 0不正常
|
||||||
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除 1删除
|
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除 1删除
|
||||||
CreatedAt *int64 `gorm:"default:0;" json:"created_at"` // 添加时间
|
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||||
UpdatedAt *int64 `gorm:"default:0;" json:"updated_at"` // 更新时间
|
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||||
IsOrderStatusEmail *int64 `gorm:"default:0;" json:"is_order_status_email"` // 订单状态改变时是否接收邮件
|
|
||||||
IsEmailAdvertisement *int64 `gorm:"default:0;" json:"is_email_advertisement"` // 是否接收邮件广告
|
|
||||||
IsOrderStatusPhone *int64 `gorm:"default:0;" json:"is_order_status_phone"` // 订单状态改变是是否接收电话
|
|
||||||
IsPhoneAdvertisement *int64 `gorm:"default:0;" json:"is_phone_advertisement"` // 是否接收短信广告
|
|
||||||
IsOpenRender *int64 `gorm:"default:0;" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
|
||||||
IsThousandFace *int64 `gorm:"default:0;" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
|
||||||
IsLowRendering *int64 `gorm:"default:0;" json:"is_low_rendering"` //
|
|
||||||
IsRemoveBg *int64 `gorm:"default:1;" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
|
||||||
}
|
}
|
||||||
type FsUserModel struct {
|
type FsUserModel struct {
|
||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
|
|
|
@ -115,9 +115,9 @@ func (u *FsUserModel) RegisterByGoogleOAuth(ctx context.Context, token *auth.Reg
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// 没有找到在数据库就创建注册
|
// 没有找到在数据库就创建注册
|
||||||
if err == gorm.ErrRecordNotFound {
|
if err == gorm.ErrRecordNotFound {
|
||||||
createAt := time.Now().UTC().Unix()
|
createAt := time.Now().UTC()
|
||||||
user.Email = &token.Email
|
user.Email = &token.Email
|
||||||
user.CreatedAt = &createAt
|
user.Ctime = &createAt
|
||||||
user.GoogleId = &googleId
|
user.GoogleId = &googleId
|
||||||
user.PasswordHash = &token.Password
|
user.PasswordHash = &token.Password
|
||||||
user.FirstName = &firstName
|
user.FirstName = &firstName
|
||||||
|
@ -182,9 +182,9 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
||||||
LastName := token.Extend["last_name"].(string)
|
LastName := token.Extend["last_name"].(string)
|
||||||
Resetaurant := token.Extend["resetaurant"].(string)
|
Resetaurant := token.Extend["resetaurant"].(string)
|
||||||
|
|
||||||
createAt := time.Now().UTC().Unix()
|
createAt := time.Now().UTC()
|
||||||
user.Email = &token.Email
|
user.Email = &token.Email
|
||||||
user.CreatedAt = &createAt
|
user.Ctime = &createAt
|
||||||
user.PasswordHash = &token.Password
|
user.PasswordHash = &token.Password
|
||||||
user.FirstName = &FirstName
|
user.FirstName = &FirstName
|
||||||
user.LastName = &LastName
|
user.LastName = &LastName
|
||||||
|
|
|
@ -88,7 +88,7 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri
|
||||||
}
|
}
|
||||||
|
|
||||||
// 插入数据库 更新地址
|
// 插入数据库 更新地址
|
||||||
err := m.UpdateAddAddress(l.ctx, address)
|
err := m.UpdateAddress(l.ctx, address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return resp.SetStatus(basic.CodeDbUpdateErr)
|
return resp.SetStatus(basic.CodeDbUpdateErr)
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"fusenapi/server/home-user-auth/internal/types"
|
"fusenapi/server/home-user-auth/internal/types"
|
||||||
"fusenapi/utils/auth"
|
"fusenapi/utils/auth"
|
||||||
"fusenapi/utils/basic"
|
"fusenapi/utils/basic"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
@ -46,12 +47,12 @@ func (l *UserBasicInfoLogic) UserBasicInfo(req *types.Request, userinfo *auth.Us
|
||||||
|
|
||||||
return resp.SetStatus(basic.CodeOK, types.DataUserBasicInfo{
|
return resp.SetStatus(basic.CodeOK, types.DataUserBasicInfo{
|
||||||
Type: *user.Type,
|
Type: *user.Type,
|
||||||
IsOrderStatusEmail: *user.IsOrderStatusEmail,
|
// IsOrderStatusEmail: *user.IsOrderStatusEmail,
|
||||||
IsEmailAdvertisement: *user.IsEmailAdvertisement,
|
// IsEmailAdvertisement: *user.IsEmailAdvertisement,
|
||||||
IsOrderStatusPhone: *user.IsOrderStatusPhone,
|
// IsOrderStatusPhone: *user.IsOrderStatusPhone,
|
||||||
IsPhoneAdvertisement: *user.IsPhoneAdvertisement,
|
// IsPhoneAdvertisement: *user.IsPhoneAdvertisement,
|
||||||
IsOpenRender: *user.IsOpenRender,
|
// IsOpenRender: *user.IsOpenRender,
|
||||||
IsLowRendering: *user.IsLowRendering,
|
// IsLowRendering: *user.IsLowRendering,
|
||||||
IsRemoveBg: *user.IsRemoveBg,
|
// IsRemoveBg: *user.IsRemoveBg,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,10 @@ func (l *AddressUpdateLogic) AddressUpdate(req *types.AddressRequest, userinfo *
|
||||||
|
|
||||||
now := time.Now().UTC()
|
now := time.Now().UTC()
|
||||||
|
|
||||||
|
if req.AddressId == 0 {
|
||||||
|
return resp.SetStatusWithMessage(basic.CodeApiErr, "address_id must setting")
|
||||||
|
}
|
||||||
|
|
||||||
address := gmodel.FsAddress{
|
address := gmodel.FsAddress{
|
||||||
AddressId: req.AddressId,
|
AddressId: req.AddressId,
|
||||||
UserId: &userinfo.UserId,
|
UserId: &userinfo.UserId,
|
||||||
|
@ -56,10 +60,9 @@ func (l *AddressUpdateLogic) AddressUpdate(req *types.AddressRequest, userinfo *
|
||||||
City: &req.City,
|
City: &req.City,
|
||||||
State: &req.State,
|
State: &req.State,
|
||||||
Utime: &now,
|
Utime: &now,
|
||||||
Ltime: &now,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err := l.svcCtx.AllModels.FsAddress.UpdateAddAddress(l.ctx, &address)
|
err := l.svcCtx.AllModels.FsAddress.UpdateAddress(l.ctx, &address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error())
|
return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error())
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,10 +73,13 @@ func (l *CalculateProductPriceLogic) CalculateProductPrice(req *types.CalculateP
|
||||||
fittingPrice := int64(0)
|
fittingPrice := int64(0)
|
||||||
if req.FittingId > 0 {
|
if req.FittingId > 0 {
|
||||||
fittingInfo, err := l.svcCtx.AllModels.FsProductModel3d.FindOne(l.ctx, req.FittingId, "id,price")
|
fittingInfo, err := l.svcCtx.AllModels.FsProductModel3d.FindOne(l.ctx, req.FittingId, "id,price")
|
||||||
|
if err != nil {
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "fitting info is not exists")
|
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "fitting info is not exists")
|
||||||
}
|
}
|
||||||
|
logx.Error(err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get fitting info")
|
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get fitting info")
|
||||||
|
}
|
||||||
fittingPrice = *fittingInfo.Price
|
fittingPrice = *fittingInfo.Price
|
||||||
}
|
}
|
||||||
totalPrice, itemPrice, err := step_price.GetNewCentStepPrice(req.PurchaseQuantity, stepPrice, fittingPrice)
|
totalPrice, itemPrice, err := step_price.GetNewCentStepPrice(req.PurchaseQuantity, stepPrice, fittingPrice)
|
||||||
|
|
|
@ -2,12 +2,9 @@ package logic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
|
||||||
"fusenapi/utils/auth"
|
"fusenapi/utils/auth"
|
||||||
"fusenapi/utils/basic"
|
"fusenapi/utils/basic"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
|
||||||
|
|
||||||
"fusenapi/server/product/internal/svc"
|
"fusenapi/server/product/internal/svc"
|
||||||
"fusenapi/server/product/internal/types"
|
"fusenapi/server/product/internal/types"
|
||||||
|
|
||||||
|
@ -33,18 +30,18 @@ func (l *GetLastProductDesignLogic) GetLastProductDesign(req *types.Request, use
|
||||||
return resp.SetStatusAddMessage(basic.CodeUnAuth, "please sign in")
|
return resp.SetStatusAddMessage(basic.CodeUnAuth, "please sign in")
|
||||||
}
|
}
|
||||||
//获取用户信息
|
//获取用户信息
|
||||||
user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId)
|
// user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
// if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "user not found")
|
// return resp.SetStatusWithMessage(basic.CodeUnAuth, "user not found")
|
||||||
}
|
// }
|
||||||
logx.Error(err)
|
// logx.Error(err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user info")
|
// return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user info")
|
||||||
}
|
// }
|
||||||
//若没打开了个性化渲染按钮
|
// //若没打开了个性化渲染按钮
|
||||||
if *user.IsOpenRender != 1 {
|
// if *user.IsOpenRender != 1 {
|
||||||
return resp.SetStatusWithMessage(basic.CodeOK, "success:IsOpenRender switch is closed")
|
// return resp.SetStatusWithMessage(basic.CodeOK, "success:IsOpenRender switch is closed")
|
||||||
}
|
// }
|
||||||
//查询用户最近下单成功的数据
|
//查询用户最近下单成功的数据
|
||||||
// orderInfo, err := l.svcCtx.AllModels.FsOrder.FindLastSuccessOneOrder(l.ctx, user.Id, int64(constants.STATUS_NEW_NOT_PAY))
|
// orderInfo, err := l.svcCtx.AllModels.FsOrder.FindLastSuccessOneOrder(l.ctx, user.Id, int64(constants.STATUS_NEW_NOT_PAY))
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
|
|
|
@ -377,8 +377,8 @@ func (l *GetProductInfoLogic) GetProductInfo(req *types.GetProductInfoReq, useri
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user info")
|
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user info")
|
||||||
}
|
}
|
||||||
isLowRendering = *user.IsLowRendering > 0
|
isLowRendering = true
|
||||||
isRemoveBg = *user.IsRemoveBg > 0
|
isRemoveBg = true
|
||||||
lastDesign = l.getLastDesign(user)
|
lastDesign = l.getLastDesign(user)
|
||||||
}
|
}
|
||||||
var renderDesign interface{}
|
var renderDesign interface{}
|
||||||
|
|
|
@ -12,12 +12,13 @@ import (
|
||||||
"fusenapi/utils/basic"
|
"fusenapi/utils/basic"
|
||||||
"fusenapi/utils/format"
|
"fusenapi/utils/format"
|
||||||
"fusenapi/utils/image"
|
"fusenapi/utils/image"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
|
||||||
"gorm.io/gorm"
|
|
||||||
"math"
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GetProductListLogic struct {
|
type GetProductListLogic struct {
|
||||||
|
@ -163,7 +164,7 @@ func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq, useri
|
||||||
UserId: user.Id,
|
UserId: user.Id,
|
||||||
}
|
}
|
||||||
if user.Id != 0 {
|
if user.Id != 0 {
|
||||||
r.IsThousandFace = int(*user.IsThousandFace)
|
r.IsThousandFace = 1
|
||||||
}
|
}
|
||||||
image.ThousandFaceImageFormat(&r)
|
image.ThousandFaceImageFormat(&r)
|
||||||
item.Cover = r.Cover
|
item.Cover = r.Cover
|
||||||
|
|
|
@ -77,8 +77,8 @@ func (l *GetRenderSettingByPidLogic) GetRenderSettingByPid(req *types.GetRenderS
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user info")
|
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user info")
|
||||||
}
|
}
|
||||||
isLowRendering = *user.IsLowRendering > 0
|
isLowRendering = true
|
||||||
isRemoveBg = *user.IsRemoveBg > 0
|
isRemoveBg = true
|
||||||
lastDesign, err = l.checkLastDesignExists(user.Id)
|
lastDesign, err = l.checkLastDesignExists(user.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"fusenapi/utils/auth"
|
"fusenapi/utils/auth"
|
||||||
"fusenapi/utils/basic"
|
"fusenapi/utils/basic"
|
||||||
"fusenapi/utils/image"
|
"fusenapi/utils/image"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
@ -75,7 +76,7 @@ func (l *GetSuccessRecommandLogic) GetSuccessRecommand(req *types.GetSuccessReco
|
||||||
UserId: user.Id,
|
UserId: user.Id,
|
||||||
}
|
}
|
||||||
if user.Id > 0 {
|
if user.Id > 0 {
|
||||||
r.IsThousandFace = int(*user.IsThousandFace)
|
r.IsThousandFace = int(1)
|
||||||
}
|
}
|
||||||
image.ThousandFaceImageFormat(&r)
|
image.ThousandFaceImageFormat(&r)
|
||||||
data.Cover = r.Cover
|
data.Cover = r.Cover
|
||||||
|
|
|
@ -8,9 +8,10 @@ import (
|
||||||
"fusenapi/utils/basic"
|
"fusenapi/utils/basic"
|
||||||
"fusenapi/utils/format"
|
"fusenapi/utils/format"
|
||||||
"fusenapi/utils/image"
|
"fusenapi/utils/image"
|
||||||
"gorm.io/gorm"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gorm.io/gorm"
|
||||||
|
|
||||||
"fusenapi/server/product/internal/svc"
|
"fusenapi/server/product/internal/svc"
|
||||||
"fusenapi/server/product/internal/types"
|
"fusenapi/server/product/internal/types"
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ func (l *OtherProductListLogic) OtherProductList(req *types.OtherProductListReq,
|
||||||
UserId: user.Id,
|
UserId: user.Id,
|
||||||
}
|
}
|
||||||
if user.Id > 0 {
|
if user.Id > 0 {
|
||||||
r.IsThousandFace = int(*user.IsThousandFace)
|
r.IsThousandFace = 1
|
||||||
}
|
}
|
||||||
image.ThousandFaceImageFormat(r)
|
image.ThousandFaceImageFormat(r)
|
||||||
v.Cover = r.Cover
|
v.Cover = r.Cover
|
||||||
|
|
|
@ -20,7 +20,7 @@ service info {
|
||||||
post /api/info/address/add(AddressRequest) returns (response);
|
post /api/info/address/add(AddressRequest) returns (response);
|
||||||
|
|
||||||
@handler AddressUpdateHandler
|
@handler AddressUpdateHandler
|
||||||
post /api/info/address/update(AddressObjectRequest) returns (response);
|
post /api/info/address/update(AddressRequest) returns (response);
|
||||||
|
|
||||||
@handler AddressDeleteHandler
|
@handler AddressDeleteHandler
|
||||||
post /api/info/address/delete(AddressIdRequest) returns (response);
|
post /api/info/address/delete(AddressIdRequest) returns (response);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user