1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- /**
- *
- * @author: xaboy<365615158@qq.com>
- * @day: 2017/11/11
- */
- namespace app\admin\controller\many;
- use app\admin\controller\AuthController;
- use crmeb\repositories\OrderRepository;
- use crmeb\repositories\ShortLetterRepositories;
- use crmeb\services\{ExpressService,
- JsonService,
- JsonService as Json,
- MiniProgramService,
- WechatService,
- FormBuilder as Form,
- CacheService,
- UtilService as Util};
- use app\admin\model\ump\StorePink;
- use crmeb\basic\BaseModel;
- use think\facade\Route as Url;
- use crmeb\services\YLYService;
- use think\facade\Log;
- use think\facade\Validate;
- /**
- * 订单管理控制器 同一个订单表放在一个控制器
- * Class StoreOrder
- * @package app\admin\controller\store
- */
- class ManyDiscipline extends AuthController
- {
- /**
- * @return mixed
- */
- public function index()
- {
- $list = \app\admin\model\many\Many::select();
- $this->assign([
- 'year' => get_month(),
- 'auction'=> $list,
- ]);
- return $this->fetch();
- }
- public function list()
- {
- $where = Util::getMore([
- ['status', ''],
- ['page', 1],
- ['limit', 20],
- ['stage', ''],
- ['order_id', ''],
- ['excel', 0],
- ['data', ''],
- ['many_id',''],
- ['name', '']
- ]);
- return Json::successlayui(\app\admin\model\many\ManyDiscipline::list($where));
- }
- /**
- * 删除
- * @param $id
- * @return void
- * @throws \Exception
- */
- public function delete($id)
- {
- if (!$id) Json::fail('删除失败');
- $model = new \app\admin\model\many\ManyDiscipline();
- $res = $model->where('id', $id)->delete();
- if ($res){
- return Json::success('删除成功!');
- }else{
- return Json::fail($model->getErrorInfo());
- }
- }
- }
|