Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into develop

This commit is contained in:
eson
2023-06-12 18:09:00 +08:00
11 changed files with 19 additions and 19 deletions

View File

@@ -108,7 +108,7 @@ func (l *GetCanteenDetailLogic) GetCanteenDetail(req *types.GetCanteenDetailReq,
if !ok {
continue
}
data.Name = fmt.Sprintf("%s-%s-%s", tag.Title, p.Title, size.Title)
data.Name = fmt.Sprintf("%s-%s-%s", *tag.Title, *p.Title, *size.Title)
list = append(list, data)
}
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.GetCanteenDetailRsp{

View File

@@ -2,7 +2,6 @@ package logic
import (
"context"
"fmt"
"fusenapi/model/gmodel"
"fusenapi/utils/auth"
"fusenapi/utils/basic"
@@ -51,7 +50,6 @@ func (l *SaveCanteenTypeProductLogic) SaveCanteenTypeProduct(req *types.SaveCant
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to get product size list")
}
fmt.Println(len(productSizeList))
mapProductSize := make(map[int64]gmodel.FsProductSize)
for _, v := range productSizeList {
mapProductSize[v.Id] = v
@@ -83,10 +81,12 @@ func (l *SaveCanteenTypeProductLogic) SaveCanteenTypeProduct(req *types.SaveCant
continue
}
//新增
addStatus := int64(1)
err = canteenProductModel.Create(l.ctx, &gmodel.FsCanteenProduct{
SizeId: &v.SizeId,
Sid: &v.SId,
Sort: &sort,
Status: &addStatus,
Ctime: &now,
CanteenType: &req.Id,
ProductId: sizeInfo.ProductId,