|
|
@@ -44,15 +44,15 @@ class xhUserAssetService
|
|
|
$merchantId = $merchant['id'];
|
|
|
$orderId = $order['id'];
|
|
|
$openId = $user['openId'];
|
|
|
- $integral = isset($upAssetData['integral']) ? $upAssetData['integral'] : 0;
|
|
|
+ $growth = isset($upAssetData['growth']) ? $upAssetData['growth'] : 0;
|
|
|
$preLevel = $userAsset['member'];
|
|
|
- $preIntegral = $userAsset['integral'];
|
|
|
- $addIntegral = stringUtil::calcSub($integral, $preIntegral);
|
|
|
-
|
|
|
+ $preGrowth = $userAsset['growth'];
|
|
|
+ $addGrowth = stringUtil::calcSub($growth, $preGrowth);
|
|
|
+
|
|
|
$allTM = xhTMessageService::getList($merchantId);
|
|
|
-
|
|
|
- //没有积分,后续升级流程不需要再走
|
|
|
- if (empty($integral)) {
|
|
|
+
|
|
|
+ //没有成长值,后续升级流程不需要再走
|
|
|
+ if (empty($growth)) {
|
|
|
self::updateByUserId($userId, $upAssetData);
|
|
|
return;
|
|
|
}
|
|
|
@@ -84,19 +84,19 @@ class xhUserAssetService
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
- if ($addIntegral > 0) {
|
|
|
+ if ($addGrowth > 0) {
|
|
|
$shortTempId = 'TM00230';
|
|
|
$tempId = isset($allTM[$shortTempId]) ? $allTM[$shortTempId] : 0;
|
|
|
if (!empty($tempId)) {
|
|
|
$changeData = ["touser" => $openId, "template_id" => $tempId,
|
|
|
"url" => Yii::$app->params['frontUrl'] . "/center/order-detail?id=$orderId&account=" . $merchant['id'],
|
|
|
"data" => [
|
|
|
- "first" => ["value" => "您在本店购物获得积分", "color" => "#173177"],
|
|
|
+ "first" => ["value" => "您在本店购物获得成长值", "color" => "#173177"],
|
|
|
"FieldName" => ["value" => "会员名称", "color" => "#0F0F0F"],
|
|
|
"Account" => ["value" => $user['userName'], "color" => "#173177"],
|
|
|
"change" => ["value" => "增加", "color" => "#0F0F0F"],
|
|
|
- "CreditChange" => ["value" => $addIntegral, "color" => "#173177"],
|
|
|
- "CreditTotal" => ["value" => $integral, "color" => "#173177"],
|
|
|
+ "CreditChange" => ["value" => $addGrowth, "color" => "#173177"],
|
|
|
+ "CreditTotal" => ["value" => $growth, "color" => "#173177"],
|
|
|
"Remark" => ["value" => "点此查看订单明细、添加编辑收花人信息", "color" => "#173177"],],];
|
|
|
wxUtil::sendTaskInform($changeData, $merchant);
|
|
|
}
|
|
|
@@ -157,7 +157,7 @@ class xhUserAssetService
|
|
|
"Account" => ["value" => $user['userName'], "color" => "#173177"],
|
|
|
"change" => ["value" => "增加", "color" => "#0F0F0F"],
|
|
|
"CreditChange" => ["value" => $addIntegral, "color" => "#173177"],
|
|
|
- "CreditTotal" => ["value" => $integral, "color" => "#173177"],
|
|
|
+ "CreditTotal" => ["value" => $growth, "color" => "#173177"],
|
|
|
"Remark" => ["value" => "点此查看明细!", "color" => "#173177"],],];
|
|
|
wxUtil::sendTaskInform($changeData, $merchant);
|
|
|
}
|
|
|
@@ -168,7 +168,7 @@ class xhUserAssetService
|
|
|
|
|
|
}
|
|
|
//新增积分
|
|
|
- UserIntegralService::increaseToUpgrade($preIntegral, $integral, $preLevel, $userId, $merchantId, $merchantExtend);
|
|
|
+ UserIntegralService::increaseToUpgrade($preGrowth, $growth, $preLevel, $userId, $merchantId, $merchantExtend);
|
|
|
|
|
|
self::updateByUserId($userId, $upAssetData);
|
|
|
}
|