shish 6 år sedan
förälder
incheckning
e3a7882744

+ 2 - 2
biz/message/classes/InformAdminClass.php

@@ -40,14 +40,14 @@ class InformAdminClass extends BaseClass
 				break;
 			default:
 		}
-		$adminId = $adminShop['id'];
+		$adminShopId = $adminShop['id'];
 		$mobile = $adminShop['mobile'];
 		$data = [
 			'messageType' => 'inform',
 			'informWay' => 'miniProgram',
 			'userType' => 'admin',
 			'mobile' => $mobile,
-			'adminId' => $adminId,
+			'adminShopId' => $adminShopId,
 			'userId' => 0,
 			'shopId' => $shopId,
 		];

+ 5 - 4
biz/message/services/InformAdminService.php

@@ -3,6 +3,7 @@
 namespace biz\message\services;
 
 use biz\admin\classes\AdminClass;
+use biz\admin\classes\AdminShopClass;
 use biz\admin\services\AdminService;
 use biz\admin\services\AdminShopService;
 use biz\base\services\BaseService;
@@ -36,13 +37,13 @@ class InformAdminService extends BaseService
 	}
 	
 	//消费通知内容 shish 2020.1.1
+	//['messageType'=>'inform','informWay'=>'miniProgram','userType'=>'admin','adminShopId'=>913,'mobile'=>'15280215347','tMessage'=>'','content'=>'','briefContent'=>'']
 	public static function consumeInformQueue($data)
 	{
-		//['messageType'=>'inform','informWay'=>'miniProgram','userType'=>'admin','id'=>1,'mobile'=>'15280215347','tMessage'=>'','content'=>'','briefContent'=>'']
 		$informWay = $data['informWay'];
-		$adminId = $data['adminId'];
-		$admin = AdminService::getAdminById($id);
-		$merchantId = $admin['merchantId'];
+		$adminShopId = $data['adminShopId'];
+		$adminShop = AdminShopClass::getById($adminShopId);
+		$merchantId = $adminShop['merchantId'];
 		$mobile = $data['mobile'];
 		$merchant = MerchantService::getMerchantById($merchantId);
 		$hasSend = 0;

+ 4 - 4
common/components/rabbitmq/consumer/informConsumer.php

@@ -28,10 +28,10 @@ class informConsumer implements ConsumerInterface
 //		return ConsumerInterface::MSG_ACK;
 		$userType = $data['userType'];
 		if ($userType == 'user') {
-			$return = InformUserService::consumeInformQueue($data);
-			if ($return) {
-				return ConsumerInterface::MSG_ACK;
-			}
+//			$return = InformUserService::consumeInformQueue($data);
+//			if ($return) {
+//				return ConsumerInterface::MSG_ACK;
+//			}
 		}
 		if ($userType == 'admin') {
 			$return = InformAdminService::consumeInformQueue($data);