Accept Merge Request #193: (su -> mark)
Merge Request: 饿鲜达订单缺少skuId Created By: @苏尹岚 Accepted By: @苏尹岚 URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/193
This commit is contained in:
@@ -3,6 +3,8 @@ package cms
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"mime/multipart"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -1475,59 +1477,127 @@ func DeleteSkuNameExPrefixOverdue(db *dao.DaoDB) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func SumExianDaDepot(ctx *jxcontext.Context) (err error) {
|
func SumExianDaDepot(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
result, err := api.EbaiAPI.GetExianDaSkuDepot("")
|
results, err := api.EbaiAPI.GetExianDaSkuDepot("")
|
||||||
for _, v := range result {
|
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
|
||||||
skus, err := api.EbaiAPI.GetExianDaSku(utils.Str2Int64(v.ElemeGoodsID))
|
switch step {
|
||||||
if err != nil {
|
case 0:
|
||||||
return err
|
for _, v := range results {
|
||||||
}
|
skus, err := api.EbaiAPI.GetExianDaSku(utils.Str2Int64(v.ElemeGoodsID))
|
||||||
dao.Begin(db)
|
if err != nil {
|
||||||
defer func() {
|
return result, err
|
||||||
if r := recover(); r != nil {
|
}
|
||||||
dao.Rollback(db)
|
skuNameExt := &model.SkuName{}
|
||||||
panic(r)
|
sql2 := `
|
||||||
|
SELECT a.*
|
||||||
|
FROM sku_name a
|
||||||
|
JOIN sku b ON b.name_id = a.id
|
||||||
|
WHERE a.upc = ?
|
||||||
|
`
|
||||||
|
sqlParams2 := []interface{}{
|
||||||
|
skus.UpcIds,
|
||||||
|
}
|
||||||
|
dao.GetRow(db, skuNameExt, sql2, sqlParams2)
|
||||||
|
dao.Begin(db)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
panic(r)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
prefix, _, _, specUnit, unit, specQuality := jxutils.SplitSkuName(v.GoodsName)
|
||||||
|
//京西库中存在此商品
|
||||||
|
if skuNameExt.ID != 0 {
|
||||||
|
if skuNameExt.Name != v.GoodsName {
|
||||||
|
skuNameExt.Name = v.GoodsName
|
||||||
|
_, err = dao.UpdateEntity(db, skuNameExt, "Name")
|
||||||
|
if err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
skuCat := &model.SkuCategory{}
|
||||||
|
sql := `
|
||||||
|
SELECT *
|
||||||
|
FROM sku_category
|
||||||
|
WHERE ebai_category_id = ?
|
||||||
|
`
|
||||||
|
sqlParams := []interface{}{
|
||||||
|
skus.CategoryIDThird,
|
||||||
|
}
|
||||||
|
dao.GetRow(db, skuCat, sql, sqlParams)
|
||||||
|
skuName := &model.SkuName{
|
||||||
|
Prefix: prefix,
|
||||||
|
Name: v.GoodsName,
|
||||||
|
IsGlobal: model.YES,
|
||||||
|
Unit: unit,
|
||||||
|
SpecQuality: specQuality,
|
||||||
|
SpecUnit: specUnit,
|
||||||
|
Price: 100,
|
||||||
|
Img: v.ImageURL,
|
||||||
|
Upc: &v.UpcID,
|
||||||
|
Status: model.SkuStatusNormal,
|
||||||
|
}
|
||||||
|
if skuCat.ID != 0 {
|
||||||
|
skuName.CategoryID = skuCat.ID
|
||||||
|
} else {
|
||||||
|
skuName.CategoryID = -1 //默认给了个分类
|
||||||
|
}
|
||||||
|
dao.WrapAddIDCULDEntity(skuName, ctx.GetUserName())
|
||||||
|
err = dao.CreateEntity(db, skuName)
|
||||||
|
if err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
sku := &model.Sku{
|
||||||
|
NameID: skuName.ID,
|
||||||
|
SpecQuality: specQuality,
|
||||||
|
SpecUnit: specUnit,
|
||||||
|
Weight: int(utils.Str2Int64(skus.Weight)),
|
||||||
|
Status: model.SkuStatusNormal,
|
||||||
|
ExdSkuID: v.ElemeGoodsID,
|
||||||
|
ExdCategoryThirdID: skus.CategoryIDThird,
|
||||||
|
}
|
||||||
|
dao.WrapAddIDCULDEntity(sku, ctx.GetUserName())
|
||||||
|
err = dao.CreateEntity(db, sku)
|
||||||
|
if err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dao.Commit(db)
|
||||||
}
|
}
|
||||||
}()
|
case 1:
|
||||||
prefix, _, _, specUnit, unit, specQuality := jxutils.SplitSkuName(v.GoodsName)
|
//刷新分类
|
||||||
skuName := &model.SkuName{
|
skus := &model.SkuAndName{}
|
||||||
Prefix: prefix,
|
sql := `
|
||||||
Name: v.GoodsName,
|
SELECT b.*, a.name, a.category_id real_category_id
|
||||||
CategoryID: skus.CategoryIDThird,
|
FROM sku_name a
|
||||||
IsGlobal: 1,
|
JOIN sku b ON b.name_id = a.id
|
||||||
Unit: unit,
|
WHERE b.exd_sku_id <> ''
|
||||||
SpecQuality: specQuality,
|
AND a.deleted_at = ?
|
||||||
SpecUnit: specUnit,
|
AND b.deleted_at = ?
|
||||||
Price: 100,
|
AND a.category_id = -1
|
||||||
Img: v.ImageURL,
|
`
|
||||||
Upc: &v.UpcID,
|
sqlParams := []interface{}{
|
||||||
Status: model.SkuStatusNormal,
|
utils.DefaultTimeValue, utils.DefaultTimeValue,
|
||||||
|
}
|
||||||
|
err = dao.GetRows(db, &skus, sql, sqlParams)
|
||||||
|
|
||||||
}
|
}
|
||||||
dao.WrapAddIDCULDEntity(skuName, ctx.GetUserName())
|
return result, err
|
||||||
err = dao.CreateEntity(db, skuName)
|
|
||||||
if err != nil {
|
|
||||||
dao.Rollback(db)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
sku := &model.Sku{
|
|
||||||
NameID: skuName.ID,
|
|
||||||
SpecQuality: specQuality,
|
|
||||||
SpecUnit: specUnit,
|
|
||||||
Weight: int(utils.Str2Int64(skus.Weight)),
|
|
||||||
Status: model.SkuStatusNormal,
|
|
||||||
ExdSkuID: v.ElemeGoodsID,
|
|
||||||
ExdCategoryThirdID: skus.CategoryIDThird,
|
|
||||||
}
|
|
||||||
dao.WrapAddIDCULDEntity(sku, ctx.GetUserName())
|
|
||||||
err = dao.CreateEntity(db, sku)
|
|
||||||
if err != nil {
|
|
||||||
dao.Rollback(db)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
dao.Commit(db)
|
|
||||||
}
|
}
|
||||||
return err
|
taskSeq := tasksch.NewSeqTask2("合并饿鲜达商品库", ctx, isContinueWhenError, taskSeqFunc, 2)
|
||||||
|
tasksch.HandleTask(taskSeq, nil, true).Run()
|
||||||
|
if !isAsync {
|
||||||
|
_, err = taskSeq.GetResult(0)
|
||||||
|
hint = "1"
|
||||||
|
} else {
|
||||||
|
hint = taskSeq.GetID()
|
||||||
|
}
|
||||||
|
return hint, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func CopyEbaiSkuPriceToJx(ctx *jxcontext.Context, baiduShopID string) (err error) {
|
func CopyEbaiSkuPriceToJx(ctx *jxcontext.Context, baiduShopID string) (err error) {
|
||||||
@@ -1586,7 +1656,18 @@ func CopyEbaiStoreSkusToJx(ctx *jxcontext.Context, baiduShopID string, storeID i
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func AddExdSkuByExcel(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hint string, err error) {
|
func AddExdSkuByExcel(ctx *jxcontext.Context, files []*multipart.FileHeader, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
|
if len(files) == 0 {
|
||||||
|
return "", errors.New("没有文件上传!")
|
||||||
|
}
|
||||||
|
fileHeader := files[0]
|
||||||
|
file, err := fileHeader.Open()
|
||||||
|
hint, err = AddExdSkuByExcelBin(ctx, file, isAsync, isContinueWhenError)
|
||||||
|
file.Close()
|
||||||
|
return hint, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func AddExdSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
skuMap = make(map[string]string)
|
skuMap = make(map[string]string)
|
||||||
@@ -1594,8 +1675,8 @@ func AddExdSkuByExcel(ctx *jxcontext.Context, isAsync, isContinueWhenError bool)
|
|||||||
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
|
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
|
||||||
switch step {
|
switch step {
|
||||||
case 0:
|
case 0:
|
||||||
xlsx, err := excelize.OpenFile("111.xlsx")
|
// xlsx, err := excelize.OpenFile("111.xlsx")
|
||||||
// xlsx, err := excelize.OpenReader(reader)
|
xlsx, err := excelize.OpenReader(reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
@@ -1620,11 +1701,13 @@ func AddExdSkuByExcel(ctx *jxcontext.Context, isAsync, isContinueWhenError bool)
|
|||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
for k, _ := range skuMap {
|
for k, _ := range skuMap {
|
||||||
fmt.Println(k, skuMap[k])
|
|
||||||
result, err := api.EbaiAPI.GetExianDaSkuDepot(k)
|
result, err := api.EbaiAPI.GetExianDaSkuDepot(k)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
if len(result) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
exdSku := result[0]
|
exdSku := result[0]
|
||||||
skus, err := api.EbaiAPI.GetExianDaSku(utils.Str2Int64(exdSku.ElemeGoodsID))
|
skus, err := api.EbaiAPI.GetExianDaSku(utils.Str2Int64(exdSku.ElemeGoodsID))
|
||||||
skuName := &model.SkuName{}
|
skuName := &model.SkuName{}
|
||||||
@@ -1647,7 +1730,7 @@ func AddExdSkuByExcel(ctx *jxcontext.Context, isAsync, isContinueWhenError bool)
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
//表示京西库中已存在此饿鲜达商品,再判断更不更新名字
|
//表示京西库中已存在此饿鲜达商品,再判断更不更新名字
|
||||||
if skuName != nil {
|
if skuName.ID != 0 {
|
||||||
if skuName.Name != skuMap[k] {
|
if skuName.Name != skuMap[k] {
|
||||||
skuName.Name = skuMap[k]
|
skuName.Name = skuMap[k]
|
||||||
_, err = dao.UpdateEntity(db, skuName, "Name")
|
_, err = dao.UpdateEntity(db, skuName, "Name")
|
||||||
@@ -1659,10 +1742,19 @@ func AddExdSkuByExcel(ctx *jxcontext.Context, isAsync, isContinueWhenError bool)
|
|||||||
} else {
|
} else {
|
||||||
//插入
|
//插入
|
||||||
prefix, _, _, specUnit, unit, specQuality := jxutils.SplitSkuName(exdSku.GoodsName)
|
prefix, _, _, specUnit, unit, specQuality := jxutils.SplitSkuName(exdSku.GoodsName)
|
||||||
|
skuCat := &model.SkuCategory{}
|
||||||
|
sql := `
|
||||||
|
SELECT *
|
||||||
|
FROM sku_category
|
||||||
|
WHERE ebai_category_id = ?
|
||||||
|
`
|
||||||
|
sqlParams := []interface{}{
|
||||||
|
skus.CategoryIDThird,
|
||||||
|
}
|
||||||
|
dao.GetRow(db, skuCat, sql, sqlParams)
|
||||||
skuName2 := &model.SkuName{
|
skuName2 := &model.SkuName{
|
||||||
Prefix: prefix,
|
Prefix: prefix,
|
||||||
Name: skuMap[k],
|
Name: skuMap[k],
|
||||||
CategoryID: skus.CategoryIDThird,
|
|
||||||
IsGlobal: 1,
|
IsGlobal: 1,
|
||||||
Unit: unit,
|
Unit: unit,
|
||||||
SpecQuality: specQuality,
|
SpecQuality: specQuality,
|
||||||
@@ -1672,6 +1764,11 @@ func AddExdSkuByExcel(ctx *jxcontext.Context, isAsync, isContinueWhenError bool)
|
|||||||
Upc: &k,
|
Upc: &k,
|
||||||
Status: model.SkuStatusNormal,
|
Status: model.SkuStatusNormal,
|
||||||
}
|
}
|
||||||
|
if skuCat.ID != 0 {
|
||||||
|
skuName2.CategoryID = skuCat.ID
|
||||||
|
} else {
|
||||||
|
skuName2.CategoryID = skus.CategoryIDThird
|
||||||
|
}
|
||||||
dao.WrapAddIDCULDEntity(skuName2, ctx.GetUserName())
|
dao.WrapAddIDCULDEntity(skuName2, ctx.GetUserName())
|
||||||
err = dao.CreateEntity(db, skuName2)
|
err = dao.CreateEntity(db, skuName2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -185,6 +185,12 @@ type JdStoreSkus struct {
|
|||||||
Price int `json:"price"`
|
Price int `json:"price"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type tUpdateSkuSpecTag struct {
|
||||||
|
StoreID int `json:"storeID"`
|
||||||
|
SkuID int `json:"skuID"`
|
||||||
|
IsSpec int `json:"isSpec"`
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
maxStoreNameBind = 10000 // 最大门店SkuName bind个数
|
maxStoreNameBind = 10000 // 最大门店SkuName bind个数
|
||||||
maxStoreNameBind2 = 10000 // 最大门店乘SkuName个数
|
maxStoreNameBind2 = 10000 // 最大门店乘SkuName个数
|
||||||
@@ -3315,8 +3321,8 @@ func UpdateStoreSkusSpecTag(ctx *jxcontext.Context, vendorIDs []int, files []*mu
|
|||||||
|
|
||||||
func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
storeSkuMap = make(map[int][]*partner.StoreSkuInfo)
|
results []*tUpdateSkuSpecTag
|
||||||
)
|
)
|
||||||
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
|
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
|
||||||
switch step {
|
switch step {
|
||||||
@@ -3331,30 +3337,51 @@ func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorI
|
|||||||
if rowNum < 1 {
|
if rowNum < 1 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
getCellForSpecTag(rowNum, row, storeSkuMap)
|
var (
|
||||||
|
skuMap = &tUpdateSkuSpecTag{}
|
||||||
|
storeID int
|
||||||
|
skuID int
|
||||||
|
isSpec int
|
||||||
|
)
|
||||||
|
for k, cell := range row {
|
||||||
|
if cell != "" {
|
||||||
|
if k == 0 {
|
||||||
|
storeID = int(utils.Str2Int64(cell))
|
||||||
|
}
|
||||||
|
if k == 1 {
|
||||||
|
skuID = int(utils.Str2Int64(cell))
|
||||||
|
}
|
||||||
|
if k == 2 {
|
||||||
|
isSpec = int(utils.Str2Int64(cell))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
skuMap.SkuID = skuID
|
||||||
|
skuMap.IsSpec = isSpec
|
||||||
|
skuMap.StoreID = storeID
|
||||||
|
results = append(results, skuMap)
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
for storeID, storeSkuInfos := range storeSkuMap {
|
for i := 0; i < len(results)/2; i++ {
|
||||||
for i := 0; i < len(storeSkuInfos)/2; i++ {
|
tmp := results[i]
|
||||||
tmp := storeSkuInfos[i]
|
results[i] = results[len(results)-i-1]
|
||||||
storeSkuInfos[i] = storeSkuInfos[len(storeSkuInfos)-i-1]
|
results[len(results)-i-1] = tmp
|
||||||
storeSkuInfos[len(storeSkuInfos)-i-1] = tmp
|
}
|
||||||
|
for _, v := range results {
|
||||||
|
store, err := dao.GetStoreDetail(db, v.StoreID, model.VendorIDMTWM)
|
||||||
|
food, err := api.MtwmAPI.RetailGet(store.VendorStoreID, utils.Int2Str(v.SkuID))
|
||||||
|
if err != nil || store == nil {
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
for _, v := range storeSkuInfos {
|
var foodData = make(map[string]interface{})
|
||||||
store, err := dao.GetStoreDetail(db, storeID, model.VendorIDMTWM)
|
if v.IsSpec != 0 && v.IsSpec == -1 {
|
||||||
if err != nil || store == nil {
|
v.IsSpec = 0
|
||||||
continue
|
}
|
||||||
}
|
foodData["is_specialty"] = v.IsSpec
|
||||||
var foodData = make(map[string]interface{})
|
foodData["price"] = food.Price
|
||||||
if v.IsSpecialty != 0 && v.IsSpecialty == -1 {
|
if globals.EnableMtwmStoreWrite {
|
||||||
v.IsSpecialty = 0
|
err = api.MtwmAPI.RetailInitData(ctx.GetTrackInfo(), store.VendorStoreID, utils.Int2Str(v.SkuID), foodData)
|
||||||
}
|
|
||||||
foodData["is_specialty"] = v.IsSpecialty
|
|
||||||
if globals.EnableMtwmStoreWrite {
|
|
||||||
err = api.MtwmAPI.RetailInitData(ctx.GetTrackInfo(), store.VendorStoreID, utils.Int2Str(v.SkuID), foodData)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result, err
|
return result, err
|
||||||
@@ -3370,31 +3397,6 @@ func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorI
|
|||||||
return hint, err
|
return hint, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCellForSpecTag(rowNum int, row []string, storeSkuMap map[int][]*partner.StoreSkuInfo) {
|
|
||||||
var (
|
|
||||||
skuMap = &partner.StoreSkuInfo{}
|
|
||||||
storeID int
|
|
||||||
skuID int
|
|
||||||
isSpec int
|
|
||||||
)
|
|
||||||
for k, cell := range row {
|
|
||||||
if cell != "" {
|
|
||||||
if k == 0 {
|
|
||||||
storeID = int(utils.Str2Int64(cell))
|
|
||||||
}
|
|
||||||
if k == 1 {
|
|
||||||
skuID = int(utils.Str2Int64(cell))
|
|
||||||
}
|
|
||||||
if k == 2 {
|
|
||||||
isSpec = int(utils.Str2Int64(cell))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
skuMap.SkuID = skuID
|
|
||||||
skuMap.IsSpecialty = isSpec
|
|
||||||
storeSkuMap[storeID] = append(storeSkuMap[storeID], skuMap)
|
|
||||||
}
|
|
||||||
|
|
||||||
func SendSeckillSkusCountMsg(ctx *jxcontext.Context, vendorIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
func SendSeckillSkusCountMsg(ctx *jxcontext.Context, vendorIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
// 1. 如果爆品低于8个,报警 type1
|
// 1. 如果爆品低于8个,报警 type1
|
||||||
// 2. 爆品价格低于1元商品小于5个,报警 type2
|
// 2. 爆品价格低于1元商品小于5个,报警 type2
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ type SkuAndName struct {
|
|||||||
ActPrice int `json:"actPrice"`
|
ActPrice int `json:"actPrice"`
|
||||||
ActID int `orm:"column(act_id)" json:"actID"`
|
ActID int `orm:"column(act_id)" json:"actID"`
|
||||||
ActType int `orm:"column(act_type)" json:"actType"`
|
ActType int `orm:"column(act_type)" json:"actType"`
|
||||||
|
RealCategoryID int `orm:"column(real_category_id)" json:"realCategoryID"`
|
||||||
|
|
||||||
EarningPrice int `json:"earningPrice"`
|
EarningPrice int `json:"earningPrice"`
|
||||||
EarningActID int `orm:"column(earning_act_id)" json:"earningActID"`
|
EarningActID int `orm:"column(earning_act_id)" json:"earningActID"`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
appname = jx-callback
|
appname = jx-callback
|
||||||
httpport = 8080
|
httpport = 8080
|
||||||
runmode = alpha
|
runmode = dev
|
||||||
autorender = false
|
autorender = false
|
||||||
copyrequestbody = true
|
copyrequestbody = true
|
||||||
EnableDocs = true
|
EnableDocs = true
|
||||||
@@ -66,7 +66,7 @@ fakeJdBaseURL = "http://test.jxc4.com/qqqq"
|
|||||||
|
|
||||||
ebaiStorePageCookieWMUSS = "B0AAFQCAAAGbhkuMCsvcyYBDkkyAxBGIBlgXAQYVwc7VwYZFkx2HDoPSmo5eV1femopWgJRawhgAALG04cg1RUmhUakBbJRdgPS0tNEhnQhNRewwuWwYYBDEFPCQSDXV5YWA6PAVRHUJ9SnVGMThYAjNjLw9pRxIbS04-XFo05AQgBl%7ERLA33vWcR73gEAKZ"
|
ebaiStorePageCookieWMUSS = "B0AAFQCAAAGbhkuMCsvcyYBDkkyAxBGIBlgXAQYVwc7VwYZFkx2HDoPSmo5eV1femopWgJRawhgAALG04cg1RUmhUakBbJRdgPS0tNEhnQhNRewwuWwYYBDEFPCQSDXV5YWA6PAVRHUJ9SnVGMThYAjNjLw9pRxIbS04-XFo05AQgBl%7ERLA33vWcR73gEAKZ"
|
||||||
ebaiStorePageCookieWMSTOKEN = "gAALgNAAAGfBI5YEBHSQdZY1InIS8CVQU9aBU1f3VLWVQqKHAAAc5LnRLZ1QLLx0S5IuzCSX8ZQ7oUwAAUr-GEm9JpRc9AQAAsLkLHHXzuhh2lZkbyrcAAAWBESKg3ZA"
|
ebaiStorePageCookieWMSTOKEN = "gAALgNAAAGfBI5YEBHSQdZY1InIS8CVQU9aBU1f3VLWVQqKHAAAc5LnRLZ1QLLx0S5IuzCSX8ZQ7oUwAAUr-GEm9JpRc9AQAAsLkLHHXzuhh2lZkbyrcAAAWBESKg3ZA"
|
||||||
ebaiStorePageCookieExdTOKEN = "PBE_2.0_5cd1c6141c127d41182ae6850e716b342e64c7b54d9ec816b6588a912ae0ee1a74761427eb88e6c3cf9903a335e486254d3ee009659aabeff8fb6e21911327a2ea7903c718647879baffb82ce1c8e34c2ba9c66bf639c025ab2d5892181add3474251be8b1eb7ee817773a5f1fa018a788e1bddd17bb4ef9575e71fe03ae79eb230adb0bf1388b70553e92dd17624dab457785b5a04b561d1ae9d71b2bb84f2381fd5f44635ab5d63d5cea9be74b9764ddfb39ae9eab174fed76cccd7f40a9c322ea1a61c63c42110d2d86333606e707e4e2d14d01f2457f224a51998467eaa1a932cd815c4e7fdc89729c4bd8d112cd797282eddce2bab910d3d34a7057321d36442c4dc3a2af14032f89da5b1d0288e374ebb6d5f7168daf3cc3c9f84d169a56da8665b8805d6792ff54d5779ed19826ea8371c9e42766a89ad7f7d8e78e3d77c8fae3d94e59fd6a9b9e6687e280defd338165832620f1fc0418900656687adbc46c1712dc0d5f"
|
ebaiStorePageCookieExdTOKEN = "PBE_2.0_5cd1c6141c127d419e817e88920aa5ae01c164ed47b678e0b16c628ef65ffc0b93ddf4a7cd1f7172e644f4f5321c5f197dd406a5a0d219aae2fa169e59c5419db8f4d4ca44c01e112c6bb4f8d87cbae90e6eaefceba88f486f26bafa41f3ec181773c4b329a6c7c154333a8496509943c63a96c71c72edc82f6beb6ecd9acd5ad69b2f2bbcbe011d05536112cbe52be0b2176860870ce608a0d7f465a1e782f6584e4253aaaee30d9042f82f12b312b5a29151e2e0400f4a128ee365966025f9719278850f60e10ddda0e32554c6867091321cd552b41aa5e5e676f64af218a0e98e4030f499c31de664a0c0a23c5306075ffb061c7654d4646317c8e6a55c66361c96b9e8f11f55c2f666a0240a3f8fb8e221d58b907731a8720572a03febd20d146cad4b6a3821cfd3c5b3286bb3383c4eff8c8ff2d63b8773bbd88f2d6c4b1deb7634221b0e086b7b7d6201435dacdb09525dc59588beeffcd0232ef64aa73fd2325509fa7fc6"
|
||||||
mtpsStoreToken = "M0p9VatZSeSHfrosD5IViAVl73IcA8mlcuHIV5sG6Zpv83a7JE0wY3t26aEhrrs_MR5gtLSFF1UIkt8HAjaXow"
|
mtpsStoreToken = "M0p9VatZSeSHfrosD5IViAVl73IcA8mlcuHIV5sG6Zpv83a7JE0wY3t26aEhrrs_MR5gtLSFF1UIkt8HAjaXow"
|
||||||
|
|
||||||
weimobAppID = "319F5E7FB6784DFCA3684C9333EB7744"
|
weimobAppID = "319F5E7FB6784DFCA3684C9333EB7744"
|
||||||
|
|||||||
@@ -423,12 +423,14 @@ func (c *SkuController) UpdateSkuNamesExPrefix() {
|
|||||||
// @Title 合并饿鲜达商品库
|
// @Title 合并饿鲜达商品库
|
||||||
// @Description 合并饿鲜达商品库
|
// @Description 合并饿鲜达商品库
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
|
// @Param isAsync formData bool false "是否异步"
|
||||||
|
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
// @Failure 200 {object} controllers.CallResult
|
// @Failure 200 {object} controllers.CallResult
|
||||||
// @router /SumExianDaDepot [put]
|
// @router /SumExianDaDepot [put]
|
||||||
func (c *SkuController) SumExianDaDepot() {
|
func (c *SkuController) SumExianDaDepot() {
|
||||||
c.callSumExianDaDepot(func(params *tSkuSumExianDaDepotParams) (retVal interface{}, errCode string, err error) {
|
c.callSumExianDaDepot(func(params *tSkuSumExianDaDepotParams) (retVal interface{}, errCode string, err error) {
|
||||||
err = cms.SumExianDaDepot(params.Ctx)
|
retVal, err = cms.SumExianDaDepot(params.Ctx, params.IsAsync, params.IsContinueWhenError)
|
||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -461,20 +463,3 @@ func (c *SkuController) CopyEbaiStoreSkusToJx() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title 通过Excel创建饿鲜达商品(必须先要在饿鲜达系统中创建)
|
|
||||||
// @Description 通过Excel创建饿鲜达商品(必须先要在饿鲜达系统中创建)
|
|
||||||
// @Param token header string true "认证token"
|
|
||||||
// @Param isAsync formData bool false "是否异步"
|
|
||||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
|
||||||
// @Success 200 {object} controllers.CallResult
|
|
||||||
// @Failure 200 {object} controllers.CallResult
|
|
||||||
// @router /AddExdSkuByExcel [post]
|
|
||||||
func (c *SkuController) AddExdSkuByExcel() {
|
|
||||||
c.callAddExdSkuByExcel(func(params *tSkuAddExdSkuByExcelParams) (retVal interface{}, errCode string, err error) {
|
|
||||||
// r := c.Ctx.Request
|
|
||||||
// files := r.MultipartForm.File["userfiles"]
|
|
||||||
retVal, err = cms.AddExdSkuByExcel(params.Ctx, params.IsAsync, params.IsContinueWhenError)
|
|
||||||
return retVal, "", err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1224,15 +1224,6 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "AddExdSkuByExcel",
|
|
||||||
Router: `/AddExdSkuByExcel`,
|
|
||||||
AllowHTTPMethods: []string{"post"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "AddSku",
|
Method: "AddSku",
|
||||||
|
|||||||
Reference in New Issue
Block a user