更新文章价格审批功能
This commit is contained in:
@@ -208,24 +208,44 @@ class Order extends base{
|
||||
$insert['ctime'] = time();
|
||||
Db::name("article_price_apply")->insert($insert);
|
||||
|
||||
|
||||
//发送邮件
|
||||
$tt = '您有新的价格审批!<a href="https://submission.tmrjournals.com/journalFeeApproval">link</a>';
|
||||
|
||||
sendEmail("18812616272@qq.com", "tmr-文章价格申请", "tmr-文章价格申请", $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return jsonSuccess();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getApplyList(){
|
||||
$list = Db::name("article_price_apply")->where("state",0)->select();
|
||||
$data = $this->request->post();
|
||||
$data['pageIndex'] = isset($data['pageIndex'])?$data['pageIndex']:0;
|
||||
$data['pageSize'] = isset($data['pageSize'])?$data['pageSize']:10;
|
||||
$start_page = ($data['pageIndex']-1)*$data['pageSize'];
|
||||
$list = Db::name("article_price_apply")->where("state", $data['state'] ?? 0)->limit($start_page,$data['pageSize'])->select();
|
||||
foreach ($list as $k=>$v){
|
||||
$list[$k]['article_info'] = $this->article_obj->field("article_id,journal_id,accept_sn,title")->where("article_id",$v['article_id'])->find();
|
||||
$list[$k]['journal_info'] = $this->journal_obj->field("journal_id,title")->where("journal_id",$list[$k]['article_info']['journal_id'])->find();
|
||||
$list[$k]['history'] = Db::name("article_price_apply")->where("article_id",$list[$k]['article_info']['article_id'])->select();
|
||||
}
|
||||
|
||||
$re['list'] = $list;
|
||||
$re['total'] = Db::name("article_price_apply")->where("state", $data['state'] ?? 0)->count();
|
||||
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function getApplyCount(){
|
||||
$res = Db::name("article_price_apply")->field("state,count(*) as count")->group("state")->select();
|
||||
|
||||
return jsonSuccess($res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function acceptPriceApply(){
|
||||
|
||||
Reference in New Issue
Block a user