public static function attachCanApplyStatus($couponApply, $user_id)
 {
     if (empty($user_id)) {
         foreach ($couponApply as $key => $couponApplyRecord) {
             $couponApply[$key]['can_apply_status'] = CouponConstantPool::CAN_APPLY_USER_LOGOUT_STATUS;
         }
     } else {
         $couponApplyCodes = Utilities::DataToArray($couponApply, 'coupon_apply_code');
         $judgeResult = self::judgeCanApplyStatus($user_id, $couponApplyCodes);
         foreach ($couponApply as $key => $couponApplyRecord) {
             $couponApplyCode = $couponApplyRecord['coupon_apply_code'];
             $couponApply[$key]['can_apply_status'] = $judgeResult[$couponApplyCode];
         }
     }
     return $couponApply;
 }
 private function getDeviceIdFromAccessToken()
 {
     if (empty($this->tokenData)) {
         return '';
     }
     $deviceId = $this->device_token;
     if (empty($deviceId) && !in_array($this->open_udid, $this->invalidDevices)) {
         $deviceId = $this->open_udid;
     }
     if (empty($deviceId) && !in_array($this->udid, $this->invalidDevices)) {
         $deviceId = $this->udid;
     }
     if (empty($deviceId) && !in_array($this->imei, $this->invalidDevices)) {
         $deviceId = $this->imei;
     }
     if (empty($deviceId) && !in_array($this->mac, $this->invalidDevices)) {
         $deviceId = $this->mac;
     }
     if (empty($deviceId) && $this->SEASHELL) {
         $deviceId = \Libs\Util\Utilities::nginx_userid_decode($this->SEASHELL);
     }
     return $deviceId;
 }