diff --git a/src/SDK/EellyOldCode/Api/GoodsTiktokUpload.php b/src/SDK/EellyOldCode/Api/GoodsTiktokUpload.php index 49549937ba3e97c5f739c87c17573476b6c65e97..63c8750f2f969ae00d4338cbe71e5e03a7aea391 100644 --- a/src/SDK/EellyOldCode/Api/GoodsTiktokUpload.php +++ b/src/SDK/EellyOldCode/Api/GoodsTiktokUpload.php @@ -57,7 +57,7 @@ class GoodsTiktokUpload * @param string $params.storeName 商品ID * @param string $params.goodsNumber 商品编码 * @param string $params.cateId 商品分类ID - * @param int $params.ifShow 上架状态 0 全部 1 上架中 2 已下架 + * @param int $params.ifShow 上架状态 -1 全部 0 已下架 1 上架中 * @param string $params.sortKey 排序字段,不排序此字段值传空字符串 price 销售价格 stock 库存 expireTime 创建时间 * @param int $params.asc 0 降序 1 升序 * @param int $page 页数 diff --git a/src/SDK/Live/Api/LiveBook.php b/src/SDK/Live/Api/LiveBook.php new file mode 100644 index 0000000000000000000000000000000000000000..1fcd06043ebe22e33f537a4b7118d5ec73b07b7b --- /dev/null +++ b/src/SDK/Live/Api/LiveBook.php @@ -0,0 +1,96 @@ + + */ + public static function getShopSubscribeAmount(array $condition = []): array + { + return EellyClient::requestJson('live/liveBook', __FUNCTION__, ['condition' => $condition], true); + } + + /** + * 后台 厂+直播预约管理 + * + * @param array $condition 搜索条件 + * @param int $currentPage 页数 + * @param int $limit 单页限制 + * + * @since 2021-06-09T09:33:37+0800 + * @author twb<1174865138@qq.com> + */ + public static function getAdminLiveBookList(array $condition = [], int $currentPage = 1, int $limit = 100): array + { + return EellyClient::requestJson('live/liveBook', __FUNCTION__, ['condition' => $condition, 'currentPage' => $currentPage, 'limit' => $limit], true); + } + + /** + * 店铺预约历史 + * + * @param array $condition 搜索条件 + * @param int $currentPage 页数 + * @param int $limit 单页限制 + * + * @since 2021-06-09T09:33:37+0800 + * @author twb<1174865138@qq.com> + */ + public static function getAdminliveBookDetail(array $condition = [], int $currentPage = 1, int $limit = 100): array + { + return EellyClient::requestJson('live/liveBook', __FUNCTION__, ['condition' => $condition, 'currentPage' => $currentPage, 'limit' => $limit], true); + } + + /** + * 查看店铺的可预约数据 + * + * @param int $storeId 店铺id + * + * @since 2021-06-09T09:33:37+0800 + * @author twb<1174865138@qq.com> + */ + public static function checkAdminliveBook(int $storeId = 100): array + { + return EellyClient::requestJson('live/liveBook', __FUNCTION__, ['storeId' => $storeId], true); + } + + /** + * 手动直播预约 + * + * @param array $params 预约数据 + * + * @since 2021-06-09T09:33:37+0800 + * @author twb<1174865138@qq.com> + */ + public static function adminliveBook(array $params = []): array + { + return EellyClient::requestJson('live/liveBook', __FUNCTION__, ['params' => $params], true); + } + + public static function getInstance(): self + { + static $instance; + if (null === $instance) { + $instance = new self(); + } + + return $instance; + } +} diff --git a/src/SDK/Live/Exception/LiveException.php b/src/SDK/Live/Exception/LiveException.php index 45fe02601edfe7f4d99469219c530a9d49f0f348..21090b85609beea8423e7e43229923e566c7b3b2 100644 --- a/src/SDK/Live/Exception/LiveException.php +++ b/src/SDK/Live/Exception/LiveException.php @@ -24,4 +24,10 @@ use Eelly\Exception\LogicException; class LiveException extends LogicException { + public const CHANNEL_FULL = '预约名额已满,请重选日期,或更换时段试试'; + + public const ALREADY_BOOKED = '存在相同预约, 请免重复'; + + public const NO_USE_IMAGES = '没有使用中的店家直播图片'; + }