shish %!s(int64=6) %!d(string=hai) anos
pai
achega
1c4b2d1505

+ 2 - 2
app/www/controllers/WxOpenController.php

@@ -149,8 +149,8 @@ class WxOpenController extends PublicController
 
 		//小程序
 		if (isset($authorize_info['MiniProgramInfo']) && !empty($authorize_info['MiniProgramInfo'])) {
-			xhMerchantExtendService::updateByMerchantId($id, ['miniAppId' => $authorizeAppId, 'miniAccessToken' => $authorize_access_token, 'miniAccessTokenTime' => $accessTokenTime, 'miniRefreshToken' => $authorize_refresh_token]);
-			MerchantService::updateById($id, ['miniAppId' => $authorizeAppId,'miniAuth'=>1]);
+			xhMerchantExtendService::updateByMerchantId($id, ['miniAppId' => $authorizeAppId,'miniAuth'=>1, 'miniAccessToken' => $authorize_access_token, 'miniAccessTokenTime' => $accessTokenTime, 'miniRefreshToken' => $authorize_refresh_token]);
+			MerchantService::updateById($id, ['miniAppId' => $authorizeAppId]);
 			Yii::info('小程序信息更新成功:' . json_encode($authorize_info));
 			util::stop("小程序信息更新成功");
 		}

+ 6 - 6
console/controllers/UpgradeController.php

@@ -1083,13 +1083,13 @@ ALTER TABLE `xhMerchantExtend` ADD openAppBind TINYINT NOT NULL DEFAULT 0 COMMEN
 		
 		//花美灵开放平台的公众号和第一个公众号
 		if ($env == 'dev') {
-			$sql = "update xhMerchant set merchantName='花美灵' where id=12359;update xhShop set shopName='花美灵',merchantName='花美灵' where merchantId=12359;
+			$sql = "update xhMerchant set merchantName='花美灵' where id=12359;update xhShop set shopName='花美灵',merchantName='花美灵',`status`=1 where merchantId=12359;
 update xhMerchant set merchantName='中花卉' where id=12358;update xhShop set shopName='中花卉',merchantName='中花卉' where merchantId=12358;";
 			Yii::$app->db->createCommand($sql)->execute();
 		}
 		//花掌柜开放平台的公众号和第一个公众号
 		if ($env == 'test') {
-			$sql = "update xhMerchant set merchantName='花掌柜' where id=12359;update xhShop set shopName='花掌柜',merchantName='花掌柜' where merchantId=12359;
+			$sql = "update xhMerchant set merchantName='花掌柜' where id=12359;update xhShop set shopName='花掌柜',merchantName='花掌柜',`status`=1 where merchantId=12359;
 update xhMerchant set merchantName='花店宝' where id=12358;update xhShop set shopName='花店宝',merchantName='花店宝' where merchantId=12358;";
 			Yii::$app->db->createCommand($sql)->execute();
 		}
@@ -1111,16 +1111,16 @@ update xhMerchant set merchantName='花店宝' where id=12358;update xhShop set
 
 		//更换开发环境小程序的miniAppId、miniAppSecret
 		if ($env == 'dev') {
-			$sql = "UPDATE xhMerchant SET miniAppId='wxe41bd5816affd0ba',miniAppSecret='ad634457979bc6eb1fb0bc7f4f58d885' WHERE id=12358;UPDATE xhMerchantExtend SET miniAppId='wxe41bd5816affd0ba' WHERE merchantId=12358;";
+			$sql = "UPDATE xhMerchant SET miniAppId='wxe41bd5816affd0ba',miniAppSecret='ad634457979bc6eb1fb0bc7f4f58d885' WHERE id=12358;UPDATE xhMerchantExtend SET miniAppId='wxe41bd5816affd0ba',wxPayInit=0,wxPayMerchantId='',wxPayKey='' WHERE merchantId=12358;";
 			Yii::$app->db->createCommand($sql)->execute($sql);
-			$sql = "UPDATE xhMerchant SET miniAppId='wxe4675bab299a52f7',miniAppSecret='12f90039b1245ba6abf2e4184462fb30' WHERE id=12359;UPDATE xhMerchantExtend SET miniAppId='wxe4675bab299a52f7' WHERE merchantId=12359;";
+			$sql = "UPDATE xhMerchant SET miniAppId='wxe4675bab299a52f7',miniAppSecret='12f90039b1245ba6abf2e4184462fb30' WHERE id=12359;UPDATE xhMerchantExtend SET miniAppId='wxe4675bab299a52f7',wxPayInit=0,wxPayMerchantId='',wxPayKey='' WHERE merchantId=12359;";
 			Yii::$app->db->createCommand($sql)->execute($sql);
 		}
 		//更换测试环境小程序的miniAppId、miniAppSecret
 		if ($env == 'test') {
-			$sql = "UPDATE xhMerchant SET miniAppId='wx36ca6b1d6e9ca2a4',miniAppSecret='b8227c6264785a233e67293f13b1b7b3' WHERE id=12358;UPDATE xhMerchantExtend SET miniAppId='wx36ca6b1d6e9ca2a4' WHERE merchantId=12358;";
+			$sql = "UPDATE xhMerchant SET miniAppId='wx36ca6b1d6e9ca2a4',miniAppSecret='b8227c6264785a233e67293f13b1b7b3' WHERE id=12358;UPDATE xhMerchantExtend SET miniAppId='wx36ca6b1d6e9ca2a4',wxPayInit=0,wxPayMerchantId='',wxPayKey='' WHERE merchantId=12358;";
 			Yii::$app->db->createCommand($sql)->execute($sql);
-			$sql = "UPDATE xhMerchant SET miniAppId='wx21b7c3ef12082099',miniAppSecret='fd21ef3ebbc70e89d5c3a5a3c013edb6' WHERE id=12359;UPDATE xhMerchantExtend SET miniAppId='wx21b7c3ef12082099' WHERE merchantId=12359;";
+			$sql = "UPDATE xhMerchant SET miniAppId='wx21b7c3ef12082099',miniAppSecret='fd21ef3ebbc70e89d5c3a5a3c013edb6' WHERE id=12359;UPDATE xhMerchantExtend SET miniAppId='wx21b7c3ef12082099',wxPayInit=0,wxPayMerchantId='',wxPayKey='' WHERE merchantId=12359;";
 			Yii::$app->db->createCommand($sql)->execute($sql);
 		}