delKeywordReply()删除关键词回复内容 * * * * * ~~~ /** * 【删除关键词回复内容】 * @author rhaphp.com * @param string $reply_id * @return bool * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ function delKeywordReply($reply_id = '') { $mp = getMpInfo(); if (!isset($mp['id']) || empty($mp['id']) || !$reply_id) { return false;//参数缺失 } $ruleModel = new \app\common\model\MpRule(); $replyMode = new \app\common\model\MpReply(); $result = $ruleModel->where(['reply_id' => $reply_id])->find(); if (!empty($result)) { if ($mp['id'] != $result['mpid']) { ajaxMsg(0, '回复关键词内容公众号标识与当前公众号标识不匹配'); } $replyMode->where(['reply_id' => $reply_id])->delete(); $ruleModel->where(['reply_id' => $reply_id])->delete(); return true; } return false; } ~~~