mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
添加 reply#text: 回复规则
This commit is contained in:
parent
1947451b98
commit
dd6c77bd13
@ -196,6 +196,10 @@ class Push extends Controller
|
|||||||
*/
|
*/
|
||||||
private function _keys(string $rule, bool $last = false, bool $custom = false)
|
private function _keys(string $rule, bool $last = false, bool $custom = false)
|
||||||
{
|
{
|
||||||
|
if (stripos($rule, 'reply#text:') === 0) {
|
||||||
|
[, $content] = explode('#text:', $rule);
|
||||||
|
return $this->_buildMessage('text', ['Content' => $content]);
|
||||||
|
}
|
||||||
[$table, $field, $value] = explode('#', $rule . '##');
|
[$table, $field, $value] = explode('#', $rule . '##');
|
||||||
$data = $this->app->db->name($table)->where([$field => $value])->find();
|
$data = $this->app->db->name($table)->where([$field => $value])->find();
|
||||||
if (empty($data['type']) || (array_key_exists('status', $data) && empty($data['status']))) {
|
if (empty($data['type']) || (array_key_exists('status', $data) && empty($data['status']))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user