同步京东门店
This commit is contained in:
@@ -2762,8 +2762,14 @@ type tJdStoreInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func UpdateJdStoreNameAll(ctx *jxcontext.Context) (err error) {
|
func UpdateJdStoreNameAll(ctx *jxcontext.Context) (err error) {
|
||||||
|
storeMap := map[int]int{
|
||||||
|
100653: 100653,
|
||||||
|
100037: 100037,
|
||||||
|
100968: 100968,
|
||||||
|
}
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
userName := ctx.GetUserName()
|
userName := ctx.GetUserName()
|
||||||
|
for _, v := range storeMap {
|
||||||
var stores []*tJdStoreInfo
|
var stores []*tJdStoreInfo
|
||||||
sql := `
|
sql := `
|
||||||
SELECT
|
SELECT
|
||||||
@@ -2778,7 +2784,7 @@ func UpdateJdStoreNameAll(ctx *jxcontext.Context) (err error) {
|
|||||||
WHERE t1.id = ?
|
WHERE t1.id = ?
|
||||||
ORDER BY t2.updated_at
|
ORDER BY t2.updated_at
|
||||||
`
|
`
|
||||||
if err = dao.GetRows(db, &stores, sql, model.VendorIDJD, 102108); err == nil {
|
if err = dao.GetRows(db, &stores, sql, model.VendorIDJD, v); err == nil {
|
||||||
for _, store := range stores {
|
for _, store := range stores {
|
||||||
a := jd.GetAPI(store.VendorOrgCode)
|
a := jd.GetAPI(store.VendorOrgCode)
|
||||||
storeParams := &jdapi.OpStoreParams{
|
storeParams := &jdapi.OpStoreParams{
|
||||||
@@ -2831,5 +2837,6 @@ func UpdateJdStoreNameAll(ctx *jxcontext.Context) (err error) {
|
|||||||
err = errList.GetErrListAsOne()
|
err = errList.GetErrListAsOne()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user