20201112
This commit is contained in:
@@ -109,6 +109,28 @@ class Article extends Controller {
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取文章话题
|
||||
* @description 获取文章话题
|
||||
* @author wangjinlei
|
||||
* @url /api/Article/getTopicsForArticle
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
*
|
||||
* @return topics:话题列表#
|
||||
*/
|
||||
public function getTopicsForArticle(){
|
||||
$data = $this->request->post();
|
||||
$list = $this->article_to_topic_obj
|
||||
->field("j_journal_topic.*")
|
||||
->join("j_journal_topic","j_journal_topic.journal_topic_id = j_article_to_topic.topic_id","left")
|
||||
->where("j_article_to_topic.article_id",$data['article_id'])
|
||||
->where('j_article_to_topic.state',0)
|
||||
->select();
|
||||
$re['topics'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function mytest(){
|
||||
$article_info = $this->article_obj->where('article_id',1689)->find();
|
||||
@@ -194,8 +216,10 @@ class Article extends Controller {
|
||||
->limit($limit_start,$data['pageSize'])
|
||||
->select();
|
||||
$count = $this->article_to_topic_obj
|
||||
->join(array(['j_article', 'j_article_to_topic.article_id = j_article.article_id', 'LEFT'], ['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT']))
|
||||
->where('j_article_to_topic.topic_id', $data['topic_id'])
|
||||
->where('j_article_to_topic.state', 0)
|
||||
->where('j_journal_stage.stage_year','>',intval(date('Y'))-3)
|
||||
->count();
|
||||
//获取作者
|
||||
foreach ($list as $k => $v) {
|
||||
|
||||
@@ -390,7 +390,7 @@ class Journal extends Controller {
|
||||
$data = $this->request->post();
|
||||
$list = [];
|
||||
if($data['journal_topic_id'] == 0){
|
||||
$journals = $this->journal_obj->where('state',0)->select();
|
||||
$journals = $this->journal_obj->where('state',0)->order("sort desc")->select();
|
||||
foreach ($journals as $k => $v){
|
||||
$topic_info = $this->journal_topic_obj->where('journal_id',$v['journal_id'])->where('title','Topics')->where('state',0)->find();
|
||||
$cache = $this->journal_topic_obj->where('parent_id',$topic_info['journal_topic_id'])->where('state',0)->limit(5)->select();
|
||||
@@ -406,6 +406,7 @@ class Journal extends Controller {
|
||||
->where('j_journal_topic.parent_id','in',$tpids)
|
||||
->where('j_journal_topic.title',$topic_info['title'])
|
||||
->where('j_journal_topic.state',0)
|
||||
->order("j_journal.sort desc")
|
||||
->select();
|
||||
$list = $journals;
|
||||
}
|
||||
@@ -443,7 +444,7 @@ class Journal extends Controller {
|
||||
}
|
||||
$ids = $this->article_to_topic_obj->where('topic_id','in',$topicids)->where('state',0)->column('article_id');
|
||||
$list = $this->article_obj
|
||||
->field('j_article.*,j_journal_stage.*,j_journal.title journal_title')
|
||||
->field('j_article.*,j_journal_stage.*,j_journal.jabbr,j_journal.usx,j_journal.title journal_title')
|
||||
->join('j_journal','j_article.journal_id = j_journal.journal_id','left')
|
||||
->join('j_journal_stage','j_article.journal_stage_id = j_journal_stage.journal_stage_id','left')
|
||||
->where('j_article.article_id','in',$ids)
|
||||
|
||||
@@ -26,6 +26,12 @@ class mail {
|
||||
// }
|
||||
}
|
||||
|
||||
public function puchAndFJ(Job $job, $data){
|
||||
$res = $this->sendFJ($data);
|
||||
$job->delete();
|
||||
}
|
||||
|
||||
|
||||
public function propa(Job $job, $data){
|
||||
$res = $this->push($data);
|
||||
$job->delete();
|
||||
@@ -54,5 +60,10 @@ class mail {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function sendFJ($data){
|
||||
sendEmail_data($data['email'],$data['title'],$data['fromname'],$data['content'],$data['temail'],$data['tpassword'],$data["fj"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user