Parcourir la source

fix cron/createElectronicPlate when failed to create localpath without continue

git il y a 5 ans
Parent
commit
349fa7abc9
3 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 2 2
      Home/Lib/Action/ApiAction.class.php
  2. 1 1
      Home/Lib/Action/CronAction.class.php
  3. 1 1
      czapp

+ 2 - 2
Home/Lib/Action/ApiAction.class.php

@@ -909,10 +909,10 @@ class ApiAction extends Action {
 		$data = I('post.');
 		$plate = $data['plate'];
 		$vehicleId = M('jms_vehicle')->where(array('LicensePlate'=>$plate))->field('ID')->find();
-		$insureInfo = M('jms_insure')->where(array('VehicleId'=>$vehicleId['ID']))->field('StartDate,EndDate')->find();
+		$insureInfo = M('jms_insure')->where(array('VehicleId'=>$vehicleId['ID']))->field('InsuranceId,StartDate,EndDate')->find();
 		if($insureInfo){
+			$insuranceInfo = M('jms_insurance')->where(array('ID'=>$insureInfo['InsuranceId']))->field('InsuranceName')->find();
 			$insuranceDetailInfo = M('jms_insurance_detail')->where(array('VehicleId'=>$vehicleId['ID']))->select();
-			$insuranceInfo = M('jms_insurance')->where(array('ID'=>$insuranceDetailInfo[0]['InsuranceId']))->field('InsuranceName')->find();
 			$result['insuranceDetailInfo'] = $insuranceDetailInfo;
 			$result['insuranceName'] = $insuranceInfo['InsuranceName'];
 			$result['insureInfo'] = $insureInfo;

+ 1 - 1
Home/Lib/Action/CronAction.class.php

@@ -38,8 +38,8 @@ class CronAction extends Action {
 				$result = $pendingElectricPlate->add($licensPlate);
 				if(!$result){
 					echo 'pendingElectricPlate->add() failed,$licensPlate = '.$licensPlate .PHP_EOL;
-					continue;
 				}
+				continue;
 			}
 			//生成的本地电子车牌,加入到待上传oss队列
 			$up2ossWait = json_encode(array('licensePlate' => $licensPlate, 'localPath' => $localPath));

+ 1 - 1
czapp

@@ -1 +1 @@
-Subproject commit 132521eb9aecda8c9f4c09ed323db5751f98bd85
+Subproject commit bf0cb5b92f3583d22ab5502a4bf6716e5ca9c207