public function getComment($operateId)
 {
     $query = (new Query())->select('a.*')->addSelect('b.username as username')->addSelect('c.avatar')->from(DiaryComment::tableName() . ' as a')->leftJoin(['b' => User::tableName()], 'a.user_id = b.id')->leftJoin(['c' => UserExtend::tableName()], 'a.user_id = c.user_id')->where('1=1')->andWhere(['a.diary_id' => $operateId])->orderBy(['a.created_at' => SORT_ASC]);
     return $query->createCommand()->queryAll();
 }
 public function getUserResponse($userId)
 {
     $Query = (new Query())->select('b.comment_content,b.created_at')->addSelect('c.username')->addSelect('c.realname')->addSelect('d.avatar')->from(Diary::tableName() . ' as a')->leftJoin(['b' => DiaryComment::tableName()], 'b.diary_id = a.id')->leftJoin(['c' => User::tableName()], 'b.user_id = c.id')->leftJoin(['d' => UserExtend::tableName()], 'd.user_id = c.id')->where('1=1')->andFilterWhere(['a.created_by' => $userId])->andFilterWhere(['b.comment_id' => 0])->andFilterWhere(['b.comment_type' => 0])->orderBy(['b.created_at' => SORT_DESC])->limit(10);
     $result = $Query->createCommand()->queryAll();
     return $result;
 }