Documentation ¶
Index ¶
- func InitField(db *gorm.DB) error
- type BrandRepo
- func (r BrandRepo) Create(ctx context.Context, brand *entity.Brand) error
- func (r BrandRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r BrandRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) (entity.Brands, uint32, error)
- func (r BrandRepo) GetByID(ctx context.Context, id uint64) (*entity.Brand, error)
- func (r BrandRepo) GetByIDs(ctx context.Context, ids []uint64) (entity.Brands, error)
- func (r BrandRepo) Update(ctx context.Context, brand *entity.Brand) error
- func (r BrandRepo) WithByName(name string) db2.DBOption
- func (r BrandRepo) WithByShowStatus(showStatus uint8) db2.DBOption
- type CompanyAddressRepo
- func (r CompanyAddressRepo) Create(ctx context.Context, companyAddress *entity.CompanyAddress) error
- func (r CompanyAddressRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r CompanyAddressRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.CompanyAddress, uint32, error)
- func (r CompanyAddressRepo) GetByID(ctx context.Context, id uint64) (*entity.CompanyAddress, error)
- func (r CompanyAddressRepo) GetByIDs(ctx context.Context, ids []uint64) (entity.CompanyAddresses, error)
- func (r CompanyAddressRepo) Update(ctx context.Context, companyAddress *entity.CompanyAddress) error
- type HomeAdvertiseRepo
- func (r HomeAdvertiseRepo) Create(ctx context.Context, homeAdvertise *entity.HomeAdvertise) error
- func (r HomeAdvertiseRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r HomeAdvertiseRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.HomeAdvertise, uint32, error)
- func (r HomeAdvertiseRepo) GetByID(ctx context.Context, id uint64) (*entity.HomeAdvertise, error)
- func (r HomeAdvertiseRepo) Update(ctx context.Context, homeAdvertise *entity.HomeAdvertise) error
- type JsonDynamicConfigRepo
- func (r JsonDynamicConfigRepo) Create(ctx context.Context, jsonDynamicConfig *entity.JsonDynamicConfig) error
- func (r JsonDynamicConfigRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r JsonDynamicConfigRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.JsonDynamicConfig, uint32, error)
- func (r JsonDynamicConfigRepo) GetByID(ctx context.Context, id uint64) (*entity.JsonDynamicConfig, error)
- func (r JsonDynamicConfigRepo) Update(ctx context.Context, jsonDynamicConfig *entity.JsonDynamicConfig) error
- type MemberPriceRepo
- func (r MemberPriceRepo) BatchCreateWithTX(ctx context.Context, productID uint64, memberPrices []*entity.MemberPrice) error
- func (r MemberPriceRepo) Create(ctx context.Context, pmsMemberPrice *entity.MemberPrice) error
- func (r MemberPriceRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r MemberPriceRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
- func (r MemberPriceRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.MemberPrice, uint32, error)
- func (r MemberPriceRepo) GetByID(ctx context.Context, id uint64) (*entity.MemberPrice, error)
- func (r MemberPriceRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.MemberPrice, error)
- func (r MemberPriceRepo) Update(ctx context.Context, pmsMemberPrice *entity.MemberPrice) error
- type OrderItemRepo
- func (r OrderItemRepo) Create(ctx context.Context, orderItem *entity.OrderItem) error
- func (r OrderItemRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r OrderItemRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderItem, uint32, error)
- func (r OrderItemRepo) GetByID(ctx context.Context, id uint64) (*entity.OrderItem, error)
- func (r OrderItemRepo) GetByOrderID(ctx context.Context, orderID uint64) (entity.OrderItems, error)
- func (r OrderItemRepo) Update(ctx context.Context, orderItem *entity.OrderItem) error
- type OrderOperateHistoryRepo
- func (r OrderOperateHistoryRepo) Create(ctx context.Context, orderOperateHistory *entity.OrderOperateHistory) error
- func (r OrderOperateHistoryRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r OrderOperateHistoryRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderOperateHistory, uint32, error)
- func (r OrderOperateHistoryRepo) GetByID(ctx context.Context, id uint64) (*entity.OrderOperateHistory, error)
- func (r OrderOperateHistoryRepo) GetByOrderID(ctx context.Context, orderID uint64) (entity.OrderOperateHistories, error)
- func (r OrderOperateHistoryRepo) Update(ctx context.Context, orderOperateHistory *entity.OrderOperateHistory) error
- type OrderRepo
- func (r OrderRepo) Create(ctx context.Context, order *entity.Order) error
- func (r OrderRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r OrderRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.Order, uint32, error)
- func (r OrderRepo) GetByID(ctx context.Context, id uint64) (*entity.Order, error)
- func (r OrderRepo) Update(ctx context.Context, order *entity.Order) error
- func (r OrderRepo) WithByID(id uint64) db2.DBOption
- type OrderReturnApplyRepo
- func (r OrderReturnApplyRepo) Create(ctx context.Context, orderReturnApply *entity.OrderReturnApply) error
- func (r OrderReturnApplyRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r OrderReturnApplyRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderReturnApply, uint32, error)
- func (r OrderReturnApplyRepo) GetByID(ctx context.Context, id uint64) (*entity.OrderReturnApply, error)
- func (r OrderReturnApplyRepo) Update(ctx context.Context, orderReturnApply *entity.OrderReturnApply) error
- func (r OrderReturnApplyRepo) WithByID(id uint64) db2.DBOption
- func (r OrderReturnApplyRepo) WithByStatus(status uint8) db2.DBOption
- type OrderReturnReasonRepo
- func (r OrderReturnReasonRepo) Create(ctx context.Context, orderReturnReason *entity.OrderReturnReason) error
- func (r OrderReturnReasonRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r OrderReturnReasonRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderReturnReason, uint32, error)
- func (r OrderReturnReasonRepo) GetByID(ctx context.Context, id uint64) (*entity.OrderReturnReason, error)
- func (r OrderReturnReasonRepo) Update(ctx context.Context, orderReturnReason *entity.OrderReturnReason) error
- func (r OrderReturnReasonRepo) WithByID(id uint64) db2.DBOption
- type PmsProductCategoryAttributeRelationRepo
- func (p PmsProductCategoryAttributeRelationRepo) BatchCreateWithTX(ctx context.Context, productCategoryID uint64, attributeIds []uint64) error
- func (p PmsProductCategoryAttributeRelationRepo) Create(ctx context.Context, relation *entity.ProductCategoryAttributeRelation) error
- func (p PmsProductCategoryAttributeRelationRepo) CreateWithTX(ctx context.Context, relation *entity.ProductCategoryAttributeRelation) error
- func (p PmsProductCategoryAttributeRelationRepo) DeleteByID(ctx context.Context, id uint64) error
- func (p PmsProductCategoryAttributeRelationRepo) DeleteByProductCategoryIDWithTX(ctx context.Context, productCategoryID uint64) error
- func (p PmsProductCategoryAttributeRelationRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductCategoryAttributeRelation, error)
- func (p PmsProductCategoryAttributeRelationRepo) Update(ctx context.Context, relation *entity.ProductCategoryAttributeRelation) error
- type PrefrenceAreaProductRelationRepo
- func (r PrefrenceAreaProductRelationRepo) BatchCreateWithTX(ctx context.Context, productID uint64, ...) error
- func (r PrefrenceAreaProductRelationRepo) Create(ctx context.Context, ...) error
- func (r PrefrenceAreaProductRelationRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r PrefrenceAreaProductRelationRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
- func (r PrefrenceAreaProductRelationRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.PrefrenceAreaProductRelation, uint32, error)
- func (r PrefrenceAreaProductRelationRepo) GetByID(ctx context.Context, id uint64) (*entity.PrefrenceAreaProductRelation, error)
- func (r PrefrenceAreaProductRelationRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.PrefrenceAreaProductRelation, error)
- func (r PrefrenceAreaProductRelationRepo) Update(ctx context.Context, ...) error
- type PrefrenceAreaRepo
- func (r PrefrenceAreaRepo) Create(ctx context.Context, prefrenceArea *entity.PrefrenceArea) error
- func (r PrefrenceAreaRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r PrefrenceAreaRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.PrefrenceArea, uint32, error)
- func (r PrefrenceAreaRepo) GetByID(ctx context.Context, id uint64) (*entity.PrefrenceArea, error)
- func (r PrefrenceAreaRepo) Update(ctx context.Context, prefrenceArea *entity.PrefrenceArea) error
- type ProductAttributeCategoryRepo
- func (r ProductAttributeCategoryRepo) Create(ctx context.Context, productAttributeCategory *entity.ProductAttributeCategory) error
- func (r ProductAttributeCategoryRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r ProductAttributeCategoryRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductAttributeCategory, uint32, error)
- func (r ProductAttributeCategoryRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductAttributeCategory, error)
- func (r ProductAttributeCategoryRepo) Update(ctx context.Context, productAttributeCategory *entity.ProductAttributeCategory) error
- func (r ProductAttributeCategoryRepo) WithByName(name string) db2.DBOption
- type ProductAttributeRepo
- func (r ProductAttributeRepo) Create(ctx context.Context, productAttribute *entity.ProductAttribute) error
- func (r ProductAttributeRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r ProductAttributeRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.ProductAttribute, uint32, error)
- func (r ProductAttributeRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductAttribute, error)
- func (r ProductAttributeRepo) Update(ctx context.Context, productAttribute *entity.ProductAttribute) error
- func (r ProductAttributeRepo) WithByName(name string) db.DBOption
- func (r ProductAttributeRepo) WithByProductAttributeCategoryID(productAttributeCategoryID uint32) db.DBOption
- func (r ProductAttributeRepo) WithByType(tpe uint32) db.DBOption
- type ProductAttributeValueRepo
- func (r ProductAttributeValueRepo) BatchCreateWithTX(ctx context.Context, productID uint64, ...) error
- func (r ProductAttributeValueRepo) Create(ctx context.Context, productAttributeValue *entity.ProductAttributeValue) error
- func (r ProductAttributeValueRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r ProductAttributeValueRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
- func (r ProductAttributeValueRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductAttributeValue, uint32, error)
- func (r ProductAttributeValueRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductAttributeValue, error)
- func (r ProductAttributeValueRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.ProductAttributeValue, error)
- func (r ProductAttributeValueRepo) Update(ctx context.Context, productAttributeValue *entity.ProductAttributeValue) error
- type ProductCategoryRepo
- func (p ProductCategoryRepo) Create(ctx context.Context, productCategory *entity.ProductCategory) error
- func (p ProductCategoryRepo) CreateWithTX(ctx context.Context, productCategory *entity.ProductCategory) error
- func (p ProductCategoryRepo) DeleteByID(ctx context.Context, categoryID uint64) error
- func (p ProductCategoryRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductCategory, uint32, error)
- func (p ProductCategoryRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductCategory, error)
- func (p ProductCategoryRepo) GetByIDs(ctx context.Context, ids []uint64) (entity.ProductCategories, error)
- func (p ProductCategoryRepo) Update(ctx context.Context, productCategory *entity.ProductCategory) error
- func (p ProductCategoryRepo) UpdateFieldByID(ctx context.Context, category *entity.ProductCategory, fields ...string) error
- func (p ProductCategoryRepo) UpdateProductCategoryNavStatus(ctx context.Context, categoryIDs []uint64, navStatus uint32) error
- func (p ProductCategoryRepo) UpdateProductCategoryShowStatus(ctx context.Context, categoryIDs []uint64, showStatus uint32) error
- func (p ProductCategoryRepo) UpdateWithTX(ctx context.Context, productCategory *entity.ProductCategory) error
- func (p ProductCategoryRepo) WithByID(id uint64) db2.DBOption
- func (p ProductCategoryRepo) WithByName(name string) db2.DBOption
- func (p ProductCategoryRepo) WithByParentID(parentID uint64) db2.DBOption
- type ProductFullReductionRepo
- func (r ProductFullReductionRepo) BatchCreateWithTX(ctx context.Context, productID uint64, ...) error
- func (r ProductFullReductionRepo) Create(ctx context.Context, productFullReduction *entity.ProductFullReduction) error
- func (r ProductFullReductionRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r ProductFullReductionRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
- func (r ProductFullReductionRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductFullReduction, uint32, error)
- func (r ProductFullReductionRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductFullReduction, error)
- func (r ProductFullReductionRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.ProductFullReduction, error)
- func (r ProductFullReductionRepo) Update(ctx context.Context, productFullReduction *entity.ProductFullReduction) error
- type ProductLadderRepo
- func (r ProductLadderRepo) BatchCreateWithTX(ctx context.Context, productID uint64, productLadders []*entity.ProductLadder) error
- func (r ProductLadderRepo) Create(ctx context.Context, productLadder *entity.ProductLadder) error
- func (r ProductLadderRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r ProductLadderRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
- func (r ProductLadderRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.ProductLadder, uint32, error)
- func (r ProductLadderRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductLadder, error)
- func (r ProductLadderRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.ProductLadder, error)
- func (r ProductLadderRepo) Update(ctx context.Context, productLadder *entity.ProductLadder) error
- type ProductRepo
- func (r ProductRepo) Create(ctx context.Context, product *entity.Product) error
- func (r ProductRepo) CreateWithTX(ctx context.Context, product *entity.Product) error
- func (r ProductRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r ProductRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) (entity.Products, uint32, error)
- func (r ProductRepo) GetByID(ctx context.Context, id uint64) (*entity.Product, error)
- func (r ProductRepo) Update(ctx context.Context, product *entity.Product) error
- func (r ProductRepo) UpdateWithTX(ctx context.Context, product *entity.Product) error
- func (r ProductRepo) WithByBrandID(brandID uint64) db2.DBOption
- func (r ProductRepo) WithByID(id uint64) db2.DBOption
- func (r ProductRepo) WithByName(name string) db2.DBOption
- func (r ProductRepo) WithByProductCategoryID(productCategoryID uint64) db2.DBOption
- func (r ProductRepo) WithByProductSN(productSN string) db2.DBOption
- func (r ProductRepo) WithByPublishStatus(publishStatus uint32) db2.DBOption
- func (r ProductRepo) WithByVerifyStatus(verifyStatus uint32) db2.DBOption
- type RegisterFuncType
- type SkuStockRepo
- func (r SkuStockRepo) BatchCreateWithTX(ctx context.Context, productID uint64, skuStocks []*entity.SkuStock) error
- func (r SkuStockRepo) BatchDeleteByIDWithTX(ctx context.Context, ids []uint64) error
- func (r SkuStockRepo) BatchUpDateByIDWithTX(ctx context.Context, skuStocks []*entity.SkuStock) error
- func (r SkuStockRepo) BatchUpdateOrInsertSkuStock(ctx context.Context, stocks []*entity.SkuStock) error
- func (r SkuStockRepo) Create(ctx context.Context, skuStock *entity.SkuStock) error
- func (r SkuStockRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r SkuStockRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
- func (r SkuStockRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.SkuStock, uint32, error)
- func (r SkuStockRepo) GetByID(ctx context.Context, id uint64) (*entity.SkuStock, error)
- func (r SkuStockRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.SkuStock, error)
- func (r SkuStockRepo) Update(ctx context.Context, skuStock *entity.SkuStock) error
- func (r SkuStockRepo) WithByProductID(productID uint64) db2.DBOption
- func (r SkuStockRepo) WithBySkuCode(skuCode string) db2.DBOption
- type SubjectProductRelationRepo
- func (r SubjectProductRelationRepo) BatchCreateWithTX(ctx context.Context, productID uint64, ...) error
- func (r SubjectProductRelationRepo) Create(ctx context.Context, subjectProductRelation *entity.SubjectProductRelation) error
- func (r SubjectProductRelationRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r SubjectProductRelationRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
- func (r SubjectProductRelationRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.SubjectProductRelation, uint32, error)
- func (r SubjectProductRelationRepo) GetByID(ctx context.Context, id uint64) (*entity.SubjectProductRelation, error)
- func (r SubjectProductRelationRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.SubjectProductRelation, error)
- func (r SubjectProductRelationRepo) Update(ctx context.Context, subjectProductRelation *entity.SubjectProductRelation) error
- type SubjectRepo
- func (r SubjectRepo) Create(ctx context.Context, subject *entity.Subject) error
- func (r SubjectRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r SubjectRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.Subject, uint32, error)
- func (r SubjectRepo) GetByID(ctx context.Context, id uint64) (*entity.Subject, error)
- func (r SubjectRepo) Update(ctx context.Context, subject *entity.Subject) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BrandRepo ¶
type BrandRepo struct { *db2.GenericDao[entity.Brand, uint64] }
BrandRepo 商品品牌表
func (BrandRepo) DeleteByID ¶
DeleteByID 根据主键ID删除商品品牌表
func (BrandRepo) GetByDBOption ¶
func (r BrandRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) (entity.Brands, uint32, error)
GetByDBOption 根据动态条件查询商品品牌表
type CompanyAddressRepo ¶
type CompanyAddressRepo struct { *db2.GenericDao[entity.CompanyAddress, uint64] }
CompanyAddressRepo 公司收发货地址
func NewCompanyAddressRepo ¶
func NewCompanyAddressRepo(conn *gorm.DB) *CompanyAddressRepo
NewCompanyAddressRepo 创建
func (CompanyAddressRepo) Create ¶
func (r CompanyAddressRepo) Create(ctx context.Context, companyAddress *entity.CompanyAddress) error
Create 创建公司收发货地址
func (CompanyAddressRepo) DeleteByID ¶
func (r CompanyAddressRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除公司收发货地址
func (CompanyAddressRepo) GetByDBOption ¶
func (r CompanyAddressRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.CompanyAddress, uint32, error)
GetByDBOption 根据动态条件查询公司收发货地址
func (CompanyAddressRepo) GetByID ¶
func (r CompanyAddressRepo) GetByID(ctx context.Context, id uint64) (*entity.CompanyAddress, error)
GetByID 根据主键ID查询公司收发货地址
func (CompanyAddressRepo) GetByIDs ¶
func (r CompanyAddressRepo) GetByIDs(ctx context.Context, ids []uint64) (entity.CompanyAddresses, error)
GetByIDs 根据主键ID查询公司收发货地址
func (CompanyAddressRepo) Update ¶
func (r CompanyAddressRepo) Update(ctx context.Context, companyAddress *entity.CompanyAddress) error
Update 修改公司收发货地址
type HomeAdvertiseRepo ¶
type HomeAdvertiseRepo struct { *db.GenericDao[entity.HomeAdvertise, uint64] }
HomeAdvertiseRepo 首页轮播广告表
func NewHomeAdvertiseRepo ¶
func NewHomeAdvertiseRepo(conn *gorm.DB) *HomeAdvertiseRepo
NewHomeAdvertiseRepo 创建
func (HomeAdvertiseRepo) Create ¶
func (r HomeAdvertiseRepo) Create(ctx context.Context, homeAdvertise *entity.HomeAdvertise) error
Create 创建首页轮播广告表
func (HomeAdvertiseRepo) DeleteByID ¶
func (r HomeAdvertiseRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除首页轮播广告表
func (HomeAdvertiseRepo) GetByDBOption ¶
func (r HomeAdvertiseRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.HomeAdvertise, uint32, error)
GetByDBOption 根据动态条件查询首页轮播广告表
func (HomeAdvertiseRepo) GetByID ¶
func (r HomeAdvertiseRepo) GetByID(ctx context.Context, id uint64) (*entity.HomeAdvertise, error)
GetByID 根据主键ID查询首页轮播广告表
func (HomeAdvertiseRepo) Update ¶
func (r HomeAdvertiseRepo) Update(ctx context.Context, homeAdvertise *entity.HomeAdvertise) error
Update 修改首页轮播广告表
type JsonDynamicConfigRepo ¶
type JsonDynamicConfigRepo struct { *db.GenericDao[entity.JsonDynamicConfig, uint64] }
JsonDynamicConfigRepo JSON动态配置
func NewJsonDynamicConfigRepo ¶
func NewJsonDynamicConfigRepo(conn *gorm.DB) *JsonDynamicConfigRepo
NewJsonDynamicConfigRepo 创建
func (JsonDynamicConfigRepo) Create ¶
func (r JsonDynamicConfigRepo) Create(ctx context.Context, jsonDynamicConfig *entity.JsonDynamicConfig) error
Create 创建JSON动态配置
func (JsonDynamicConfigRepo) DeleteByID ¶
func (r JsonDynamicConfigRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除JSON动态配置
func (JsonDynamicConfigRepo) GetByDBOption ¶
func (r JsonDynamicConfigRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.JsonDynamicConfig, uint32, error)
GetByDBOption 根据动态条件查询JSON动态配置
func (JsonDynamicConfigRepo) GetByID ¶
func (r JsonDynamicConfigRepo) GetByID(ctx context.Context, id uint64) (*entity.JsonDynamicConfig, error)
GetByID 根据主键ID查询JSON动态配置
func (JsonDynamicConfigRepo) Update ¶
func (r JsonDynamicConfigRepo) Update(ctx context.Context, jsonDynamicConfig *entity.JsonDynamicConfig) error
Update 修改JSON动态配置
type MemberPriceRepo ¶
type MemberPriceRepo struct { *db2.GenericDao[entity.MemberPrice, uint64] }
MemberPriceRepo 商品会员价格
func NewMemberPriceRepo ¶
func NewMemberPriceRepo(conn *gorm.DB) *MemberPriceRepo
NewMemberPriceRepo 创建
func (MemberPriceRepo) BatchCreateWithTX ¶
func (r MemberPriceRepo) BatchCreateWithTX(ctx context.Context, productID uint64, memberPrices []*entity.MemberPrice) error
BatchCreateWithTX 创建商品会员价格
func (MemberPriceRepo) Create ¶
func (r MemberPriceRepo) Create(ctx context.Context, pmsMemberPrice *entity.MemberPrice) error
Create 创建商品会员价格表
func (MemberPriceRepo) DeleteByID ¶
func (r MemberPriceRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除商品会员价格
func (MemberPriceRepo) DeleteByProductIDWithTX ¶
func (r MemberPriceRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
DeleteByProductIDWithTX 根据商品ID删除记录
func (MemberPriceRepo) GetByDBOption ¶
func (r MemberPriceRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.MemberPrice, uint32, error)
GetByDBOption 根据动态条件查询商品会员价格
func (MemberPriceRepo) GetByID ¶
func (r MemberPriceRepo) GetByID(ctx context.Context, id uint64) (*entity.MemberPrice, error)
GetByID 根据主键ID查询商品会员价格
func (MemberPriceRepo) GetByProductID ¶
func (r MemberPriceRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.MemberPrice, error)
GetByProductID 根据商品ID查询商品会员价格
func (MemberPriceRepo) Update ¶
func (r MemberPriceRepo) Update(ctx context.Context, pmsMemberPrice *entity.MemberPrice) error
Update 修改商品会员价格
type OrderItemRepo ¶
type OrderItemRepo struct { *db2.GenericDao[entity.OrderItem, uint64] }
OrderItemRepo 订单商品信息
func (OrderItemRepo) DeleteByID ¶
func (r OrderItemRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除订单商品信息
func (OrderItemRepo) GetByDBOption ¶
func (r OrderItemRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderItem, uint32, error)
GetByDBOption 根据动态条件查询订单商品信息
func (OrderItemRepo) GetByOrderID ¶
func (r OrderItemRepo) GetByOrderID(ctx context.Context, orderID uint64) (entity.OrderItems, error)
GetByOrderID 根据订单ID查询订单商品信息
type OrderOperateHistoryRepo ¶
type OrderOperateHistoryRepo struct { *db2.GenericDao[entity.OrderOperateHistory, uint64] }
OrderOperateHistoryRepo 订单商品信息
func NewOrderOperateHistoryRepo ¶
func NewOrderOperateHistoryRepo(conn *gorm.DB) *OrderOperateHistoryRepo
NewOrderOperateHistoryRepo 创建
func (OrderOperateHistoryRepo) Create ¶
func (r OrderOperateHistoryRepo) Create(ctx context.Context, orderOperateHistory *entity.OrderOperateHistory) error
Create 创建订单操作历史记录
func (OrderOperateHistoryRepo) DeleteByID ¶
func (r OrderOperateHistoryRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除订单操作历史记录
func (OrderOperateHistoryRepo) GetByDBOption ¶
func (r OrderOperateHistoryRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderOperateHistory, uint32, error)
GetByDBOption 根据动态条件查询订单商品信息
func (OrderOperateHistoryRepo) GetByID ¶
func (r OrderOperateHistoryRepo) GetByID(ctx context.Context, id uint64) (*entity.OrderOperateHistory, error)
GetByID 根据主键ID查询订单操作历史记录
func (OrderOperateHistoryRepo) GetByOrderID ¶
func (r OrderOperateHistoryRepo) GetByOrderID(ctx context.Context, orderID uint64) (entity.OrderOperateHistories, error)
GetByOrderID 根据订单ID查询操作历史记录
func (OrderOperateHistoryRepo) Update ¶
func (r OrderOperateHistoryRepo) Update(ctx context.Context, orderOperateHistory *entity.OrderOperateHistory) error
Update 修改订单操作历史记录
type OrderRepo ¶
type OrderRepo struct { *db2.GenericDao[entity.Order, uint64] }
OrderRepo 订单
func (OrderRepo) DeleteByID ¶
DeleteByID 根据主键ID删除订单
func (OrderRepo) GetByDBOption ¶
func (r OrderRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.Order, uint32, error)
GetByDBOption 根据动态条件查询订单
type OrderReturnApplyRepo ¶
type OrderReturnApplyRepo struct { *db2.GenericDao[entity.OrderReturnApply, uint64] }
OrderReturnApplyRepo 订单退货申请
func NewOrderReturnApplyRepo ¶
func NewOrderReturnApplyRepo(conn *gorm.DB) *OrderReturnApplyRepo
NewOrderReturnApplyRepo 创建
func (OrderReturnApplyRepo) Create ¶
func (r OrderReturnApplyRepo) Create(ctx context.Context, orderReturnApply *entity.OrderReturnApply) error
Create 创建订单退货申请
func (OrderReturnApplyRepo) DeleteByID ¶
func (r OrderReturnApplyRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除订单退货申请
func (OrderReturnApplyRepo) GetByDBOption ¶
func (r OrderReturnApplyRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderReturnApply, uint32, error)
GetByDBOption 根据动态条件查询订单退货申请
func (OrderReturnApplyRepo) GetByID ¶
func (r OrderReturnApplyRepo) GetByID(ctx context.Context, id uint64) (*entity.OrderReturnApply, error)
GetByID 根据主键ID查询订单退货申请
func (OrderReturnApplyRepo) Update ¶
func (r OrderReturnApplyRepo) Update(ctx context.Context, orderReturnApply *entity.OrderReturnApply) error
Update 修改订单退货申请
func (OrderReturnApplyRepo) WithByID ¶
func (r OrderReturnApplyRepo) WithByID(id uint64) db2.DBOption
func (OrderReturnApplyRepo) WithByStatus ¶
func (r OrderReturnApplyRepo) WithByStatus(status uint8) db2.DBOption
type OrderReturnReasonRepo ¶
type OrderReturnReasonRepo struct { *db2.GenericDao[entity.OrderReturnReason, uint64] }
OrderReturnReasonRepo 退货原因
func NewOrderReturnReasonRepo ¶
func NewOrderReturnReasonRepo(conn *gorm.DB) *OrderReturnReasonRepo
NewOrderReturnReasonRepo 创建
func (OrderReturnReasonRepo) Create ¶
func (r OrderReturnReasonRepo) Create(ctx context.Context, orderReturnReason *entity.OrderReturnReason) error
Create 创建退货原因
func (OrderReturnReasonRepo) DeleteByID ¶
func (r OrderReturnReasonRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除退货原因
func (OrderReturnReasonRepo) GetByDBOption ¶
func (r OrderReturnReasonRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.OrderReturnReason, uint32, error)
GetByDBOption 根据动态条件查询退货原因
func (OrderReturnReasonRepo) GetByID ¶
func (r OrderReturnReasonRepo) GetByID(ctx context.Context, id uint64) (*entity.OrderReturnReason, error)
GetByID 根据主键ID查询退货原因
func (OrderReturnReasonRepo) Update ¶
func (r OrderReturnReasonRepo) Update(ctx context.Context, orderReturnReason *entity.OrderReturnReason) error
Update 修改退货原因
type PmsProductCategoryAttributeRelationRepo ¶
type PmsProductCategoryAttributeRelationRepo struct { *db2.GenericDao[entity.ProductCategoryAttributeRelation, uint64] }
PmsProductCategoryAttributeRelationRepo 产品的分类和属性的关系表,用于设置分类筛选条件(只支持一级分类)
func NewProductCategoryAttributeRelationRepo ¶
func NewProductCategoryAttributeRelationRepo(conn *gorm.DB) *PmsProductCategoryAttributeRelationRepo
NewProductCategoryAttributeRelationRepo 创建
func (PmsProductCategoryAttributeRelationRepo) BatchCreateWithTX ¶
func (p PmsProductCategoryAttributeRelationRepo) BatchCreateWithTX(ctx context.Context, productCategoryID uint64, attributeIds []uint64) error
BatchCreateWithTX 批量插入商品分类与筛选属性关系表 attributeIds 商品分类id productAttributeIDList 相关商品筛选属性id集合(pms_product_attribute#id type=1)
func (PmsProductCategoryAttributeRelationRepo) Create ¶
func (p PmsProductCategoryAttributeRelationRepo) Create(ctx context.Context, relation *entity.ProductCategoryAttributeRelation) error
Create 创建
func (PmsProductCategoryAttributeRelationRepo) CreateWithTX ¶
func (p PmsProductCategoryAttributeRelationRepo) CreateWithTX(ctx context.Context, relation *entity.ProductCategoryAttributeRelation) error
CreateWithTX 创建
func (PmsProductCategoryAttributeRelationRepo) DeleteByID ¶
func (p PmsProductCategoryAttributeRelationRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除
func (PmsProductCategoryAttributeRelationRepo) DeleteByProductCategoryIDWithTX ¶
func (p PmsProductCategoryAttributeRelationRepo) DeleteByProductCategoryIDWithTX(ctx context.Context, productCategoryID uint64) error
func (PmsProductCategoryAttributeRelationRepo) GetByID ¶
func (p PmsProductCategoryAttributeRelationRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductCategoryAttributeRelation, error)
GetByID 根据主键ID查询
func (PmsProductCategoryAttributeRelationRepo) Update ¶
func (p PmsProductCategoryAttributeRelationRepo) Update(ctx context.Context, relation *entity.ProductCategoryAttributeRelation) error
Update 修改商品
type PrefrenceAreaProductRelationRepo ¶
type PrefrenceAreaProductRelationRepo struct { *db2.GenericDao[entity.PrefrenceAreaProductRelation, uint64] }
PrefrenceAreaProductRelationRepo 优选专区和产品关系表
func NewPrefrenceAreaProductRelationRepo ¶
func NewPrefrenceAreaProductRelationRepo(conn *gorm.DB) *PrefrenceAreaProductRelationRepo
NewPrefrenceAreaProductRelationRepo 创建
func (PrefrenceAreaProductRelationRepo) BatchCreateWithTX ¶
func (r PrefrenceAreaProductRelationRepo) BatchCreateWithTX(ctx context.Context, productID uint64, prefrenceAreaProductRelations []*entity.PrefrenceAreaProductRelation) error
BatchCreateWithTX 创建优选专区和产品关系
func (PrefrenceAreaProductRelationRepo) Create ¶
func (r PrefrenceAreaProductRelationRepo) Create(ctx context.Context, prefrenceAreaProductRelation *entity.PrefrenceAreaProductRelation) error
Create 创建优选专区和产品关系表
func (PrefrenceAreaProductRelationRepo) DeleteByID ¶
func (r PrefrenceAreaProductRelationRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除优选专区和产品关系表
func (PrefrenceAreaProductRelationRepo) DeleteByProductIDWithTX ¶
func (r PrefrenceAreaProductRelationRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
DeleteByProductIDWithTX 根据商品ID删除记录
func (PrefrenceAreaProductRelationRepo) GetByDBOption ¶
func (r PrefrenceAreaProductRelationRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.PrefrenceAreaProductRelation, uint32, error)
GetByDBOption 根据动态条件查询优选专区和产品关系
func (PrefrenceAreaProductRelationRepo) GetByID ¶
func (r PrefrenceAreaProductRelationRepo) GetByID(ctx context.Context, id uint64) (*entity.PrefrenceAreaProductRelation, error)
GetByID 根据主键ID查询优选专区和产品关系表
func (PrefrenceAreaProductRelationRepo) GetByProductID ¶
func (r PrefrenceAreaProductRelationRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.PrefrenceAreaProductRelation, error)
GetByProductID 根据商品ID查询优选专区和产品关系
func (PrefrenceAreaProductRelationRepo) Update ¶
func (r PrefrenceAreaProductRelationRepo) Update(ctx context.Context, prefrenceAreaProductRelation *entity.PrefrenceAreaProductRelation) error
Update 修改优选专区和产品关系表
type PrefrenceAreaRepo ¶
type PrefrenceAreaRepo struct { *db2.GenericDao[entity.PrefrenceArea, uint64] }
PrefrenceAreaRepo 优选专区
func NewPrefrenceAreaRepo ¶
func NewPrefrenceAreaRepo(conn *gorm.DB) *PrefrenceAreaRepo
NewPrefrenceAreaRepo 创建
func (PrefrenceAreaRepo) Create ¶
func (r PrefrenceAreaRepo) Create(ctx context.Context, prefrenceArea *entity.PrefrenceArea) error
Create 创建优选专区
func (PrefrenceAreaRepo) DeleteByID ¶
func (r PrefrenceAreaRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除优选专区
func (PrefrenceAreaRepo) GetByDBOption ¶
func (r PrefrenceAreaRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.PrefrenceArea, uint32, error)
GetByDBOption 根据动态条件查询优选专区
func (PrefrenceAreaRepo) GetByID ¶
func (r PrefrenceAreaRepo) GetByID(ctx context.Context, id uint64) (*entity.PrefrenceArea, error)
GetByID 根据主键ID查询优选专区
func (PrefrenceAreaRepo) Update ¶
func (r PrefrenceAreaRepo) Update(ctx context.Context, prefrenceArea *entity.PrefrenceArea) error
Update 修改优选专区
type ProductAttributeCategoryRepo ¶
type ProductAttributeCategoryRepo struct { *db2.GenericDao[entity.ProductAttributeCategory, uint64] }
ProductAttributeCategoryRepo 产品属性分类表
func NewProductAttributeCategoryRepo ¶
func NewProductAttributeCategoryRepo(conn *gorm.DB) *ProductAttributeCategoryRepo
NewProductAttributeCategoryRepo 创建
func (ProductAttributeCategoryRepo) Create ¶
func (r ProductAttributeCategoryRepo) Create(ctx context.Context, productAttributeCategory *entity.ProductAttributeCategory) error
Create 创建产品属性分类表
func (ProductAttributeCategoryRepo) DeleteByID ¶
func (r ProductAttributeCategoryRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除产品属性分类表
func (ProductAttributeCategoryRepo) GetByDBOption ¶
func (r ProductAttributeCategoryRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductAttributeCategory, uint32, error)
GetByDBOption 根据动态条件查询产品属性分类表
func (ProductAttributeCategoryRepo) GetByID ¶
func (r ProductAttributeCategoryRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductAttributeCategory, error)
GetByID 根据主键ID查询产品属性分类表
func (ProductAttributeCategoryRepo) Update ¶
func (r ProductAttributeCategoryRepo) Update(ctx context.Context, productAttributeCategory *entity.ProductAttributeCategory) error
Update 修改产品属性分类表
func (ProductAttributeCategoryRepo) WithByName ¶
func (r ProductAttributeCategoryRepo) WithByName(name string) db2.DBOption
type ProductAttributeRepo ¶
type ProductAttributeRepo struct { *db.GenericDao[entity.ProductAttribute, uint64] }
ProductAttributeRepo 商品属性参数表
func NewProductAttributeRepo ¶
func NewProductAttributeRepo(conn *gorm.DB) *ProductAttributeRepo
NewProductAttributeRepo 创建
func (ProductAttributeRepo) Create ¶
func (r ProductAttributeRepo) Create(ctx context.Context, productAttribute *entity.ProductAttribute) error
Create 创建商品属性参数表
func (ProductAttributeRepo) DeleteByID ¶
func (r ProductAttributeRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除商品属性参数表
func (ProductAttributeRepo) GetByDBOption ¶
func (r ProductAttributeRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.ProductAttribute, uint32, error)
GetByDBOption 根据动态条件查询商品属性参数表
func (ProductAttributeRepo) GetByID ¶
func (r ProductAttributeRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductAttribute, error)
GetByID 根据主键ID查询商品属性参数表
func (ProductAttributeRepo) Update ¶
func (r ProductAttributeRepo) Update(ctx context.Context, productAttribute *entity.ProductAttribute) error
Update 修改商品属性参数表
func (ProductAttributeRepo) WithByName ¶
func (r ProductAttributeRepo) WithByName(name string) db.DBOption
func (ProductAttributeRepo) WithByProductAttributeCategoryID ¶
func (r ProductAttributeRepo) WithByProductAttributeCategoryID(productAttributeCategoryID uint32) db.DBOption
func (ProductAttributeRepo) WithByType ¶
func (r ProductAttributeRepo) WithByType(tpe uint32) db.DBOption
type ProductAttributeValueRepo ¶
type ProductAttributeValueRepo struct { *db2.GenericDao[entity.ProductAttributeValue, uint64] }
ProductAttributeValueRepo 产品参数信息
func NewProductAttributeValueRepo ¶
func NewProductAttributeValueRepo(conn *gorm.DB) *ProductAttributeValueRepo
NewProductAttributeValueRepo 创建
func (ProductAttributeValueRepo) BatchCreateWithTX ¶
func (r ProductAttributeValueRepo) BatchCreateWithTX(ctx context.Context, productID uint64, productAttributeValues []*entity.ProductAttributeValue) error
BatchCreateWithTX 创建产品参数信息
func (ProductAttributeValueRepo) Create ¶
func (r ProductAttributeValueRepo) Create(ctx context.Context, productAttributeValue *entity.ProductAttributeValue) error
Create 创建产品参数信息
func (ProductAttributeValueRepo) DeleteByID ¶
func (r ProductAttributeValueRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除产品参数信息
func (ProductAttributeValueRepo) DeleteByProductIDWithTX ¶
func (r ProductAttributeValueRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
DeleteByProductIDWithTX 根据商品ID删除记录
func (ProductAttributeValueRepo) GetByDBOption ¶
func (r ProductAttributeValueRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductAttributeValue, uint32, error)
GetByDBOption 根据动态条件查询产品参数信息
func (ProductAttributeValueRepo) GetByID ¶
func (r ProductAttributeValueRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductAttributeValue, error)
GetByID 根据主键ID查询产品参数信息
func (ProductAttributeValueRepo) GetByProductID ¶
func (r ProductAttributeValueRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.ProductAttributeValue, error)
GetByProductID 根据商品ID查询产品参数信息
func (ProductAttributeValueRepo) Update ¶
func (r ProductAttributeValueRepo) Update(ctx context.Context, productAttributeValue *entity.ProductAttributeValue) error
Update 修改产品参数信息
type ProductCategoryRepo ¶
type ProductCategoryRepo struct { *db2.GenericDao[entity.ProductCategory, uint64] }
ProductCategoryRepo 商品分类表
func NewProductCategoryRepo ¶
func NewProductCategoryRepo(conn *gorm.DB) *ProductCategoryRepo
NewProductCategoryRepo 创建
func (ProductCategoryRepo) Create ¶
func (p ProductCategoryRepo) Create(ctx context.Context, productCategory *entity.ProductCategory) error
Create 创建商品分类
func (ProductCategoryRepo) CreateWithTX ¶
func (p ProductCategoryRepo) CreateWithTX(ctx context.Context, productCategory *entity.ProductCategory) error
CreateWithTX 创建商品分类
func (ProductCategoryRepo) DeleteByID ¶
func (p ProductCategoryRepo) DeleteByID(ctx context.Context, categoryID uint64) error
DeleteByID 根据主键ID删除商品分类
func (ProductCategoryRepo) GetByDBOption ¶
func (p ProductCategoryRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductCategory, uint32, error)
GetByDBOption 根据动态条件查询商品分类
func (ProductCategoryRepo) GetByID ¶
func (p ProductCategoryRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductCategory, error)
GetByID 根据主键ID查询商品分类
func (ProductCategoryRepo) GetByIDs ¶
func (p ProductCategoryRepo) GetByIDs(ctx context.Context, ids []uint64) (entity.ProductCategories, error)
GetByIDs 根据主键ID查询商品分类
func (ProductCategoryRepo) Update ¶
func (p ProductCategoryRepo) Update(ctx context.Context, productCategory *entity.ProductCategory) error
Update 修改商品分类
func (ProductCategoryRepo) UpdateFieldByID ¶
func (p ProductCategoryRepo) UpdateFieldByID(ctx context.Context, category *entity.ProductCategory, fields ...string) error
UpdateFieldByID 根据ID修改
func (ProductCategoryRepo) UpdateProductCategoryNavStatus ¶
func (p ProductCategoryRepo) UpdateProductCategoryNavStatus(ctx context.Context, categoryIDs []uint64, navStatus uint32) error
UpdateProductCategoryNavStatus 修改导航栏显示状态
func (ProductCategoryRepo) UpdateProductCategoryShowStatus ¶
func (p ProductCategoryRepo) UpdateProductCategoryShowStatus(ctx context.Context, categoryIDs []uint64, showStatus uint32) error
UpdateProductCategoryShowStatus 修改显示状态
func (ProductCategoryRepo) UpdateWithTX ¶
func (p ProductCategoryRepo) UpdateWithTX(ctx context.Context, productCategory *entity.ProductCategory) error
UpdateWithTX 修改商品分类
func (ProductCategoryRepo) WithByName ¶
func (p ProductCategoryRepo) WithByName(name string) db2.DBOption
func (ProductCategoryRepo) WithByParentID ¶
func (p ProductCategoryRepo) WithByParentID(parentID uint64) db2.DBOption
type ProductFullReductionRepo ¶
type ProductFullReductionRepo struct { *db2.GenericDao[entity.ProductFullReduction, uint64] }
ProductFullReductionRepo 产品满减表(只针对同商品)
func NewProductFullReductionRepo ¶
func NewProductFullReductionRepo(conn *gorm.DB) *ProductFullReductionRepo
NewProductFullReductionRepo 创建
func (ProductFullReductionRepo) BatchCreateWithTX ¶
func (r ProductFullReductionRepo) BatchCreateWithTX(ctx context.Context, productID uint64, productFullReductions []*entity.ProductFullReduction) error
BatchCreateWithTX 创建产品满减
func (ProductFullReductionRepo) Create ¶
func (r ProductFullReductionRepo) Create(ctx context.Context, productFullReduction *entity.ProductFullReduction) error
Create 创建产品满减
func (ProductFullReductionRepo) DeleteByID ¶
func (r ProductFullReductionRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除产品满减
func (ProductFullReductionRepo) DeleteByProductIDWithTX ¶
func (r ProductFullReductionRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
DeleteByProductIDWithTX 根据商品ID删除记录
func (ProductFullReductionRepo) GetByDBOption ¶
func (r ProductFullReductionRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.ProductFullReduction, uint32, error)
GetByDBOption 根据动态条件查询产品满减
func (ProductFullReductionRepo) GetByID ¶
func (r ProductFullReductionRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductFullReduction, error)
GetByID 根据主键ID查询产品满减
func (ProductFullReductionRepo) GetByProductID ¶
func (r ProductFullReductionRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.ProductFullReduction, error)
GetByProductID 根据产品ID查询产品满减
func (ProductFullReductionRepo) Update ¶
func (r ProductFullReductionRepo) Update(ctx context.Context, productFullReduction *entity.ProductFullReduction) error
Update 修改产品满减
type ProductLadderRepo ¶
type ProductLadderRepo struct { *db.GenericDao[entity.ProductLadder, uint64] }
ProductLadderRepo 产品阶梯价格表(只针对同商品)
func NewProductLadderRepo ¶
func NewProductLadderRepo(conn *gorm.DB) *ProductLadderRepo
NewProductLadderRepo 创建
func (ProductLadderRepo) BatchCreateWithTX ¶
func (r ProductLadderRepo) BatchCreateWithTX(ctx context.Context, productID uint64, productLadders []*entity.ProductLadder) error
BatchCreateWithTX 创建阶梯价格
func (ProductLadderRepo) Create ¶
func (r ProductLadderRepo) Create(ctx context.Context, productLadder *entity.ProductLadder) error
Create 创建产品阶梯价格
func (ProductLadderRepo) DeleteByID ¶
func (r ProductLadderRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除产品阶梯价格
func (ProductLadderRepo) DeleteByProductIDWithTX ¶
func (r ProductLadderRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
DeleteByProductIDWithTX 根据商品ID删除记录
func (ProductLadderRepo) GetByDBOption ¶
func (r ProductLadderRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db.DBOption) ([]*entity.ProductLadder, uint32, error)
GetByDBOption 根据动态条件查询产品阶梯价格
func (ProductLadderRepo) GetByID ¶
func (r ProductLadderRepo) GetByID(ctx context.Context, id uint64) (*entity.ProductLadder, error)
GetByID 根据主键ID查询产品阶梯价格
func (ProductLadderRepo) GetByProductID ¶
func (r ProductLadderRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.ProductLadder, error)
GetByProductID 根据商品ID查询商品阶梯价格
func (ProductLadderRepo) Update ¶
func (r ProductLadderRepo) Update(ctx context.Context, productLadder *entity.ProductLadder) error
Update 修改产品阶梯价格
type ProductRepo ¶
type ProductRepo struct { *db2.GenericDao[entity.Product, uint64] }
ProductRepo 商品信息表
func (ProductRepo) CreateWithTX ¶
CreateWithTX 创建商品
func (ProductRepo) DeleteByID ¶
func (r ProductRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除商品
func (ProductRepo) GetByDBOption ¶
func (r ProductRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) (entity.Products, uint32, error)
GetByDBOption 根据动态条件查询商品
func (ProductRepo) UpdateWithTX ¶
UpdateWithTX 修改商品
func (ProductRepo) WithByBrandID ¶
func (r ProductRepo) WithByBrandID(brandID uint64) db2.DBOption
func (ProductRepo) WithByName ¶
func (r ProductRepo) WithByName(name string) db2.DBOption
func (ProductRepo) WithByProductCategoryID ¶
func (r ProductRepo) WithByProductCategoryID(productCategoryID uint64) db2.DBOption
func (ProductRepo) WithByProductSN ¶
func (r ProductRepo) WithByProductSN(productSN string) db2.DBOption
func (ProductRepo) WithByPublishStatus ¶
func (r ProductRepo) WithByPublishStatus(publishStatus uint32) db2.DBOption
func (ProductRepo) WithByVerifyStatus ¶
func (r ProductRepo) WithByVerifyStatus(verifyStatus uint32) db2.DBOption
type RegisterFuncType ¶
type SkuStockRepo ¶
type SkuStockRepo struct { *db2.GenericDao[entity.SkuStock, uint64] }
SkuStockRepo sku的库存
func (SkuStockRepo) BatchCreateWithTX ¶
func (r SkuStockRepo) BatchCreateWithTX(ctx context.Context, productID uint64, skuStocks []*entity.SkuStock) error
BatchCreateWithTX 创建sku库存
func (SkuStockRepo) BatchDeleteByIDWithTX ¶
func (r SkuStockRepo) BatchDeleteByIDWithTX(ctx context.Context, ids []uint64) error
BatchDeleteByIDWithTX 根据ID删除记录
func (SkuStockRepo) BatchUpDateByIDWithTX ¶
func (r SkuStockRepo) BatchUpDateByIDWithTX(ctx context.Context, skuStocks []*entity.SkuStock) error
BatchUpDateByIDWithTX 根据ID修改记录
func (SkuStockRepo) BatchUpdateOrInsertSkuStock ¶
func (r SkuStockRepo) BatchUpdateOrInsertSkuStock(ctx context.Context, stocks []*entity.SkuStock) error
BatchUpdateOrInsertSkuStock 批量插入或者更新
func (SkuStockRepo) DeleteByID ¶
func (r SkuStockRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除sku的库存
func (SkuStockRepo) DeleteByProductIDWithTX ¶
func (r SkuStockRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
DeleteByProductIDWithTX 根据商品ID删除记录
func (SkuStockRepo) GetByDBOption ¶
func (r SkuStockRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.SkuStock, uint32, error)
GetByDBOption 根据动态条件查询sku的库存
func (SkuStockRepo) GetByProductID ¶
func (r SkuStockRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.SkuStock, error)
GetByProductID 根据商品ID查询sku的库存
func (SkuStockRepo) WithByProductID ¶
func (r SkuStockRepo) WithByProductID(productID uint64) db2.DBOption
func (SkuStockRepo) WithBySkuCode ¶
func (r SkuStockRepo) WithBySkuCode(skuCode string) db2.DBOption
type SubjectProductRelationRepo ¶
type SubjectProductRelationRepo struct { *db2.GenericDao[entity.SubjectProductRelation, uint64] }
SubjectProductRelationRepo 专题商品关系
func NewSubjectProductRelationRepo ¶
func NewSubjectProductRelationRepo(conn *gorm.DB) *SubjectProductRelationRepo
NewSubjectProductRelationRepo 创建
func (SubjectProductRelationRepo) BatchCreateWithTX ¶
func (r SubjectProductRelationRepo) BatchCreateWithTX(ctx context.Context, productID uint64, subjectProductRelations []*entity.SubjectProductRelation) error
BatchCreateWithTX 创建专题商品关系
func (SubjectProductRelationRepo) Create ¶
func (r SubjectProductRelationRepo) Create(ctx context.Context, subjectProductRelation *entity.SubjectProductRelation) error
Create 创建专题商品关系
func (SubjectProductRelationRepo) DeleteByID ¶
func (r SubjectProductRelationRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除专题商品关系
func (SubjectProductRelationRepo) DeleteByProductIDWithTX ¶
func (r SubjectProductRelationRepo) DeleteByProductIDWithTX(ctx context.Context, productID uint64) error
DeleteByProductIDWithTX 根据商品ID删除记录
func (SubjectProductRelationRepo) GetByDBOption ¶
func (r SubjectProductRelationRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.SubjectProductRelation, uint32, error)
GetByDBOption 根据动态条件查询专题商品关系表
func (SubjectProductRelationRepo) GetByID ¶
func (r SubjectProductRelationRepo) GetByID(ctx context.Context, id uint64) (*entity.SubjectProductRelation, error)
GetByID 根据主键ID查询专题商品关系表
func (SubjectProductRelationRepo) GetByProductID ¶
func (r SubjectProductRelationRepo) GetByProductID(ctx context.Context, productID uint64) ([]*entity.SubjectProductRelation, error)
GetByProductID 根据商品ID查询专题商品关系
func (SubjectProductRelationRepo) Update ¶
func (r SubjectProductRelationRepo) Update(ctx context.Context, subjectProductRelation *entity.SubjectProductRelation) error
Update 修改专题商品关系
type SubjectRepo ¶
type SubjectRepo struct { *db2.GenericDao[entity.Subject, uint64] }
SubjectRepo 专题表
func (SubjectRepo) DeleteByID ¶
func (r SubjectRepo) DeleteByID(ctx context.Context, id uint64) error
DeleteByID 根据主键ID删除专题表
func (SubjectRepo) GetByDBOption ¶
func (r SubjectRepo) GetByDBOption(ctx context.Context, pageNum uint32, pageSize uint32, opts ...db2.DBOption) ([]*entity.Subject, uint32, error)
GetByDBOption 根据动态条件查询专题表
Source Files ¶
- cms_json_dynamic_config.go
- cms_prefrence_area.go
- cms_prefrence_area_product_relation.go
- cms_subject.go
- cms_subject_product_relation.go
- oms_company_address.go
- oms_order.go
- oms_order_item.go
- oms_order_operate_history.go
- oms_order_return_apply.go
- oms_order_return_reason.go
- pms_brand.go
- pms_member_price.go
- pms_product.go
- pms_product_attribute.go
- pms_product_attribute_category.go
- pms_product_attribute_value.go
- pms_product_category.go
- pms_product_category_attribute_relation.go
- pms_product_full_reduction.go
- pms_product_ladder.proto.go
- pms_sku_stock.go
- repo.go
- sms_home_advertise.go