|
|
|
@ -26,11 +26,11 @@ type CommoditySearch struct {
|
|
|
|
|
CategoryIds []uint // 类目id
|
|
|
|
|
SkuCode string // 商品条码
|
|
|
|
|
Handle uint // 处理状态 1=待处理 2=入库 3=废弃
|
|
|
|
|
SkuId uint // 供应商skuId
|
|
|
|
|
CommodityCode string // 商品编码
|
|
|
|
|
MinSupplyPrice decimal.Decimal // 最小采购价
|
|
|
|
|
MaxSupplyPrice decimal.Decimal // 最大采购价
|
|
|
|
|
}
|
|
|
|
|
type ArgsGoodsList struct {
|
|
|
|
|
type ArgsCommodityList struct {
|
|
|
|
|
Search CommoditySearch
|
|
|
|
|
Page bean.Page
|
|
|
|
|
}
|
|
|
|
@ -38,6 +38,7 @@ type ArgsGoodsList struct {
|
|
|
|
|
type CommodityItem struct {
|
|
|
|
|
Id uint `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
CommodityCode string `json:"commodityCode"`
|
|
|
|
|
Img string `json:"img"`
|
|
|
|
|
CategoryId uint `json:"categoryId"`
|
|
|
|
|
CategoryNames string `json:"categoryNames"`
|
|
|
|
@ -56,18 +57,13 @@ type CommoditySkuItem struct {
|
|
|
|
|
SkuCode string `json:"skuCode"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GoodsSpecificationItem struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Values []string `json:"values"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ReplyCommodityLists struct {
|
|
|
|
|
List []CommodityItem `json:"list"`
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Lists @Title 获取商品列表
|
|
|
|
|
func (g *commodity) Lists(ctx context.Context, args ArgsGoodsList) (reply ReplyCommodityLists, err error) {
|
|
|
|
|
func (g *commodity) Lists(ctx context.Context, args ArgsCommodityList) (reply ReplyCommodityLists, err error) {
|
|
|
|
|
xClient, err := client.GetClient(g)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|