回复搜索

This commit is contained in:
JaguarJack 2020-06-30 07:36:38 +08:00
parent 7dedec17d9
commit 16a19312a9
3 changed files with 59 additions and 13 deletions

View File

@ -1,13 +0,0 @@
<?php
namespace catchAdmin\cms\controller;
use catcher\base\CatchController;
use catcher\CatchResponse;
class TestController extends CatchController
{
public function index()
{
return CatchResponse::success('Hello CatchAdmin');
}
}

View File

@ -11,10 +11,13 @@
namespace catchAdmin\wechat\model;
use catchAdmin\wechat\model\search\ReplySearchTrait;
use catcher\base\CatchModel;
class WechatReply extends CatchModel
{
use ReplySearchTrait;
protected $name = 'wechat_reply';
protected $field = [

View File

@ -0,0 +1,56 @@
<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------
namespace catchAdmin\wechat\model\search;
trait ReplySearchTrait
{
/**
* 规则查询
*
* @time 2020年06月30日
* @param $query
* @param $value
* @param $data
* @return mixed
*/
public function searchRuleTypeAttr($query, $value, $data)
{
return $query->where('rule_type', $value);
}
/**
* 类型查询
*
* @time 2020年06月30日
* @param $query
* @param $value
* @param $data
* @return mixed
*/
public function searchTypeAttr($query, $value, $data)
{
return $query->where('type', $value);
}
/**
* 状态查询
*
* @time 2020年06月30日
* @param $query
* @param $value
* @param $data
* @return mixed
*/
public function searchStatusAttr($query, $value, $data)
{
return $query->where('status', $value);
}
}