mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-12 21:13:45 +08:00
更新2.1.2版本,优化部门、角色权限,增加上下级关系;增加登录、系统、短信日志;优化省市区编码
This commit is contained in:
@@ -31,20 +31,20 @@ var (
|
||||
// Fill with you ideas below.
|
||||
|
||||
// GetRegion 获取省市编码对应的地区名称
|
||||
func (dao *sysProvincesDao) GetRegion(ctx context.Context, province int, city int, spilt ...string) (string, error) {
|
||||
|
||||
func (dao *sysProvincesDao) GetRegion(ctx context.Context, province int64, city int64, spilt ...string) (string, error) {
|
||||
var (
|
||||
provinceName *gvar.Var
|
||||
cityName *gvar.Var
|
||||
err error
|
||||
)
|
||||
// TODO 默认分隔符
|
||||
|
||||
// 分隔符
|
||||
spiltSymbol := "-"
|
||||
if len(spilt) > 0 {
|
||||
spiltSymbol = spilt[0]
|
||||
}
|
||||
|
||||
if province > 0 {
|
||||
if province > 0 && province < 999999 {
|
||||
provinceName, err = dao.Ctx(ctx).Where("id", province).Fields("title").Value()
|
||||
if err != nil {
|
||||
err = gerror.Wrap(err, consts.ErrorORM)
|
||||
|
Reference in New Issue
Block a user