Skip to content

Commit

Permalink
小程序发货信息管理服务
Browse files Browse the repository at this point in the history
  • Loading branch information
fireqong committed Dec 14, 2023
1 parent 633f67b commit e6fef78
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 86 deletions.
2 changes: 1 addition & 1 deletion src/MiniProgram/Base/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getPaidUnionid($openid, $options = [])
{
return $this->httpGet('wxa/getpaidunionid', compact('openid') + $options);
}

/**
* Get version info
*
Expand Down
10 changes: 3 additions & 7 deletions src/MiniProgram/Shipping/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ public function setMsgJumpPath(string $path)
*/
public function isTradeManaged(string $appID = '')
{
// $config = $this->app->getConfig();

$params = [
'appid' => $appID
'appid' => empty($appID) ? $this->app['config']['app_id'] : $appID
];

return $this->httpPostJson('wxa/sec/order/is_trade_managed', $params);
Expand All @@ -133,12 +131,10 @@ public function isTradeManaged(string $appID = '')
*/
public function isTradeCompleted(string $appID = '')
{
// $config = $this->app->getConfig();

$params = [
'appid' => $appID
'appid' => empty($appID) ? $this->app['config']['app_id'] : $appID
];

return $this->httpPostJson('wxa/sec/order/is_trade_management_confirmation_completed', $params);
}
}
}
3 changes: 1 addition & 2 deletions src/MiniProgram/Shipping/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@

class ServiceProvider implements ServiceProviderInterface
{

public function register(Container $app)
{
$app['shipping'] = function ($app) {
return new Client($app);
};
}
}
}
9 changes: 4 additions & 5 deletions src/Work/Wedrive/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@

/**
* Class Client
*
*
* @author lio990527 <lio990527@163.com>
*/
class Client extends BaseClient
{

/**
* 获取盘专业版信息
*
*
* @param string $userid
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/95856#%E8%8E%B7%E5%8F%96%E7%9B%98%E4%B8%93%E4%B8%9A%E7%89%88%E4%BF%A1%E6%81%AF
*/
public function proInfo($userid)
Expand All @@ -44,7 +43,7 @@ public function proInfo($userid)
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/95856#%E8%8E%B7%E5%8F%96%E7%9B%98%E5%AE%B9%E9%87%8F%E4%BF%A1%E6%81%AF
*/
public function capacity()
Expand Down
78 changes: 39 additions & 39 deletions src/Work/Wedrive/FileClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
* Class FileClient
*
*
* @author lio990527 <lio990527@163.com>
*/
class FileClient extends BaseClient
Expand All @@ -30,12 +30,12 @@ class FileClient extends BaseClient
* @param string $fatherid 父目录fileid, 在根目录时为空间spaceid
* @param int $fileType 文件类型, 1:文件夹 3:文档(文档) 4:文档(表格) 6:文档(幻灯片)
* @param string $fileName 文件名字
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E6%96%87%E6%A1%A3
*/
public function create($userid, $spaceid, $fatherid, $fileType, $fileName)
Expand All @@ -57,12 +57,12 @@ public function create($userid, $spaceid, $fatherid, $fileType, $fileName)
* @param string $userid 操作人userid
* @param string $fileid 文件id
* @param string $name 新文件名
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E9%87%8D%E5%91%BD%E5%90%8D%E6%96%87%E4%BB%B6
*/
public function rename($userid, $fileid, $name)
Expand All @@ -79,16 +79,16 @@ public function rename($userid, $fileid, $name)
/**
* 移动文件
*
* @param string $userid
* @param string $userid
* @param string|array $fileid 文件fileid
* @param string $fatherid 目标目录的fileid
* @param boolean $replace 重名时,是否覆盖 false:重名文件进行冲突重命名处理(移动后文件名格式如xxx(1).txt xxx(1).doc等)
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E7%A7%BB%E5%8A%A8%E6%96%87%E4%BB%B6
*/
public function move($userid, $fileid, $fatherid, $replace = false)
Expand All @@ -103,12 +103,12 @@ public function move($userid, $fileid, $fatherid, $replace = false)
*
* @param string $userid
* @param string|array $fileid
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E5%88%A0%E9%99%A4%E6%96%87%E4%BB%B6
*/
public function delete($userid, $fileid)
Expand All @@ -127,12 +127,12 @@ public function delete($userid, $fileid)
* @param integer $start 查询游标 首次填0, 后续填上一次请求返回的next_start
* @param integer $limit 拉取条数 最大1000
* @param integer $sort 列表排序方式 1:名字升序;2:名字降序;3:大小升序;4:大小降序;5:修改时间升序;6:修改时间降序
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E8%8E%B7%E5%8F%96%E6%96%87%E4%BB%B6%E5%88%97%E8%A1%A8
*/
public function list($userid, $spaceid, $fatherid = null, $start = 0, $limit = 1000, $sort = 1)
Expand All @@ -154,12 +154,12 @@ public function list($userid, $spaceid, $fatherid = null, $start = 0, $limit = 1
*
* @param string $userid
* @param string $fileid
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E6%96%87%E4%BB%B6%E4%BF%A1%E6%81%AF
*/
public function info($userid, $fileid)
Expand All @@ -175,12 +175,12 @@ public function info($userid, $fileid)
* @param string $fatherid 目录id
* @param string $fileName 文件名
* @param string $fileContent 文件内容
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6
*/
public function upload($userid, $spaceid, $fatherid, $fileName, $fileContent)
Expand All @@ -202,12 +202,12 @@ public function upload($userid, $spaceid, $fatherid, $fileName, $fileContent)
* @param string $userid
* @param string $fileid
* @param boolean $download 是否直接下载
*
*
* @return \EasyWeChat\Kernel\Http\StreamResponse|\Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93657#%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6
*/
public function download($userid, $fileid, $download = false)
Expand All @@ -230,12 +230,12 @@ public function download($userid, $fileid, $download = false)
*
* @param string $userid
* @param string $fileid
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93658#%E8%8E%B7%E5%8F%96%E5%88%86%E4%BA%AB%E9%93%BE%E6%8E%A5
*/
public function share($userid, $fileid)
Expand All @@ -252,12 +252,12 @@ public function share($userid, $fileid)
* @param int $auth 权限信息 权限信息
* 普通文档: 1:仅浏览(可下载) 4:仅预览(仅专业版企业可设置);如果不填充此字段为保持原有状态
* 微文档: 1:仅浏览(可下载) 2:可编辑;如果不填充此字段为保持原有状态
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93658#%E5%88%86%E4%BA%AB%E8%AE%BE%E7%BD%AE
*/
public function setting($userid, $fileid, $authScope, $auth = null)
Expand All @@ -278,12 +278,12 @@ public function setting($userid, $fileid, $authScope, $auth = null)
* @param string $userid
* @param string $fileid
* @param array $authInfo 添加成员的信息
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93658#%E6%96%B0%E5%A2%9E%E6%88%90%E5%91%98
*/
public function aclAdd($userid, $fileid, $authInfo)
Expand All @@ -299,16 +299,16 @@ public function aclAdd($userid, $fileid, $authInfo)

/**
* 删除成员
*
*
* @param string $userid
* @param string $fileid
* @param array $authInfo 删除成员的信息
*
*
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
*
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*
*
* @see https://developer.work.weixin.qq.com/document/path/93658#%E5%88%A0%E9%99%A4%E6%88%90%E5%91%98
*/
public function aclDel($userid, $fileid, $authInfo)
Expand Down
2 changes: 1 addition & 1 deletion src/Work/Wedrive/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/**
* Class ServiceProvider
*
*
* @author lio990527 <lio990527@163.com>
*/
class ServiceProvider implements ServiceProviderInterface
Expand Down
Loading

0 comments on commit e6fef78

Please sign in to comment.