|
|
|
@ -93,7 +93,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
$map['company_name'] = $company_name;
|
|
|
|
|
$res = $model->where($map)->getField('id');
|
|
|
|
|
if ($res) {
|
|
|
|
|
$this->error('合作方已存在');
|
|
|
|
|
$this->error('推广公司已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$time = time();
|
|
|
|
@ -128,7 +128,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
$id = intval(I('post.id', 0));
|
|
|
|
|
|
|
|
|
|
if (empty($company_name)) {
|
|
|
|
|
$this->error('请输入合作方名称');
|
|
|
|
|
$this->error('请输入推广公司名称');
|
|
|
|
|
}
|
|
|
|
|
if (!in_array($status, [0, 1]) || $id == 0) {
|
|
|
|
|
$this->error('参数异常');
|
|
|
|
@ -142,7 +142,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
$map['company_name'] = $company_name;
|
|
|
|
|
$res = $model->where($map)->getField('id');
|
|
|
|
|
if ($res && $res != $id) {
|
|
|
|
|
$this->error('合作方已存在');
|
|
|
|
|
$this->error('推广公司已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$time = time();
|
|
|
|
@ -168,7 +168,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$this->assign('data', $data);
|
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'PromoteCompany/edit'])->find());
|
|
|
|
|
$this->meta_title = '编辑合作方';
|
|
|
|
|
$this->meta_title = '编辑推广公司';
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|