Merge remote-tracking branch 'origin/mark' into su

This commit is contained in:
苏尹岚
2020-03-24 10:58:50 +08:00
10 changed files with 337 additions and 93 deletions

View File

@@ -1234,3 +1234,28 @@ func GetOrdersForJxPay(db *DaoDB, finishTimeBegin, finishTimeEnd time.Time) (goo
err = GetRows(db, &goods, sql, sqlParams...)
return goods, err
}
func GetWaybills(db *DaoDB, vendorOrderID string) (waybills []*model.Waybill, err error) {
sql := `SELECT *
FROM waybill
WHERE vendor_order_id = ?
`
sqlParams := []interface{}{vendorOrderID}
err = GetRows(db, &waybills, sql, sqlParams)
return waybills, err
}
func GetMatterChildOrders(db *DaoDB, vendorOrderID string) (goods []*model.GoodsOrder, err error) {
sql := `SELECT *
FROM goods_order
WHERE vendor_order_id LIKE ? OR vendor_order_id LIKE ?
AND vendor_id = ?
ORDER BY vendor_order_id DESC
`
sqlParams := []interface{}{
vendorOrderID + "0%", vendorOrderID + "1%",
model.VendorIDJX,
}
err = GetRows(db, &goods, sql, sqlParams)
return goods, err
}

View File

@@ -56,7 +56,8 @@ const (
)
const (
ExdStoreName = "饿鲜达"
ExdStoreName = "饿鲜达"
MatterStoreID = 666666
)
var (
@@ -278,7 +279,8 @@ type Store struct {
Status int `json:"status"`
AutoEnableAt *time.Time `orm:"type(datetime);null" json:"autoEnableAt"` // 自动营业时间(临时休息用)
ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核
SMSNotify int8 `orm:"column(sms_notify);" json:"smsNotify"` // 是否通过短信接收订单消息
SMSNotify int8 `orm:"column(sms_notify);" json:"smsNotify"` // 是否通过短信接收订单消息(每天只推一条)
SMSNotifyMark int8 `orm:"column(sms_notify_mark);" json:"smsNotifyMark"` //今天是否已经推送过订单消息
AutoReplyType int8 `json:"autoReplyType"` // 订单评价自动回复类型
LinkStoreID int `orm:"column(link_store_id);default(0);index" json:"linkStoreID"` // 关联门店ID