Documentation ¶
Index ¶
- type GoodsService
- func (service GoodsService) AddGoodsTypeByNameByChild(name string, childName string) (goodsType dao.GoodsType, goodsTypeChild dao.GoodsTypeChild)
- func (service GoodsService) AllList() []dao.Goods
- func (service GoodsService) ChangeSpecification(context *gweb.Context) gweb.Result
- func (service GoodsService) DeleteCollageGoods(DB *gorm.DB, GoodsID uint64, OID uint64) error
- func (service GoodsService) DeleteGoods(ID uint64) *result.ActionResult
- func (service GoodsService) DeleteGoodsType(ID uint64) *result.ActionResult
- func (service GoodsService) DeleteGoodsTypeChild(GoodsTypeChildID uint64) *result.ActionResult
- func (service GoodsService) DeleteSpecification(ID uint64) error
- func (service GoodsService) DeleteTimeSellGoods(DB *gorm.DB, GoodsID uint64, OID uint64) error
- func (service GoodsService) FindGoodsByCollageHash(Hash string) []dao.Goods
- func (service GoodsService) FindGoodsByOrganizationIDAndGoodsID(OrganizationID uint64, GoodsID uint64) dao.Goods
- func (service GoodsService) FindGoodsByTimeSellHash(Hash string) []dao.Goods
- func (service GoodsService) FindGoodsByTimeSellID(TimeSellID uint64) []dao.Goods
- func (service GoodsService) FindGoodsByTitle(Title string) dao.Goods
- func (service GoodsService) FindGoodsLikeMark(Mark string) dao.Goods
- func (service GoodsService) GetDiscounts(GoodsID, OID uint64) []dao.Discount
- func (service GoodsService) GetGoods(DB *gorm.DB, ID uint64) dao.GoodsInfo
- func (service GoodsService) GetGoodsInfo(goods dao.Goods) dao.GoodsInfo
- func (service GoodsService) GetGoodsInfoList(UserID uint64, goodsList []dao.Goods) []dao.GoodsInfo
- func (service GoodsService) GetGoodsTypeData(OID uint64) *dao.GoodsTypeData
- func (service GoodsService) GetSpecification(ID uint64, target *dao.Specification) error
- func (service GoodsService) GetTopGoodsTypeChild(DB *gorm.DB, Num uint64) []TopGoodsTypeChild
- func (service GoodsService) GoodsList(UserID uint64, SqlOrder string, Index int, where interface{}, ...) []dao.GoodsInfo
- func (service GoodsService) HotList(count uint64) []dao.Goods
- func (service GoodsService) HotListByGoodsTypeIDAndGoodsTypeChildID(GoodsTypeID, GoodsTypeChildID, Num uint64) []dao.Goods
- func (service GoodsService) ListAllGoodsType() []dao.GoodsType
- func (service GoodsService) ListAllGoodsTypeChild(GoodsTypeID uint64) []dao.GoodsTypeChild
- func (service GoodsService) ListGoodsByGoodsTypeID(GoodsTypeID uint64) []dao.Goods
- func (service GoodsService) ListGoodsByType(OID, GoodsTypeID, GoodsTypeChildID uint64) []dao.Goods
- func (service GoodsService) ListGoodsChildByGoodsTypeID(GoodsTypeID, GoodsTypeChildID uint64) []dao.Goods
- func (service GoodsService) ListGoodsType(OID uint64) []dao.GoodsType
- func (service GoodsService) ListGoodsTypeByOIDForAdmin(OID uint64) []dao.GoodsType
- func (service GoodsService) ListGoodsTypeChild(GoodsTypeID uint64) []dao.GoodsTypeChild
- func (service GoodsService) ListGoodsTypeChildAll(OID uint64) []dao.GoodsTypeChild
- func (service GoodsService) ListGoodsTypeForAdmin() []dao.GoodsType
- func (service GoodsService) NewListByGoodsTypeIDAndGoodsTypeChildID(GoodsTypeID, GoodsTypeChildID, Num uint64) []dao.Goods
- func (service GoodsService) RecommendGoods(OID, GoodsID, GoodsTypeID, GoodsTypeChildID uint64) []dao.Goods
- func (service GoodsService) SaveGoods(goods dao.Goods, specifications []dao.Specification) error
- type TopGoodsTypeChild
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 (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 (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) GetGoodsInfo ¶
func (service GoodsService) GetGoodsInfo(goods dao.Goods) dao.GoodsInfo
func (GoodsService) GetGoodsInfoList ¶
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) 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
Click to show internal directories.
Click to hide internal directories.