feat(withdraw): 落地方案B一体化商城余额提现与手续费内扣模式,完善多端打款退款与对账闭环
这个提交包含在:
@@ -166,7 +166,7 @@ class PartnerClean extends Command
|
||||
$output->writeln("\n========================================================");
|
||||
$output->writeln(" 重置后指标核对:");
|
||||
$output->writeln(" 合格订单总数 N : {$resetN} 单 (应为 0)");
|
||||
$output->writeln(" 当前大盘汇率 : {$formattedRate} 元/豆 (回归初始基准值 0.00000075)");
|
||||
$output->writeln(" 当前大盘汇率 : {$formattedRate} 元/枚 (回归初始基准值 0.00000075)");
|
||||
$output->writeln("========================================================\n");
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -163,15 +163,41 @@ class Pay extends Common
|
||||
// 微信公众号,小程序支付,必须有 openid
|
||||
if ($payment == 'wechat') {
|
||||
if (in_array($platform, ['WechatOfficialAccount', 'WechatMiniProgram'])) {
|
||||
$targetPlatform = lcfirst(str_replace('Wechat', '', $platform));
|
||||
if (isset($openid) && $openid) {
|
||||
// 如果传的有 openid
|
||||
$order_data['payer']['openid'] = $openid;
|
||||
|
||||
// 自愈绑定:若当前用户在 third_oauth 中尚无对应平台的绑定记录,自动补建
|
||||
if ($platform == 'WechatMiniProgram') {
|
||||
$oauth = \app\admin\model\shopro\ThirdOauth::where([
|
||||
'user_id' => $order->user_id,
|
||||
'provider' => 'wechat',
|
||||
'platform' => $targetPlatform
|
||||
])->find();
|
||||
if (!$oauth) {
|
||||
$existOauth = \app\admin\model\shopro\ThirdOauth::getByOpenid($openid);
|
||||
if (!$existOauth) {
|
||||
\app\admin\model\shopro\ThirdOauth::create([
|
||||
'user_id' => $order->user_id,
|
||||
'provider' => 'wechat',
|
||||
'platform' => $targetPlatform,
|
||||
'openid' => $openid,
|
||||
'createtime' => time(),
|
||||
'updatetime' => time(),
|
||||
]);
|
||||
} elseif ($existOauth->user_id == 0) {
|
||||
$existOauth->user_id = $order->user_id;
|
||||
$existOauth->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 没有 openid 默认拿下单人的 openid
|
||||
$oauth = \app\admin\model\shopro\ThirdOauth::where([
|
||||
'user_id' => $order->user_id,
|
||||
'provider' => 'Wechat',
|
||||
'platform' => lcfirst(str_replace('Wechat', '', $platform))
|
||||
'user_id' => $order->user_id,
|
||||
'provider' => 'wechat',
|
||||
'platform' => $targetPlatform
|
||||
])->find();
|
||||
|
||||
$order_data['payer']['openid'] = $oauth ? $oauth->openid : '';
|
||||
|
||||
@@ -120,6 +120,13 @@ class Goods extends Common
|
||||
// 处理商品规格
|
||||
$skuPrices = $goods['new_sku_prices'];
|
||||
$content = $goods['content'];
|
||||
if ($content) {
|
||||
$cdnurl = cdnurl('', true);
|
||||
if ($cdnurl) {
|
||||
$cdnurl = rtrim($cdnurl, '/');
|
||||
$content = preg_replace('/<img([^>]+)src=["\'](\/uploads\/[^"\']+)["\']/i', '<img$1src="' . $cdnurl . '$2"', $content);
|
||||
}
|
||||
}
|
||||
$goods = $goods->toArray();
|
||||
$goods['sku_prices'] = $skuPrices;
|
||||
$goods['content'] = $content;
|
||||
|
||||
@@ -45,8 +45,10 @@ class Wechat extends Common
|
||||
|
||||
if ($result) {
|
||||
$auth = \app\common\library\Auth::instance();
|
||||
$oauthInfo = $this->wechat->getOauthInfo();
|
||||
$this->success('登陆成功', [
|
||||
'token' => $auth->isLogin() ? $auth->getToken() : ''
|
||||
'token' => $auth->isLogin() ? $auth->getToken() : '',
|
||||
'openid' => $oauthInfo ? ($oauthInfo->openid ?? '') : ''
|
||||
]);
|
||||
}
|
||||
$this->error('登陆失败');
|
||||
|
||||
@@ -21,6 +21,63 @@ class Base
|
||||
public $config = null; // 支付参数
|
||||
|
||||
|
||||
/**
|
||||
* 确保 Yansongda Pay V3 类库与命名空间正确加载
|
||||
*/
|
||||
public static function ensurePayLoaded()
|
||||
{
|
||||
if (class_exists('\Yansongda\Pay\Pay') && method_exists('\Yansongda\Pay\Pay', 'config')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 尝试触发 epay 钩子
|
||||
\think\Hook::listen('epay_config_init');
|
||||
|
||||
if (class_exists('\Yansongda\Pay\Pay') && method_exists('\Yansongda\Pay\Pay', 'config')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 保障性直接注册 epay 插件中的 Yansongda V3 类库
|
||||
$libraryDir = (defined('ADDON_PATH') ? ADDON_PATH : (ROOT_PATH . 'addons' . DS)) . 'epay' . DS . 'library' . DS;
|
||||
if (is_dir($libraryDir)) {
|
||||
$versionDir = (PHP_VERSION_ID >= 80000 && is_dir($libraryDir . 'v3new')) ? 'v3new' : 'v3';
|
||||
$yansongdaDir = $libraryDir . $versionDir . DS . 'Yansongda' . DS;
|
||||
|
||||
if (is_dir($yansongdaDir)) {
|
||||
if (is_dir($yansongdaDir . 'Artful')) {
|
||||
\think\Loader::addNamespace('Yansongda\Artful', $yansongdaDir . 'Artful' . DS);
|
||||
if (file_exists($yansongdaDir . 'Artful' . DS . 'Functions.php')) {
|
||||
require_once $yansongdaDir . 'Artful' . DS . 'Functions.php';
|
||||
}
|
||||
}
|
||||
|
||||
\think\Loader::addNamespace('Yansongda\Pay', $yansongdaDir . 'Pay' . DS);
|
||||
|
||||
$checkArr = [
|
||||
'\Hyperf\Context\Context' => 'context',
|
||||
'\Hyperf\Contract\Castable' => 'contract',
|
||||
'\Hyperf\Engine\Constant' => 'engine',
|
||||
'\Hyperf\Macroable\Macroable' => 'macroable',
|
||||
'\Hyperf\Pimple\Container' => 'pimple',
|
||||
'\Hyperf\Utils\Arr' => 'utils',
|
||||
];
|
||||
foreach ($checkArr as $index => $item) {
|
||||
if (!class_exists($index) && is_dir($libraryDir . 'hyperf' . DS . $item . DS . 'src' . DS)) {
|
||||
\think\Loader::addNamespace(substr($index, 1, strrpos($index, '\\') - 1), $libraryDir . 'hyperf' . DS . $item . DS . 'src' . DS);
|
||||
}
|
||||
}
|
||||
|
||||
if (!class_exists('\Yansongda\Supports\Logger') && is_dir($yansongdaDir . 'Supports')) {
|
||||
\think\Loader::addNamespace('Yansongda\Supports', $yansongdaDir . 'Supports' . DS);
|
||||
}
|
||||
|
||||
if (file_exists($yansongdaDir . 'Pay' . DS . 'Functions.php')) {
|
||||
require_once $yansongdaDir . 'Pay' . DS . 'Functions.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* yansongda 支付初始化
|
||||
*
|
||||
@@ -30,6 +87,8 @@ class Base
|
||||
*/
|
||||
public function init($payment, $config = [], $type = 'normal')
|
||||
{
|
||||
self::ensurePayLoaded();
|
||||
|
||||
$this->config = $this->getConfig($payment, $config, $type);
|
||||
|
||||
$this->pay = Pay::config($this->config);
|
||||
|
||||
@@ -473,7 +473,12 @@ class Wechat extends Base
|
||||
break;
|
||||
}
|
||||
|
||||
$config['notify_url'] = request()->domain() . '/addons/shopro/pay/notify/payment/wechat/platform/' . $this->platform;
|
||||
$domain = request()->domain();
|
||||
if (empty($domain) || $domain == 'http://' || $domain == 'https://') {
|
||||
$domain = config('site.cdnurl') ?: (config('site.url') ?: 'https://henglian.gynhc.com');
|
||||
}
|
||||
$domain = rtrim($domain, '/');
|
||||
$config['notify_url'] = $domain . '/addons/shopro/pay/notify/payment/wechat/platform/' . $this->platform;
|
||||
$config['mch_secret_cert'] = ROOT_PATH . 'public' . $config['mch_secret_cert'];
|
||||
$config['mch_public_cert_path'] = ROOT_PATH . 'public' . $config['mch_public_cert_path'];
|
||||
|
||||
|
||||
@@ -53,7 +53,10 @@ class Withdraw
|
||||
// 发起提现申请
|
||||
public function apply($params)
|
||||
{
|
||||
$walletType = $params['wallet_type'] ?? 'commission';
|
||||
$walletType = $params['wallet_type'] ?? 'money';
|
||||
if (!in_array($walletType, ['money', 'commission', 'madow'])) {
|
||||
$walletType = 'money';
|
||||
}
|
||||
$type = $params['type'] ?? '';
|
||||
$money = $params['money'] ?? 0;
|
||||
$money = (string)$money;
|
||||
@@ -66,10 +69,17 @@ class Withdraw
|
||||
$charge = bcmul($money, (string)$this->config['charge_rate'], 2);
|
||||
|
||||
// 检查提现规则
|
||||
$this->checkApply($type, $money, $charge);
|
||||
$this->checkApply($type, $money, $charge, $walletType);
|
||||
|
||||
// 获取账号信息
|
||||
$withdrawInfo = $this->getAccountInfo($type, $params);
|
||||
$withdrawInfo['wallet_type'] = $walletType;
|
||||
if ($walletType === 'money') {
|
||||
$withdrawInfo['提现资产'] = '商城余额';
|
||||
} elseif ($walletType === 'commission') {
|
||||
$withdrawInfo['提现资产'] = '佣金钱包';
|
||||
}
|
||||
|
||||
// 添加提现记录
|
||||
$withdraw = new WithdrawModel();
|
||||
$withdraw->user_id = $this->user->id;
|
||||
@@ -83,15 +93,26 @@ class Withdraw
|
||||
$withdraw->platform = request()->header('platform');
|
||||
$withdraw->save();
|
||||
|
||||
// 佣金钱包变动
|
||||
WalletService::change($this->user, 'commission', -bcadd($charge, $money, 2), 'withdraw', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
]);
|
||||
|
||||
$this->handleLog($withdraw, '用户发起提现申请', $this->user);
|
||||
// 扣减对应钱包资金(内扣模式:仅扣除提现申请本金,手续费从提现金额中内扣)
|
||||
if ($walletType === 'money') {
|
||||
WalletService::change($this->user, 'money', -$money, 'withdraw', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
'wallet_type' => 'money',
|
||||
], '申请提现扣除余额');
|
||||
$this->handleLog($withdraw, '用户发起商城余额提现申请', $this->user);
|
||||
} else {
|
||||
WalletService::change($this->user, 'commission', -$money, 'withdraw', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
'wallet_type' => 'commission',
|
||||
]);
|
||||
$this->handleLog($withdraw, '用户发起佣金提现申请', $this->user);
|
||||
}
|
||||
|
||||
return $withdraw;
|
||||
}
|
||||
@@ -272,7 +293,7 @@ class Withdraw
|
||||
'transfer_scene_id' => '1005',
|
||||
'openid' => $withdraw->withdraw_info['微信ID'] ?? '',
|
||||
'user_name' => $withdraw->withdraw_info['真实姓名'] ?? '', // 明文传参即可,sdk 会自动加密
|
||||
'transfer_amount' => $withdraw->amount,
|
||||
'transfer_amount' => bcsub((string)$withdraw->amount, (string)$withdraw->charge_fee, 2),
|
||||
'transfer_remark' => "用户[" . ($withdraw->withdraw_info['微信用户'] ?? '') . "]提现",
|
||||
'transfer_scene_report_infos' => [
|
||||
['info_type' => '岗位类型', 'info_content' => '推广专员'],
|
||||
@@ -351,7 +372,7 @@ class Withdraw
|
||||
}
|
||||
if ($withDrawStatus) {
|
||||
$withdraw->status = 2;
|
||||
$withdraw->paid_fee = $withdraw->amount;
|
||||
$withdraw->paid_fee = bcsub((string)$withdraw->amount, (string)$withdraw->charge_fee, 2);
|
||||
$withdraw->save();
|
||||
return $this->handleLog($withdraw, '已打款', $oper);
|
||||
}
|
||||
@@ -379,6 +400,9 @@ class Withdraw
|
||||
$isMadow = (isset($info['wallet_type']) && $info['wallet_type'] === 'madow')
|
||||
|| (isset($info['提现资产']) && strcasecmp($info['提现资产'], 'dmepa') === 0);
|
||||
|
||||
$isMoney = (isset($info['wallet_type']) && $info['wallet_type'] === 'money')
|
||||
|| (isset($info['提现资产']) && $info['提现资产'] === '商城余额');
|
||||
|
||||
if ($isMadow) {
|
||||
$madowRefund = $info['madow_amount'] ?? ($info['扣除DMEPA'] ?? ($info['扣除dmepa'] ?? 0));
|
||||
if (is_string($madowRefund)) {
|
||||
@@ -410,17 +434,29 @@ class Withdraw
|
||||
]);
|
||||
}
|
||||
return $this->handleLog($withdraw, '拒绝:' . $refuse_msg . ',已退还扣除的 ' . $madowRefund . ' dmepa');
|
||||
} elseif (isset($info['wallet_type']) && $info['wallet_type'] === 'commission') {
|
||||
// 仅显式标注佣金提现的退回用户佣金
|
||||
WalletService::change($this->user, 'commission', $withdraw->amount, 'withdraw_error', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
'wallet_type' => 'commission',
|
||||
]);
|
||||
|
||||
return $this->handleLog($withdraw, '拒绝:' . $refuse_msg . ',已退还提现佣金');
|
||||
} else {
|
||||
// 方案 B 一体化内扣:常规提现默认退回商城可用余额本金
|
||||
WalletService::change($this->user, 'money', $withdraw->amount, 'withdraw_error', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
'wallet_type' => 'money',
|
||||
], '提现驳回退还余额');
|
||||
|
||||
return $this->handleLog($withdraw, '拒绝:' . $refuse_msg . ',已退还提现商城余额');
|
||||
}
|
||||
|
||||
// 退回用户佣金
|
||||
WalletService::change($this->user, 'commission', bcadd($withdraw->charge_fee, $withdraw->amount, 2), 'withdraw_error', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
]);
|
||||
|
||||
return $this->handleLog($withdraw, '拒绝:' . $refuse_msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -445,6 +481,9 @@ class Withdraw
|
||||
$isMadow = (isset($info['wallet_type']) && $info['wallet_type'] === 'madow')
|
||||
|| (isset($info['提现资产']) && strcasecmp($info['提现资产'], 'dmepa') === 0);
|
||||
|
||||
$isMoney = (isset($info['wallet_type']) && $info['wallet_type'] === 'money')
|
||||
|| (isset($info['提现资产']) && $info['提现资产'] === '商城余额');
|
||||
|
||||
if ($isMadow) {
|
||||
$madowRefund = $info['madow_amount'] ?? ($info['扣除DMEPA'] ?? ($info['扣除dmepa'] ?? 0));
|
||||
if (is_string($madowRefund)) {
|
||||
@@ -476,17 +515,29 @@ class Withdraw
|
||||
]);
|
||||
}
|
||||
return $this->handleLog($withdraw, '提现失败,已退还 ' . $madowRefund . ' dmepa:' . $refuse_msg);
|
||||
} elseif (isset($info['wallet_type']) && $info['wallet_type'] === 'commission') {
|
||||
// 仅显式标注佣金提现的退回用户佣金
|
||||
WalletService::change($this->user, 'commission', $withdraw->amount, 'withdraw_error', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
'wallet_type' => 'commission',
|
||||
]);
|
||||
|
||||
return $this->handleLog($withdraw, '提现失败,已退还提现佣金:' . $refuse_msg);
|
||||
} else {
|
||||
// 方案 B 一体化内扣:常规提现默认退回商城可用余额本金
|
||||
WalletService::change($this->user, 'money', $withdraw->amount, 'withdraw_error', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
'wallet_type' => 'money',
|
||||
], '提现失败退还余额');
|
||||
|
||||
return $this->handleLog($withdraw, '提现失败,已退还提现商城余额:' . $refuse_msg);
|
||||
}
|
||||
|
||||
// 退回用户佣金
|
||||
WalletService::change($this->user, 'commission', bcadd($withdraw->charge_fee, $withdraw->amount, 2), 'withdraw_error', [
|
||||
'withdraw_id' => $withdraw->id,
|
||||
'amount' => $withdraw->amount,
|
||||
'charge_fee' => $withdraw->charge_fee,
|
||||
'charge_rate' => $withdraw->charge_rate,
|
||||
]);
|
||||
|
||||
return $this->handleLog($withdraw, '提现失败,已退还提现佣金:' . $refuse_msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +611,7 @@ class Withdraw
|
||||
if ($type == 'alipay') {
|
||||
$payload = [
|
||||
'out_biz_no' => $withdraw->withdraw_sn,
|
||||
'trans_amount' => $withdraw->amount,
|
||||
'trans_amount' => bcsub((string)$withdraw->amount, (string)$withdraw->charge_fee, 2),
|
||||
'product_code' => 'TRANS_ACCOUNT_NO_PWD',
|
||||
'biz_scene' => 'DIRECT_TRANSFER',
|
||||
// 'order_title' => '余额提现到',
|
||||
@@ -611,7 +662,7 @@ class Withdraw
|
||||
|
||||
|
||||
// 提现条件检查
|
||||
private function checkApply($type, $money, $charge)
|
||||
private function checkApply($type, $money, $charge, $walletType = 'money')
|
||||
{
|
||||
if (isset($this->config['status']) && intval($this->config['status']) === 0) {
|
||||
throw new ShoproException('系统提现功能已关闭');
|
||||
@@ -638,9 +689,19 @@ class Withdraw
|
||||
throw new ShoproException('提现金额不能大于 ' . $this->config['max_amount'] . '元');
|
||||
}
|
||||
|
||||
if ($walletType === 'money') {
|
||||
if (bccomp((string)($this->user->money ?? 0), (string)$money, 2) < 0) {
|
||||
throw new ShoproException('商城可用余额不足');
|
||||
}
|
||||
} else {
|
||||
if (bccomp((string)($this->user->commission ?? 0), (string)$money, 2) < 0) {
|
||||
throw new ShoproException('可提现佣金不足');
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->user->commission < bcadd($charge, $money, 2)) {
|
||||
throw new ShoproException('可提现佣金不足');
|
||||
$realAmount = bcsub($money, $charge, 2);
|
||||
if (bccomp($realAmount, '0.00', 2) <= 0) {
|
||||
throw new ShoproException('扣除手续费后实际到账金额必须大于0元');
|
||||
}
|
||||
|
||||
// 检查最大提现次数
|
||||
|
||||
@@ -237,7 +237,7 @@ class PartnerConfig
|
||||
'county_peer' => $countyAgentShort . '平级奖',
|
||||
'venue_share' => $venue . '加权奖',
|
||||
'county_share' => $countyShort . '加权奖',
|
||||
'madow_share' => '每日贡献dmepa',
|
||||
'madow_share' => '每日获得dmepa',
|
||||
'madow_withdraw' => 'dmepa提现扣除',
|
||||
'madow_withdraw_refund' => 'dmepa提现退还',
|
||||
'admin_madow' => '管理员调整dmepa',
|
||||
|
||||
@@ -160,6 +160,10 @@ class MiniProgram
|
||||
|
||||
$session_id = Random::uuid();
|
||||
redis_cache($session_id, $decryptData, 60 * 60 * 24 * 7); // session_key缓存保留一周
|
||||
return ['session_id' => $session_id, 'auto_login' => $auto_login];
|
||||
return [
|
||||
'session_id' => $session_id,
|
||||
'openid' => $decryptData['openid'] ?? '',
|
||||
'auto_login' => $auto_login
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ class Wechat
|
||||
protected $platform;
|
||||
// 转发服务
|
||||
protected $service;
|
||||
// 认证信息
|
||||
protected $oauthInfo;
|
||||
|
||||
public function __construct($platform, $payload = [])
|
||||
{
|
||||
@@ -26,6 +28,11 @@ class Wechat
|
||||
return $this->service->wechat;
|
||||
}
|
||||
|
||||
public function getOauthInfo()
|
||||
{
|
||||
return $this->oauthInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信登陆
|
||||
*
|
||||
@@ -40,6 +47,7 @@ class Wechat
|
||||
$this->registerOrBindUser($oauthInfo, 0, ['mobile' => $wechatUser['mobile'] ?? '']);
|
||||
|
||||
$oauthInfo->save();
|
||||
$this->oauthInfo = $oauthInfo;
|
||||
|
||||
$auth = Auth::instance();
|
||||
$ret = $auth->direct($oauthInfo->user_id);
|
||||
@@ -147,7 +155,21 @@ class Wechat
|
||||
if (!$user) {
|
||||
$oauthInfo->user_id = 0;
|
||||
} else {
|
||||
// 如果本次快捷登录提供了手机号,且用户原本没有手机号,则为用户补充手机号
|
||||
// 如果本次快捷登录提供了手机号
|
||||
if (!empty($extend['mobile'])) {
|
||||
// 若当前绑定账号手机号与快捷登录手机号不一致,检查系统是否已有该手机号用户
|
||||
if ($user->mobile !== $extend['mobile']) {
|
||||
$existingUser = UserModel::where('mobile', $extend['mobile'])->where('id', '<>', $user->id)->find();
|
||||
if ($existingUser) {
|
||||
// 将此微信第三方账号智能合并关联至已有该手机号的用户
|
||||
$oauthInfo->user_id = $existingUser->id;
|
||||
$oauthInfo->save();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果用户原本没有手机号,则为用户补充手机号
|
||||
$isChanged = false;
|
||||
if (!empty($extend['mobile']) && empty($user->mobile)) {
|
||||
$user->mobile = $extend['mobile'];
|
||||
|
||||
在新工单中引用
屏蔽一个用户