|
|
@@ -543,13 +543,14 @@ class ShopController extends BaseController
|
|
|
{
|
|
|
$shopId = $this->shop->id;
|
|
|
$shop = ShopClass::getById($shopId, false, 'rechargeWeal');
|
|
|
- $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], false, false, 'reachVip');
|
|
|
+ $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], false, false, 'reachVip,rechargeRemark');
|
|
|
|
|
|
$return = [
|
|
|
'rechargeRule' => $shop['rechargeWeal'] == 3 ? 2 : $shop['rechargeWeal'],
|
|
|
'isVipMember' => $shopExt['reachVip'] > 0 ? 1 : 0,
|
|
|
'vipAmount' => $shopExt['reachVip'],
|
|
|
'hbPayable' => $shop['rechargeWeal'] == 2 ? 1 : 0,
|
|
|
+ 'rechargeRemark' => $shopExt['rechargeRemark'],
|
|
|
];
|
|
|
|
|
|
util::success($return);
|
|
|
@@ -570,6 +571,10 @@ class ShopController extends BaseController
|
|
|
if ($rechargeWeal == 2 && $hbPayable == 0) {
|
|
|
$rechargeWeal = 3;
|
|
|
}
|
|
|
+ $rechargeRemark = trim($data['rechargeRemark']);
|
|
|
+ $rechargeRemark = function_exists('mb_substr')
|
|
|
+ ? mb_substr($rechargeRemark, 0, 200, 'UTF-8')
|
|
|
+ : substr($rechargeRemark, 0, 200);
|
|
|
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
@@ -577,7 +582,10 @@ class ShopController extends BaseController
|
|
|
}
|
|
|
$shopId = $this->shop->id;
|
|
|
ShopClass::updateById($shopId, ['rechargeWeal' => $rechargeWeal]);
|
|
|
- ShopExtClass::updateByCondition(['shopId' => $shopId], ['reachVip' => $reachVip]);
|
|
|
+ ShopExtClass::updateByCondition(['shopId' => $shopId], [
|
|
|
+ 'reachVip' => $reachVip,
|
|
|
+ 'rechargeRemark' => $rechargeRemark,
|
|
|
+ ]);
|
|
|
|
|
|
util::complete('充值设置成功');
|
|
|
}
|