...
|
...
|
@@ -542,6 +542,34 @@ class ActivityController extends AdminBaseController |
|
|
$update['status']='2';
|
|
|
$result=\db('join')->where($map)->update($update);
|
|
|
if ($result>0){
|
|
|
|
|
|
$join=\db('join')->where($map)->find();
|
|
|
$activity=\db('activity')->where('id',$join['activity_id'])->find();
|
|
|
$userMap['user_id']=$join['user_id'];
|
|
|
$openid=db('third_party_user')->where($userMap)->value('openid');
|
|
|
$volunteer=\db('volunteer')->where('user_id',$join['user_id'])->find();
|
|
|
$formMap['user_id']=$join['user_id'];
|
|
|
$formMap['use_time']=0;
|
|
|
$formMap['expire_time']=['>',time()];
|
|
|
$form_id=\db('form_id')->where($formMap)->find();
|
|
|
if (!empty($form_id)){
|
|
|
\db('form_id')->where('form_id',$form_id['form_id'])->update(['use_time'=>time()]);
|
|
|
$data['keyword1']= $volunteer['name'];
|
|
|
$data['keyword2']='活动审核';
|
|
|
$data['keyword3']='未通过';
|
|
|
$data['keyword4']=$activity['activity_name'];
|
|
|
$message = [
|
|
|
'touser' => $openid,
|
|
|
'template_id' => '1FYkLuMK8LNKO4_nxJ_DuNQhgIjaaJQlAukgt92C-uw',
|
|
|
'page' => 'pages/index/index',
|
|
|
'form_id' => $form_id['value'],
|
|
|
'data' => $data,
|
|
|
'emphasis_keyword' =>$data['keyword3']='状态',
|
|
|
];
|
|
|
$this->wxappNotice($message);
|
|
|
}
|
|
|
|
|
|
|
|
|
$this->success('操作成功!');
|
|
|
}else{
|
|
|
$this->error('操作失败!');
|
...
|
...
|
|