This commit is contained in:
邹宗楠
2022-10-06 17:01:49 +08:00
parent f7d5acd442
commit 1b0fccd598
5 changed files with 93 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package model
import (
"strings"
"time"
"git.rosy.net.cn/baseapi/utils"
@@ -427,6 +428,22 @@ func (s *Store) SetOpTime(opTimeList []int16) {
}
}
// 抖音营业时间转本地营业时间,时间模式全部统一成本地
func (s *Store) SetTiktokOpenTime(openTime string) {
openTimeList := strings.Split(openTime, " ")
for i := 0; i < len(openTimeList); i++ {
if i == 0 {
open := strings.Split(openTimeList[0], "-")
s.OpenTime1, s.CloseTime1 = utils.Str2Int16(strings.ReplaceAll(open[0], ":", "")), utils.Str2Int16(strings.ReplaceAll(open[1], ":", ""))
}
if i == 1 {
open := strings.Split(openTimeList[1], "-")
s.OpenTime2, s.CloseTime2 = utils.Str2Int16(strings.ReplaceAll(open[0], ":", "")), utils.Str2Int16(strings.ReplaceAll(open[1], ":", ""))
}
}
}
type StoreSub struct {
ModelIDCULD