You've already forked qlg.tsgz.moe
							
							Merge remote-tracking branch 'origin/master'
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								H5B854518.wgt
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								H5B854518.wgt
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -1,8 +1,8 @@ | |||||||
| <?php | <?php | ||||||
| $data['version'] = 16; | $data['version'] = 16; | ||||||
| $data['ios_must_update'] = 0;	//是否强制更新,0不强制,1强制 | $data['ios_must_update'] = 1;	//是否强制更新,0不强制,1强制 | ||||||
| $data['must_update'] = 1;	//是否强制更新,0不强制,1强制 | $data['must_update'] = 1;	//是否强制更新,0不强制,1强制 | ||||||
| $data['apk_version'] = '2.2.7'; | $data['apk_version'] = '2.3.1'; | ||||||
| $data['apk_down_url'] = 'http://www.zgqlg.com.cn/H5B854518.wgt'; | $data['apk_down_url'] = 'http://www.zgqlg.com.cn/H5B854518.wgt'; | ||||||
| //$data['ios_version'] = '1.0.0'; | //$data['ios_version'] = '1.0.0'; | ||||||
| $data['ios_appid'] = '1355322179'; | $data['ios_appid'] = '1355322179'; | ||||||
|   | |||||||
| @@ -229,7 +229,6 @@ class Users extends Base{ | |||||||
|     $m = Model('common/Table'); |     $m = Model('common/Table'); | ||||||
|     $m->setTable('user_vouchers_summary'); |     $m->setTable('user_vouchers_summary'); | ||||||
|     $data = $m->getInfo(['userId'=>$userId],'expectedProductNum,expectedCouponsNum,alreadyProductNum,alreadyCouponsNum'); |     $data = $m->getInfo(['userId'=>$userId],'expectedProductNum,expectedCouponsNum,alreadyProductNum,alreadyCouponsNum'); | ||||||
|     $data = $m->getInfo(['userId'=>$userId],'expectedProductNum,expectedCouponsNum,alreadyProductNum,alreadyCouponsNum'); |  | ||||||
|     $m->setTable('shops'); |     $m->setTable('shops'); | ||||||
|     $shopIds = $m->getColumn(['status'=>1,'userId'=>$userId],'shopId'); |     $shopIds = $m->getColumn(['status'=>1,'userId'=>$userId],'shopId'); | ||||||
|     if($shopIds){ |     if($shopIds){ | ||||||
|   | |||||||
| @@ -21,12 +21,12 @@ class UserVouchers extends Base{ | |||||||
| 		//应释放总额 | 		//应释放总额 | ||||||
| 		$toPaySum = $payFast + $paySlow; | 		$toPaySum = $payFast + $paySlow; | ||||||
| 		Db::startTrans(); | 		Db::startTrans(); | ||||||
| 		try{             | 		try{ | ||||||
|             $m = Model('common/Table'); |             $m = Model('common/Table'); | ||||||
|             $m->setTable('user_vouchers_summary');   |             $m->setTable('user_vouchers_summary'); | ||||||
|             if(1 == date('j')){ |             if(1 == date('j')){ | ||||||
|                 //每月损耗 |                 //每月损耗 | ||||||
|                 $monthScale = round((100-dataConf('couponsNextMonthInitSacle'))*0.01,2);                |                 $monthScale = round((100-dataConf('couponsNextMonthInitSacle'))*0.01,2); | ||||||
|                 $giveList = $m->getList([],'id, userId, expectedProductNum, expectedCouponsNum'); |                 $giveList = $m->getList([],'id, userId, expectedProductNum, expectedCouponsNum'); | ||||||
|                 foreach ($giveList as &$g) { |                 foreach ($giveList as &$g) { | ||||||
|                     if($g['expectedProductNum'] > 0){ |                     if($g['expectedProductNum'] > 0){ | ||||||
| @@ -38,7 +38,7 @@ class UserVouchers extends Base{ | |||||||
|                         $this->insertVouchersNotice($g['userId'],0,0,$decNum,$desc='预获优惠券月耗损',0,1); |                         $this->insertVouchersNotice($g['userId'],0,0,$decNum,$desc='预获优惠券月耗损',0,1); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             }         |             } | ||||||
|             $where['isDisabled'] = 0; |             $where['isDisabled'] = 0; | ||||||
|             //总预获产品券 |             //总预获产品券 | ||||||
|             $allPreProduct = $m->getSum($where,'expectedProductNum'); |             $allPreProduct = $m->getSum($where,'expectedProductNum'); | ||||||
| @@ -128,7 +128,7 @@ class UserVouchers extends Base{ | |||||||
|                 $data['isGive'] = 1; |                 $data['isGive'] = 1; | ||||||
|     			$data['giveDate'] = $time; |     			$data['giveDate'] = $time; | ||||||
|     			$data['giveDay'] = $v['giveDay'] + 1; |     			$data['giveDay'] = $v['giveDay'] + 1; | ||||||
|     			$m->updateInfo(['id'=>$v['id']],$data); |                 Db::name('user_vouchers_summary')->where(['id'=>$v['id']])->update($data); | ||||||
|     		} |     		} | ||||||
|             Db::commit(); |             Db::commit(); | ||||||
|             Db::startTrans(); |             Db::startTrans(); | ||||||
| @@ -136,18 +136,16 @@ class UserVouchers extends Base{ | |||||||
|             // A、当“助购预获”值为负数时,每天0.1%耗损在“预获产品券”值扣减。 |             // A、当“助购预获”值为负数时,每天0.1%耗损在“预获产品券”值扣减。 | ||||||
|             // B、当“预获产品券”值为负数时,每天0.1%耗损在“预获优惠券”值扣减。 |             // B、当“预获产品券”值为负数时,每天0.1%耗损在“预获优惠券”值扣减。 | ||||||
|             // C、当“助购预获”值和“预获产品券”值同为负数时,每天0.1%耗损在“预获优惠券”值同时扣减。 |             // C、当“助购预获”值和“预获产品券”值同为负数时,每天0.1%耗损在“预获优惠券”值同时扣减。 | ||||||
|             $vm = Model('common/Table'); |             $data = Db::name('user_vouchers_summary')->whereOr(["helpSaleNum"=>["lt", 0]])->whereOr(["expectedProductNum"=>["lt", 0]])->select(); | ||||||
|             $vm->setTable('user_vouchers_summary'); |  | ||||||
|             $data = $vm->whereOr(["helpSaleNum"=>["lt", 0]])->whereOr(["expectedProductNum"=>["lt", 0]])->select(); |  | ||||||
|             foreach ($data as $_each){ |             foreach ($data as $_each){ | ||||||
|                 if($_each["expectedProductNum"]<0){ |                 if($_each["expectedProductNum"]<0){ | ||||||
|                     $count = (float)$_each["expectedProductNum"]; |                     $count = (float)$_each["expectedProductNum"]; | ||||||
|                     if($_each["helpSaleNum"] < 0)$count+=(float)$_each["helpSaleNum"]; |                     if($_each["helpSaleNum"] < 0)$count+=(float)$_each["helpSaleNum"]; | ||||||
|                     $this->insertVouchersNotice($_each["userId"], 0, 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), |                     model('common/UserVouchers')->insertVouchersNotice($_each["userId"], 0, 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), | ||||||
|                         "预获产品券为负,每天耗损预获优惠券", 0); |                         "预获产品券为负,每天耗损预获优惠券", 0); | ||||||
|                 }else{ |                 }else{ | ||||||
|                     $count = (float)$_each["helpSaleNum"]; |                     $count = (float)$_each["helpSaleNum"]; | ||||||
|                     $this->insertVouchersNotice($_each["userId"], 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), |                     model('common/UserVouchers')->insertVouchersNotice($_each["userId"], 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), | ||||||
|                         0, "助购预获为负,每天耗损预获产品券", 0); |                         0, "助购预获为负,每天耗损预获产品券", 0); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| @@ -177,8 +175,7 @@ class UserVouchers extends Base{ | |||||||
|             $m->insertInfo(['targetType'=>0,'targetId'=>$userId,'dataSrc'=>1,'money'=>$alreadyProductNum,'moneyName'=>1,'remark'=>$desc,'moneyType'=>$isAdd,'payType'=>'qlgpay','createTime'=>date('Y/m/d H:i:s')]); |             $m->insertInfo(['targetType'=>0,'targetId'=>$userId,'dataSrc'=>1,'money'=>$alreadyProductNum,'moneyName'=>1,'remark'=>$desc,'moneyType'=>$isAdd,'payType'=>'qlgpay','createTime'=>date('Y/m/d H:i:s')]); | ||||||
|         } |         } | ||||||
|     	if($alreadyCouponsNum>0){ |     	if($alreadyCouponsNum>0){ | ||||||
|             $m->insertInfo(['targetType'=>0,'targetId'=>$userId,'dataSrc'=>1,'money'=>$alreadyProductNum,'moneyName'=>2,'remark'=>$desc,'moneyType'=>$isAdd,'payType'=>'qlgpay','createTime'=>date('Y/m/d H:i:s')]); |             $m->insertInfo(['targetType'=>0,'targetId'=>$userId,'dataSrc'=>1,'money'=>$alreadyCouponsNum,'moneyName'=>2,'remark'=>$desc,'moneyType'=>$isAdd,'payType'=>'qlgpay','createTime'=>date('Y/m/d H:i:s')]); | ||||||
|  |  | ||||||
|         } |         } | ||||||
|     	//插入或更新详细表 |     	//插入或更新详细表 | ||||||
|     	$m->setTable('users'); |     	$m->setTable('users'); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user