This commit is contained in:
孟帅
2023-04-10 15:31:08 +08:00
parent 075a12ce7e
commit 9ac036a542
35 changed files with 506 additions and 143 deletions

View File

@@ -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"`
}
///////////// 以下是本地配置

View File

@@ -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 {