新增类型
This commit is contained in:
parent
bf7b74d922
commit
ce4b9607bc
|
|
@ -59,24 +59,28 @@ func (p DefParty) goodsList() web_iris.Party {
|
|||
var goodsT1 []GoodsDetail
|
||||
var goodsT2 []GoodsDetail
|
||||
var goodsT3 []GoodsDetail
|
||||
var goodsT4 []GoodsDetail
|
||||
for _, value := range goodsList {
|
||||
if value.GoodsType == 2 {
|
||||
goodsT2 = append(goodsT2, value)
|
||||
if value.GoodsType == 4 {
|
||||
goodsT4 = append(goodsT4, value)
|
||||
}
|
||||
if value.GoodsType == 3 {
|
||||
goodsT3 = append(goodsT3, value)
|
||||
}
|
||||
if value.GoodsType == 2 {
|
||||
goodsT2 = append(goodsT2, value)
|
||||
}
|
||||
if value.GoodsType == 1 {
|
||||
goodsT1 = append(goodsT1, value)
|
||||
}
|
||||
}
|
||||
goodsT1Main := GoodsDetail{
|
||||
Name: "基础服务",
|
||||
Name: "洗护",
|
||||
GoodsSubList: goodsT1,
|
||||
GoodsType: 1,
|
||||
}
|
||||
goodsT2Main := GoodsDetail{
|
||||
Name: "附加产品",
|
||||
Name: "美容",
|
||||
GoodsSubList: goodsT2,
|
||||
GoodsType: 2,
|
||||
}
|
||||
|
|
@ -85,8 +89,13 @@ func (p DefParty) goodsList() web_iris.Party {
|
|||
GoodsSubList: goodsT3,
|
||||
GoodsType: 3,
|
||||
}
|
||||
goodsT4Main := GoodsDetail{
|
||||
Name: "附加产品",
|
||||
GoodsSubList: goodsT4,
|
||||
GoodsType: 4,
|
||||
}
|
||||
var goodsTs []GoodsDetail
|
||||
goodsTs = append(goodsTs, goodsT1Main, goodsT2Main, goodsT3Main)
|
||||
goodsTs = append(goodsTs, goodsT1Main, goodsT2Main, goodsT3Main, goodsT4Main)
|
||||
zap_server.ZAPLOG.Info("key", zap.Any("key1", key), zap.Any("key2", key1), zap.Any("key3", key2), zap.Any("key4", key3), zap.Any("key5", key4))
|
||||
Success(ctx, goodsListRequest, GoodsListResponse{goodsTs})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue