|
@@ -5,191 +5,3 @@ use Tool\ShanTaoTool\EsTool;
|
|
|
|
|
|
require_once "./vendor/autoload.php";
|
|
require_once "./vendor/autoload.php";
|
|
|
|
|
|
-//$url = "www.baidu.com";
|
|
|
|
-//$url = "https://runion.meituan.com/url?key=765f44a936837a4c8a347d7e6576cf69&url=https%3A%2F%2Fcube.meituan.com%2Fawp%2Fhfe%2Fblock%2Fa945391288b790d558b7%2F78716%2Findex.html%3Fappkey%3D765f44a936837a4c8a347d7e6576cf69%3A1234561&sid=1234561";
|
|
|
|
-//var_dump(\Tool\ShanTaoTool\QiWeiTool::sendImgTxtToBaoJing(
|
|
|
|
-// "http://image.vv-tool.com/meituan.jpg",
|
|
|
|
-// $url,
|
|
|
|
-// "美团外卖",
|
|
|
|
-// "外卖领券",
|
|
|
|
-// "daogouqun")
|
|
|
|
-//);
|
|
|
|
-//var_dump(\Tool\ShanTaoTool\QiWeiTool::sendImgToBaoJing("2.png","daogouqun"));
|
|
|
|
-
|
|
|
|
-//var_dump(\Tool\ShanTaoTool\BaseAuth\AdminAuth::login("hujie1","123456","88888888"));
|
|
|
|
-//var_dump(\Tool\ShanTaoTool\BaseAuth\AdminAuth::getAuth());
|
|
|
|
-
|
|
|
|
-//var_dump(\Tool\ShanTaoTool\QiWeiTool::sendMessageToBaoJing("ceshi"));
|
|
|
|
-
|
|
|
|
-//$head = ["测试","名字"];
|
|
|
|
-//$data = [
|
|
|
|
-// [
|
|
|
|
-// "测试","anii"
|
|
|
|
-// ],
|
|
|
|
-// [
|
|
|
|
-// "skdh","ksi8"
|
|
|
|
-// ]
|
|
|
|
-//];
|
|
|
|
-
|
|
|
|
-//\Tool\ShanTaoTool\ExcelTool::exportToCsv($head,$data,"ceshi");
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
-//$channel = $connection->channel();
|
|
|
|
-//
|
|
|
|
-//echo ' [*] Waiting for messages. To exit press CTRL+C', "\n";
|
|
|
|
-//
|
|
|
|
-//$callback = function($msg) {
|
|
|
|
-// echo " [x] Received ", $msg->body, "\n";
|
|
|
|
-// $data = json_decode($msg->body,true);
|
|
|
|
-// $bean = new CreateLogDocParamBean($data);
|
|
|
|
-// $res = EsTool::createLogDoc($bean);
|
|
|
|
-// var_dump($res);
|
|
|
|
-//};
|
|
|
|
-//
|
|
|
|
-//$channel->basic_consume('vtoolLogQueue', '', false, true, false, false, $callback);
|
|
|
|
-//
|
|
|
|
-//while(count($channel->callbacks)) {
|
|
|
|
-// $channel->wait();
|
|
|
|
-//}
|
|
|
|
-//
|
|
|
|
-//$channel->close();
|
|
|
|
-//$connection->close();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-//测试es
|
|
|
|
-//$data = [
|
|
|
|
-// "requestParams"=>json_encode(["name"=>"mark"]),
|
|
|
|
-// "requestResponse"=>json_encode(["age"=>29]),
|
|
|
|
-// "requestPath"=>"/ceshi/path",
|
|
|
|
-// "requestLog"=>json_encode(["ceshi","自定义日志"]),
|
|
|
|
-// "requestSqlLog"=>json_encode(["insel sql","update sql"]),
|
|
|
|
-// "requestProjectName"=>"vtool",
|
|
|
|
-// "createdAt"=>"1611916077.8329",
|
|
|
|
-// "updatedAt"=>"1611916231.7019",
|
|
|
|
-// "requestId"=>1611916231,
|
|
|
|
-// "uniqueTraceId"=>md5(1234)
|
|
|
|
-//];
|
|
|
|
-//$bean = new \Tool\ShanTaoTool\Bean\ElasticSearch\CreateLogDocParamBean($data);
|
|
|
|
-//$res = \Tool\ShanTaoTool\EsTool::createLogDoc($bean);
|
|
|
|
-//var_dump($res);
|
|
|
|
-//var_dump($data);
|
|
|
|
-//
|
|
|
|
-//\Tool\ShanTaoTool\ElasticSearch\ElasticSerach::getElasticSearchClient();
|
|
|
|
-//$client = \Tool\ShanTaoTool\ElasticSearch\ElasticSerach::$client;
|
|
|
|
-//$param = [
|
|
|
|
-// "index"=>"2021-03-08",
|
|
|
|
-// "projectName"=>"vtool",
|
|
|
|
-//// "requestPath"=>"doc/apps/docs",
|
|
|
|
-// "page"=>1,
|
|
|
|
-// "pageSize"=>2,
|
|
|
|
-// "unique_trace_id"=>"81dc9bdb52d04dc20036dbd8313ed055"
|
|
|
|
-//];
|
|
|
|
-//$bean = new \Tool\ShanTaoTool\Bean\ElasticSearch\GetLogDocParamBean($param);
|
|
|
|
-//$data = \Tool\ShanTaoTool\EsTool::getLogDoc($bean);
|
|
|
|
-//var_dump($data);
|
|
|
|
-
|
|
|
|
-//ini_set("memory_limit",-1);
|
|
|
|
-//
|
|
|
|
-//$datas = \Tool\ShanTaoTool\ExcelTool::importExcel("1.xlsx");
|
|
|
|
-//$heades = [];
|
|
|
|
-//$headData = json_decode($datas[1][1],true);
|
|
|
|
-//foreach ($headData as $key=>$val){
|
|
|
|
-// if(!is_array($val)){
|
|
|
|
-// $heades[] = $key;
|
|
|
|
-// }
|
|
|
|
-//}
|
|
|
|
-//
|
|
|
|
-//$res = [];
|
|
|
|
-//foreach ($datas as $k=>$data){
|
|
|
|
-// if($k>0){
|
|
|
|
-// $tmps = json_decode($data[1],true);
|
|
|
|
-// foreach ($tmps as $tmpKey=>$kv){
|
|
|
|
-// if(!is_array($kv)){
|
|
|
|
-// if(in_array($tmpKey,["inputDate","actionDate","amoytocustomerDate"])){
|
|
|
|
-// if($kv){
|
|
|
|
-// $kv = " ".date("Y-m-d H:i:s",$kv/1000);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// $res[$k-1][]=$kv;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-//}
|
|
|
|
-//var_dump("数据总数:".count($res));
|
|
|
|
-////\Tool\ShanTaoTool\ExcelTool::exportToCsv($heades,$res,"修正");
|
|
|
|
-////打开PHP文件句柄,php://output,表示直接输出到浏览器
|
|
|
|
-//$fp = fopen("修正.csv","a+");
|
|
|
|
-//fwrite($fp, chr(0xEF).chr(0xBB).chr(0xBF)); // 添加 BOM
|
|
|
|
-////输出Excel列表名称信息
|
|
|
|
-//$headerList = $heades;
|
|
|
|
-//foreach ($headerList as $key => $value) {
|
|
|
|
-//// $headerList[$key] = iconv('UTF-8', 'GBK', $value);//CSV的EXCEL支持BGK编码,一定要转换,否则乱码
|
|
|
|
-// $headerList[$key] = $value;//CSV的EXCEL支持BGK编码,一定要转换,否则乱码
|
|
|
|
-//}
|
|
|
|
-////使用fputcsv将数据写入文件句柄
|
|
|
|
-//fputcsv($fp, $headerList);
|
|
|
|
-////计数器
|
|
|
|
-//$num = 0;
|
|
|
|
-////每隔$limit行,刷新一下输出buffer,不要太大亦不要太小
|
|
|
|
-//$limit = 100000;
|
|
|
|
-//$data = $res;
|
|
|
|
-////逐行去除数据,不浪费内存
|
|
|
|
-//$count = count($data);
|
|
|
|
-//for($i = 0 ; $i < $count ; $i++){
|
|
|
|
-// $num++;
|
|
|
|
-// //刷新一下输出buffer,防止由于数据过多造成问题
|
|
|
|
-//// if($limit == $num){
|
|
|
|
-//// ob_flush();
|
|
|
|
-//// flush();
|
|
|
|
-//// $num = 0;
|
|
|
|
-//// }
|
|
|
|
-// $row = $data[$i];
|
|
|
|
-// foreach ($row as $key => $value) {
|
|
|
|
-// $value = is_numeric($value) ? $value."\t" : $value;//解决输出长度较长的数字型变成科学计数法
|
|
|
|
-// $row[$key] = $value;
|
|
|
|
-//// $row[$key] = iconv('UTF-8', 'GBK', $value);
|
|
|
|
-// }
|
|
|
|
-// fputcsv($fp, $row);
|
|
|
|
-//}
|
|
|
|
-//fclose($fp);
|
|
|
|
-
|
|
|
|
-//$txt = \Tool\ShanTaoTool\QrTool::getQrContent("http://oss.taobao2622.top/WechatIMG3.jpeg");
|
|
|
|
-//var_dump($txt);
|
|
|
|
-
|
|
|
|
-//$re = \Tool\ShanTaoTool\SendEmail::sendEmail("底单处理通知","v兔工具",'1152888295@qq.com',"<p data-we-empty-p=''>尊敬的用户:</p><p>您提交的关于包裹id:包裹idxxx,快递公司:快递公司xxx,快递单号:快递单号xxx,申请的底单已经完成申请,</p><p>以下电子面单:</p><p><img src='底单图片xxx' style='max-width:50%;'><br></p><p><br></p><p>如果需要查看详情,点击http://www.vv-tool.com/store/list,如果有什么问题请及时联系网站客服<br></p><p></p><p></p><p>备注:备注xxx</p><hr><p data-we-empty-p=''>v兔电商工具</p>");
|
|
|
|
-//var_dump($re);
|
|
|
|
-
|
|
|
|
-//$res = \Tool\ShanTaoTool\Pdd\Ddk\DdkDaogouService::goodsPidGenerate(1);
|
|
|
|
-//$res = \Tool\ShanTaoTool\Pdd\Ddk\DdkDaogouService::goodsPidQuery(1,10,0);
|
|
|
|
-//$bean = [
|
|
|
|
-// "pid"=>"14844776_209372830",
|
|
|
|
-// "generateWeApp"=>"true",
|
|
|
|
-// "resourceType"=>\Tool\ShanTaoTool\Enum\Pdd\Ddk\DdkResourceTypeEnum::RESOURCE_HUOCHEPIAO
|
|
|
|
-//];
|
|
|
|
-//$bean = new \Tool\ShanTaoTool\Bean\Pdd\Ddk\ResourceUrlGenParamBean($bean);
|
|
|
|
-//$res = \Tool\ShanTaoTool\Pdd\Ddk\DdkDaogouService::resourceUrlGen($bean);
|
|
|
|
-//$bean = new \Tool\ShanTaoTool\Bean\Pdd\Ddk\OrderListRangeGetParamBean(
|
|
|
|
-// [
|
|
|
|
-// "startTime"=>"2021-05-18 13:50:00",
|
|
|
|
-// "endTime"=>"2021-05-18 15:19:00",
|
|
|
|
-// ]
|
|
|
|
-//);
|
|
|
|
-//$res = \Tool\ShanTaoTool\Pdd\Ddk\DdkDaogouService::orderListRangeGet($bean);
|
|
|
|
-//$res = \Tool\ShanTaoTool\Sms\QidianyunSms::send("18768452697","1334");
|
|
|
|
-//var_dump($res);
|
|
|
|
-
|
|
|
|
-$str = "ceshi";
|
|
|
|
-$params = [
|
|
|
|
- "fileName"=>"1.jpg",
|
|
|
|
- "qrContent"=>"nicai",
|
|
|
|
- "qrSize"=>20,
|
|
|
|
- "logoName"=>"1.jpeg"
|
|
|
|
-];
|
|
|
|
-$bean = new \Tool\ShanTaoTool\Bean\Qr\CreateQrLogoImgServiceParamBean($params);
|
|
|
|
-$res = \Tool\ShanTaoTool\QrTool::createQrLogoImg($bean);
|
|
|
|
-var_dump($res);
|
|
|