models

package
v0.0.0-...-10721fb Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChildGoods

func AddChildGoods(ormer orm.Ormer, goods *childGoods.JccGoods) (goodsBack *childGoods.JccGoods, ChildId int64, err error)

添加子商品

func AddGoodsCategory

func AddGoodsCategory(goodsCategory *JccGoodsCategoryIndex, ormer orm.Ormer, GoodsId int64, GoodsCategoryId int64) error

func AddGoodsSupplier

func AddGoodsSupplier(goodsSupplier *JccGoodsSupplierIndex, ormer orm.Ormer, GoodsId int64, GoodsSupplierId int64) error

func AddGoodsUnitConversion

func AddGoodsUnitConversion(ormer orm.Ormer, unitId int64, Num int64, ParentGoodsId int64, ChildGoodsId int64) error

添加商品单位换算

func AddOnlineGoods

func AddOnlineGoods(db orm.Ormer, list erp_goods.JccCenterGoods, companyid int, erp_id string) (id int64, err error)

func AddOnlineGoodsCategory

func AddOnlineGoodsCategory(db orm.Ormer, GoodsId int64, GoodsCategoryId int64) error

func QueryCategoryId

func QueryCategoryId(goodsid int64) (id int64, err error)

func QuerySKUExit

func QuerySKUExit(sku string, companyid string) (count int, err error)

func QuerySKUId

func QuerySKUId(sku string, companyid int) (id int64, err error)

func SelectChildGoodsStock

func SelectChildGoodsStock(ormer orm.Ormer, childGoodsId int64, newStrock int64, lId int64) (strockId int64, goodsStock int64, err error)

合成查子库存

func SelectGoodsStock

func SelectGoodsStock(ormer orm.Ormer, childGoodsId int64, newStrock int64, lId int64) (strockId int64, goodsStock int64, err error)

拆分查子库存

func SelectGoodsUnitId

func SelectGoodsUnitId(ormer orm.Ormer, goodsId int64) (unitId int, err error)

通过商品id查询单位id

func SelectParentGoodsStock

func SelectParentGoodsStock(ormer orm.Ormer, goodsId int64, LId int64) (goodsStock int64, isHavedStock bool, err error)

查父库存

func SelectUnitName

func SelectUnitName(ormer orm.Ormer, unitId int) (unitName string, err error)

func UpdateGoodsStock

func UpdateGoodsStock(ormer orm.Ormer, goodsId int64, newChildStock int64, lId int64) error

对库存进行修改

func UpdateOnlineGoods

func UpdateOnlineGoods(db orm.Ormer, list erp_goods.JccCenterGoods, id int64) error

func UpdateOnlineGoodsCategory

func UpdateOnlineGoodsCategory(db orm.Ormer, id int64, GoodsCategoryId int) error

func UpdateParentGoods

func UpdateParentGoods(ormer orm.Ormer, goodsId int64) error

修改父商品的parent_id字段

Types

type AppParam

type AppParam struct {
	AppKey   string `orm:"column(app_key);auto"`
	AppValue string `orm:"column(app_value);auto"`
}

func QueryAppParam

func QueryAppParam(appKey string) (*AppParam, error)

type JccBrand

type JccBrand struct {
	Id        int64  `orm:"column(id);auto" description:"ID"`
	Name      string `orm:"column(name)" description:"品牌id" json:"brand_id"`
	IsDel     int64  `orm:"column(is_del)" description:"是否删除" json:"is_del"`
	UpdatedAt int64  `orm:"column(updated_at)" description:"修改时间"`
	Companyid int    `orm:"column(companyid)" description:"公司id" json:"companyid"`
}

type JccGoodsCategoryIndex

type JccGoodsCategoryIndex struct {
	Id              int64
	GoodsId         int64
	GoodsCategoryId int64
	CreatedAt       int64
}

type JccGoodsSupplierIndex

type JccGoodsSupplierIndex struct {
	Id         int64
	GoodsId    int64
	SupplierId int64
	CreatedAt  int64
}

type JccGoodsUnitConversion

type JccGoodsUnitConversion struct {
	Id           int64  `orm:"column(id);auto" description:"ID"`
	GoodsId      int64  `orm:"column(goods_id)" description:"父商品id" json:"goods_id"`
	ChildGoodsId int64  `orm:"column(child_goods_id)" description:"子商品id" json:"child_goods_id"`
	CreatedAt    int64  `orm:"column(created_at)" description:"创建时间"`
	UnitId       int64  `orm:"column(unit_id)" description:"单位id"`
	Num          int64  `orm:"column(num)" description:"换算数量" json:"num"`
	Mode         string `orm:"-" json:"mode"`
	LId          int64  `orm:"-" description:"所在仓库" json:"l_id"`
	UnitName     string `orm:"-"`
	GoodsName    string `orm:"-"`
}

func ChildSelect

func ChildSelect(ormer orm.Ormer, childGoodsId int64) (goodsUnitConversionInfo *JccGoodsUnitConversion, err error)

通过childGoodsId查找unitConversion

func ChildSelectConversion

func ChildSelectConversion(ormer orm.Ormer, childGoodsId int64) (goodsUnitConversionInfo *JccGoodsUnitConversion, err error)

通过child_goods_id 找父商品的单位

func ParentSelect

func ParentSelect(ormer orm.Ormer, GoodsId int64) (goodsUnitConversionInfo *JccGoodsUnitConversion, err error)

通过GoodsId查找unitConversion

func ParentSelectConversion

func ParentSelectConversion(ormer orm.Ormer, GoodsId int64) (goodsUnitConversionInfo *JccGoodsUnitConversion, err error)

通过GoodsId查找unitConversion

type JccStock

type JccStock struct {
	Id        int64 `orm:"column(id);auto" description:"ID"`
	GoodsId   int64 `orm:"column(goods_id)" description:"商品id" json:"goods_id"`
	Actual    int64 `orm:"column(actual)" description:"实际库存" json:"actual"`
	Option    int64 `orm:"column(option)" description:"可定库存" json:"option"`
	LId       int64 `orm:"column(l_id)" description:"所在仓库"`
	UpdatedAt int64 `orm:"column(updated_at)" description:"修改时间"`
	Companyid int   `orm:"column(companyid)" description:"公司id" json:"companyid"`
}

func (*JccStock) AddStock

func (stock *JccStock) AddStock(db orm.Ormer) error

增加库存信息

type JccUnit

type JccUnit struct {
	Id        int64  `orm:"column(id);auto" description:"ID"`
	Name      string `orm:"column(name)" description:"单位id" json:"unit_id"`
	IsDel     int64  `orm:"column(is_del)" description:"是否删除" json:"is_del"`
	UpdatedAt int64  `orm:"column(updated_at)" description:"修改时间"`
}

Jump to

Keyboard shortcuts

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