队列相关的调整
This commit is contained in:
@@ -527,6 +527,7 @@ class Material
|
||||
if(empty($iArticleId)){
|
||||
return json_encode(['status' => 2,'msg' => 'article_id is empty']);
|
||||
}
|
||||
|
||||
//期刊ID
|
||||
$iJournalId = empty($aParam['journal_id']) ? '' : $aParam['journal_id'];
|
||||
if(empty($iJournalId)){
|
||||
@@ -705,4 +706,36 @@ class Material
|
||||
}
|
||||
return json_encode(['status' => 1,'msg' => 'Successfully obtained data','data' => $aData]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 对接微信公众号日志
|
||||
*/
|
||||
public function addWechatLog($aParam = []){
|
||||
//获取参数
|
||||
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
||||
//必填参数验证
|
||||
if(empty($aParam['article_id']) || empty($aParam['type'])){
|
||||
return json_encode(['status' => 2, 'msg' => '非法操作']);
|
||||
}
|
||||
$result = Db::name('wechat_api_log')->insertGetId($aParam);
|
||||
if($result === false){
|
||||
return json_encode(['status' => 3, 'msg' => '数据插入失败'.Db::getLastSql()."\n数据内容:",'data' => $aParam]);
|
||||
}
|
||||
return json_encode(['status' => 1, 'msg' => '日志插入成功']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公众号
|
||||
*/
|
||||
public function getWechatLog($aParam = []){
|
||||
//获取参数
|
||||
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
||||
//必填参数验证
|
||||
if(empty($aParam['article_id']) || empty($aParam['type'])){
|
||||
return json_encode(['status' => 2, 'msg' => '非法操作']);
|
||||
}
|
||||
$aLog = Db::name('wechat_api_log')->where($aParam)->find();
|
||||
return json_encode(['status' => 1, 'msg' => '获取数据成功','data' => $aLog]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user