|
@@ -225,7 +225,7 @@ class Topicdongtai extends Api
|
|
|
|
|
|
//系统消息
|
|
//系统消息
|
|
if($dt_user_id != $this->auth->id){
|
|
if($dt_user_id != $this->auth->id){
|
|
- $msg_id = \app\common\model\Message::addMessage($dt_user_id,'动态点赞',$this->auth->nickname.'('.$this->auth->username.')赞了你的动态','dongtai_good',$id);
|
|
|
|
|
|
+ $msg_id = \app\common\model\Message::addMessage($id,$dt_user_id,$dt_user_id, $this->auth->id,'动态点赞','点赞了你的帖子','dongtai_good',$id);
|
|
}
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
Db::commit();
|
|
@@ -254,6 +254,11 @@ class Topicdongtai extends Api
|
|
$this->error('楼层错误');
|
|
$this->error('楼层错误');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $topic_dongtai = Db::name('topic_dongtai')->where('id',$id)->find();
|
|
|
|
+ if(empty($topic_dongtai)){
|
|
|
|
+ $this->error('帖子不存在');
|
|
|
|
+ }
|
|
|
|
+
|
|
//关键字替换
|
|
//关键字替换
|
|
$content = Keyworld::sensitive($content);
|
|
$content = Keyworld::sensitive($content);
|
|
|
|
|
|
@@ -296,7 +301,7 @@ class Topicdongtai extends Api
|
|
//系统消息
|
|
//系统消息
|
|
if($level == 1){
|
|
if($level == 1){
|
|
//发给动态用户
|
|
//发给动态用户
|
|
- $msg_user_id = Db::name('topic_dongtai')->where('id',$id)->value('user_id');
|
|
|
|
|
|
+ $msg_user_id = $topic_dongtai['user_id'];
|
|
$msg_title = '动态评论';
|
|
$msg_title = '动态评论';
|
|
$msg_content = $this->auth->nickname.'评论了你的动态';
|
|
$msg_content = $this->auth->nickname.'评论了你的动态';
|
|
$infotype_id = $rs;
|
|
$infotype_id = $rs;
|
|
@@ -308,7 +313,10 @@ class Topicdongtai extends Api
|
|
$msg_content = $this->auth->nickname.'点评了你的动态评论';
|
|
$msg_content = $this->auth->nickname.'点评了你的动态评论';
|
|
$infotype_id = $answer_info['id'];
|
|
$infotype_id = $answer_info['id'];
|
|
}
|
|
}
|
|
- $msg_id = \app\common\model\Message::addMessage($msg_user_id,$msg_title,$msg_content,'dongtai_answer',$infotype_id);
|
|
|
|
|
|
+
|
|
|
|
+ if($msg_content != $this->auth->id){
|
|
|
|
+ $msg_id = \app\common\model\Message::addMessage($id,$topic_dongtai['user_id'],$msg_user_id,$this->auth->id,$msg_title,$msg_content,'dongtai_answer',$infotype_id);
|
|
|
|
+ }
|
|
|
|
|
|
Db::commit();
|
|
Db::commit();
|
|
$this->success('评论成功');
|
|
$this->success('评论成功');
|