order apis

This commit is contained in:
2026-08-26 17:32:54 +08:00
parent eabdc8772e
commit 299191749b
32 changed files with 1321 additions and 251 deletions
+26 -24
View File
@@ -22,30 +22,32 @@ const (
)
type OrderCreate struct {
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
OrderSn string `gorm:"column:ordersn;type:varchar(100);comment:订单号;NOT NULL" json:"ordersn"`
StoreId int `gorm:"column:store_id;type:int(11);comment:美容院关联ID号" json:"store_id"`
StoreName string `gorm:"column:store_name;type:varchar(50);comment:门店名" json:"store_name"`
SaleName string `gorm:"column:sale_name;type:varchar(50);comment:销售姓名" json:"sale_name"`
SaleMobile string `gorm:"column:sale_mobile;type:char(60);comment:销售电话" json:"sale_mobile"`
SaleProvince int `gorm:"column:sale_province;type:int(11);default:0;comment:销售到的地域" json:"sale_province"`
UserId int `gorm:"column:user_id;type:int(11);comment:用户ID" json:"user_id"`
UserName string `gorm:"column:user_name;type:varchar(255);comment:用户名" json:"user_name"`
SaleId int `gorm:"column:sale_id;type:int(11);comment:销售员ID号" json:"sale_id"`
Mobile string `gorm:"column:mobile;type:char(60);comment:收货人手机号;NOT NULL" json:"mobile"`
Address string `gorm:"column:address;type:varchar(255);comment:收货人地址;NOT NULL" json:"address"`
Addressee string `gorm:"column:addressee;type:varchar(50);comment:收货人姓名;NOT NULL" json:"addressee"`
DistrictIds string `gorm:"column:district_ids;type:varchar(255);comment:地区IDS;NOT NULL" json:"district_ids"`
TotalPrice float64 `gorm:"column:total_price;type:decimal(10,2);comment:总价;NOT NULL" json:"total_price"`
GroupId int `gorm:"column:group_id;type:int(11);default:0" json:"group_id"`
PayPrice float64 `gorm:"column:pay_price;type:decimal(10,2);comment:实际支付金额" json:"pay_price"`
PayType uint8 `gorm:"column:pay_type;type:tinyint(1);default:1;comment:支付类型,1为微信,2为支付宝,3为余额支付" json:"pay_type"`
Status uint8 `gorm:"column:status;type:tinyint(1);default:2;comment:支付状态,1为已支付,2为未支付,3为支付中,4支付失败,5已失效;NOT NULL" json:"status"`
IsSupply uint8 `gorm:"column:is_supply;type:tinyint(1);default:1;comment:是否补过货,1为没有,2为补过" json:"is_supply"`
Note string `gorm:"column:note;type:varchar(255);comment:备注" json:"note"`
VerifyStatus uint8 `gorm:"column:verify_status;type:tinyint(1);default:0;comment:审核状态,1为通过,2为失败,3为待审核,0为正常订单不需要审核" json:"verify_status"`
ProductIds string `gorm:"column:product_ids;type:varchar(150);comment:产品IDs" json:"product_ids"`
Type uint8 `gorm:"column:type;type:tinyint(1);default:0;comment:类型 1 销售,2为门店,3为个人,4为个人家庭试用,5为个人门店试用" json:"type"`
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
OrderSn string `gorm:"column:ordersn;type:varchar(100);comment:订单号;NOT NULL" json:"ordersn"`
StoreId int `gorm:"column:store_id;type:int(11);comment:美容院关联ID号" json:"store_id"`
StoreName string `gorm:"column:store_name;type:varchar(50);comment:门店名" json:"store_name"`
SaleName string `gorm:"column:sale_name;type:varchar(50);comment:销售姓名" json:"sale_name"`
SaleMobile string `gorm:"column:sale_mobile;type:char(60);comment:销售电话" json:"sale_mobile"`
SaleProvince int `gorm:"column:sale_province;type:int(11);default:0;comment:销售到的地域" json:"sale_province"`
UserId int `gorm:"column:user_id;type:int(11);comment:用户ID" json:"user_id"`
UserName string `gorm:"column:user_name;type:varchar(255);comment:用户名" json:"user_name"`
SaleId int `gorm:"column:sale_id;type:int(11);comment:销售员ID号" json:"sale_id"`
Mobile string `gorm:"column:mobile;type:char(60);comment:收货人手机号;NOT NULL" json:"mobile"`
Address string `gorm:"column:address;type:varchar(255);comment:收货人地址;NOT NULL" json:"address"`
Addressee string `gorm:"column:addressee;type:varchar(50);comment:收货人姓名;NOT NULL" json:"addressee"`
DistrictIds string `gorm:"column:district_ids;type:varchar(255);comment:地区IDS;NOT NULL" json:"district_ids"`
TotalPrice float64 `gorm:"column:total_price;type:decimal(10,2);comment:总价;NOT NULL" json:"total_price"`
GroupId int `gorm:"column:group_id;type:int(11);default:0" json:"group_id"`
PayPrice float64 `gorm:"column:pay_price;type:decimal(10,2);comment:实际支付金额" json:"pay_price"`
PayType uint8 `gorm:"column:pay_type;type:tinyint(1);default:1;comment:支付类型,1为微信,2为支付宝,3为余额支付" json:"pay_type"`
Status uint8 `gorm:"column:status;type:tinyint(1);default:2;comment:支付状态,1为已支付,2为未支付,3为支付中,4支付失败,5已失效;NOT NULL" json:"status"`
IsSupply uint8 `gorm:"column:is_supply;type:tinyint(1);default:1;comment:是否补过货,1为没有,2为补过" json:"is_supply"`
Note string `gorm:"column:note;type:varchar(255);comment:备注" json:"note"`
VerifyStatus uint8 `gorm:"column:verify_status;type:tinyint(1);default:0;comment:审核状态,1为通过,2为失败,3为待审核,0为正常订单不需要审核" json:"verify_status"`
ExpiredTime utils.CustomTime `json:"expired_time" gorm:"expired_time"` // 过期时间
ProductIds string `gorm:"column:product_ids;type:varchar(150);comment:产品IDs" json:"product_ids"`
CreateType uint8 `gorm:"column:create_type;type:tinyint(1);default:1;comment:下单人类型,1为销售,2为门店,3为个人;NOT NULL" json:"create_type"`
Type uint8 `gorm:"column:type;type:tinyint(1);default:0;comment:类型 1 销售,2为门店,3为个人,4为个人家庭试用,5为个人门店试用" json:"type"`
}
type OrderInfo struct {