回复搜索
This commit is contained in:
parent
7dedec17d9
commit
16a19312a9
@ -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');
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,10 +11,13 @@
|
|||||||
|
|
||||||
namespace catchAdmin\wechat\model;
|
namespace catchAdmin\wechat\model;
|
||||||
|
|
||||||
|
use catchAdmin\wechat\model\search\ReplySearchTrait;
|
||||||
use catcher\base\CatchModel;
|
use catcher\base\CatchModel;
|
||||||
|
|
||||||
class WechatReply extends CatchModel
|
class WechatReply extends CatchModel
|
||||||
{
|
{
|
||||||
|
use ReplySearchTrait;
|
||||||
|
|
||||||
protected $name = 'wechat_reply';
|
protected $name = 'wechat_reply';
|
||||||
|
|
||||||
protected $field = [
|
protected $field = [
|
||||||
|
56
catch/wechat/model/search/ReplySearchTrait.php
Normal file
56
catch/wechat/model/search/ReplySearchTrait.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user