|
|
@@ -7,6 +7,7 @@ use biz\goods\services\GoodsService;
|
|
|
use biz\goods\services\GoodsStyleService;
|
|
|
use biz\merchant\services\MerchantCapitalService;
|
|
|
use biz\merchant\services\MerchantExtendService;
|
|
|
+use biz\merchant\services\MerchantService;
|
|
|
use biz\message\services\TMessageService;
|
|
|
use biz\order\services\OrderGoodsService;
|
|
|
use biz\order\services\OrderService;
|
|
|
@@ -21,6 +22,7 @@ use biz\user\services\UserService;
|
|
|
use biz\weixin\services\WxMenuService;
|
|
|
use common\components\dirUtil;
|
|
|
use common\components\util;
|
|
|
+use common\components\wxUtil;
|
|
|
use common\services\xhMerchantService;
|
|
|
use common\services\xhWxMenuService;
|
|
|
use Yii;
|
|
|
@@ -1193,11 +1195,11 @@ ALTER TABLE `xhUserGrowth` DROP COLUMN `capitalType`;";
|
|
|
|
|
|
$sql = "ALTER TABLE `xhOrder` MODIFY `discountType` TINYINT NOT NULL DEFAULT 0 COMMENT '优惠类型 0没有优惠 1使用优惠卷 2会员打折 3随机优惠';";
|
|
|
Yii::$app->db->createCommand($sql)->execute($sql);
|
|
|
-
|
|
|
+
|
|
|
//增加常规的节日 shish 2020.3.11
|
|
|
$sql = "INSERT INTO `xhFest`(`id`,`name`,`month`,`day`,`inTurn`) VALUES (1,'情人节',2,14,0),(2,'母亲节',5,10,0),(3,'教师节',9,10,0),(4,'七夕节',8,25,0),(5,'妇女节',3,8,0),(6,'女生节',3,7,0);";
|
|
|
Yii::$app->db->createCommand($sql)->execute($sql);
|
|
|
-
|
|
|
+
|
|
|
//将商家的logo清除掉
|
|
|
$sql = "UPDATE xhMerchant SET `logo`='';";
|
|
|
Yii::$app->db->createCommand($sql)->execute($sql);
|
|
|
@@ -1210,16 +1212,24 @@ merchantId INT NOT NULL DEFAULT 0 COMMENT '商家id',
|
|
|
`addTime` INT NOT NULL DEFAULT 0 COMMENT '添加时间'
|
|
|
)COMMENT='微信公众号';";
|
|
|
Yii::$app->db->createCommand($sql)->execute($sql);
|
|
|
-
|
|
|
+
|
|
|
+ $sql = "ALTER TABLE xhWxAccount ADD `logo` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '公众号logo' AFTER `id`;
|
|
|
+ALTER TABLE xhMerchant MODIFY `logo` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '商家logo';";
|
|
|
+ Yii::$app->db->createCommand($sql)->execute($sql);
|
|
|
+
|
|
|
+ //公众号二维码
|
|
|
+ $sql = "ALTER TABLE `xhMerchant` CHANGE `wxQrcodeUrl` `wxQrCodeUrl` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '公众号二维码';";
|
|
|
+ Yii::$app->db->createCommand($sql)->execute($sql);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//数据迁移 shish 2020.1.12
|
|
|
//./yii upgrade/sync
|
|
|
public function actionSync()
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
//国兰和花卉宝的logo要重新补进去!!!!!
|
|
|
-
|
|
|
+
|
|
|
//国兰老客户导入
|
|
|
$oldUserList = Yii::$app->db2->createCommand('select * from xhUserOldData where `status`=0')->queryAll();
|
|
|
if (!empty($oldUserList)) {
|
|
|
@@ -1301,10 +1311,10 @@ merchantId INT NOT NULL DEFAULT 0 COMMENT '商家id',
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//头像丢失了更新头像
|
|
|
UserService::syncAvatar(12358);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//微信菜单初始化或重置,可以重复执行 shish 2020.3.5
|
|
|
@@ -1314,18 +1324,27 @@ merchantId INT NOT NULL DEFAULT 0 COMMENT '商家id',
|
|
|
$merchant = xhMerchantService::getById($id);
|
|
|
xhWxMenuService::applyInit($merchant);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//测试生成头像有没问题
|
|
|
public function actionAddAvatar($id)
|
|
|
{
|
|
|
UserService::deleteByCondition(['merchantId' => $id]);
|
|
|
UserService::syncWxAllUser($id);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//更新头像 shish 2020.3.10
|
|
|
public function actionUpdateAvatar($id)
|
|
|
{
|
|
|
UserService::syncAvatar($id);
|
|
|
}
|
|
|
+
|
|
|
+ //更新公众号的头像和二维码 shish 2020.3.11
|
|
|
+ public function actionUpdateImg($id)
|
|
|
+ {
|
|
|
+ $merchant = MerchantService::getMerchantById($id);
|
|
|
+ $appId = $merchant['wxAppId'];
|
|
|
+ $info = wxUtil::getAuthorizerInfo($appId);
|
|
|
+ print_r($info);
|
|
|
+ }
|
|
|
|
|
|
}
|