切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
9a2aa1d955a0b9554accb2c592772fa5ef87e817
1 个父辈
a3679b07
调整短信消息提醒
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
14 行删除
pkg/application/notify/sms.go
pkg/application/notify/sms_confirm_evaluation_score.go
pkg/application/notify/sms.go
查看文件 @
9a2aa1d
...
...
@@ -115,6 +115,7 @@ func (notices *notifySms) checkSendSms() error {
"status"
:
string
(
domain
.
SmsWait
),
"executeAtBegin"
:
nowDay
,
"executeAtEnd"
:
nowTime
,
"limit"
:
1000
,
})
if
err
!=
nil
{
return
err
...
...
pkg/application/notify/sms_confirm_evaluation_score.go
查看文件 @
9a2aa1d
...
...
@@ -90,23 +90,18 @@ func (notices notifyConfirmEvaluationScore) ifSend(index int) (bool, error) {
}
// 输入的时间为基础微调短信的执行时间
// 适配规则 :(23:00-7:00期间不提醒)
// 适配规则 :
每隔6个小时进行提醒
(23:00-7:00期间不提醒)
func
(
notices
notifyConfirmEvaluationScore
)
getTimeExecuteAt
(
nowTime
time
.
Time
)
time
.
Time
{
nowHour
:=
nowTime
.
Local
()
.
Hour
()
if
nowHour
<
23
&&
nowHour
>
7
{
if
nowHour
<
23
&&
nowHour
>
=
7
{
return
nowTime
}
year
,
month
,
day
:=
nowTime
.
Local
()
.
Date
()
//微调执行时间
if
nowHour
>=
23
{
//第二天:7:00
t1
:=
time
.
Date
(
year
,
month
,
day
,
23
,
59
,
59
,
0
,
time
.
Local
)
return
t1
.
Add
(
7
*
time
.
Hour
)
t1
:=
nowTime
.
Add
(
6
*
time
.
Hour
)
hour1
:=
t1
.
Local
()
.
Hour
()
if
hour1
<
23
&&
hour1
>=
7
{
return
t1
}
if
nowHour
<=
7
{
//当天 7:00
t1
:=
time
.
Date
(
year
,
month
,
day
,
0
,
0
,
0
,
0
,
time
.
Local
)
return
t1
.
Add
(
7
*
time
.
Hour
)
}
return
nowTime
return
t1
.
Add
(
6
*
time
.
Hour
)
}
...
...
请
注册
或
登录
后发表评论