| 123456789101112131415161718192021222324 |
- package base
- import (
- "context"
- "dashoo.cn/common_definition/comm_def"
- "github.com/gogf/gf/frame/g"
- server "dashoo.cn/micro/app/service/base"
- )
- type DistrictHandler struct{}
- //GetList 区域列表
- func (d *DistrictHandler) GetList(ctx context.Context, req *comm_def.IdReq, rsp *comm_def.CommonMsg) error {
- districtServer, err := server.NewDistrictService(ctx)
- if err != nil {
- g.Log().Error(err)
- return err
- }
- list := districtServer.ListToTree(int(req.Id))
- rsp.Data = g.Map{"list": list}
- return nil
- }
|