github.com/SupenBysz/gf-admin-community@v0.7.4/sys_service/sys_area.go (about) 1 // ================================================================================ 2 // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 // You can delete these comments if you wish manually maintain this interface file. 4 // ================================================================================ 5 6 package sys_service 7 8 import ( 9 "context" 10 11 "github.com/SupenBysz/gf-admin-community/sys_model" 12 "github.com/SupenBysz/gf-admin-community/sys_model/sys_entity" 13 ) 14 15 type ( 16 IArea interface { 17 // GetAreaListByParentId 获取属于父级ID的地区列表 18 GetAreaListByParentId(ctx context.Context, parentId int64) (*sys_model.AreaListRes, error) 19 // GetAreaById 根据ID获取区域信息 20 GetAreaById(ctx context.Context, id int64) *sys_entity.SysArea 21 // GetAreaByCode 根据区域编号获取区域信息 22 GetAreaByCode(ctx context.Context, areaCode string) *sys_entity.SysArea 23 // GetAreaByName 根据区域名称获取区域信息 24 GetAreaByName(ctx context.Context, areaName string) *sys_entity.SysArea 25 } 26 ) 27 28 var ( 29 localArea IArea 30 ) 31 32 func Area() IArea { 33 if localArea == nil { 34 panic("implement not found for interface IArea, forgot register?") 35 } 36 return localArea 37 } 38 39 func RegisterArea(i IArea) { 40 localArea = i 41 }