goods

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoodsService

type GoodsService struct {
	dao.BaseDao
	TimeSell activity.TimeSellService
	Collage  activity.CollageService
}

func (GoodsService) AddGoodsTypeByNameByChild

func (service GoodsService) AddGoodsTypeByNameByChild(name string, childName string) (goodsType dao.GoodsType, goodsTypeChild dao.GoodsTypeChild)

func (GoodsService) AllList

func (service GoodsService) AllList() []dao.Goods

func (GoodsService) ChangeSpecification

func (service GoodsService) ChangeSpecification(context *gweb.Context) gweb.Result

func (GoodsService) DeleteCollageGoods

func (service GoodsService) DeleteCollageGoods(DB *gorm.DB, GoodsID uint64, OID uint64) error

func (GoodsService) DeleteGoods

func (service GoodsService) DeleteGoods(ID uint64) *result.ActionResult

func (GoodsService) DeleteGoodsType

func (service GoodsService) DeleteGoodsType(ID uint64) *result.ActionResult

func (GoodsService) DeleteGoodsTypeChild

func (service GoodsService) DeleteGoodsTypeChild(GoodsTypeChildID uint64) *result.ActionResult

func (GoodsService) DeleteSpecification

func (service GoodsService) DeleteSpecification(ID uint64) error
func (service GoodsService) AddSpecification(context *gweb.Context) gweb.Result {
	item := &dao.Specification{}
	err := util.RequestBodyToJSON(context.Request.Body, item)
	if err != nil {
		return &gweb.JsonResult{Data: (&result.ActionResult{}).SmartError(err, "", nil)}
	}
	err = service.Add(Orm, item)
	return &gweb.JsonResult{Data: (&result.ActionResult{}).SmartError(err, "添加成功", nil)}
}
func (service GoodsService) ListSpecification(context *gweb.Context) gweb.Result {
	GoodsID, _ := strconv.ParseUint(context.PathParams["GoodsID"], 10, 64)
	var dts []dao.Specification
	service.FindWhere(Orm, &dts, dao.Specification{GoodsID: GoodsID})
	return &gweb.JsonResult{Data: &result.ActionResult{Code: result.ActionOK, Message: "OK", Data: dts}}
}

func (GoodsService) DeleteTimeSellGoods

func (service GoodsService) DeleteTimeSellGoods(DB *gorm.DB, GoodsID uint64, OID uint64) error

func (GoodsService) FindGoodsByCollageHash

func (service GoodsService) FindGoodsByCollageHash(Hash string) []dao.Goods

func (GoodsService) FindGoodsByOrganizationIDAndGoodsID

func (service GoodsService) FindGoodsByOrganizationIDAndGoodsID(OrganizationID uint64, GoodsID uint64) dao.Goods

func (GoodsService) FindGoodsByTimeSellHash

func (service GoodsService) FindGoodsByTimeSellHash(Hash string) []dao.Goods

func (GoodsService) FindGoodsByTimeSellID

func (service GoodsService) FindGoodsByTimeSellID(TimeSellID uint64) []dao.Goods

func (GoodsService) FindGoodsByTitle

func (service GoodsService) FindGoodsByTitle(Title string) dao.Goods

func (GoodsService) FindGoodsLikeMark

func (service GoodsService) FindGoodsLikeMark(Mark string) dao.Goods

func (GoodsService) GetDiscounts

func (service GoodsService) GetDiscounts(GoodsID, OID uint64) []dao.Discount

func (GoodsService) GetGoods

func (service GoodsService) GetGoods(DB *gorm.DB, ID uint64) dao.GoodsInfo

func (GoodsService) GetGoodsInfo

func (service GoodsService) GetGoodsInfo(goods dao.Goods) dao.GoodsInfo

func (GoodsService) GetGoodsInfoList

func (service GoodsService) GetGoodsInfoList(UserID uint64, goodsList []dao.Goods) []dao.GoodsInfo

func (GoodsService) GetGoodsTypeData

func (service GoodsService) GetGoodsTypeData(OID uint64) *dao.GoodsTypeData

func (GoodsService) GetSpecification

func (service GoodsService) GetSpecification(ID uint64, target *dao.Specification) error

func (GoodsService) GetTopGoodsTypeChild

func (service GoodsService) GetTopGoodsTypeChild(DB *gorm.DB, Num uint64) []TopGoodsTypeChild

func (GoodsService) GoodsList

func (service GoodsService) GoodsList(UserID uint64, SqlOrder string, Index int, where interface{}, args ...interface{}) []dao.GoodsInfo

func (GoodsService) HotList

func (service GoodsService) HotList(count uint64) []dao.Goods

func (GoodsService) HotListByGoodsTypeIDAndGoodsTypeChildID

func (service GoodsService) HotListByGoodsTypeIDAndGoodsTypeChildID(GoodsTypeID, GoodsTypeChildID, Num uint64) []dao.Goods

func (GoodsService) ListAllGoodsType

func (service GoodsService) ListAllGoodsType() []dao.GoodsType

func (GoodsService) ListAllGoodsTypeChild

func (service GoodsService) ListAllGoodsTypeChild(GoodsTypeID uint64) []dao.GoodsTypeChild

func (GoodsService) ListGoodsByGoodsTypeID

func (service GoodsService) ListGoodsByGoodsTypeID(GoodsTypeID uint64) []dao.Goods

func (GoodsService) ListGoodsByType

func (service GoodsService) ListGoodsByType(OID, GoodsTypeID, GoodsTypeChildID uint64) []dao.Goods

func (GoodsService) ListGoodsChildByGoodsTypeID

func (service GoodsService) ListGoodsChildByGoodsTypeID(GoodsTypeID, GoodsTypeChildID uint64) []dao.Goods

func (GoodsService) ListGoodsType

func (service GoodsService) ListGoodsType(OID uint64) []dao.GoodsType

func (GoodsService) ListGoodsTypeByOIDForAdmin added in v1.0.4

func (service GoodsService) ListGoodsTypeByOIDForAdmin(OID uint64) []dao.GoodsType

func (GoodsService) ListGoodsTypeChild

func (service GoodsService) ListGoodsTypeChild(GoodsTypeID uint64) []dao.GoodsTypeChild

func (GoodsService) ListGoodsTypeChildAll

func (service GoodsService) ListGoodsTypeChildAll(OID uint64) []dao.GoodsTypeChild

func (GoodsService) ListGoodsTypeForAdmin

func (service GoodsService) ListGoodsTypeForAdmin() []dao.GoodsType

func (GoodsService) NewListByGoodsTypeIDAndGoodsTypeChildID

func (service GoodsService) NewListByGoodsTypeIDAndGoodsTypeChildID(GoodsTypeID, GoodsTypeChildID, Num uint64) []dao.Goods

func (GoodsService) RecommendGoods

func (service GoodsService) RecommendGoods(OID, GoodsID, GoodsTypeID, GoodsTypeChildID uint64) []dao.Goods

func (GoodsService) SaveGoods

func (service GoodsService) SaveGoods(goods dao.Goods, specifications []dao.Specification) error

type TopGoodsTypeChild

type TopGoodsTypeChild struct {
	Name             string `gorm:"column:Name"`
	Image            string `gorm:"column:Image"`
	GoodsTypeChildID uint64 `gorm:"column:GoodsTypeChildID"`
	Price            uint64 `gorm:"column:Price"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL