2 Commits 08bccbe3fb ... f7104bb99b

Autore SHA1 Messaggio Data
  sunhao f7104bb99b ti 1 anno fa
  sunhao 708d7d8551 修改佣金基础0.2 2 anni fa

+ 11 - 1
PHPMailer/ClassSmtp.php

@@ -1107,7 +1107,17 @@ class SMTP {
1107 1107
         return $data;
1108 1108
     }
1109 1109
 
1110
+    /**
1111
+     * Get the latest error.
1112
+     *
1113
+     * @return array
1114
+     */
1115
+    public function getError()
1116
+    {
1117
+        return $this->error;
1118
+    }
1119
+
1110 1120
 }
1111 1121
 
1112 1122
 
1113
-?>
1123
+?>

+ 1 - 1
confv2.class.php

@@ -19,7 +19,7 @@ class conf{
19 19
 		);
20 20
 	# 佣金比例
21 21
 	public static $RATE_CONF = array(
22
-			"globalzk"=>0.5,  //全局
22
+			"globalzk"=>0.8,  //全局
23 23
 			"selfSuper"=>0.6, //超 自购
24 24
 			"selfYys"=>0.9,  //运 自购
25 25
 			"onefirstSuper"=>0.6, //超 普下购

+ 3 - 2
liedou_order_new/finance_export.php

@@ -133,11 +133,12 @@ function sendMail($to, $subject, $body = '', $attachment = null) { //$to 收件
133 133
     $mail->MsgHTML($body);
134 134
     $mail->AddAddress($to);
135 135
     $mail->AddAddress("yu.fu@kuxuan-inc.com");
136
-    $mail->AddAddress("ming.li@kuxuan-inc.com");
136
+    $mail->AddAddress("song.shen@kuxuan-inc.com");
137 137
     $mail->AddAddress("wanlu.zhang@kuxuan-inc.com");
138
-    $mail->AddAddress("jingjing.jiang@kuxuan-inc.com");
139 138
     $mail->AddAttachment($attachment);
139
+echo "\n发送...";
140 140
     $rs = $mail->Send() ? true : $mail->ErrorInfo;
141
+var_dump($rs);
141 142
     return $rs;
142 143
 }   
143 144
 

File diff suppressed because it is too large
+ 212 - 0
liedou_order_new/sync_liedou_order_auto_up.php


File diff suppressed because it is too large
+ 212 - 0
liedou_order_new/sync_liedou_order_auto_up2.php


+ 3 - 3
liedou_order_new/sync_liedou_order_up.php

@@ -18,7 +18,7 @@ function sync_orders(){
18 18
 	//同步订单脚本
19 19
 	# 1.同步N分钟内所有订单
20 20
 	//$now = strtotime('2019-01-21 16:54:00');
21
-	$time = date("Y-m-1", strtotime('-1 month'));
21
+	$time = date("Y-m-11", strtotime('-1 month'));
22 22
 	echo "\n\nCreate_time:".$time;
23 23
 	$etime = '';
24 24
 
@@ -26,7 +26,7 @@ function sync_orders(){
26 26
 	$time_type = 2;//按付款时间查
27 27
 	$tk_status = 0;//查询所有状态订单
28 28
 
29
-	for($x=1;$x<145;$x++){
29
+	for($x=1;$x<73;$x++){
30 30
 		$position_index = '';//查下一页必要参数
31 31
 		$stime = !empty($etime) ? $etime : $time;
32 32
 		$dstr = $time.' '.($x*20).' minutes';
@@ -88,7 +88,7 @@ function sync_orders(){
88 88
 	        if(!isset($orderDetail['pub_share_pre_fee'])) $orderDetail['pub_share_pre_fee'] = 0;
89 89
 		    if(!isset($orderDetail['alipay_total_price'])) $orderDetail['alipay_total_price'] = 0;
90 90
 
91
-	    	echo 'order_id:'.$orderDetail['trade_id'].'|| goods_id:'.$orderDetail['item_id'].'|| orderstatus:'.$orderDetail['tk_status'].'|| order_balance_at:'.$orderDetail['tk_earning_time'].'|| order_create_time:'.$orderDetail['tk_create_time'];
91
+	    	echo 'order_id:'.$orderDetail['trade_id'].'|| goods_id:'.$orderDetail['item_id'].'|| orderstatus:'.$orderDetail['tk_status'].'|| order_balance_at:'.$orderDetail['tk_earning_time'].'|| order_pay_time:'.$orderDetail['tb_paid_time'];;
92 92
 			if( DETAILDEBUG == 1){
93 93
 				echo 'orderDetail:';
94 94
 				var_dump($orderDetail);

+ 1 - 1
sync_liedou_order_up.php

@@ -21,7 +21,7 @@ function sync_orders($_time, $now){
21 21
 	# 1.同步N分钟内所有订单
22 22
 	//$now = strtotime('2019-01-21 16:54:00');
23 23
 	//$time = date("Y-m-d H:i:s", strtotime('-1 day'));
24
-	$time = "2019-07-01 00:00:00";
24
+	$time = "2019-08-19 00:00:00";
25 25
 	echo "\n\nCreate_time:".$time;
26 26
 	$orderResult = array();
27 27
 	for($x=0;$x<144;$x++){

+ 3 - 3
tbk_online/order_balance.php

@@ -28,9 +28,9 @@ $_PDO=DB_PDO::getInstance( conf::$DB_ONLINE_CONF );
28 28
     */
29 29
 
30 30
 #查询上月份结算信息
31
-$stime = date('2019-08-01').' 00:00:00';
32
-$etime = date('2019-09-01').' 00:00:00';
33
-$ntime = date('2019-09-26').' 00:00:00';
31
+$stime = date('2019-12-01').' 00:00:00';
32
+$etime = date('2020-01-01').' 00:00:00';
33
+$ntime = date('2020-01-26').' 00:00:00';
34 34
 $sql = "SELECT user_id,sum(rebate) as money from `order_rebate` where order_balance_at>=:stime and order_balance_at<:etime and status=2 and maintain_power<3 and type!=7 group by user_id ";
35 35
 echo "beginTime:".$stime." -> endTime:".$etime."\n";
36 36
 $stmt = $_PDO->prepare($sql);  

+ 5 - 3
tbk_online/profit_balance.php

@@ -28,9 +28,9 @@ $_PDO=DB_PDO::getInstance( conf::$DB_ONLINE_CONF );
28 28
     */
29 29
 
30 30
 #查询上月份结算信息
31
-$stime = date('2019-08-01').' 00:00:00';
32
-$etime = date('2019-09-01').' 00:00:00';
33
-$ntime = date('2019-09-26').' 00:00:00';
31
+$stime = date('2019-12-01').' 00:00:00';
32
+$etime = date('2020-01-01').' 00:00:00';
33
+$ntime = date('2020-01-26').' 00:00:00';
34 34
 
35 35
 $sql = "SELECT user_id,sum(rebate) as money from `order_rebate_profit` where order_balance_at>=:stime and order_balance_at<:etime and status=2 and maintain_power<3 group by user_id ";
36 36
 echo "beginTime:".$stime." -> endTime:".$etime."\n";
@@ -63,6 +63,7 @@ foreach( $rebateInfo as $k=>$v){
63 63
 		echo "多多!!!用户跳过user_id:".$v['user_id']."\n";
64 64
 		continue;
65 65
 	}
66
+$id = $res['id'];
66 67
 	try{
67 68
 		$sql = "UPDATE account_detail_profit set rebate=:rebate where id=:id";
68 69
 		$stmt = $_PDO->prepare($sql);  
@@ -72,6 +73,7 @@ foreach( $rebateInfo as $k=>$v){
72 73
 		if($res){
73 74
 			$success++;
74 75
 		}else{
76
+echo "失败".$id.' '.$v['money']."\n";
75 77
 			$fail++;
76 78
 		}
77 79
 	}catch(Exception $e){