差评补款

This commit is contained in:
苏尹岚
2020-01-06 18:25:14 +08:00
parent e4b8d1da21
commit 103bce68ba
5 changed files with 88 additions and 11 deletions

View File

@@ -1084,7 +1084,7 @@ func GetOrdersSupplement(db *DaoDB, storIDs, vendorIDs, statuss []int, vendorOrd
sqlParams = append(sqlParams, vendorOrderID)
}
if len(statuss) > 0 {
sql += " AND status IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
sql += " AND status IN (" + GenQuestionMarks(len(statuss)) + ")"
sqlParams = append(sqlParams, statuss)
}
if stype > 0 {
@@ -1096,8 +1096,7 @@ func GetOrdersSupplement(db *DaoDB, storIDs, vendorIDs, statuss []int, vendorOrd
} else if IsReverse == 1 {
sql += " AND link_id <> 0"
}
sql += `
LIMIT ? OFFSET ?`
sql += " LIMIT ? OFFSET ?"
sqlParams = append(sqlParams, pageSize, offset)
Begin(db)
defer Commit(db)
@@ -1138,7 +1137,7 @@ func GetOrdersSupplementNoPage(db *DaoDB, ID int, storIDs, vendorIDs, statuss []
sqlParams = append(sqlParams, vendorOrderID)
}
if len(statuss) > 0 {
sql += " AND status IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
sql += " AND status IN (" + GenQuestionMarks(len(statuss)) + ")"
sqlParams = append(sqlParams, statuss)
}
if stype > 0 {

View File

@@ -347,7 +347,7 @@ type OrderPayRefund struct {
type OrderSupplementFee struct {
ModelIDCULD
StoreID int `orm:"column(store_id)" json:"storeID"`
VendorOrderID *string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorID *int `orm:"column(vendor_id);null" json:"vendorID"`
Status int `json:"status"` //账单状态,若已结账则不允许再修改 ,暂时 0为未结账1为已结账,-1为作废
LinkID int `orm:"column(link_id)" json:"linkID"` //作为冲账标志关联某条扣款记录