- 整理partner.ReadStore
This commit is contained in:
@@ -113,23 +113,21 @@ func rangeJX2Mtwm(coords string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func openTimeMtwm2JX(vendorOpenTime string) [][2]int16 {
|
||||
func openTimeMtwm2JX(vendorOpenTime string) (opTimeList []int16) {
|
||||
timePairs := strings.Split(vendorOpenTime, ",")
|
||||
jxOpenTimers := make([][2]int16, len(timePairs))
|
||||
for k, v := range timePairs {
|
||||
for _, v := range timePairs {
|
||||
times := strings.Split(v, "-")
|
||||
jxOpenTimers[k][0] = jxutils.StrTime2JxOperationTime(times[0], 700)
|
||||
jxOpenTimers[k][1] = jxutils.StrTime2JxOperationTime(times[1], 2000)
|
||||
opTimeList = append(opTimeList, jxutils.StrTime2JxOperationTime(times[0]+":00", 700), jxutils.StrTime2JxOperationTime(times[1]+":00", 2000))
|
||||
}
|
||||
return jxOpenTimers
|
||||
return opTimeList
|
||||
}
|
||||
|
||||
func openTimeJX2Mtwm(times []int16) string {
|
||||
timesLen := len(times) / 2 * 2
|
||||
func openTimeJX2Mtwm(opTimeList []int16) string {
|
||||
timesLen := len(opTimeList) / 2 * 2
|
||||
var strPairs []string
|
||||
for i := 0; i < timesLen; i += 2 {
|
||||
if times[i] != 0 {
|
||||
strPairs = append(strPairs, jxutils.JxOperationTime2StrTime(times[i])+"-"+jxutils.JxOperationTime2StrTime(times[i+1]))
|
||||
if opTimeList[i] != 0 {
|
||||
strPairs = append(strPairs, jxutils.JxOperationTime2StrTime(opTimeList[i])+"-"+jxutils.JxOperationTime2StrTime(opTimeList[i+1]))
|
||||
} else {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user