- no platform dependency in sync.go

This commit is contained in:
gazebo
2018-10-11 22:17:20 +08:00
parent 02b97909bc
commit 6133998e54
17 changed files with 152 additions and 52 deletions

View File

@@ -3,9 +3,7 @@ package cms
import (
"crypto/md5"
"fmt"
"math"
"strconv"
"time"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler/basesch"
@@ -129,12 +127,3 @@ func UpdatePlace(placeCode int, payload map[string]interface{}, userName string)
func genPicFileName(suffix string) string {
return fmt.Sprintf("%x%s", md5.Sum([]byte(utils.GetUUID()+suffix)), suffix)
}
// 生成一个不重复的临时ID
func genTmpID() int64 {
return time.Now().UnixNano() / 1000000
}
func isFakeVendorThingID(id int64) bool {
return id == 0 || (int(math.Log10(float64(id))) == int(math.Log10(float64(genTmpID()))))
}