3
This commit is contained in:
parent
453c6c16b7
commit
bce2afc8a7
@ -38,6 +38,10 @@ func (r *AreaService) AddArea(req requests.AddArea) (bool, string, error) {
|
|||||||
return false, "", errors.New("上级地区错误")
|
return false, "", errors.New("上级地区错误")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(req.AreaId) > 6 {
|
||||||
|
return false, "", errors.New("请输入正确地区编码")
|
||||||
|
}
|
||||||
|
|
||||||
// 检测编码是否重复
|
// 检测编码是否重复
|
||||||
maps = make(map[string]interface{})
|
maps = make(map[string]interface{})
|
||||||
maps["area_id"] = req.AreaId
|
maps["area_id"] = req.AreaId
|
||||||
@ -94,6 +98,10 @@ func (r *AreaService) PutArea(areaId int, req requests.PutArea) (bool, error) {
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(req.AreaId) > 6 {
|
||||||
|
return false, errors.New("请输入正确地区编码")
|
||||||
|
}
|
||||||
|
|
||||||
// 检测编码是否重复
|
// 检测编码是否重复
|
||||||
maps := make(map[string]interface{})
|
maps := make(map[string]interface{})
|
||||||
maps["area_id"] = req.AreaId
|
maps["area_id"] = req.AreaId
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user