- check copyMode for CopyStoreSkus

This commit is contained in:
gazebo
2018-10-15 14:43:11 +08:00
parent 7c9b9e05fe
commit f830c4f151
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
package cms package cms
import ( import (
"fmt"
"strconv" "strconv"
"time" "time"
@@ -391,6 +392,9 @@ func UpdateStoresSkus(storeIDs []int, skuBindInfos []*StoreSkuBindInfo, userName
} }
func CopyStoreSkus(fromStoreID, toStoreID int, copyMode string, params map[string]interface{}, userName string) (num int64, err error) { func CopyStoreSkus(fromStoreID, toStoreID int, copyMode string, params map[string]interface{}, userName string) (num int64, err error) {
if copyMode != CopyStoreSkuModeFresh && copyMode != CopyStoreSkuModeUpdate {
return 0, fmt.Errorf("不支持的拷贝模式:%s", copyMode)
}
db := dao.GetDB() db := dao.GetDB()
sqlCatAndSku := "" sqlCatAndSku := ""
sqlCatAndSkuParams := make([]interface{}, 0) sqlCatAndSkuParams := make([]interface{}, 0)

View File

@@ -75,7 +75,7 @@ func (c *StoreSkuController) UpdateStoreSkus() {
} }
// @Title 同步商家商品信息 // @Title 同步商家商品信息
// @Description 同步商家商品信息,单店模式厂商才支持 // @Description 同步商家商品信息
// @Param token header string true "认证token" // @Param token header string true "认证token"
// @Param storeIDs formData string true "门店ID列表" // @Param storeIDs formData string true "门店ID列表"
// @Param vendorID formData int true "厂商ID" // @Param vendorID formData int true "厂商ID"