|
@@ -155,8 +155,8 @@ class AppController extends Controller
|
|
|
$is_enable = $request->get('is_enabled', '');
|
|
|
if(!empty($phone)) {
|
|
|
$channel = new ChannelService();
|
|
|
- $distribution_channels = $channel->getChannelsByChannelUserIds([],$is_enable,$phone);
|
|
|
- if(!$distribution_channels->isEmpty()){
|
|
|
+ $distribution_channels = $channel->getChannelsByChannelUserIds($this->channel_user_ids,$is_enable,$phone);
|
|
|
+ if($distribution_channels){
|
|
|
$distribution_channels = $distribution_channels->toArray();
|
|
|
$this->channel_ids = array_column($distribution_channels,'id');
|
|
|
}
|
|
@@ -166,6 +166,7 @@ class AppController extends Controller
|
|
|
return response()->success($result);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* @api {post} company/auth/orders 订单
|
|
|
* @apiVersion 1.0.0
|
|
@@ -414,6 +415,17 @@ class AppController extends Controller
|
|
|
$user_info = $prev_coin = DB::connection('mysql')->table('users')
|
|
|
->where(['distribution_channel_id'=>$channel_id, 'openid'=>$openid])
|
|
|
->select('id', 'distribution_channel_id', 'balance', 'reward_balance')->first();
|
|
|
+ if(empty($user_info)){
|
|
|
+ $temp_user_id = DB::connection('mysql')->table('temp_force_subscribe_users')
|
|
|
+ ->where('distribution_channel_id',$channel_id)
|
|
|
+ ->where('openid',$openid)
|
|
|
+ ->value('uid');
|
|
|
+ if(isset($temp_user_id) && !empty($temp_user_id)){
|
|
|
+ $user_info = $prev_coin = DB::connection('mysql')->table('users')
|
|
|
+ ->select('id', 'distribution_channel_id', 'balance', 'reward_balance')
|
|
|
+ ->find($temp_user_id);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
$user_info = (array)$user_info;
|
|
|
if (!$user_info) return response()->json(['code'=>-1, 'msg'=>'用户不存在!']);
|