daShangDao_psiServer/models/product_destroy_log.go
Administrator a2ea0c3a40 1.在这个接口里 /api/product/updateNameAndImages,添加多张图片时,并未覆盖原来的多张图片。(Y)
2.从系统导出的excel数据,在外部对excel某一列进行更改时,新增的要回传到原来的地方;并对改动的地方进行覆盖。
3.销售单管理、出库管理、发货单三个接口里面展示第三方订单编号和快递单号
4.选择多个仓库时,只要选择发货单子就会报错
5.在这个/api/split-account-deduction-log/create接口里,当传参时,如果参数 total_amount 是0,则会报错 {"code":204,"data":{},"msg":"TotalAmount不能为空"} 0是金额数字,不能当空值进行判断(T)
传递参数created_by,没有往数据表里写入
6.商品销毁的同时写入日志,也能通过读取这个日志,还原销毁的商品。传出这个新增的接口
7.新增一个不需要签名认证的分帐扣钱日志列表接口,新增一个返回字段buniness_no,并对这个字段进行模糊查询。
测试接口:/open/split-account-deduction-log/list
8.增加个新接口:首先 调用 /api/sales-order/create 创建销售订单的时候会锁定库存,
现在我需要一个解锁库存的接口,传递参数是订单编号
POST /api/sales-order/unlock-inventory // 解锁销售订单库存
/api/split-account-deduction-log/update /api/sales-order/unlock-inventory 在这两个接口里不需要签名认证
/api/sales-order/unlock-inventory 在这个接口里面返回解锁的所有商品信息
/api/split-account-deduction-log/update  在这个接口里面的status也需要更改,status没有变化
2026-06-24 09:41:12 +08:00

33 lines
2.3 KiB
Go

package models
import "gorm.io/datatypes"
// ProductDestroyLog 商品销毁日志表
type ProductDestroyLog struct {
ID int64 `json:"id" gorm:"primarykey;comment:日志ID"`
ProductID int64 `json:"product_id" gorm:"not null;default:0;index;comment:商品ID"`
Barcode string `json:"barcode" gorm:"size:100;not null;default:'';index;comment:条码"`
ProductSnapshot datatypes.JSON `json:"product_snapshot" gorm:"type:json;not null;comment:商品快照(完整product表数据)"`
ProductBookSnapshot datatypes.JSON `json:"product_book_snapshot" gorm:"type:json;comment:书籍快照(product_book表数据)"`
InventorySnapshot datatypes.JSON `json:"inventory_snapshot" gorm:"type:json;comment:库存汇总快照"`
InventoryDetailSnapshot datatypes.JSON `json:"inventory_detail_snapshot" gorm:"type:json;comment:库存明细快照"`
DestroyedBy string `json:"destroyed_by" gorm:"size:100;not null;default:'';comment:销毁人"`
DestroyedByID int64 `json:"destroyed_by_id" gorm:"not null;default:0;comment:销毁人ID"`
DestroyedAt int64 `json:"destroyed_at" gorm:"type:bigint;not null;default:0;comment:销毁时间戳"`
RestoredBy string `json:"restored_by" gorm:"size:100;not null;default:'';comment:还原人"`
RestoredByID int64 `json:"restored_by_id" gorm:"not null;default:0;comment:还原人ID"`
RestoredAt int64 `json:"restored_at" gorm:"type:bigint;not null;default:0;comment:还原时间戳"`
Status int8 `json:"status" gorm:"type:tinyint(1);not null;default:0;comment:状态(0:已销毁,1:已还原)"`
CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:创建时间戳"`
UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;not null;default:0;comment:更新时间戳"`
IsDel int8 `json:"is_del" gorm:"type:tinyint(1);not null;default:0;comment:逻辑删除"`
}
func (ProductDestroyLog) TableName() string {
return "product_destroy_log"
}
func (ProductDestroyLog) TableOptions() string {
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品销毁日志表'"
}