sync: 同步 v1.0.4 并脱敏配置与镜像

This commit is contained in:
MiFaZhan
2026-10-29 14:36:49 +08:00
parent 743e8e6e6e
commit 2206a393f7
516 changed files with 18119 additions and 2253 deletions
@@ -0,0 +1,19 @@
package warningnotify
import (
"context"
"fmt"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/dao"
)
func warningWechatEnabled(ctx context.Context, tenantID string, userID int64) (bool, error) {
var preference *struct {
Value string `orm:"config_value"`
}
err := dao.SysConfig.Ctx(ctx).Fields("config_value").Where("tenant_id", tenantID).
Where("config_key", fmt.Sprintf("app.wechat.warning.enabled.%d", userID)).OrderDesc("config_id").Scan(&preference)
if err != nil {
return false, err
}
return preference == nil || preference.Value == "1", nil
}