fix
wangpengfei
2023-07-25 1109d0c6565e3413e54d9f28e68dda8ca26b99c4
fix

add logisticCompany, logisticNumber and logisticCost field to salesDetails
3个文件已修改
9 ■■■■■ 已修改文件
api/v1/salesDetails.go 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/request/saleDetails.go 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/salesDetails.go 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/salesDetails.go
@@ -162,6 +162,9 @@
    salesDetailsModel.Addressee = salesDetails.Addressee
    salesDetailsModel.Conditions = salesDetails.Conditions
    salesDetailsModel.Products = salesDetails.Products
    salesDetailsModel.LogisticCompany = salesDetails.LogisticCompany
    salesDetailsModel.LogisticNumber = salesDetails.LogisticNumber
    salesDetailsModel.LogisticCost = salesDetails.LogisticCost
    return ecode.OK, salesDetailsModel
}
model/request/saleDetails.go
@@ -23,6 +23,9 @@
    Conditions        string          `json:"conditions" gorm:"column:conditions;type:text;comment:条件"`
    Remark            string          `json:"remark" gorm:"column:remark;type:text;comment:备注"`
    Products          []model.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:物流费用"`
}
type UpdateSalesDetails struct {
model/salesDetails.go
@@ -24,6 +24,9 @@
        Conditions        string    `json:"conditions" gorm:"column:conditions;type:text;comment:条件"`
        Remark            string    `json:"remark" gorm:"column:remark;type:text;comment:备注"`
        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:物流费用"`
        gorm.Model        `json:"-"`
    }