From 6454733a9ab67603ef026053d8939d0b9deb3a64 Mon Sep 17 00:00:00 2001 From: cyc Date: Tue, 7 May 2019 09:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=88=B0144=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/models/BIZ_train_model.php | 2 +- .../tripadvisor_spider/controllers/index.php | 16 +++++++++------ .../dingmail/controllers/index.php | 18 +++-------------- .../dingmail/models/ding_value_model.php | 17 ++++++++++++++++ webht/third_party/dingmail/views/login.php | 20 +++++++++---------- .../dingmail/views/rank_person.php | 2 +- .../third_party/outlook/controllers/index.php | 18 ++++++++++------- .../outlook/models/outlook_model.php | 2 +- 8 files changed, 54 insertions(+), 41 deletions(-) diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index d6401575..0c4b8fea 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -253,7 +253,7 @@ class BIZ_train_model extends CI_Model { //自动获取符合自动出票要求的订单的coli_sn function auto_check_ticket(){ - $sql = "SELECT distinct top 20 COLD_SN ,coli_id,COLD_SPFS,COLI_State + $sql = "SELECT distinct top 30 COLD_SN ,coli_id,COLD_SPFS,COLI_State FROM BIZ_ConfirmLineInfo bcli inner join BIZ_ConfirmLineDetail bcld on COLD_COLI_SN=COLI_SN LEFT JOIN BIZ_GroupAccountInfo bgai diff --git a/application/third_party/tripadvisor_spider/controllers/index.php b/application/third_party/tripadvisor_spider/controllers/index.php index 6bc23ea5..6b7e266f 100644 --- a/application/third_party/tripadvisor_spider/controllers/index.php +++ b/application/third_party/tripadvisor_spider/controllers/index.php @@ -18,7 +18,7 @@ class Index extends CI_Controller { header('Access-Control-Allow-Credentials:true'); $this->load->model('Tripadvisor_Review_model'); } - + public function index($city = 'Beijing') { $this->permission->is_admin(); $data = array(); @@ -228,6 +228,7 @@ class Index extends CI_Controller { require_once "PHPExcel/IOFactory.php"; $phpExcel = PHPExcel_IOFactory::load($path.$filename); + //创建返回的数组 $data = []; foreach ($phpExcel->getSheetNames() as $key=>$destination){ @@ -236,20 +237,20 @@ class Index extends CI_Controller { $data[$key]->list_name = array(); $data[$key]->list_data = array(); //循环获取每个表格的行/列数 - $row = $phpExcel->getActiveSheet()->getHighestRow(); - $column = $phpExcel->getActiveSheet()->getHighestColumn(); + $row = $phpExcel->getSheet($key)->getHighestRow(); + $column = $phpExcel->getSheet($key)->getHighestColumn(); $j = 0; // 行数循环 for ($i = 1; $i <= $row; $i++) { // 列数循环 for ($c = 'A'; $c <= $column; $c++) { - if($phpExcel->getActiveSheet($key)->getCell('A' . $i)->getValue() == ''){ + if($phpExcel->getSheet($key)->getCell('A' . $i)->getValue() == ''){ continue; }else{ if($i == 1){ - array_push($data[$key]->list_name,$phpExcel->getActiveSheet($key)->getCell($c . $i)->getValue()); + array_push($data[$key]->list_name,$phpExcel->getSheet($key)->getCell($c . $i)->getValue()); }else{ - $data[$key]->list_data[$j][] = $phpExcel->getActiveSheet($key)->getCell($c . $i)->getValue(); + $data[$key]->list_data[$j][] = $phpExcel->getSheet($key)->getCell($c . $i)->getValue(); } } @@ -291,6 +292,7 @@ class Index extends CI_Controller { set_time_limit(0); $url = $this->input->get_post('url'); $destination = $this->input->get_post('destination'); + $html_num = $this->input->get_post('html_num'); //$url = 'https://www.tripadvisor.com/ShowUserReviews-g294212-d4006739-r666168101-The_Trippest_Mini_Group_Tours-Beijing.html'; $destination = 'tp_Beijing'; @@ -307,6 +309,8 @@ class Index extends CI_Controller { $meta_inner = $html_object->find('.meta_inner'); foreach($meta_inner as $detail_info){ + //记录该条记录的id + $detail_data->html_id = $html_num; //获取评论者帐号 foreach($detail_info->find('.info_text') as $review_name){ $detail_data->review_name = $review_name->first_child()->innertext; diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php index 6b705811..7ee50452 100644 --- a/webht/third_party/dingmail/controllers/index.php +++ b/webht/third_party/dingmail/controllers/index.php @@ -375,21 +375,9 @@ class Index extends CI_Controller { $year_end = strtotime(date('Y-12-31', time())); //$year_end = strtotime(date('2016-12-31')); $data['rank_year'] = $this->ding_value_model->get_person_rank($year_start, $year_end); - //总榜 - //$data['rank_all']=$this->Outlook_model->get_person_rank(); - //每条价值观对应获得最多的人 - /* ycc,暂时不需要了 - $rank=array(); - $value_array=array('team','chengxin','customer','discovery','system'); - foreach ($value_array as $value) { - $rank[$value]=$this->Outlook_model->value_key_rank($value); - for ($i=1; $i < 5; $i++) { - $value_key=$value.$i; - $rank[$value_key]=$this->Outlook_model->value_key_rank($value_key); - } - } - $data['rank']=$rank; - */ + //获取全年点赞次数 + $data['click_like'] = $this->ding_value_model->get_click_liek($year_start, $year_end); + $this->load->view('rank_person',$data); } } diff --git a/webht/third_party/dingmail/models/ding_value_model.php b/webht/third_party/dingmail/models/ding_value_model.php index cc656095..72992758 100644 --- a/webht/third_party/dingmail/models/ding_value_model.php +++ b/webht/third_party/dingmail/models/ding_value_model.php @@ -287,6 +287,23 @@ class ding_value_model extends CI_Model { return $result; } + //获取全年参与点赞的次数 + public function get_click_liek($from_date=false,$to_date=false){ + $datesql=""; + if ($from_date) { + $datesql=" AND ddv_Createtime BETWEEN '$from_date' AND '$to_date' "; + } + $sql="SELECT COUNT(*) as like_count + FROM Dingding_Value + WHERE ddv_Type='like' AND ddv_Comment_Name != 'value邮件' + $datesql + "; + + $query = $this->HT->query($sql); + $result=$query->row(); + return $result; + } + //更新用户信息 function update_dingding_user($name,$unionid,$mobile,$email,$position,$avatar,$time){ $sql = "UPDATE Dingding_User SET diff --git a/webht/third_party/dingmail/views/login.php b/webht/third_party/dingmail/views/login.php index 39421aa0..6c38f003 100644 --- a/webht/third_party/dingmail/views/login.php +++ b/webht/third_party/dingmail/views/login.php @@ -4,16 +4,16 @@ value系统登录 - - - - - - - - - - + + + + + + + + + + diff --git a/webht/third_party/dingmail/views/rank_person.php b/webht/third_party/dingmail/views/rank_person.php index e1a89a0f..398936e6 100644 --- a/webht/third_party/dingmail/views/rank_person.php +++ b/webht/third_party/dingmail/views/rank_person.php @@ -59,7 +59,7 @@
-

个人获赞排行榜

+

个人获赞排行榜 | 全年参与点赞次数:like_count?>

diff --git a/webht/third_party/outlook/controllers/index.php b/webht/third_party/outlook/controllers/index.php index 5f6ef0a7..7372af94 100644 --- a/webht/third_party/outlook/controllers/index.php +++ b/webht/third_party/outlook/controllers/index.php @@ -175,7 +175,10 @@ class Index extends CI_Controller { $data['rank_month'] = $this->Outlook_model->get_person_rank($from_date, $to_date); //年榜 $year_start = strtotime(date('Y-01-01', time())); + //$year_start = strtotime(date('2016-01-01')); $year_end = strtotime(date('Y-12-31', time())); + //$year_end = strtotime(date('2016-12-31')); + $data['rank_year'] = $this->Outlook_model->get_person_rank($year_start, $year_end); //总榜 //$data['rank_all']=$this->Outlook_model->get_person_rank(); @@ -342,12 +345,12 @@ class Index extends CI_Controller { $tip_type = 'comment'; //等于comment时页面不弹出提示 $tpldata['list'] = $this->Outlook_model->get_comment_list($whc_whm_identify, 'comment', 'DESC'); - $tpldata['mail_text'] = $this->Outlook_model->get_mail_text($whc_whm_identify); + $tpldata['mail_text'] = $this->Outlook_model->get_mail_text($whc_whm_identify); $tpldata['userinfo'] = $this->Outlook_model->get_webhtuser_by_filed('whu_email', $whc_whm_identify . '@citsguilin.com', '*'); - + if ($current_user->whu_uid && $linktype != 'comment' && $tpldata['userinfo']->whu_uid != $current_user->whu_uid) { $like_count = $this->Outlook_model->get_comment_count($whc_whm_identify, $linktype, $current_user->whu_uid); - if ($like_count < 3) { + if ($like_count < 3) { $data['whc_type'] = $linktype; $data['whc_whm_identify'] = $whc_whm_identify; $data['whc_uid'] = $current_user->whu_uid; @@ -373,7 +376,7 @@ class Index extends CI_Controller { } $tpldata['list_count'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'comment', true); - $tpldata['like_list'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'like'); + $tpldata['like_list'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'like'); $tpldata['unlike_list'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'unlike'); $tpldata['type'] = $tip_type; $tpldata['current_user'] = $current_user; @@ -627,7 +630,6 @@ class Index extends CI_Controller { $fromemail = $fromuser->whu_email; $subject = $this->input->post('mail_subject'); $body = $this->input->post('emailcontent') . $mailbody; - if (!$this->do_sendmail($fromemail, $tolist_array, $cclist_array, $subject, $body)) { $result = 0; //"邮件发送有误: " . $mail->ErrorInfo; } else { @@ -659,7 +661,7 @@ class Index extends CI_Controller { $mail->CharSet = "utf-8"; $mail->Encoding = "base64"; $mail->IsHTML(true); - + $mail->From = $fromuser; //发件人 foreach ($tolist_array as $v) { $mail->AddAddress($v); //收件人 @@ -671,7 +673,8 @@ class Index extends CI_Controller { $mail->Body = $mailbody; //邮件内容 if (!$mail->Send()) { - $result = false; //"邮件发送有误: " . $mail->ErrorInfo; + //$result = false;// echo "邮件发送有误: " . $mail->ErrorInfo; + echo "邮件发送有误: " . $mail->ErrorInfo; } else { $result = true; } @@ -814,6 +817,7 @@ class Index extends CI_Controller { $whu_uname = $whu_uname[0]; $whu_ip = $this->input->post('whu_ip'); $result = $this->Outlook_model->verify_user($whu_uname, $whu_ip); + echo $result; } diff --git a/webht/third_party/outlook/models/outlook_model.php b/webht/third_party/outlook/models/outlook_model.php index 86e6d1e0..1c8b4f3e 100644 --- a/webht/third_party/outlook/models/outlook_model.php +++ b/webht/third_party/outlook/models/outlook_model.php @@ -281,7 +281,7 @@ class Outlook_model extends CI_Model { return '2'; }else{ $sql="UPDATE webht_user SET whu_ip = '$whu_ip',whu_status=1 WHERE whu_uname like '%$whu_uname%' "; - $result = $this->HT->query($sql); + $result = $this->HT->query($sql);//var_dump($this->HT->last_query()); return '1'; } }