
- 新增 MobileMnp 控制器和相关视图文件 - 实现携号转网手机号检测数据的添加、编辑和删除功能 - 添加条件搜索功能 - 优化订单历史数据获取逻辑,使用 OrderLastweekHistoryService
113 lines
3.2 KiB
PHP
113 lines
3.2 KiB
PHP
<?php
|
||
|
||
// +----------------------------------------------------------------------
|
||
// | ThinkAdmin
|
||
// +----------------------------------------------------------------------
|
||
// | 版权所有 2014~2020 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||
// +----------------------------------------------------------------------
|
||
// | 官方网站: https://thinkadmin.top
|
||
// +----------------------------------------------------------------------
|
||
// | 开源协议 ( https://mit-license.org )
|
||
// +----------------------------------------------------------------------
|
||
// | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||
// | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\setting\controller;
|
||
|
||
use think\admin\Controller;
|
||
use think\admin\helper\QueryHelper;
|
||
|
||
/**
|
||
* 手机号携号转网
|
||
* Class Merchant
|
||
* @package app\merchant\controller
|
||
*/
|
||
class MobileMnp extends Controller
|
||
{
|
||
|
||
/**
|
||
* 绑定数据表
|
||
* @var string
|
||
*/
|
||
public $table = 'MobileMnp';
|
||
|
||
/**
|
||
* 携号转网手机号
|
||
* @auth true
|
||
* @menu true
|
||
* @throws \think\db\exception\DataNotFoundException
|
||
* @throws \think\db\exception\DbException
|
||
* @throws \think\db\exception\ModelNotFoundException
|
||
*/
|
||
public function index()
|
||
{
|
||
$this->title = '卡号黑名单';
|
||
$query = $this->_query($this->table);
|
||
$query->equal('status,id,is_mnp,mobile,old_isp,new_isp')->dateBetween('create_at');
|
||
// 加载对应数据列表
|
||
$this->type = input('is_mnp', 'all');
|
||
// 列表排序并显示
|
||
// $query->order('status desc,id desc')->page();
|
||
$query->order('status desc,id desc')->layTable(function(QueryHelper $query){
|
||
// 前置操作,处理 HTML 模型
|
||
},function(QueryHelper $query){
|
||
// $vo['isp_name'] = $this->isp[$vo['isp']];
|
||
// 后置操作,处理表格数据
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 添加携转号码
|
||
* @auth true
|
||
* @throws \think\db\exception\DataNotFoundException
|
||
* @throws \think\db\exception\DbException
|
||
* @throws \think\db\exception\ModelNotFoundException
|
||
*/
|
||
public function add()
|
||
{
|
||
$this->_applyFormToken();
|
||
$this->_form($this->table, 'form');
|
||
}
|
||
|
||
/**
|
||
* 编辑携转号码检测
|
||
* @auth true
|
||
* @throws \think\db\exception\DataNotFoundException
|
||
* @throws \think\db\exception\DbException
|
||
* @throws \think\db\exception\ModelNotFoundException
|
||
*/
|
||
public function edit()
|
||
{
|
||
$this->_applyFormToken();
|
||
$this->_form($this->table, 'form');
|
||
}
|
||
|
||
/**
|
||
* 修改携转号码检测
|
||
* @auth true
|
||
* @throws \think\db\exception\DbException
|
||
*/
|
||
public function state()
|
||
{
|
||
$this->_applyFormToken();
|
||
$this->_save($this->table, $this->_vali([
|
||
'status.in:0,1' => '状态值范围异常!',
|
||
'status.require' => '状态值不能为空!',
|
||
]));
|
||
}
|
||
|
||
/**
|
||
* 删除携转号码检测
|
||
* @auth true
|
||
* @throws \think\db\exception\DbException
|
||
*/
|
||
public function remove()
|
||
{
|
||
// $this->_applyFormToken();
|
||
$this->_delete($this->table);
|
||
}
|
||
|
||
|
||
}
|