对比京西和平台商品差异
This commit is contained in:
277
business/jxstore/cms/store_sku_check.go
Normal file
277
business/jxstore/cms/store_sku_check.go
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
package cms
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
|
"git.rosy.net.cn/baseapi"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/excel"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
diffFileName = "export/京西和平台商品差异.xlsx"
|
||||||
|
)
|
||||||
|
var (
|
||||||
|
vendorNameList = map[int]string {
|
||||||
|
// model.VendorIDMTWM: "美团",
|
||||||
|
// model.VendorIDEBAI: "饿百",
|
||||||
|
model.VendorIDJD: "京东",
|
||||||
|
}
|
||||||
|
titleList = []string {
|
||||||
|
"京西门店ID",
|
||||||
|
"平台门店ID",
|
||||||
|
"门店名",
|
||||||
|
"京西商品名",
|
||||||
|
"平台商品名",
|
||||||
|
"京西可售状态",
|
||||||
|
"平台可售状态",
|
||||||
|
}
|
||||||
|
diffData map[int][]DiffData
|
||||||
|
JdAllSkuInfoMap map[int]*partner.SkuNameInfo
|
||||||
|
)
|
||||||
|
|
||||||
|
type DiffData struct {
|
||||||
|
JxStoreID string `json:"京西门店ID"`
|
||||||
|
VendorStoreID string `json:"平台门店ID"`
|
||||||
|
VendorStoreName string `json:"门店名"`
|
||||||
|
JxSkuName string `json:"京西商品名"`
|
||||||
|
VendorSkuName string `json:"平台商品名"`
|
||||||
|
JxStatus string `json:"京西可售状态"`
|
||||||
|
VendorStatus string `json:"平台可售状态"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetFilterJxSkuInfoMap(jxSkuInfoList []*StoreSkuNameExt) map[int]*StoreSkuNameExt {
|
||||||
|
filterJxSkuInfoMap := make(map[int]*StoreSkuNameExt)
|
||||||
|
for _, value := range jxSkuInfoList {
|
||||||
|
for _, skuInfo := range value.Skus2 {
|
||||||
|
filterJxSkuInfoMap[skuInfo.SkuID] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return filterJxSkuInfoMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetFilterVendorSkuInfoMap(vendorSkuInfoList []*partner.SkuNameInfo) map[int]*partner.SkuNameInfo {
|
||||||
|
filterVendorSkuInfoMap := make(map[int]*partner.SkuNameInfo)
|
||||||
|
for _, value := range vendorSkuInfoList {
|
||||||
|
for _, skuInfo := range value.SkuList {
|
||||||
|
filterVendorSkuInfoMap[skuInfo.SkuID] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return filterVendorSkuInfoMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetFilterJdSkuInfoMap(jdSkuInfoList []*partner.StoreSkuInfo) map[int]*partner.StoreSkuInfo {
|
||||||
|
filterJdSkuInfoMap := make(map[int]*partner.StoreSkuInfo)
|
||||||
|
for _, value := range jdSkuInfoList {
|
||||||
|
filterJdSkuInfoMap[value.SkuID] = value
|
||||||
|
}
|
||||||
|
|
||||||
|
return filterJdSkuInfoMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetJdAllSkuInfoMap() map[int]*partner.SkuNameInfo {
|
||||||
|
if JdAllSkuInfoMap == nil {
|
||||||
|
JdAllSkuInfoMap = make(map[int]*partner.SkuNameInfo)
|
||||||
|
ctx := jxcontext.AdminCtx
|
||||||
|
vendorID := model.VendorIDJD
|
||||||
|
if multiHandler, ok := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IMultipleStoresHandler); ok {
|
||||||
|
jdAllSkuInfoList, err := multiHandler.GetSkus(ctx, 0, "", "")
|
||||||
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Errorf("GetJdAllSkuInfoMap error:%v", err)
|
||||||
|
} else {
|
||||||
|
for _, value := range jdAllSkuInfoList {
|
||||||
|
for _, skuInfo := range value.SkuList {
|
||||||
|
JdAllSkuInfoMap[skuInfo.SkuID] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JdAllSkuInfoMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSkuStatusName(status int) string {
|
||||||
|
if status == 1 {
|
||||||
|
return "可售"
|
||||||
|
} else {
|
||||||
|
return "不可售"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func CompareJxAndJd(vendorID int, storeIDStr, vendorStoreID, storeName string,
|
||||||
|
filterJxSkuInfoMap map[int]*StoreSkuNameExt,
|
||||||
|
filterJdSkuInfoMap map[int]*partner.StoreSkuInfo) {
|
||||||
|
JdAllSkuInfoMap := GetJdAllSkuInfoMap()
|
||||||
|
for skuID, jxSkuInfo := range filterJxSkuInfoMap {
|
||||||
|
jxSkuDetailName := jxutils.ComposeSkuName(jxSkuInfo.SkuName.Prefix, jxSkuInfo.SkuName.Name, "", jxSkuInfo.SkuName.Unit, jxSkuInfo.SkuName.SpecQuality, jxSkuInfo.SkuName.SpecUnit, 0)
|
||||||
|
jxSkuStatusName := GetSkuStatusName(jxSkuInfo.Skus2[0].SkuStatus)
|
||||||
|
|
||||||
|
vendorSkuInfo := filterJdSkuInfoMap[skuID]
|
||||||
|
if vendorSkuInfo != nil {
|
||||||
|
vendorSkuInfo := JdAllSkuInfoMap[vendorSkuInfo.SkuID]
|
||||||
|
vendorSkuDetailName := vendorSkuInfo.SkuList[0].SkuName
|
||||||
|
vendorSkuStatusName := GetSkuStatusName(vendorSkuInfo.SkuList[0].Status)
|
||||||
|
if jxSkuStatusName != vendorSkuStatusName || jxSkuDetailName != vendorSkuDetailName {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, jxSkuDetailName, vendorSkuDetailName, jxSkuStatusName, jxSkuStatusName}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, jxSkuDetailName, "", jxSkuStatusName, ""}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for skuID, _ := range filterJdSkuInfoMap {
|
||||||
|
vendorSkuInfo := JdAllSkuInfoMap[skuID]
|
||||||
|
vendorSkuDetailName := vendorSkuInfo.SkuList[0].SkuName
|
||||||
|
vendorSkuStatusName := GetSkuStatusName(vendorSkuInfo.SkuList[0].Status)
|
||||||
|
|
||||||
|
jxSkuInfo := filterJxSkuInfoMap[skuID]
|
||||||
|
if jxSkuInfo != nil {
|
||||||
|
jxSkuDetailName := jxutils.ComposeSkuName(jxSkuInfo.SkuName.Prefix, jxSkuInfo.SkuName.Name, "", jxSkuInfo.SkuName.Unit, jxSkuInfo.SkuName.SpecQuality, jxSkuInfo.SkuName.SpecUnit, 0)
|
||||||
|
jxSkuStatusName := GetSkuStatusName(jxSkuInfo.Skus2[0].SkuStatus)
|
||||||
|
if jxSkuStatusName != vendorSkuStatusName || jxSkuDetailName != vendorSkuDetailName {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, jxSkuDetailName, vendorSkuDetailName, jxSkuStatusName, jxSkuStatusName}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, vendorSkuDetailName, "", vendorSkuStatusName, ""}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName string,
|
||||||
|
filterJxSkuInfoMap map[int]*StoreSkuNameExt,
|
||||||
|
filterVendorSkuInfoMap map[int]*partner.SkuNameInfo) {
|
||||||
|
for skuID, jxSkuInfo := range filterJxSkuInfoMap {
|
||||||
|
jxSkuDetailName := jxutils.ComposeSkuName(jxSkuInfo.SkuName.Prefix, jxSkuInfo.SkuName.Name, "", jxSkuInfo.SkuName.Unit, jxSkuInfo.SkuName.SpecQuality, jxSkuInfo.SkuName.SpecUnit, 0)
|
||||||
|
jxSkuStatusName := GetSkuStatusName(jxSkuInfo.Skus2[0].SkuStatus)
|
||||||
|
|
||||||
|
vendorSkuInfo := filterVendorSkuInfoMap[skuID]
|
||||||
|
if vendorSkuInfo != nil {
|
||||||
|
vendorSkuDetailName := vendorSkuInfo.SkuList[0].SkuName
|
||||||
|
vendorSkuStatusName := GetSkuStatusName(vendorSkuInfo.SkuList[0].Status)
|
||||||
|
if jxSkuStatusName != vendorSkuStatusName || jxSkuDetailName != vendorSkuDetailName {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, jxSkuDetailName, vendorSkuDetailName, jxSkuStatusName, jxSkuStatusName}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, jxSkuDetailName, "", jxSkuStatusName, ""}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for skuID, vendorSkuInfo := range filterVendorSkuInfoMap {
|
||||||
|
vendorSkuDetailName := vendorSkuInfo.SkuList[0].SkuName
|
||||||
|
vendorSkuStatusName := GetSkuStatusName(vendorSkuInfo.SkuList[0].Status)
|
||||||
|
|
||||||
|
jxSkuInfo := filterJxSkuInfoMap[skuID]
|
||||||
|
if jxSkuInfo != nil {
|
||||||
|
jxSkuDetailName := jxutils.ComposeSkuName(jxSkuInfo.SkuName.Prefix, jxSkuInfo.SkuName.Name, "", jxSkuInfo.SkuName.Unit, jxSkuInfo.SkuName.SpecQuality, jxSkuInfo.SkuName.SpecUnit, 0)
|
||||||
|
jxSkuStatusName := GetSkuStatusName(jxSkuInfo.Skus2[0].SkuStatus)
|
||||||
|
if jxSkuStatusName != vendorSkuStatusName || jxSkuDetailName != vendorSkuDetailName {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, jxSkuDetailName, vendorSkuDetailName, jxSkuStatusName, jxSkuStatusName}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, vendorSkuDetailName, "", vendorSkuStatusName, ""}
|
||||||
|
diffData[vendorID] = append(diffData[vendorID], outPutData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func CheckSkuDiffBetweenJxAndVendor() {
|
||||||
|
startProcessTime := time.Now().Unix()
|
||||||
|
baseapi.SugarLogger.Debugf("CheckSkuDiffBetweenJxAndVendor start time: %v", time.Now())
|
||||||
|
ctx := jxcontext.AdminCtx
|
||||||
|
jxStoreInfoList, err := GetStores(ctx, "", map[string]interface{}{}, 0, -1, utils.DefaultTimeValue, utils.DefaultTimeValue, 0, 0)
|
||||||
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Errorf("CheckSkuDiffBetweenJxAndVendor GetStores error:%v", err)
|
||||||
|
} else {
|
||||||
|
diffData = make(map[int][]DiffData)
|
||||||
|
taskFunc := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
|
jxStoreInfoListValue := batchItemList[0].(*StoreExt)
|
||||||
|
storeID := jxStoreInfoListValue.ID
|
||||||
|
storeIDStr := utils.Int2Str(storeID)
|
||||||
|
storeName := jxStoreInfoListValue.Name
|
||||||
|
if jxStoreInfoListValue.StoreMaps != nil {
|
||||||
|
jxSkuInfoData, _ := GetStoreSkus(ctx, storeID, []int{}, true, "", true, map[string]interface{}{}, 0, -1)
|
||||||
|
filterJxSkuInfoMap := GetFilterJxSkuInfoMap(jxSkuInfoData.SkuNames)
|
||||||
|
for _, vendorListValue := range jxStoreInfoListValue.StoreMaps {
|
||||||
|
vendorID := int(utils.MustInterface2Int64(vendorListValue["vendorID"]))
|
||||||
|
if _, ok := vendorNameList[vendorID]; ok {
|
||||||
|
vendorStoreID := utils.Interface2String(vendorListValue["vendorStoreID"])
|
||||||
|
baseapi.SugarLogger.Debugf("CheckSkuDiffBetweenJxAndVendor storeID:%d vendorID:%d vendorStoreID:%s vendorListValue:%v", storeID, vendorID, vendorStoreID, vendorListValue)
|
||||||
|
|
||||||
|
if vendorID == model.VendorIDJD {
|
||||||
|
singleStoreHandler := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.ISingleStoreStoreSkuHandler)
|
||||||
|
jdSkuInfoList, err := singleStoreHandler.GetStoreSkusBareInfo(ctx, nil, storeID, vendorStoreID, nil)
|
||||||
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Errorf("CheckSkuDiffBetweenJxAndVendor GetStoreSkusBareInfo error:%v", err)
|
||||||
|
} else if len(jdSkuInfoList) > 0 {
|
||||||
|
filterJdSkuInfoMap := GetFilterJdSkuInfoMap(jdSkuInfoList)
|
||||||
|
CompareJxAndJd(vendorID, storeIDStr, vendorStoreID, storeName, filterJxSkuInfoMap, filterJdSkuInfoMap)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
singleStoreHandler := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.ISingleStoreStoreSkuHandler)
|
||||||
|
vendorSkuInfoList, err := singleStoreHandler.GetStoreSkusFullInfo(ctx, nil, storeID, vendorStoreID, nil)
|
||||||
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Errorf("CheckSkuDiffBetweenJxAndVendor GetStoreSkusFullInfo error:%v", err)
|
||||||
|
} else if len(vendorSkuInfoList) > 0 {
|
||||||
|
filterVendorSkuInfoMap := GetFilterVendorSkuInfoMap(vendorSkuInfoList)
|
||||||
|
CompareJxAndVendor(vendorID, storeIDStr, vendorStoreID, storeName, filterJxSkuInfoMap, filterVendorSkuInfoMap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retVal, err
|
||||||
|
}
|
||||||
|
task := tasksch.NewParallelTask("CheckSkuDiffBetweenJxAndVendor", nil, ctx, taskFunc, jxStoreInfoList.Stores)
|
||||||
|
tasksch.HandleTask(task, nil, false).Run()
|
||||||
|
_, err = task.GetResult(0)
|
||||||
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Debugf("CheckSkuDiffBetweenJxAndVendor tasksch error:%v", err)
|
||||||
|
}
|
||||||
|
WriteToExcel(diffData)
|
||||||
|
endProcessTime := time.Now().Unix()
|
||||||
|
diff := endProcessTime - startProcessTime
|
||||||
|
baseapi.SugarLogger.Debugf("CheckSkuDiffBetweenJxAndVendor end time: %v", time.Now())
|
||||||
|
baseapi.SugarLogger.Debugf("CheckSkuDiffBetweenJxAndVendor cost time: %d sec", diff)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func WriteToExcel(data map[int][]DiffData) {
|
||||||
|
var sheetList []*excel.Obj2ExcelSheetConfig
|
||||||
|
for key, value := range data {
|
||||||
|
sheetName := vendorNameList[key]
|
||||||
|
excelConf := &excel.Obj2ExcelSheetConfig{
|
||||||
|
Title: sheetName,
|
||||||
|
Data: value,
|
||||||
|
CaptionList: titleList,
|
||||||
|
}
|
||||||
|
sheetList = append(sheetList, excelConf)
|
||||||
|
baseapi.SugarLogger.Debugf("WriteToExcel:append:%s count:%d", sheetName, len(value))
|
||||||
|
}
|
||||||
|
if len(sheetList) > 0 {
|
||||||
|
excelBin := excel.Obj2Excel(sheetList)
|
||||||
|
err := jxutils.WriteFile(diffFileName, excelBin)
|
||||||
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Errorf("WriteToExcel:save %s failed, error %v", diffFileName, err)
|
||||||
|
} else {
|
||||||
|
baseapi.SugarLogger.Debugf("WriteToExcel:save %s success", diffFileName)
|
||||||
|
downloadURL, err := jxutils.UploadExportContent(excelBin, diffFileName)
|
||||||
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Errorf("WriteToExcel:upload %s failed error:%v", diffFileName, err)
|
||||||
|
} else {
|
||||||
|
baseapi.SugarLogger.Debugf("WriteToExcel:upload %s success, downloadURL:%s", diffFileName, downloadURL)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
33
business/jxstore/cms/store_sku_check_test.go
Normal file
33
business/jxstore/cms/store_sku_check_test.go
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
package cms
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestCheckSkuDiffBetweenJxAndVendor(t *testing.T) {
|
||||||
|
CheckSkuDiffBetweenJxAndVendor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestTestExcel(t *testing.T) {
|
||||||
|
data1 := []DiffData{
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
}
|
||||||
|
data2 := []DiffData{
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
}
|
||||||
|
data3 := []DiffData{
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
DiffData{"1", "1211", "aaa", "apple", "banna", "1", "0"},
|
||||||
|
}
|
||||||
|
data := map[int][]DiffData{
|
||||||
|
0: data1,
|
||||||
|
1: data2,
|
||||||
|
3: data3,
|
||||||
|
}
|
||||||
|
WriteToExcel(data)
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
"io/ioutil"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/autonavi"
|
"git.rosy.net.cn/baseapi/platformapi/autonavi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
@@ -641,3 +642,8 @@ func GetEbaiOrderGetCode(order *model.GoodsOrder) (getCode string) {
|
|||||||
}
|
}
|
||||||
return getCode
|
return getCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func WriteFile(fileName string, binData []byte) error {
|
||||||
|
err := ioutil.WriteFile(fileName, binData, 0666)
|
||||||
|
return err
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TempOpController struct {
|
type TempOpController struct {
|
||||||
@@ -276,7 +277,7 @@ func (c *TempOpController) TestIt() {
|
|||||||
// @Title 开启或结束所有平台商店的额外时间
|
// @Title 开启或结束所有平台商店的额外时间
|
||||||
// @Description 开启或结束所有平台商店的额外时间,并且修改所有商品库存为0或99999(开启:0 , 结束:99999)
|
// @Description 开启或结束所有平台商店的额外时间,并且修改所有商品库存为0或99999(开启:0 , 结束:99999)
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
// @Param startOrEndStore query bool true "开启或结束"
|
// @Param isStart query bool true "开启或结束门店"
|
||||||
// @Param startTime query int false "开始营业时间(格式:930代表早上9点30分)"
|
// @Param startTime query int false "开始营业时间(格式:930代表早上9点30分)"
|
||||||
// @Param endTime query int false "结束营业时间"
|
// @Param endTime query int false "结束营业时间"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
@@ -284,7 +285,20 @@ func (c *TempOpController) TestIt() {
|
|||||||
// @router /TestStartOrEndOpStore [get]
|
// @router /TestStartOrEndOpStore [get]
|
||||||
func (c *TempOpController) TestStartOrEndOpStore() {
|
func (c *TempOpController) TestStartOrEndOpStore() {
|
||||||
c.callTestStartOrEndOpStore(func(params *tTempopTestStartOrEndOpStoreParams) (retVal interface{}, errCode string, err error) {
|
c.callTestStartOrEndOpStore(func(params *tTempopTestStartOrEndOpStoreParams) (retVal interface{}, errCode string, err error) {
|
||||||
misc.StartOrEndOpStore(params.StartOrEndStore, int16(params.StartTime), int16(params.EndTime))
|
misc.StartOrEndOpStore(params.IsStart, int16(params.StartTime), int16(params.EndTime))
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Title 京西平台和其他平台商品的对比
|
||||||
|
// @Description 京西平台和其他平台商品的对比
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /CheckSkuDiffBetweenJxAndVendor [get]
|
||||||
|
func (c *TempOpController) CheckSkuDiffBetweenJxAndVendor() {
|
||||||
|
c.callCheckSkuDiffBetweenJxAndVendor(func(params *tTempopCheckSkuDiffBetweenJxAndVendorParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
cms.CheckSkuDiffBetweenJxAndVendor()
|
||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1654,6 +1654,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "CheckSkuDiffBetweenJxAndVendor",
|
||||||
|
Router: `/CheckSkuDiffBetweenJxAndVendor`,
|
||||||
|
AllowHTTPMethods: []string{"get"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "PrintMsg",
|
Method: "PrintMsg",
|
||||||
|
|||||||
Reference in New Issue
Block a user