1
This commit is contained in:
@@ -136,6 +136,21 @@ class Email extends Controller{
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加模板调用计数
|
||||
*/
|
||||
public function addEmailTemplateNum(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'eid'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$this->email_template_obj->where('eid',$data['eid'])->setInc('num');
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送模板邮件
|
||||
*/
|
||||
@@ -168,8 +183,23 @@ class Email extends Controller{
|
||||
}
|
||||
|
||||
public function tttt(){
|
||||
$str = "home".DS."ds".DS."12312321.jpg";
|
||||
echo substr($str,strrpos($str,DS)+1);
|
||||
echo md5('zhengzuguo0614');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取邮件发送记录通过文章
|
||||
*/
|
||||
public function getEmailsByArticle(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'article_id'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$list = $this->email_log_obj->where('article_id',$data['article_id'])->where('is_success',1)->select();
|
||||
$re['emails'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user