liche update for admin sys addr unrepeat at county
This commit is contained in:
@@ -169,7 +169,10 @@ class Addr extends HD_Controller{
|
||||
return $this->show_json(SYS_CODE_FAIL, '请选行政区');
|
||||
}
|
||||
|
||||
$where = array("title like '{$title}'" => null);
|
||||
$where = array(
|
||||
"title like '{$title}'" => null,
|
||||
'county_id' => $county_id
|
||||
);
|
||||
$count = $this->addr_model->count($where);
|
||||
if($count>0){
|
||||
return $this->show_json(SYS_CODE_FAIL, '地址已存在');
|
||||
@@ -217,7 +220,11 @@ class Addr extends HD_Controller{
|
||||
return $this->show_json(SYS_CODE_FAIL, '请选行政区');
|
||||
}
|
||||
|
||||
$where = array("title like '{$title}'" => null, "id<>{$info['id']}" => null);
|
||||
$where = array(
|
||||
"title like '{$title}'" => null,
|
||||
"id<>{$info['id']}" => null,
|
||||
'county_id' => $county_id
|
||||
);
|
||||
$count = $this->addr_model->count($where);
|
||||
if($count>0){
|
||||
return $this->show_json(SYS_CODE_FAIL, '地址已存在');
|
||||
|
||||
Reference in New Issue
Block a user