去掉微盟微商城相关的代码
This commit is contained in:
@@ -55,10 +55,9 @@ func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID, l
|
||||
sql := `
|
||||
SELECT t1.lock_status, t1.status, COUNT(*) count
|
||||
FROM goods_order t1
|
||||
WHERE t1.vendor_id <> 2 AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) = ?
|
||||
WHERE t1.vendor_id <> 2 AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
|
||||
AND t1.order_created_at >= ?`
|
||||
sqlParams := []interface{}{
|
||||
model.VendorIDWSC,
|
||||
storeID,
|
||||
time.Now().Add(-time.Duration(lastHours) * time.Hour),
|
||||
}
|
||||
@@ -198,14 +197,14 @@ func (c *OrderManager) ExportMTWaybills(ctx *jxcontext.Context, fromDateStr, toD
|
||||
toDate = toDate.Add(24 * time.Hour)
|
||||
var waybills []*tWaybillExt
|
||||
sql := `
|
||||
SELECT t1.*, t2.store_name, IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) store_id
|
||||
SELECT t1.*, t2.store_name, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) store_id
|
||||
FROM waybill t1
|
||||
JOIN goods_order t2 ON t1.vendor_order_id = t2.vendor_order_id
|
||||
WHERE t1.waybill_vendor_id = 102 AND t1.status = 105 AND t1.waybill_created_at >= ? AND t1.waybill_created_at <= ?
|
||||
ORDER BY t1.id
|
||||
`
|
||||
db := dao.GetDB()
|
||||
if err = dao.GetRows(db, &waybills, sql, model.VendorIDWSC, fromDate, toDate); err == nil {
|
||||
if err = dao.GetRows(db, &waybills, sql, fromDate, toDate); err == nil {
|
||||
config := []*excel.Obj2ExcelSheetConfig{
|
||||
&excel.Obj2ExcelSheetConfig{
|
||||
Title: "Sheet1",
|
||||
@@ -334,8 +333,8 @@ func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku, isInclude
|
||||
if storeIDs[0] == 0 { // 容错
|
||||
sqlWhere += " AND 1 = 0"
|
||||
} else {
|
||||
sqlWhere += " AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, model.VendorIDWSC, storeIDs)
|
||||
sqlWhere += " AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -560,17 +559,16 @@ func (c *OrderManager) GetWaybills(ctx *jxcontext.Context, fromDateStr, toDateSt
|
||||
offset = 0
|
||||
}
|
||||
|
||||
sqlParams := []interface{}{
|
||||
model.VendorIDWSC,
|
||||
fromDate,
|
||||
toDate,
|
||||
}
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS t1.*, t2.store_name, IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) store_id
|
||||
SELECT SQL_CALC_FOUND_ROWS t1.*, t2.store_name, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) store_id
|
||||
FROM waybill t1
|
||||
JOIN goods_order t2 ON t1.vendor_order_id = t2.vendor_order_id
|
||||
WHERE t1.status = 105 AND t1.waybill_created_at >= ? AND t1.waybill_created_at < ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
fromDate,
|
||||
toDate,
|
||||
}
|
||||
if params["keyword"] != nil {
|
||||
keyword := params["keyword"].(string)
|
||||
keywordLike := "%" + keyword + "%"
|
||||
@@ -712,8 +710,8 @@ func (c *OrderManager) GetOrdersFinancial(ctx *jxcontext.Context, fromDateStr, t
|
||||
return nil, err
|
||||
}
|
||||
if len(storeIDs) > 0 {
|
||||
sqlWhere += " AND IF(t1.vendor_id = ?, t2.store_id, IF(t2.jx_store_id != 0, t2.jx_store_id, t2.store_id)) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, model.VendorIDWSC, storeIDs)
|
||||
sqlWhere += " AND IF(t2.jx_store_id != 0, t2.jx_store_id, t2.store_id) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
}
|
||||
if params["statuss"] != nil {
|
||||
@@ -1066,11 +1064,11 @@ func (c *OrderManager) GetStoreAfsOrderCountInfo(ctx *jxcontext.Context, storeID
|
||||
err = dao.GetRows(db, &countInfo, `
|
||||
SELECT 0 lock_status, t1.status, COUNT(*) count
|
||||
FROM afs_order t1
|
||||
WHERE t1.vendor_id <> 2 AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) = ?
|
||||
WHERE t1.vendor_id <> 2 AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
|
||||
AND t1.afs_created_at >= ?
|
||||
GROUP BY 1,2
|
||||
ORDER BY 1,2
|
||||
`, model.VendorIDWSC, storeID, time.Now().Add(-time.Duration(lastHours)*time.Hour))
|
||||
`, storeID, time.Now().Add(-time.Duration(lastHours)*time.Hour))
|
||||
if err == nil {
|
||||
return countInfo, nil
|
||||
}
|
||||
|
||||
@@ -1029,7 +1029,7 @@ func UploadImg2Platforms(ctx *jxcontext.Context, parentTask tasksch.ITask, imgUR
|
||||
}
|
||||
}
|
||||
return nil, err
|
||||
}, []int{model.VendorIDEBAI, model.VendorIDWSC})
|
||||
}, []int{model.VendorIDEBAI})
|
||||
tasksch.HandleTask(task, parentTask, false).Run()
|
||||
resultList, err := task.GetResult(0)
|
||||
if err == nil {
|
||||
|
||||
@@ -430,8 +430,8 @@ func GuessVendorIDFromVendorStoreID(vendorStoreID int64) (vendorID int) {
|
||||
vendorID = model.VendorIDMTWM
|
||||
} else if vendorStoreID > 1234567890 && vendorStoreID < 99876543210 { // 饿百 2167002607,10位,11位
|
||||
vendorID = model.VendorIDEBAI
|
||||
} else if vendorStoreID > 123456789 && vendorStoreID < 987654321 { // 微盟微商城 132091048,9位
|
||||
vendorID = model.VendorIDWSC
|
||||
} else if false { //vendorStoreID > 123456789 && vendorStoreID < 987654321 { // 微盟微商城 132091048,9位
|
||||
// vendorID = model.VendorIDWSC
|
||||
} else if vendorStoreID > 123456 && vendorStoreID < 654321 { // 京西门店ID,6位
|
||||
vendorID = model.VendorIDJX
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user