<?php
/**
 * @package merchant
 *
 * @author Qinii
 * @day 2020-06-09
 *
 * 
 */
namespace app\controller\api\user;

use think\App;
use crmeb\basic\BaseController;
use app\common\repositories\user\FeedBackCategoryRepository as repository;
use think\facade\Db;

class FeedBackCategory extends BaseController
{

    protected $repository;

    public function __construct(App $app, repository $repository)
    {
        parent::__construct($app);
        $this->repository = $repository;
    }

    public function lst()
    {
        return app('json')->success($this->repository->getFormatList(0,1));
    }

    public function new_lst(){
        return app('json')->success(Db::name('feedback_category') -> where('is_show',1)-> where('level',1) -> field('feedback_category_id,cate_name') -> select());
    }

}
