fix
zhangqian
2023-08-18 5c3b42bb561c1731c0922d74f4ffc089f6b24268
fix
2个文件已删除
2个文件已修改
179 ■■■■■ 已修改文件
model/request/salesDetailsProduct.go 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/salesDetails.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/salesDetailsProduct.go 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/salesDetails.go 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/request/salesDetailsProduct.go
File was deleted
model/salesDetails.go
@@ -30,7 +30,7 @@
        Conditions          string            `json:"conditions" gorm:"column:conditions;type:text;comment:条件"`
        CreatorId           int               `json:"creatorId" gorm:"column:creator_id;type:int;comment:创建人id"`
        Remark              string            `json:"remark" gorm:"column:remark;type:text;comment:备注"`
        Products            []*Product        `json:"products" gorm:"many2many:sales_details_product;"`
        Products            []*Product        `json:"products" gorm:"many2many:SalesDetails_Product;"`
        LogisticCompany     string            `json:"logisticCompany" gorm:"column:logistic_company;type:varchar(255);comment:物流公司"`
        LogisticNumber      string            `json:"logisticNumber" gorm:"column:logistic_number;type:varchar(255);comment:物流单号"`
        LogisticCost        float64           `json:"logisticCost" gorm:"column:logistic_cost;type:decimal(10,2);comment:物流费用"`
model/salesDetailsProduct.go
File was deleted
service/salesDetails.go
@@ -88,17 +88,17 @@
            if err != nil {
                return err
            }
            var rel []*model.SalesDetailsProduct
            for _, p := range newProducts {
                rel = append(rel, &model.SalesDetailsProduct{
                    SalesDetailsId: salesDetails.Id,
                    ProductId:      p.Id,
                })
            }
            err = model.NewSalesDetailsProductSearch().CreateBatch(rel)
            if err != nil {
                return err
            }
            //var rel []*model.SalesDetailsProduct
            //for _, p := range newProducts {
            //    rel = append(rel, &model.SalesDetailsProduct{
            //        SalesDetailsId: salesDetails.Id,
            //        ProductId:      p.Id,
            //    })
            //}
            //err = model.NewSalesDetailsProductSearch().CreateBatch(rel)
            //if err != nil {
            //    return err
            //}
        }
        return nil