public static function judgeCanApplyStatus($user_id, $couponApplyCodes)
 {
     $params = array('user_id' => $user_id, 'coupon_apply_codes' => $couponApplyCodes);
     $clientObj = new \Libs\Serviceclient\Client();
     $result = $clientObj->call('coupon', 'coupon/judge_can_apply_status', $params, array('method' => 'POST', 'timeout' => 1));
     $judgeResult = array();
     if ($result['httpcode'] == 200 && $result['content']['error_code'] == 0) {
         $judgeResult = $result['content']['data'];
     }
     return $judgeResult;
 }
Example #2
0
 private static function _getUpleftHorizontalMarks($paramData)
 {
     $param = array('url' => 'fashion/get_upleft_marks');
     $opt = array('timeout' => 1, 'connect_timeout' => 1);
     \Libs\Serviceclient\SnakeHeaderCreator::setInfos(array('user_id' => 0, 'ip' => '127.0.0.2'));
     $clientObj = new \Libs\Serviceclient\Client();
     $result = $clientObj->call('virus', $param['url'], $paramData, $opt);
     if ($result['httpcode'] == 200 && isset($result['content']) && $result['content']['error_code'] == 0) {
         $markinfo = $result['content']['data'];
     } else {
         return array();
     }
     $gids = explode(',', $paramData['gids']);
     !is_array($markinfo) && ($markinfo = array());
     foreach ($gids as $gid) {
         if (!isset($markinfo[$gid]) || empty($markinfo[$gid])) {
             $markinfo[$gid] = array('to_cache' => '1');
         }
     }
     return $markinfo;
 }