Ver Fonte

短信黑名单导出

shenzhipeng há 2 anos atrás
pai
commit
2acb6b0ad8

+ 7 - 0
application/lib/data/adminAction.php

@@ -171,6 +171,13 @@ class AdvertAdminAction extends BaseAction{
 			$result = $this->getDbEntity()->query($sql);
 			return $result;
 		}
+
+		public function exportBlackList() {
+			$sql = "select uname, tel, country, group_name from ly_sms_customer where is_block=1 order by id desc ";
+			$result = $this->getDbEntity()->query($sql);
+			return $result;
+		}
+
   		//查询UID下所有客户Email
 		public function selesctCustomerByUid($uid){
 			$sql    = "select email  from ly_customer where 1=1 and uid = $uid  ";

+ 10 - 0
application/module/ctrl/Sms_customer_list_adminAction.class.php

@@ -663,5 +663,15 @@ class Sms_customer_list_adminAction extends Action{
 		}
 		return $excel_array;
 	}
+
+	public function exportBlackList(){
+		$admin = new AdvertAdminAction();
+
+		$list = $admin->getAllSmsBlacklist();
+
+		$d = date('Y-m-d',time());
+		$this->generateEXCEL($d . "导出短信黑名单客户数据", $list);
+
+	}
 }
 

+ 7 - 0
application/module/view/sms_customer_list_admin/blacklist.html

@@ -40,6 +40,13 @@
 
 				<br/><br/>
 
+				<form method="post" action="/?a=sms_customer_list_admin&m=exportBlackList" target="_blank">
+					<div style="text-align:right;">
+						<input type="hidden"  name="is_block" value="1" />
+						<input type="submit" class="btn btn-primary" value="导出短信黑名单数据"  style="width:200px;"/>
+					</div>
+				</form>
+
 				<form method="post" id="batch_user_group" action="/?a=sms_customer_list_admin&m=importBlackList" enctype="multipart/form-data"  >
 					<input type="hidden"  name="to_import_user" value="yes" />
 					<input type="file" name="inputExcel" style="width:175px;"><span style="color:red;">(excel是.xls格式的)</span>