This commit is contained in:
suyl
2021-05-20 16:39:44 +08:00
parent 6455a5fc26
commit 68b74c6d68

View File

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