fix: adjustment directory structure

This commit is contained in:
zhangsz
2025-03-25 09:46:16 +08:00
parent e9b29a109d
commit 63ec6e5b14
167 changed files with 374 additions and 21127 deletions

30
proxy/Nredis/holiday.go Normal file
View File

@@ -0,0 +1,30 @@
package Nredis
import (
l4g "proxy/logger"
"strconv"
)
func SetHdId2TariffId(id int, tariffId int) bool {
err := rdb.Set(ctx, "HdId:"+strconv.Itoa(id), strconv.Itoa(tariffId), 0).Err()
if err != nil {
l4g.RedisLog.Errorf("Set HdId:%d %s, err: %v", id, strconv.Itoa(tariffId), err)
return false
} else {
l4g.RedisLog.Infof("Set HdId:%d %s", id, tariffId)
return true
}
}
func GetTariffIdByHdId(id int) string {
var tariffIdStr string
var err error
tariffIdStr, err = rdb.Get(ctx, "HdId:"+strconv.Itoa(id)).Result()
if err != nil {
return ""
} else {
return tariffIdStr
}
}