Commit 368a5740 authored by 夏彬's avatar 夏彬

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/client_config_dev.php
#	src/client_config_prod.php
#	src/client_config_test.php
parents 370f5b4f 37a7820c
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/9/12
* Time: 17:48
*/
require __DIR__.'/_init.php';
use internalApi\bbs\Integralmall;
Integralmall::setDebug(true);
print_r(Integralmall::goods([529]));
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2018/6/13
* Time: 10:26
*/
require __DIR__.'/_init.php';
use internalApi\bbs\Stat;
Stat::setDebug();
$f = 1528732800;
$t = 1528819199;
//$data = Stat::threadsActivityInTime($f, $t, 3600*5);
//$data = Stat::countReplyThumbup(strtotime('Today'), strtotime('Tomorrow')-1);
print_r($data);
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
require __DIR__.'/_init.php'; require __DIR__.'/_init.php';
\internalApi\bbs\Tcptuan::setDebug(true); \internalApi\bbs\Tcptuan::setDebug(true);
print_r(\internalApi\bbs\Tcptuan::getGoods(1)); print_r(\internalApi\bbs\Tcptuan::getTuanGoods(1));
\ No newline at end of file \ No newline at end of file
...@@ -11,4 +11,4 @@ use internalApi\bbs\Thread; ...@@ -11,4 +11,4 @@ use internalApi\bbs\Thread;
require __DIR__.'/_init.php'; require __DIR__.'/_init.php';
Thread::setDebug(true); Thread::setDebug(true);
print_r(Thread::getUnresolveQustion()); print_r(Thread::getDigest(2));
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,8 @@ use internalApi\bbs\User; ...@@ -11,6 +11,8 @@ use internalApi\bbs\User;
require __DIR__.'/_init.php'; require __DIR__.'/_init.php';
User::setDebug(true); User::setDebug(true);
$uid = 42;
$data = User::updateGoldCoin('18503078897', 5, '完工奖励', '完工奖励+5'); $data = User::getMemberCount(12);
//$data = User::canAddGoldCoin(13739230723);
print_r($data); print_r($data);
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: cx
* Date: 2018/8/15
* Time: 10:23
*/
use internalApi\sv\Video;
require __DIR__.'/_init.php';
Video::setDebug();
$list = Video::getMyVideoList(658, 1);
print_r($list);
...@@ -12,9 +12,13 @@ require __DIR__.'/_init.php'; ...@@ -12,9 +12,13 @@ require __DIR__.'/_init.php';
Member::setDebug(); Member::setDebug();
//Member::updateNickname(12, 'Test Hello World');
$info = Member::getMemberInfo(12); $bin = file_get_contents('/Users/pader/Development/sites/wxh/ucenter/src/resource/tmp/zxx.jpg');
Member::updateAvatar(12, 'jpg', base64_encode($bin));
//$info = Member::getMemberInfo(12);
// $info = Member::getInfoByMobile('15395081586'); // $info = Member::getInfoByMobile('15395081586');
//$info = Member::getSyncByMobile('13000000002'); //$info = Member::getSyncByMobile('13000000002');
//$info = Member::getSyncByUid(514); //$info = Member::getSyncByUid(514);
print_r($info); //print_r($info);
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 10:23
*/
use internalApi\ucenter\Group;
require __DIR__.'/_init.php';
Group::setDebug();
//$info = Group::getPotentialGroupMemberList('worker-71318');
$info = Group::getPotentialGroupMemberCount('worker-71318');
print_r($info);
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
* Time: 4:52 PM * Time: 4:52 PM
*/ */
use internalApi\ucenter\Member; use internalApi\ucenter\Member;
use internalApi\ucenter\Message; use internalApi\ucenter\Message;
...@@ -38,3 +37,6 @@ Message::setDebug(); ...@@ -38,3 +37,6 @@ Message::setDebug();
//$info = \internalApi\ucenter\Message::pushMsg(1,0,0,'bbs','theme',0); //$info = \internalApi\ucenter\Message::pushMsg(1,0,0,'bbs','theme',0);
//print_r($info); //print_r($info);
$ret = Message::sendSystemMessage('assistant', 0, 12, Message::TYPE_TEXT, ['msg'=>'新消息测试']);
print_r($ret);
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/10/17
* Time: 10:37
*/
use internalApi\ucenter\Timeline;
require __DIR__.'/_init.php';
Timeline::setDebug();
$info = Timeline::removeTimeline('reply_145');
print_r($info);
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2018/6/13
* Time: 17:25
*/
use internalApi\ucenter\Track;
require __DIR__.'/_init.php';
echo Track::track('test');
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*/ */
use internalApi\xue\Favorite; use internalApi\xue\Favorite;
use internalApi\xue\Comment;
require __DIR__.'/_init.php'; require __DIR__.'/_init.php';
...@@ -15,6 +16,9 @@ Favorite::setDebug(true); ...@@ -15,6 +16,9 @@ Favorite::setDebug(true);
//$count = Favorite::countUserFavorites(8); //$count = Favorite::countUserFavorites(8);
//var_dump($count); //var_dump($count);
echo Comment::countLikeBetweenTime(0, 1529942399);
exit;
$startTime = microtime(true); $startTime = microtime(true);
$count = \internalApi\xue\Comment::getLikeMsgCount(8); $count = \internalApi\xue\Comment::getLikeMsgCount(8);
$endTime = microtime(true); $endTime = microtime(true);
......
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/5/31
* Time: 15:43
*/
use internalApi\xue\Live;
require __DIR__.'/_init.php';
Live::setDebug(true);
print_r(Live::getShow());
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/5/31
* Time: 16:49
*/
use internalApi\xue\Course;
require __DIR__.'/_init.php';
Course::setDebug(true);
print_r(Course::getRecommendCourseShow());
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/9/12
* Time: 17:41
*/
namespace internalApi\bbs;
use internalApi\base\Client;
class Integralmall extends Client
{
/**
* 获取积分商城商品信息
* @param array $tids
* @return mixed
*/
public static function goods($tids = [])
{
return self::call('integralmall.goods', compact('tids'));
}
/**
* 验证是否领取
* @param $ucid
* @return mixed
*/
public static function checkReceive($ucid)
{
return self::call('integralmall.checkReceive', compact('ucid'));
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2018/6/13
* Time: 09:05
*/
namespace internalApi\bbs;
use internalApi\base\Client;
/**
* 论坛数据统计服务
* @package internalApi\bbs
*/
class Stat extends Client
{
/**
* 统计在指定时间范围内的新帖子数量
*
* @param int $timebetween
* @param int $timeand
* @return int
*/
public static function countThreads($timeBetween, $timeAnd)
{
return self::call('stat.countThreads', compact('timeBetween', 'timeAnd'));
}
/**
* 统计指定时间范围内且在指定时限内有回帖的帖子数量
*
* @param int $timeBetween
* @param int $timeAnd
* @param int $inSeconds 首个回帖产生时间秒数范围
* @param string $way 首个回帖在产生时间内还是时间外的,时间内使用in,时间外使用out
* @return int
*/
public static function countThreadsActivity($timeBetween, $timeAnd, $inSeconds, $way='in')
{
return self::call('stat.countThreadsActivity', compact('timeBetween', 'timeAnd', 'inSeconds', 'way'));
}
/**
* 统计指定时间范围内的回复数量
*
* @param int $timeBetween
* @param int $timeAnd
* @return int
*/
public static function countReplysBetween($timeBetween, $timeAnd)
{
return self::call('stat.countReplysBetween', compact('timeBetween', 'timeAnd'));
}
/**
* 统计指定时间范围内的回复点赞数
*
* @param int $timeBetween
* @param int $timeAnd
* @return int
*/
public static function countReplyThumbup($timeBetween, $timeAnd) {
return self::call('stat.countReplyThumbup', compact('timeBetween', 'timeAnd'));
}
/**
* 统计指定时间范围内的活跃用户
*
* @param int $timeBetween
* @param int $timeAnd
* @return int
*/
public static function countActivityUser($timeBetween, $timeAnd) {
return self::call('stat.countActivityUser', compact('timeBetween', 'timeAnd'));
}
/**
* 统计指定时间范围内的签到数量
*
* @param int $timeBetween
* @param int $timeAnd
* @return int
*/
public static function countSign($timeBetween, $timeAnd) {
return self::call('stat.countSign', compact('timeBetween', 'timeAnd'));
}
}
\ No newline at end of file
...@@ -19,4 +19,14 @@ class Tcptuan extends Client ...@@ -19,4 +19,14 @@ class Tcptuan extends Client
return self::call('tcptuan.getGoods',compact('num')); return self::call('tcptuan.getGoods',compact('num'));
} }
/**
* 拼团商品接口
* @param int $num
* @return mixed
*/
public static function getTuanGoods($num = 1)
{
return self::call('tcptuan.getTuanGoods',compact('num'));
}
} }
\ No newline at end of file
...@@ -47,4 +47,61 @@ class Thread extends Client ...@@ -47,4 +47,61 @@ class Thread extends Client
return self::call('thread.getUnresolveQustion'); return self::call('thread.getUnresolveQustion');
} }
/**
* 获取问题日志精华3
* @return mixed
*/
public static function getMaintenanceLogDigest($num = 1){
return self::call('thread.getMaintenanceLogDigest',compact('num'));
}
/**
* 获取问题互助精华3
* @return mixed
*/
public static function getQuestionDigest($num = 1){
return self::call('thread.getQuestionDigest',compact('num'));
}
/**
* 获取维修中精华3的帖子
* @param int $num
* @return mixed
*/
public static function getThreadDigest($num = 1)
{
return self::call('thread.getThreadDigest',compact('num'));
}
/**
* 根据fid获取帖子
* @param int $fid
* @param int $page
* @param int $num
* @return mixed
*/
public static function getThread($fid,$page,$num)
{
return self::call('thread.getThread',compact('fid','page','num'));
}
/**
* 获取板块帖子
* @param int $bid
* @return mixed
*/
public static function getBlockThread($bid)
{
return self::call('thread.getBlockThread',compact('bid'));
}
/**
* 获取加精帖子
* @param $num
* @return mixed
*/
public static function getDigest($num)
{
return self::call('thread.getDigest',compact('num'));
}
} }
\ No newline at end of file
...@@ -47,4 +47,27 @@ class User extends Client ...@@ -47,4 +47,27 @@ class User extends Client
return self::call('user.updateGoldCoin', compact('telephone','num','title','text')); return self::call('user.updateGoldCoin', compact('telephone','num','title','text'));
} }
/**
* 获取签到的日期
* @param int $userId
* @return mixed
*/
public static function getMonthSignList($userId)
{
return self::call('user.getMonthSignList',compact('userId'));
}
/**
* 获取指定用户的统计数据
*
* @param int $uid
* @return array
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function getMemberCount($uid)
{
return self::call('user.getMemberCount', compact('uid'));
}
} }
\ No newline at end of file
...@@ -17,6 +17,11 @@ $internalApiClientConfig = [ ...@@ -17,6 +17,11 @@ $internalApiClientConfig = [
'apiUrl' => 'http://u.yunya.com/test/api-server', 'apiUrl' => 'http://u.yunya.com/test/api-server',
'clientId' => 'common', 'clientId' => 'common',
'clientSecret' => 'Kuy2dVHKRWKAFRXX2l6k' 'clientSecret' => 'Kuy2dVHKRWKAFRXX2l6k'
],
'sv' => [
'apiUrl' => 'http://sv.yunya.com/api/server',
'clientId' => 'common',
'clientSecret' => '6A23057D233DA902B5D603A758B0438E'
] ]
]; ];
......
...@@ -33,6 +33,12 @@ return [ ...@@ -33,6 +33,12 @@ return [
'clientId' => 'common', 'clientId' => 'common',
'clientSecret' => 'TveYDczsq7LTllIUlM5t' 'clientSecret' => 'TveYDczsq7LTllIUlM5t'
], ],
'sv' => [
'apiUrl' => 'http://sv.yunya.com/api/server',
'clientId' => 'common',
'clientSecret' => '6A23057D233DA902B5D603A758B0438E'
]
],
'shop' => [ 'shop' => [
'apiUrl' => 'http://appapi.fecshoptest.com/v1/internalapi', 'apiUrl' => 'http://appapi.fecshoptest.com/v1/internalapi',
'clientId' => 'common', 'clientId' => 'common',
......
...@@ -32,6 +32,12 @@ return [ ...@@ -32,6 +32,12 @@ return [
'clientId' => 'common', 'clientId' => 'common',
'clientSecret' => 'TveYDczsq7LTllIUlM5t' 'clientSecret' => 'TveYDczsq7LTllIUlM5t'
], ],
'sv' => [
'apiUrl' => 'http://sv.ibanshou.cn/api/server',
'clientId' => 'common',
'clientSecret' => '6A23057D233DA902B5D603A758B0438E'
]
],
'shop' => [ 'shop' => [
'apiUrl' => 'http://api-shop.banshouhui.com/internalapi/api', 'apiUrl' => 'http://api-shop.banshouhui.com/internalapi/api',
'clientId' => 'common', 'clientId' => 'common',
......
...@@ -37,4 +37,10 @@ return [ ...@@ -37,4 +37,10 @@ return [
'clientId' => 'common', 'clientId' => 'common',
'clientSecret' => 'qlOCFMUfxWjOhK2bdL88e3w2DjdhUDIA' 'clientSecret' => 'qlOCFMUfxWjOhK2bdL88e3w2DjdhUDIA'
] ]
],
'sv' => [
'apiUrl' => 'http://sv.test.yunyamooc.com/api/server',
'clientId' => 'common',
'clientSecret' => '6A23057D233DA902B5D603A758B0438E'
]
]; ];
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/4/20
* Time: 16:49
*/
namespace internalApi\sv;
use internalApi\base\Client;
class Video extends Client
{
/**
* 获取我的视频列表
* @return mixed
*/
public static function getMyVideoList($uid, $page)
{
return self::call('video.getMyVideoList', compact('uid', 'page'));
}
/**
* 获取首页推荐视频列表
* @param int $num
* @return mixed
*/
public static function getRecommendVideoList($num = 10)
{
return self::call('video.getRecommendVideoList', compact('num'));
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/9/29
* Time: 15:25
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
class Group extends Client
{
/**
* 获取有效潜在团员团员
* @param string $uid
* @param int $page
* @param int $num
* @return mixed
*/
public static function getPotentialGroupMemberList($uid, $page = 1, $num = 20)
{
return self::call('groupMembers.getPotentialGroupMemberList', compact('uid','page','num'));
}
/**
* 获取有效潜在团员数量
* @param string $uids
* @return mixed
*/
public static function getPotentialGroupMemberCount($uids)
{
return self::call('groupMembers.getPotentialGroupMemberCount', compact('uids'));
}
}
\ No newline at end of file
...@@ -82,4 +82,27 @@ class Member extends Client ...@@ -82,4 +82,27 @@ class Member extends Client
return self::call('member.register', compact('username', 'password', 'nickname', 'expand')); return self::call('member.register', compact('username', 'password', 'nickname', 'expand'));
} }
/**
* 更新用户昵称
*
* @param int $uid
* @param string $nickname
*/
public static function updateNickname($uid, $nickname)
{
self::call('member.updateNickname', compact('uid', 'nickname'));
}
/**
* 更新用户头像
*
* @param int $uid
* @param string $format 文件格式,输入文件格式,如 jpg, gif 等
* @param string $avatarBase64 头像内容的base64码,eg: $avatarBase64 = base64_encode(file_get_content('avatar.jpg'));
*/
public static function updateAvatar($uid, $format, $avatarBase64)
{
self::call('member.updateAvatar', compact('uid', 'format', 'avatarBase64'));
}
} }
\ No newline at end of file
...@@ -18,6 +18,14 @@ use internalApi\base\Client; ...@@ -18,6 +18,14 @@ use internalApi\base\Client;
class Message extends Client class Message extends Client
{ {
const TYPE_TEXT = 0; //文本
const TYPE_IMAGE = 1; //图片消息
const TYPE_AUDIO = 2; //语音消息
const TYPE_VIDEO = 3; //视频消息
const TYPE_INTERACTIVE = 4;//互动消息
const TYPE_PUSH = 5;//推送消息
const TYPE_REMIND = 6;//提醒消息
/** /**
* 向指定号码发送短信 * 向指定号码发送短信
* *
...@@ -159,5 +167,23 @@ class Message extends Client ...@@ -159,5 +167,23 @@ class Message extends Client
{ {
return self::call('message.pushMsg', compact('title', 'url', 'desc', 'userId','from','type')); return self::call('message.pushMsg', compact('title', 'url', 'desc', 'userId','from','type'));
} }
/**
* 以系统会话发送消息
*
* @param int|string $systemSessionId 系统会话的ID或别名
* @param int $from 发送用户,系统用户请指定0
* @param int $to 接收用户
* @param int $type 消息类型
* @param array $content 消息内容
* @param array $ext 消息扩展属性
* @return array
* @throws \internalApi\base\ApiException
*/
public static function sendSystemMessage($systemSessionId, $from, $to, $type, $content, $ext=[])
{
return self::call('message.sendSystemMessage', compact('systemSessionId', 'from', 'to', 'type', 'content', 'ext'));
}
} }
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/10/17
* Time: 10:01
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
class Timeline extends Client
{
/**
* 添加时间线
* @param int $uid
* @param string $type
* @param string $key
* @param array $content
* @param array $quote
* @param array $ext
* @param null $time
* @return mixed
*/
public static function addTimeline($uid, $type, $key, $content = [], $quote = [], $ext = [], $time = null)
{
return self::call('Timeline.addTimeline', compact('uid', 'type', 'key', 'content', 'quote', 'ext', 'time'));
}
/**
* 从时间线中删除动态
* @param string $key
* @return mixed
*/
public static function removeTimeline($key)
{
return self::call('Timeline.removeTimeline', compact('key'));
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2018/6/13
* Time: 17:13
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
/**
* 用户中心事件跟踪服务
* @package internalApi\ucenter
*/
class Track extends Client
{
/**
* 添加事件
*
* @param string $event 事件、32个字符以内
* @param int $uid 用户UID,0代表访客
* @param int|null $time 时间,默认为当前时间
* @param array $props 属性键值列表 (键32个字符以内,值128字符以内)
* @return string 事件ID
*/
public static function track($event, $uid=0, $time=null, $props=[])
{
return self::call('track.track', compact('event', 'uid', 'time', 'props'));
}
/**
* 更新事件
*
* @param string $id
* @param int $uid
* @param int|null $time
* @param array $props
*/
public static function update($id, $uid=0, $time=null, $props=[])
{
return self::call('track.update', compact('id', 'uid', 'time', 'props'));
}
}
\ No newline at end of file
...@@ -40,4 +40,28 @@ class Comment extends Client ...@@ -40,4 +40,28 @@ class Comment extends Client
return self::call('comment.getReplyMsgCount', compact('uid')); return self::call('comment.getReplyMsgCount', compact('uid'));
} }
/**
* 统计指定时间段内产生的评论数量
*
* @param int $from
* @param int $to
* @return int
*/
public static function countBetweenTime($from, $to)
{
return self::call('comment.countBetweenTime', compact('from', 'to'));
}
/**
* 统计指定时间段内对评论的赞数量
*
* @param int $from
* @param int $to
* @return int
*/
public static function countLikeBetweenTime($from, $to)
{
return self::call('comment.countLikeBetweenTime', compact('from', 'to'));
}
} }
\ No newline at end of file
...@@ -35,4 +35,36 @@ class Course extends Client ...@@ -35,4 +35,36 @@ class Course extends Client
return self::call('course.getSectionInfo', compact('sectionId')); return self::call('course.getSectionInfo', compact('sectionId'));
} }
/**
* 获取推荐免费或付费课程
* @param int $fee 0是免费 1是付费
* @param $num
* @return mixed
*/
public static function getRecommendCourseShow($fee=0,$num=1)
{
return self::call('course.getRecommendCourseShow', compact('fee','num'));
}
/**
* 获取推荐课程带讲师
* @param $num
* @return mixed
*/
public static function getRecommendCourses($num=1)
{
return self::call('course.getRecommendCourses', compact('num'));
}
/**
* 批量获取课程详情
* @param array $courseIds
* @return mixed
*/
public static function getCourseDetails($courseIds)
{
return self::call('course.getCourseDetails', compact('courseIds'));
}
} }
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/5/31
* Time: 15:31
*/
namespace internalApi\xue;
use internalApi\base\Client;
class Live extends Client
{
/**
* 获取正在直播的场次
* @param int $userId 未登录状态不传
* @param int $num
* @return mixed
*/
public static function getShow($userId = 0,$num = 1)
{
return self::call('live.getLiveShow', compact('userId','num'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment