修改细节

This commit is contained in:
Rosy-zhudan
2019-09-17 10:32:49 +08:00
parent 6199a2e714
commit 957db04544
3 changed files with 25 additions and 32 deletions

View File

@@ -2,9 +2,10 @@ package misc
import (
"testing"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
)
func TestStartOrEndOpStore(t *testing.T) {
StartOrEndOpStore(jxcontext.AdminCtx, true, []int{}, []int{}, 0, 0, false, true)
StartOrEndOpStore(jxcontext.AdminCtx, true, nil, nil, 0, 0, false, true)
}

View File

@@ -657,10 +657,9 @@ func ScheduleScoreStore() {
func CheckScoreStore() {
if !isScoring {
curTime := time.Now()
year, month, day := curTime.Date()
checkTimeStr1 := fmt.Sprintf("%d-%d-%d "+scoreStoreTimeList[0], year, int(month), day)
checkTimeStr1 := fmt.Sprintf("%s %s", utils.Time2DateStr(curTime), scoreStoreTimeList[0])
checkTime1 := utils.Str2Time(checkTimeStr1)
checkTimeStr2 := fmt.Sprintf("%d-%d-%d "+scoreStoreCheckTimeEnd, year, int(month), day)
checkTimeStr2 := fmt.Sprintf("%s %s", utils.Time2DateStr(curTime), scoreStoreCheckTimeEnd)
checkTime2 := utils.Str2Time(checkTimeStr2)
if curTime.Unix() >= checkTime1.Unix() && curTime.Unix() <= checkTime2.Unix() {
db := dao.GetDB()