|
|
@@ -6,6 +6,7 @@ use biz\goods\services\GoodsCategoryService;
|
|
|
use biz\goods\services\GoodsStyleService;
|
|
|
use common\components\business;
|
|
|
use common\components\stringUtil;
|
|
|
+use common\components\wxUtil;
|
|
|
use common\services\xhTMessageService;
|
|
|
use Yii;
|
|
|
use biz\base\classes\BaseClass;
|
|
|
@@ -19,10 +20,15 @@ class CouponAssetClass extends BaseClass
|
|
|
public static function giveCoupon($user, $merchant, $userAsset)
|
|
|
{
|
|
|
$userId = $user['id'];
|
|
|
+ $merchantId = $merchant['id'];
|
|
|
$asset = self::getByCondition(['merchantId' => $merchantId]);
|
|
|
$time = time();
|
|
|
- $merchantId = $merchant['id'];
|
|
|
$date = date("Y-m-d H:i:s");
|
|
|
+ echo '<pre>';
|
|
|
+ print_r($userAsset);
|
|
|
+ print_r($user);
|
|
|
+ print_r($asset);
|
|
|
+
|
|
|
//商家开启注册会员送券
|
|
|
if (isset($asset['switch']) && $asset['switch'] == 1) {
|
|
|
//客户没有消费过且没有领过优惠券
|
|
|
@@ -58,7 +64,9 @@ class CouponAssetClass extends BaseClass
|
|
|
"keyword1" => ["value" => '代金劵', "color" => "#173177"],
|
|
|
"keyword2" => ["value" => $amount . '元', "color" => "#173177"],
|
|
|
"keyword3" => ["value" => date("Y-m-d H:i"), "color" => "#173177"],
|
|
|
- "remark" => ["value" => "点击查看详情", "color" => "#173177"]]];
|
|
|
+ "remark" => ["value" => "点击查看详情", "color" => "#173177"]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
wxUtil::sendTaskInform($data, $merchant);
|
|
|
}
|
|
|
}
|