更新2.1.2版本,优化部门、角色权限,增加上下级关系;增加登录、系统、短信日志;优化省市区编码

This commit is contained in:
孟帅
2023-01-25 11:49:21 +08:00
parent 11fad0132d
commit 93e0fe7250
190 changed files with 35896 additions and 7208 deletions

View File

@@ -0,0 +1,43 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/gogf/gf/v2/os/gtime"
"hotgo/internal/dao/internal"
)
// internalSysSmsLogDao is internal type for wrapping internal DAO implements.
type internalSysSmsLogDao = *internal.SysSmsLogDao
// sysSmsLogDao is the data access object for table hg_sys_sms_log.
// You can define custom methods on it to extend its functionality as you wish.
type sysSmsLogDao struct {
internalSysSmsLogDao
}
var (
// SysSmsLog is globally public accessible object for table hg_sys_sms_log operations.
SysSmsLog = sysSmsLogDao{
internal.NewSysSmsLogDao(),
}
)
// Fill with you ideas below.
// NowDayCount 当天发送次数
func (dao *sysSmsLogDao) NowDayCount(ctx context.Context, event, mobile string) (count int, err error) {
count, err = dao.Ctx(ctx).
Where("mobile", mobile).
Where("event", event).
WhereGTE("created_at", gtime.Now().Format("Y-m-d")).
Count()
if err != nil {
return 0, err
}
return
}