From e4bea2e7eb23c6ff7f4d44654c8d8624fc9f3800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 11:22:05 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E7=BE=8E=E5=9B=A2cookie=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/app.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.conf b/conf/app.conf index a43e7f158..c13fec8c5 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -15,7 +15,7 @@ dadaAppSecret = "2c717ad914767d6e2beb3f743db9e477" mtwmAppID = "589" mtwmSecret = "a81eb3df418d83d6a1a4b7c572156d2f" mtwmCallbackURL = "http://callback.jxc4.com" -mtwmCookieStr = "_lxsdk_cuid=16ddced5e9a95-0a65869c427a14-48714616-15f900-16ddced5e9b2b; _hc.v=cfebbfd1-79a7-9823-d8df-77e59646cb34.1571369610; _lxsdk=16ddced5e9a95-0a65869c427a14-48714616-15f900-16ddced5e9b2b; uuid_update=true; uuid=7b28e71504f5414e382b.1579155871.1.0.0; device_uuid=!64dedf83-b510-4910-8a31-b2b13d0bdd73; pushToken=00kRvxlerO15kB0dJFWDwYuctAoe04xGMNd0r3BqvLUA*; acctId=57396785; token=0eRY2RM8Adm0th9r_lm1_BMg06Y95bBCLl79MVCMym0g*; brandId=-1; wmPoiId=-1; isOfflineSelfOpen=0; city_id=0; isChain=1; existBrandPoi=true; ignore_set_router_proxy=true; region_id=; region_version=0; newCategory=false; bsid=OyqgRLyV54i9JKP0zRCI9jPyXc4UBU-6KReDAkPIwSlljhb97JPyFUIXfYQvhlJb6G1erzHQKbvtZ2pSWOYDxQ; cityId=510100; provinceId=510000; city_location_id=0; location_id=0; igateApp=shangouepc; wpush_server_url=wss://wpush.meituan.com; shopCategory=food; set_info=%7B%22wmPoiId%22%3A-1%2C%22ignoreSetRouterProxy%22%3Atrue%7D; JSESSIONID=ikhdbyehstgx3lfc9l9pdr8u; LX_SC_CONSTANT=c_shangou_online_e_znrurnrc; _lxsdk_s=16fb15646be-e0a-ff3-7c4%7" +mtwmCookieStr = "_lxsdk_cuid=16ddced5e9a95-0a65869c427a14-48714616-15f900-16ddced5e9b2b; _hc.v=cfebbfd1-79a7-9823-d8df-77e59646cb34.1571369610; _lxsdk=16ddced5e9a95-0a65869c427a14-48714616-15f900-16ddced5e9b2b; uuid_update=true; uuid=7b28e71504f5414e382b.1579155871.1.0.0; device_uuid=!64dedf83-b510-4910-8a31-b2b13d0bdd73; pushToken=00kRvxlerO15kB0dJFWDwYuctAoe04xGMNd0r3BqvLUA*; acctId=57396785; brandId=-1; wmPoiId=-1; isOfflineSelfOpen=0; city_id=0; isChain=1; existBrandPoi=true; ignore_set_router_proxy=true; region_id=; region_version=0; newCategory=false; bsid=OyqgRLyV54i9JKP0zRCI9jPyXc4UBU-6KReDAkPIwSlljhb97JPyFUIXfYQvhlJb6G1erzHQKbvtZ2pSWOYDxQ; cityId=510100; provinceId=510000; city_location_id=0; location_id=0; igateApp=shangouepc; wpush_server_url=wss://wpush.meituan.com; token=0MScAPaSa57iwRpgpCmGLf21tiA4yU4Uy-nDZlv8wNWs*; shopCategory=food; set_info=%7B%22wmPoiId%22%3A-1%2C%22ignoreSetRouterProxy%22%3Atrue%7D; JSESSIONID=105dgww27nsy6yfp68q7wmcni; LX_SC_CONSTANT=c_shangou_online_e_znrurnrc; _lxsdk_s=17041b590ac-3d-689-a8c%7C%7C15" autonaviKey = "ef64f638f31e05cb7bde28790f7309fe" From e451901a7420340f7d81ef2aad62fcc5b93cfe33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 15:30:21 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=85=B3=E4=BA=8E=E9=A5=BF=E9=B2=9C?= =?UTF-8?q?=E8=BE=BE=E5=95=86=E5=93=81=E5=85=B3=E6=B3=A8=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 8 +++ business/jxstore/cms/store_sku.go | 93 ++++++++++++++++--------------- business/jxstore/misc/misc.go | 1 + controllers/cms_sku.go | 1 + 4 files changed, 58 insertions(+), 45 deletions(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index cf59dbb98..4810a07b1 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -415,6 +415,14 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma sqlParams = append(sqlParams, nameIDs) } } + if params["isExd"] != nil { + var idExd = params["isExd"].(bool) + if idExd { + sql += " AND t2.exd_sku_id <> ''" + } else { + sql += " AND t2.exd_sku_id == ''" + } + } if params["categoryID"] != nil { cat := &model.SkuCategory{} cat.ID = params["categoryID"].(int) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 6e067b43f..9ac32cb2b 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -82,15 +82,16 @@ type StoreSkuBindInfo struct { type tStoreSkuBindAndSpec struct { model.StoreSkuBind - SkuStatus int - SkuNameStatus int - Name string - SpecQuality float32 - SpecUnit string - SkuNamePrice int - SkuNameUnit string - RealSkuID int `orm:"column(real_sku_id)"` - + SkuStatus int + SkuNameStatus int + Name string + SpecQuality float32 + SpecUnit string + SkuNamePrice int + SkuNameUnit string + RealSkuID int `orm:"column(real_sku_id)"` + ExdSkuID string `orm:"column(exd_sku_id)"` + StoreName string ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核 } @@ -976,13 +977,13 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs sql := ` SELECT t2.*, - t1.id real_sku_id, t1.status sku_status, t1.spec_quality, t1.spec_unit,` + t1.id real_sku_id, t1.status sku_status, t1.spec_quality, t1.spec_unit, t1.exd_sku_id,` if needGetExistingUnitPrice { sql += " IF(t5.unit_price > 0, t5.unit_price, t3.price) sku_name_price," } sql += ` t3.unit sku_name_unit, t3.name, t3.status sku_name_status, - ts.change_price_type + ts.change_price_type, ts.name store_name FROM sku t1 JOIN store ts ON ts.id = ? AND ts.deleted_at = ? LEFT JOIN store_sku_bind t2 ON t2.sku_id = t1.id AND t2.store_id = ts.id AND t2.deleted_at = ? @@ -1037,41 +1038,43 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs // globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false)) var skuBind *model.StoreSkuBind if v.ID == 0 { - if skuBindInfo.IsFocus == 1 && v.SkuNameStatus == model.SkuStatusNormal && v.SkuStatus == model.SkuStatusNormal && isCanChangePrice { - skuBind = &model.StoreSkuBind{ - StoreID: storeID, - SkuID: v.RealSkuID, - SubStoreID: skuBindInfo.SubStoreID, // todo 这个应该从用户信息中自动获得 - UnitPrice: unitPrice, - Price: jxutils.CaculateSkuPrice(unitPrice, v.SpecQuality, v.SpecUnit, v.SkuNameUnit), - Status: model.StoreSkuBindStatusDontSale, // 缺省不可售? - } - skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price) - if tmpStatus := getSkuSaleStatus(inSkuBind, skuBindInfo); tmpStatus != model.StoreSkuBindStatusNA { - skuBind.Status = tmpStatus - } - if globals.IsAddEvent { - err = AddEventDetail(db, ctx, model.OperateAdd, v.RealSkuID, model.ThingTypeSku, storeID, "", "") - } - setStoreSkuBindStatus(skuBind, model.SyncFlagNewMask) - dao.WrapAddIDCULDEntity(skuBind, userName) - // globals.SugarLogger.Debug(utils.Format4Output(skuBind, false)) - if deletedSku := dao.GetDeletedStoreSkuBind(db, skuBind.StoreID, skuBind.SkuID); deletedSku == nil { - if err = dao.CreateEntity(db, skuBind); err != nil { - dao.Rollback(db) - return nil, err + if !(strings.Contains(v.StoreName, model.ExdStoreName) && v.ExdSkuID == "") { + if skuBindInfo.IsFocus == 1 && v.SkuNameStatus == model.SkuStatusNormal && v.SkuStatus == model.SkuStatusNormal && isCanChangePrice { + skuBind = &model.StoreSkuBind{ + StoreID: storeID, + SkuID: v.RealSkuID, + SubStoreID: skuBindInfo.SubStoreID, // todo 这个应该从用户信息中自动获得 + UnitPrice: unitPrice, + Price: jxutils.CaculateSkuPrice(unitPrice, v.SpecQuality, v.SpecUnit, v.SkuNameUnit), + Status: model.StoreSkuBindStatusDontSale, // 缺省不可售? } - num = 1 - } else { - // 需要处理,在删除某个门店商品,同步失败的情况下,又把商品重新关注。 - // 所以统一处理成恢复删除的记录,这样避免问题 - skuBind.ID = deletedSku.ID - // vendorSkuID的赋值意义不大 - skuBind.MtwmID = deletedSku.MtwmID - skuBind.EbaiID = deletedSku.EbaiID - if num, err = dao.UpdateEntity(db, skuBind); err != nil { - dao.Rollback(db) - return nil, err + skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price) + if tmpStatus := getSkuSaleStatus(inSkuBind, skuBindInfo); tmpStatus != model.StoreSkuBindStatusNA { + skuBind.Status = tmpStatus + } + if globals.IsAddEvent { + err = AddEventDetail(db, ctx, model.OperateAdd, v.RealSkuID, model.ThingTypeSku, storeID, "", "") + } + setStoreSkuBindStatus(skuBind, model.SyncFlagNewMask) + dao.WrapAddIDCULDEntity(skuBind, userName) + // globals.SugarLogger.Debug(utils.Format4Output(skuBind, false)) + if deletedSku := dao.GetDeletedStoreSkuBind(db, skuBind.StoreID, skuBind.SkuID); deletedSku == nil { + if err = dao.CreateEntity(db, skuBind); err != nil { + dao.Rollback(db) + return nil, err + } + num = 1 + } else { + // 需要处理,在删除某个门店商品,同步失败的情况下,又把商品重新关注。 + // 所以统一处理成恢复删除的记录,这样避免问题 + skuBind.ID = deletedSku.ID + // vendorSkuID的赋值意义不大 + skuBind.MtwmID = deletedSku.MtwmID + skuBind.EbaiID = deletedSku.EbaiID + if num, err = dao.UpdateEntity(db, skuBind); err != nil { + dao.Rollback(db) + return nil, err + } } } } diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 216a8f4fb..adfaf6772 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -47,6 +47,7 @@ var ( } checkCookieList = []string{ "08:00:00", + "12:00:00", "18:00:00", } createStorePriceTimeList = []string{ diff --git a/controllers/cms_sku.go b/controllers/cms_sku.go index 5cbeca9e9..59d441406 100644 --- a/controllers/cms_sku.go +++ b/controllers/cms_sku.go @@ -147,6 +147,7 @@ func (c *SkuController) SyncCategory() { // @Param skuCategoryID query int false "商品所属类别ID" // @Param unit query string false "商品单位" // @Param isSpu query bool false "是否是SPU" +// @Param isExd query bool false "是否是饿鲜达商品" // @Param fromStatus query int false "查询起始状态(0:下架,1:正常)" // @Param toStatus query int false "查询起始状态(0:下架,1:正常)" // @Param offset query int false "门店列表起始序号(以0开始,缺省为0)" From 287f69515251be83ca542f8855e9982f22860620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 16:24:43 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E7=9B=AE=E5=89=8D=E5=85=88=E4=B8=8D?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=85=B3=E6=B3=A8=E9=A5=BF=E9=B2=9C=E8=BE=BE?= =?UTF-8?q?=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 9ac32cb2b..047b6c3aa 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -1038,7 +1038,8 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs // globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false)) var skuBind *model.StoreSkuBind if v.ID == 0 { - if !(strings.Contains(v.StoreName, model.ExdStoreName) && v.ExdSkuID == "") { + if v.ExdSkuID == "" { + // if !(strings.Contains(v.StoreName, model.ExdStoreName) && v.ExdSkuID == "") { if skuBindInfo.IsFocus == 1 && v.SkuNameStatus == model.SkuStatusNormal && v.SkuStatus == model.SkuStatusNormal && isCanChangePrice { skuBind = &model.StoreSkuBind{ StoreID: storeID, From 99489c47e4161368bb3439e54a8092a4f1bee3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 16:45:17 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=B8=8D=E8=AE=A9?= =?UTF-8?q?=E9=9D=9E=E9=A5=BF=E9=B2=9C=E8=BE=BE=E9=97=A8=E5=BA=97=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E9=A5=BF=E9=B2=9C=E8=BE=BE=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 047b6c3aa..84f21e1e2 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -367,6 +367,9 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool if len(storeIDs) > 0 { sql += " AND t3.id IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")" sqlParams = append(sqlParams, storeIDs) + if len(storeIDs) == 1 { + sql += " AND IF(INSTR(t3.name," + model.ExdStoreName + ") > 0, t2.exd_id <> '', t2.exd_id = '') " + } } if len(skuIDs) > 0 { sql += " AND t2.id IN (" + dao.GenQuestionMarks(len(skuIDs)) + ")" From ec45be2b779a5e18269a89d29843e308e3979cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 16:51:30 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=B8=8D=E8=AE=A9?= =?UTF-8?q?=E9=9D=9E=E9=A5=BF=E9=B2=9C=E8=BE=BE=E9=97=A8=E5=BA=97=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E9=A5=BF=E9=B2=9C=E8=BE=BE=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 84f21e1e2..2158b9971 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -368,7 +368,7 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool sql += " AND t3.id IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")" sqlParams = append(sqlParams, storeIDs) if len(storeIDs) == 1 { - sql += " AND IF(INSTR(t3.name," + model.ExdStoreName + ") > 0, t2.exd_id <> '', t2.exd_id = '') " + sql += " AND IF(INSTR(t3.name,'" + model.ExdStoreName + "') > 0, t2.exd_id <> '', t2.exd_id = '')" } } if len(skuIDs) > 0 { From 37109d968f7ae8d4d72423e50b78612cc0f4c453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 16:53:00 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=B8=8D=E8=AE=A9?= =?UTF-8?q?=E9=9D=9E=E9=A5=BF=E9=B2=9C=E8=BE=BE=E9=97=A8=E5=BA=97=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E9=A5=BF=E9=B2=9C=E8=BE=BE=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 2158b9971..41c5c1bb3 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -368,7 +368,7 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool sql += " AND t3.id IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")" sqlParams = append(sqlParams, storeIDs) if len(storeIDs) == 1 { - sql += " AND IF(INSTR(t3.name,'" + model.ExdStoreName + "') > 0, t2.exd_id <> '', t2.exd_id = '')" + sql += " AND IF(INSTR(t3.name,'" + model.ExdStoreName + "') > 0, t2.exd_sku_id <> '', t2.exd_sku_id = '')" } } if len(skuIDs) > 0 { From 40c9884a8fe3b9aa214ad140442ff1fec32835b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 17:01:56 +0800 Subject: [PATCH 07/12] =?UTF-8?q?getskunames=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 4810a07b1..7dac37180 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -579,7 +579,7 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, - ', "seq":', t2.seq, + ', "seq":', t2.seq, ',"exdSkuID":', t2.exd_sku_id "}")), "]") skus_str, CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str ` + sql + ` From bd820f9f54c7a8a743248385936537f15352dd94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 17:04:17 +0800 Subject: [PATCH 08/12] =?UTF-8?q?getskunames=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 7dac37180..868f3e57a 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -420,7 +420,7 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma if idExd { sql += " AND t2.exd_sku_id <> ''" } else { - sql += " AND t2.exd_sku_id == ''" + sql += " AND t2.exd_sku_id = ''" } } if params["categoryID"] != nil { @@ -579,7 +579,7 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, - ', "seq":', t2.seq, ',"exdSkuID":', t2.exd_sku_id + ', "seq":', t2.seq, ',"exdSkuID":', t2.exd_sku_id, "}")), "]") skus_str, CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str ` + sql + ` From 08bbda42d0c0c4692f613abbe06d3fc355920111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 17:08:40 +0800 Subject: [PATCH 09/12] =?UTF-8?q?getskunames=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 868f3e57a..c7b2c1f5b 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -579,7 +579,7 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, - ', "seq":', t2.seq, ',"exdSkuID":', t2.exd_sku_id, + ', "seq":', t2.seq, '","exdSkuID":"', t2.exd_sku_id, "}")), "]") skus_str, CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str ` + sql + ` From 54ee24614b7e54e427af151fffb1d65a8cb0794d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 17:12:41 +0800 Subject: [PATCH 10/12] =?UTF-8?q?getskunames=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index c7b2c1f5b..b9933d981 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -579,7 +579,8 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, - ', "seq":', t2.seq, '","exdSkuID":"', t2.exd_sku_id, + ', "seq":', t2.seq, + ', "exdSkuID":"', t2.exd_sku_id, '", "}")), "]") skus_str, CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str ` + sql + ` From a3da1f8336ce66a3ee502477577d473a5bd8e9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 17:13:57 +0800 Subject: [PATCH 11/12] =?UTF-8?q?getskunames=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index b9933d981..8bb40c5cd 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -580,7 +580,7 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, ', "seq":', t2.seq, - ', "exdSkuID":"', t2.exd_sku_id, '", + ', "exdSkuID":"', t2.exd_sku_id, '" "}")), "]") skus_str, CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str ` + sql + ` From 49814b67d1fce5fcfd250b21ee47dfb43a96dde7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 14 Feb 2020 17:16:05 +0800 Subject: [PATCH 12/12] =?UTF-8?q?getskunames=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 8bb40c5cd..139dbd7d8 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -578,9 +578,9 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"id":', t2.id, ',"comment":"', t2.comment, '","status":', t2.status, ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, + '","exdSkuID":"', t2.exd_sku_id, '","weight":', t2.weight, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, ', "seq":', t2.seq, - ', "exdSkuID":"', t2.exd_sku_id, '" "}")), "]") skus_str, CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str ` + sql + `