1
This commit is contained in:
@@ -620,6 +620,7 @@ class Base extends Controller
|
|||||||
->join("t_user_reviewer_info", "t_user_reviewer_info.reviewer_id=t_board_to_journal.user_id", "left")
|
->join("t_user_reviewer_info", "t_user_reviewer_info.reviewer_id=t_board_to_journal.user_id", "left")
|
||||||
->where('t_board_to_journal.journal_id', $journal_id)
|
->where('t_board_to_journal.journal_id', $journal_id)
|
||||||
->where('t_board_to_journal.state', 0)
|
->where('t_board_to_journal.state', 0)
|
||||||
|
->order("t_user.realname")
|
||||||
->select();
|
->select();
|
||||||
foreach ($boards as $val) {
|
foreach ($boards as $val) {
|
||||||
if ($aar) {
|
if ($aar) {
|
||||||
|
|||||||
@@ -151,6 +151,76 @@ class Publish extends Base
|
|||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createHtmlForType2(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
"article_id"=>"require"
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$product = $this->production_article_obj->where("w_article_id",$data['article_id'])->find();
|
||||||
|
if(!$product){
|
||||||
|
return jsonError("system error,no product for article");
|
||||||
|
}
|
||||||
|
$check = $this->article_main_obj->where("article_id",$product['article_id'])->whereIn("state",[0,2])->find();
|
||||||
|
if(!$check){
|
||||||
|
$this->addArticleMainEx($product['article_id']);
|
||||||
|
}
|
||||||
|
$mains = $this->article_main_obj->where("article_id",$data['article_id'])->whereIn("state",[0,2])->order("sort asc")->select();
|
||||||
|
if(!$mains){
|
||||||
|
return jsonError("error");
|
||||||
|
}
|
||||||
|
foreach ($mains as $k=>$main) {
|
||||||
|
if($main['type']==0){
|
||||||
|
continue;
|
||||||
|
}elseif($main['type']==1){
|
||||||
|
$c_d = $this->article_main_image_obj->where("ami_id",$main['ami_id'])->find();
|
||||||
|
$mains[$k]['image'] = $c_d;
|
||||||
|
}else{
|
||||||
|
$c_d_t = $this->article_main_table_obj->where("amt_id",$main['amt_id'])->find();
|
||||||
|
$mains[$k]['table'] = $c_d_t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$re['list'] = $mains;
|
||||||
|
|
||||||
|
return jsonSuccess($re);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHtmlForType2(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
"article_id"=>"require"
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$product = $this->production_article_obj->where("w_article_id",$data['article_id'])->find();
|
||||||
|
if(!$product){
|
||||||
|
return jsonError("system error,no product for article");
|
||||||
|
}
|
||||||
|
$check = $this->article_main_obj->where("article_id",$product['article_id'])->whereIn("state",[0,2])->find();
|
||||||
|
if(!$check){
|
||||||
|
return jsonError("not find");
|
||||||
|
}
|
||||||
|
$mains = $this->article_main_obj->where("article_id",$data['article_id'])->whereIn("state",[0,2])->order("sort asc")->select();
|
||||||
|
foreach ($mains as $k=>$main) {
|
||||||
|
if($main['type']==0){
|
||||||
|
continue;
|
||||||
|
}elseif($main['type']==1){
|
||||||
|
$c_d = $this->article_main_image_obj->where("ami_id",$main['ami_id'])->find();
|
||||||
|
$mains[$k]['image'] = $c_d;
|
||||||
|
}else{
|
||||||
|
$c_d_t = $this->article_main_table_obj->where("amt_id",$main['amt_id'])->find();
|
||||||
|
$mains[$k]['table'] = $c_d_t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$re['list'] = $mains;
|
||||||
|
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取publish文章
|
* 获取publish文章
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user