This commit is contained in:
suyl
2021-05-21 09:59:07 +08:00
parent e04494342f
commit 83183f29bc

View File

@@ -1908,21 +1908,22 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
// } // }
// } // }
//刷新京东真实订单号 //刷新京东真实订单号
var ( //var (
db = dao.GetDB() // db = dao.GetDB()
goods []*model.GoodsOrder // goods []*model.GoodsOrder
) //)
sql := ` //sql := `
SELECT * FROM goods_order WHERE vendor_id = 0 and consignee_mobile2 = '' and order_created_at > '2021-04-13' and vendor_org_code = '339032' // SELECT * FROM goods_order WHERE vendor_id = 0 and consignee_mobile2 = '' and order_created_at > '2021-04-13' and vendor_org_code = '339032'
` //`
dao.GetRows(db, &goods, sql, nil) //dao.GetRows(db, &goods, sql, nil)
for _, v := range goods { //for _, v := range goods {
mobile, _ := api.JdAPI.GetRealMobile4Order(v.VendorOrderID, v.VendorStoreID) // mobile, _ := api.JdAPI.GetRealMobile4Order(v.VendorOrderID, v.VendorStoreID)
if v.ConsigneeMobile2 == "" { // if v.ConsigneeMobile2 == "" {
v.ConsigneeMobile2 = mobile // v.ConsigneeMobile2 = mobile
dao.UpdateEntity(db, v, "ConsigneeMobile2") // dao.UpdateEntity(db, v, "ConsigneeMobile2")
} // }
} //}
cms.RefreshPageStore()
return err return err
} }