Merge branch 'feature/mhw-v1.01' of gitee.com:fusenpack/fusenapi into feature/mhw-v1.01

This commit is contained in:
momo
2023-09-20 11:40:06 +08:00
10 changed files with 52 additions and 130 deletions

View File

@@ -2,6 +2,10 @@ package gmodel
import "context"
func (l *FsProductModel3dLightModel) FindOne(ctx context.Context, id int64) (resp *FsProductModel3dLight, err error) {
err = l.db.WithContext(ctx).Model(&FsProductModel3dLight{}).Where("`id` = ? and `status` = ?", id, 1).Take(&resp).Error
return resp, err
}
func (l *FsProductModel3dLightModel) GetAllByIds(ctx context.Context, ids []int64) (resp []FsProductModel3dLight, err error) {
if len(ids) == 0 {
return

View File

@@ -13,9 +13,11 @@ type FsShoppingCart struct {
TemplateId *int64 `gorm:"default:0;" json:"template_id"` // 模板id
ModelId *int64 `gorm:"default:0;" json:"model_id"` // 模型id
SizeId *int64 `gorm:"default:0;" json:"size_id"` // 尺寸id
LightId *int64 `gorm:"default:0;" json:"light_id"` // 灯光id
FittingId *int64 `gorm:"default:0;" json:"fitting_id"` // 配件id
PurchaseQuantity *int64 `gorm:"default:0;" json:"purchase_quantity"` // 购买数量
Snapshot *string `gorm:"default:'';" json:"snapshot"` //
IsSelected *int64 `gorm:"default:0;" json:"is_selected"` // 是否被选中 0非 1是
IsHighlyCustomized *int64 `gorm:"default:0;" json:"is_highly_customized"` // 是否高度定制 0非 1是针对客人高度定制只能后台增加如购物车
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //