94 行
2.2 KiB
PHP
可执行文件
94 行
2.2 KiB
PHP
可执行文件
<?php
|
|
|
|
namespace Retail\Controller;
|
|
|
|
use Retail\Business\StoreIndustry;
|
|
use Think\Controller;
|
|
|
|
//[1.7.90]
|
|
|
|
/**
|
|
* 门店行业
|
|
* Class StoreIndustryController
|
|
* @package Retail\Controller
|
|
* @author GuYunQinFeng
|
|
*/
|
|
class StoreIndustryController extends BaseController
|
|
{
|
|
/**
|
|
* 商户行业管理页面
|
|
*/
|
|
public function index()
|
|
{
|
|
$this->display();
|
|
}
|
|
|
|
/**
|
|
* 添加行业
|
|
*/
|
|
public function addStoreIndustry()
|
|
{
|
|
$StoreIndustry = new StoreIndustry();
|
|
$this->ajaxReturn($StoreIndustry->addStoreIndustry([
|
|
'name' => I('post.name'),
|
|
'merchant_id' => $this->merchant_id,
|
|
'operate_id' => $this->login_user['id'],
|
|
]));
|
|
}
|
|
|
|
/**
|
|
* 编辑行业
|
|
*/
|
|
public function editStoreIndustry()
|
|
{
|
|
$StoreIndustry = new StoreIndustry();
|
|
$this->ajaxReturn($StoreIndustry->editStoreIndustry([
|
|
'id' => I('post.id'),
|
|
'name' => I('post.name'),
|
|
'merchant_id' => $this->merchant_id,
|
|
'operate_id' => $this->login_user['id'],
|
|
]));
|
|
}
|
|
|
|
/**
|
|
* 删除行业
|
|
* @param id 行业id
|
|
*/
|
|
public function delStoreIndustry()
|
|
{
|
|
$StoreIndustry = new StoreIndustry();
|
|
$this->ajaxReturn($StoreIndustry->delStoreIndustry([
|
|
'id' => I('post.id'),
|
|
'operate_id' => $this->login_user['id'],
|
|
'merchant_id' => $this->merchant_id,
|
|
]));
|
|
}
|
|
|
|
/**
|
|
* 获取行业列表
|
|
* @param page 页码
|
|
* @param limit 页长
|
|
*/
|
|
public function getIndustryList()
|
|
{
|
|
$StoreIndustry = new StoreIndustry();
|
|
$this->ajaxReturn($StoreIndustry->getIndustryList([
|
|
'page' => I('post.page'),
|
|
'limit' => I('post.limit'),
|
|
'name' => I('post.name'),
|
|
'merchant_id' => $this->merchant_id,
|
|
]));
|
|
}
|
|
|
|
/**
|
|
* 获取行业列表-供选择使用
|
|
*/
|
|
public function getIndustrySelect()
|
|
{
|
|
$StoreIndustry = new StoreIndustry();
|
|
$this->ajaxReturn($StoreIndustry->getIndustrySelect([
|
|
'merchant_id' => $this->merchant_id,
|
|
]));
|
|
}
|
|
}
|