Files
bl/modules/config/service/map.go
xinian 3656e43d3c
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat: 添加地图提示接口并修改时间地图请求方法
新增地图提示接口/maptip,同时将/timemap接口的请求方法从POST改为GET
2026-03-01 09:28:00 +08:00

51 lines
1.0 KiB
Go

package service
import (
"blazing/cool"
"blazing/modules/config/model"
)
type MapService struct {
*cool.Service
}
func NewMapService() *MapService {
return &MapService{
&cool.Service{
Model: model.NewMapConfig(),
PageQueryOp: &cool.QueryOp{
KeyWordField: []string{"remake"},
FieldEQ: []string{"map_id"},
},
},
}
}
func (s *MapService) GetData(p1 uint32) (ret *model.MapConfig) {
//cacheKey := strings.Join([]string{fmt.Sprintf("%d", p1), fmt.Sprintf("%d", p2)}, ":")
m := dbm_notenable(s.Model)
m.Where(`map_id`, p1).Scan(&ret)
return
}
func (s *MapService) GetTimeMap() (ret []model.MapConfig) {
//cacheKey := strings.Join([]string{fmt.Sprintf("%d", p1), fmt.Sprintf("%d", p2)}, ":")
m := dbm_notenable(s.Model)
m.Where(`is_time_space`, 1).Scan(&ret)
return
}
func (s *MapService) GetTimeTip() (ret []model.MapConfig) {
//cacheKey := strings.Join([]string{fmt.Sprintf("%d", p1), fmt.Sprintf("%d", p2)}, ":")
m := dbm_notenable(s.Model)
m.Where(`is_time_space`, 1).Scan(&ret)
return
}