mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-26 16:46:14 +08:00
This commit is contained in:
@@ -101,10 +101,18 @@ type SmsConfig struct {
|
||||
SmsMaxIpLimit int `json:"smsMaxIpLimit"`
|
||||
SmsCodeExpire int `json:"smsCodeExpire"`
|
||||
// 阿里云
|
||||
SmsAliyunAccessKeyID string `json:"smsAliyunAccessKeyID"`
|
||||
SmsAliyunAccessKeySecret string `json:"smsAliyunAccessKeySecret"`
|
||||
SmsAliyunSign string `json:"smsAliyunSign"`
|
||||
SmsAliyunTemplate []*SmsTemplate `json:"smsAliyunTemplate"`
|
||||
AliYunAccessKeyID string `json:"smsAliYunAccessKeyID"`
|
||||
AliYunAccessKeySecret string `json:"smsAliYunAccessKeySecret"`
|
||||
AliYunSign string `json:"smsAliYunSign"`
|
||||
AliYunTemplate []*SmsTemplate `json:"smsAliYunTemplate"`
|
||||
// 腾讯云
|
||||
TencentSecretId string `json:"smsTencentSecretId"`
|
||||
TencentSecretKey string `json:"smsTencentSecretKey"`
|
||||
TencentEndpoint string `json:"smsTencentEndpoint"`
|
||||
TencentRegion string `json:"smsTencentRegion"`
|
||||
TencentAppId string `json:"smsTencentAppId"`
|
||||
TencentSign string `json:"smsTencentSign"`
|
||||
TencentTemplate []*SmsTemplate `json:"smsTencentTemplate"`
|
||||
}
|
||||
|
||||
///////////// 以下是本地配置
|
||||
|
@@ -3,10 +3,12 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
@@ -46,8 +48,20 @@ type SmsLogListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Title string
|
||||
Content string
|
||||
Mobile string
|
||||
Ip string
|
||||
Event string
|
||||
}
|
||||
|
||||
func (in *SmsLogListInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Event != "" {
|
||||
_, ok := consts.SmsTemplateEventMap[in.Event]
|
||||
if !ok {
|
||||
err = gerror.Newf("无效的事件类型:%v", in.Event)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type SmsLogListModel struct {
|
||||
|
Reference in New Issue
Block a user