推广公司列表1

master
chenzhi 5 years ago
parent 92929b1db7
commit 542c76f266

@ -20,12 +20,8 @@ class PromoteCompanyController extends ThinkController
{
$model = M($this->modelName, 'tab_');
$map = [];
$id = intval(I('id', 0));
$company_name = trim(I('company_name'));
if (!empty($id)) {
$map['tab_promote_company.id'] = $id;
$parameter['id'] = $id;
}
if($company_name)
$map['tab_promote_company.company_name'] = array('like',"%{$company_name}%");
if (isset($_REQUEST['status']) && $_REQUEST['status'] !== '') {
@ -39,14 +35,8 @@ class PromoteCompanyController extends ThinkController
$row = intval(I('row', 0));
$row = empty($row) ? 10 : $row;//每页条数
$data = $model
->field('tab_promote_company.id,tab_promote_company.company_name,tab_promote_company.status,
tab_promote_company.create_time,sys_member.nickname')
->join('left join sys_member on sys_member.uid = tab_promote_company.uid')
->where($map)
->order('id desc')
->page($page, $row)
->select();
//获取分页公司数据
/* 查询记录总数 */
$count = $model

Loading…
Cancel
Save