接口位置移动,门店归属补漏修改,获取京东用户修改

This commit is contained in:
苏尹岚
2019-12-02 11:12:09 +08:00
parent 6c0c837fae
commit 3c5afc31b6
13 changed files with 359 additions and 347 deletions

View File

@@ -922,20 +922,15 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
func UpdateOrdersWithoutJxStoreID(db *DaoDB, fromDate, toDate time.Time) (count int64, err error) {
sql := `
UPDATE goods_order t1
JOIN store_map a ON a.vendor_store_id = t1.vendor_store_id
JOIN store_map a ON a.vendor_store_id = t1.vendor_store_id AND a.vendor_id = t1.vendor_id
SET t1.jx_store_id = a.store_id
WHERE t1.jx_store_id = 0
AND t1.status != ?
AND t1.vendor_store_id != ?
AND a.status = ?
AND a.deleted_at = ?
`
sqlParams := []interface{}{
model.OrderStatusCanceled,
2523687, //测试门店
model.StoreStatusOpened,
utils.DefaultTimeValue,
}
sql += " AND t1.order_created_at >= ?"
sql += " AND t1.order_created_at <= ?"
sql += " AND t1.order_created_at >= ? AND t1.order_created_at <= ?"
if !utils.IsTimeZero(fromDate) {
sqlParams = append(sqlParams, fromDate)
if !utils.IsTimeZero(toDate) {