根据Excel更新京西价
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
"unicode"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -555,15 +554,6 @@ func GetWeiMobGoodsList(param *weimobapi.QueryGoodsListParam) (goodsList []*weim
|
||||
return goodsList, err
|
||||
}
|
||||
|
||||
func IsChineseChar(str string) bool {
|
||||
for _, r := range str {
|
||||
if unicode.Is(unicode.Scripts["Han"], r) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func GetCellIntoMap(sheetParam *SheetParam, skuMap map[string]*ExcelParam, row []string, sheetName string, rowNum int) (errMsg string) {
|
||||
var (
|
||||
skuID string
|
||||
@@ -613,10 +603,8 @@ func GetCellIntoMap(sheetParam *SheetParam, skuMap map[string]*ExcelParam, row [
|
||||
}
|
||||
if rowNum >= sheetParam.SkuRow {
|
||||
if rowNum == sheetParam.SkuRow {
|
||||
if IsChineseChar(skuID) {
|
||||
if IsChineseChar(skuID) {
|
||||
errMsg += fmt.Sprintf("sheet页:[%v],Excel排版发生变化!第[%v]行附近可能增加了一行,请确认!", sheetName, rowNum)
|
||||
}
|
||||
if cms.IsChineseChar(skuID) {
|
||||
errMsg += fmt.Sprintf("sheet页:[%v],Excel排版发生变化!第[%v]行附近可能增加了一行,请确认!", sheetName, rowNum)
|
||||
}
|
||||
}
|
||||
if len(skuMap) > 0 {
|
||||
@@ -649,7 +637,7 @@ func GetCellIntoMap(sheetParam *SheetParam, skuMap map[string]*ExcelParam, row [
|
||||
delete(skuMap, "")
|
||||
} else {
|
||||
for i := rowNum; i < sheetParam.SkuRow; i++ {
|
||||
if !IsChineseChar(skuID) {
|
||||
if !cms.IsChineseChar(skuID) {
|
||||
errMsg += fmt.Sprintf("sheet页:[%v],Excel排版发生变化!第[%v]行附近可能减少了一行,请确认!", sheetName, rowNum)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user