|
@@ -46,6 +46,9 @@ class Notices{
|
|
* @param $workorder
|
|
* @param $workorder
|
|
*/
|
|
*/
|
|
public function create_workorder($workorder){
|
|
public function create_workorder($workorder){
|
|
|
|
+ $info = array();
|
|
|
|
+ $info['sms_code'] = "FAILED";
|
|
|
|
+ $info['email_code'] = "FAILED";
|
|
if(count($workorder['remark_list'])<1) {
|
|
if(count($workorder['remark_list'])<1) {
|
|
$workorder['remark_list'][0]=array("remark_content"=>"");
|
|
$workorder['remark_list'][0]=array("remark_content"=>"");
|
|
}
|
|
}
|
|
@@ -60,8 +63,10 @@ class Notices{
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if(send_by_modem($this->setting,$receive_user['mobile'],$sms_content)){
|
|
if(send_by_modem($this->setting,$receive_user['mobile'],$sms_content)){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
|
|
}
|
|
}
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
$sms_content = array(
|
|
$sms_content = array(
|
|
@@ -73,8 +78,10 @@ class Notices{
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][0],$sms_content);
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][0],$sms_content);
|
|
if($resp['Code'] == 'OK'){
|
|
if($resp['Code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = $resp['Message'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
@@ -122,14 +129,18 @@ class Notices{
|
|
$email_content .=date("Y年m月d日",time()).'</p>';
|
|
$email_content .=date("Y年m月d日",time()).'</p>';
|
|
$email_content .='</div>';
|
|
$email_content .='</div>';
|
|
$notices_log['content'] = $email_content;
|
|
$notices_log['content'] = $email_content;
|
|
- if($this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content'])){
|
|
|
|
|
|
+ $resp = $this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content']);
|
|
|
|
+ if($resp['code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['email_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['email_msg'] = $resp['msg'];
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
}
|
|
}
|
|
|
|
+ return $info;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -138,6 +149,9 @@ class Notices{
|
|
* @param $remark
|
|
* @param $remark
|
|
*/
|
|
*/
|
|
public function sign_workorder($workorder,$remark){
|
|
public function sign_workorder($workorder,$remark){
|
|
|
|
+ $info = array();
|
|
|
|
+ $info['sms_code'] = "FAILED";
|
|
|
|
+ $info['email_code'] = "FAILED";
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$admin_list = $this->CI->user_model->select_users("1");
|
|
$admin_list = $this->CI->user_model->select_users("1");
|
|
$sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
|
|
$sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
|
|
@@ -162,8 +176,10 @@ class Notices{
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
|
|
if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
|
|
}
|
|
}
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
$sms_content = array(
|
|
$sms_content = array(
|
|
@@ -176,8 +192,10 @@ class Notices{
|
|
$resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][1],$sms_content);
|
|
$resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][1],$sms_content);
|
|
if($resp['Code'] == 'OK'){
|
|
if($resp['Code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = $resp['Message'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
@@ -225,14 +243,18 @@ class Notices{
|
|
for ($i=0;$i<count($emails);$i++) {
|
|
for ($i=0;$i<count($emails);$i++) {
|
|
$this->CI->mailer->add_recipient($emails[$i]);
|
|
$this->CI->mailer->add_recipient($emails[$i]);
|
|
}
|
|
}
|
|
- if ($this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'])) {
|
|
|
|
|
|
+ $resp = $this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content']);
|
|
|
|
+ if($resp['code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
- } else {
|
|
|
|
|
|
+ $info['email_code'] = "OK";
|
|
|
|
+ }else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['email_msg'] = $resp['msg'];
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
}
|
|
}
|
|
|
|
+ return $info;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -241,6 +263,9 @@ class Notices{
|
|
* @param $remark
|
|
* @param $remark
|
|
*/
|
|
*/
|
|
public function check_workorder($workorder,$remark){
|
|
public function check_workorder($workorder,$remark){
|
|
|
|
+ $info = array();
|
|
|
|
+ $info['sms_code'] = "FAILED";
|
|
|
|
+ $info['email_code'] = "FAILED";
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$admin_list = $this->CI->user_model->select_users("1");
|
|
$admin_list = $this->CI->user_model->select_users("1");
|
|
$sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
|
|
$sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
|
|
@@ -265,8 +290,10 @@ class Notices{
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
|
|
if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
|
|
}
|
|
}
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
$sms_content = array(
|
|
$sms_content = array(
|
|
@@ -279,8 +306,10 @@ class Notices{
|
|
$resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][2],$sms_content);
|
|
$resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][2],$sms_content);
|
|
if($resp['Code'] == 'OK'){
|
|
if($resp['Code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = $resp['Message'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
@@ -333,14 +362,18 @@ class Notices{
|
|
}else{
|
|
}else{
|
|
$attachments = null;
|
|
$attachments = null;
|
|
}
|
|
}
|
|
- if ($this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments)) {
|
|
|
|
|
|
+ $resp = $this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments);
|
|
|
|
+ if($resp['code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
- } else {
|
|
|
|
|
|
+ $info['email_code'] = "OK";
|
|
|
|
+ }else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['email_msg'] = $resp['msg'];
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
}
|
|
}
|
|
|
|
+ return $info;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -349,6 +382,9 @@ class Notices{
|
|
* @param $remark
|
|
* @param $remark
|
|
*/
|
|
*/
|
|
public function doit_workorder($workorder,$remark){
|
|
public function doit_workorder($workorder,$remark){
|
|
|
|
+ $info = array();
|
|
|
|
+ $info['sms_code'] = "FAILED";
|
|
|
|
+ $info['email_code'] = "FAILED";
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$admin_list = $this->CI->user_model->select_users("1");
|
|
$admin_list = $this->CI->user_model->select_users("1");
|
|
$sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
|
|
$sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
|
|
@@ -373,8 +409,10 @@ class Notices{
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
|
|
if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
|
|
}
|
|
}
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
$sms_content = array(
|
|
$sms_content = array(
|
|
@@ -389,6 +427,7 @@ class Notices{
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = $resp['Message'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
@@ -441,14 +480,18 @@ class Notices{
|
|
}else{
|
|
}else{
|
|
$attachments = null;
|
|
$attachments = null;
|
|
}
|
|
}
|
|
- if ($this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments)) {
|
|
|
|
|
|
+ $resp = $this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments);
|
|
|
|
+ if($resp['code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
- } else {
|
|
|
|
|
|
+ $info['email_code'] = "OK";
|
|
|
|
+ }else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['email_msg'] = $resp['msg'];
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
}
|
|
}
|
|
|
|
+ return $info;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -457,6 +500,9 @@ class Notices{
|
|
* @param $remark
|
|
* @param $remark
|
|
*/
|
|
*/
|
|
public function reject_workorder($workorder,$remark){
|
|
public function reject_workorder($workorder,$remark){
|
|
|
|
+ $info = array();
|
|
|
|
+ $info['sms_code'] = "FAILED";
|
|
|
|
+ $info['email_code'] = "FAILED";
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
if($this->setting['is_sms'] && in_array("10",$workorder['send_type'])){
|
|
if($this->setting['is_sms'] && in_array("10",$workorder['send_type'])){
|
|
$sms_content = '你的工单已由管理员驳回,请重新处理。工单ID:'.$workorder['workorder_id'].',工单名称:'.$workorder['workorder_name'].',类型:'.$workorder['type'].',备注:'.$remark['remark_content'];
|
|
$sms_content = '你的工单已由管理员驳回,请重新处理。工单ID:'.$workorder['workorder_id'].',工单名称:'.$workorder['workorder_name'].',类型:'.$workorder['type'].',备注:'.$remark['remark_content'];
|
|
@@ -468,8 +514,10 @@ class Notices{
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if(send_by_modem($this->setting, $receive_user['mobile'], $sms_content)){
|
|
if(send_by_modem($this->setting, $receive_user['mobile'], $sms_content)){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
|
|
}
|
|
}
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
$sms_content = array(
|
|
$sms_content = array(
|
|
@@ -481,8 +529,10 @@ class Notices{
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
|
|
if($resp['Code'] == 'OK'){
|
|
if($resp['Code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = $resp['Message'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
@@ -526,14 +576,18 @@ class Notices{
|
|
$email_content .=date("Y年m月d日",time()).'</p>';
|
|
$email_content .=date("Y年m月d日",time()).'</p>';
|
|
$email_content .='</div>';
|
|
$email_content .='</div>';
|
|
$notices_log['content'] = $email_content;
|
|
$notices_log['content'] = $email_content;
|
|
- if($this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content'])){
|
|
|
|
|
|
+ $resp = $this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content']);
|
|
|
|
+ if($resp['code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['email_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['email_msg'] = $resp['msg'];
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
}
|
|
}
|
|
|
|
+ return $info;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -541,6 +595,9 @@ class Notices{
|
|
* @param $workorder
|
|
* @param $workorder
|
|
*/
|
|
*/
|
|
public function finish_workorder($workorder){
|
|
public function finish_workorder($workorder){
|
|
|
|
+ $info = array();
|
|
|
|
+ $info['sms_code'] = "FAILED";
|
|
|
|
+ $info['email_code'] = "FAILED";
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
$receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
|
|
if($this->setting['is_sms'] && in_array("10",$workorder['send_type'])){
|
|
if($this->setting['is_sms'] && in_array("10",$workorder['send_type'])){
|
|
$sms_content = '你的工单已由管理员结束,工单ID:'.$workorder['workorder_id'].',工单名称:'.$workorder['workorder_name'].',类型:'.$workorder['type'];
|
|
$sms_content = '你的工单已由管理员结束,工单ID:'.$workorder['workorder_id'].',工单名称:'.$workorder['workorder_name'].',类型:'.$workorder['type'];
|
|
@@ -552,8 +609,10 @@ class Notices{
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if($this->setting['sms_type'] == '10' ){
|
|
if(send_by_modem($this->setting, $receive_user['mobile'], $sms_content)){
|
|
if(send_by_modem($this->setting, $receive_user['mobile'], $sms_content)){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
|
|
}
|
|
}
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
$sms_content = array(
|
|
$sms_content = array(
|
|
@@ -564,8 +623,10 @@ class Notices{
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
|
|
if($resp['Code'] == 'OK'){
|
|
if($resp['Code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['sms_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['sms_msg'] = $resp['Message'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
@@ -606,14 +667,18 @@ class Notices{
|
|
$email_content .=date("Y年m月d日",time()).'</p>';
|
|
$email_content .=date("Y年m月d日",time()).'</p>';
|
|
$email_content .='</div>';
|
|
$email_content .='</div>';
|
|
$notices_log['content'] = $email_content;
|
|
$notices_log['content'] = $email_content;
|
|
- if($this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content'])){
|
|
|
|
|
|
+ $resp = $this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content']);
|
|
|
|
+ if($resp['code'] == 'OK'){
|
|
$notices_log['status'] = "1";
|
|
$notices_log['status'] = "1";
|
|
|
|
+ $info['email_code'] = "OK";
|
|
}else{
|
|
}else{
|
|
$notices_log['status'] = "0";
|
|
$notices_log['status'] = "0";
|
|
|
|
+ $info['email_msg'] = $resp['msg'];
|
|
}
|
|
}
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
$this->CI->noticeslog_model->save_notices_log($notices_log);
|
|
}
|
|
}
|
|
|
|
+ return $info;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|