正在显示
7 个修改的文件
包含
47 行增加
和
8 行删除
| @@ -504,13 +504,13 @@ class Main | @@ -504,13 +504,13 @@ class Main | ||
| 504 | namespace Lackoxygen\TiktokShop\Facade; | 504 | namespace Lackoxygen\TiktokShop\Facade; |
| 505 | 505 | ||
| 506 | use Lackoxygen\TiktokShop\Request; | 506 | use Lackoxygen\TiktokShop\Request; |
| 507 | -use Illuminate\Support\Facades\Facade; | 507 | +use Illuminate\Support\Facades\Facade as LaravelFacade; |
| 508 | use Lackoxygen\TiktokShop\Support\Verify; | 508 | use Lackoxygen\TiktokShop\Support\Verify; |
| 509 | use Lackoxygen\TiktokShop\Application; | 509 | use Lackoxygen\TiktokShop\Application; |
| 510 | 510 | ||
| 511 | \${ANNOTATE} | 511 | \${ANNOTATE} |
| 512 | 512 | ||
| 513 | -class TiktokShop extends Facade | 513 | +class Facade extends LaravelFacade |
| 514 | { | 514 | { |
| 515 | /** | 515 | /** |
| 516 | * @return string | 516 | * @return string |
| @@ -549,7 +549,7 @@ FACADE; | @@ -549,7 +549,7 @@ FACADE; | ||
| 549 | global $src_path; | 549 | global $src_path; |
| 550 | 550 | ||
| 551 | file_put_contents( | 551 | file_put_contents( |
| 552 | - $src_path . '/Facade/TiktokShop.php', | 552 | + $src_path . '/Facade/Facade.php', |
| 553 | $facadeContent | 553 | $facadeContent |
| 554 | ); | 554 | ); |
| 555 | } | 555 | } |
| @@ -664,7 +664,6 @@ class CodeWriter | @@ -664,7 +664,6 @@ class CodeWriter | ||
| 664 | } | 664 | } |
| 665 | } | 665 | } |
| 666 | 666 | ||
| 667 | - | ||
| 668 | class CodeGenerateInterface | 667 | class CodeGenerateInterface |
| 669 | { | 668 | { |
| 670 | protected static string $template = <<<temp | 669 | protected static string $template = <<<temp |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | namespace Lackoxygen\TiktokShop\Facade; | 3 | namespace Lackoxygen\TiktokShop\Facade; |
| 4 | 4 | ||
| 5 | use Lackoxygen\TiktokShop\Request; | 5 | use Lackoxygen\TiktokShop\Request; |
| 6 | -use Illuminate\Support\Facades\Facade; | 6 | +use Illuminate\Support\Facades\Facade as LaravelFacade; |
| 7 | use Lackoxygen\TiktokShop\Support\Verify; | 7 | use Lackoxygen\TiktokShop\Support\Verify; |
| 8 | use Lackoxygen\TiktokShop\Application; | 8 | use Lackoxygen\TiktokShop\Application; |
| 9 | 9 | ||
| @@ -36,7 +36,7 @@ use Lackoxygen\TiktokShop\Application; | @@ -36,7 +36,7 @@ use Lackoxygen\TiktokShop\Application; | ||
| 36 | * @method static Request\Address\AddressInterface address() | 36 | * @method static Request\Address\AddressInterface address() |
| 37 | */ | 37 | */ |
| 38 | 38 | ||
| 39 | -class TiktokShop extends Facade | 39 | +class Facade extends LaravelFacade |
| 40 | { | 40 | { |
| 41 | /** | 41 | /** |
| 42 | * @return string | 42 | * @return string |
| @@ -251,6 +251,17 @@ class Yunc extends Request implements YuncInterface | @@ -251,6 +251,17 @@ class Yunc extends Request implements YuncInterface | ||
| 251 | /** | 251 | /** |
| 252 | * @inheritDoc | 252 | * @inheritDoc |
| 253 | */ | 253 | */ |
| 254 | + public function yuncSynchronizeSN(array $params = []) | ||
| 255 | + { | ||
| 256 | + $this->builder->method('POST') | ||
| 257 | + ->service('yunc.synchronizeSN') | ||
| 258 | + ->path('/yunc/synchronizeSN') | ||
| 259 | + ->params($params); | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + /** | ||
| 263 | + * @inheritDoc | ||
| 264 | + */ | ||
| 254 | public function yuncSyncInventorySnapshot(array $params = []) | 265 | public function yuncSyncInventorySnapshot(array $params = []) |
| 255 | { | 266 | { |
| 256 | $this->builder->method('POST') | 267 | $this->builder->method('POST') |
| @@ -186,6 +186,14 @@ interface YuncInterface | @@ -186,6 +186,14 @@ interface YuncInterface | ||
| 186 | public function yuncErpInboundCancel(array $params = []); | 186 | public function yuncErpInboundCancel(array $params = []); |
| 187 | 187 | ||
| 188 | /** | 188 | /** |
| 189 | + * WMS回传SN信息 | ||
| 190 | + * @link https://op.jinritemai.com/docs/api-docs/50/2174 | ||
| 191 | + * @param array $params | ||
| 192 | + * @return ResultSet | ||
| 193 | + */ | ||
| 194 | + public function yuncSynchronizeSN(array $params = []); | ||
| 195 | + | ||
| 196 | + /** | ||
| 189 | * 库存快照回传 | 197 | * 库存快照回传 |
| 190 | * @link https://op.jinritemai.com/docs/api-docs/50/2160 | 198 | * @link https://op.jinritemai.com/docs/api-docs/50/2160 |
| 191 | * @param array $params | 199 | * @param array $params |
| @@ -4,16 +4,25 @@ namespace Lackoxygen\TiktokShop\Util; | @@ -4,16 +4,25 @@ namespace Lackoxygen\TiktokShop\Util; | ||
| 4 | 4 | ||
| 5 | class Json | 5 | class Json |
| 6 | { | 6 | { |
| 7 | + /** | ||
| 8 | + * @param array $array | ||
| 9 | + * @return false|string | ||
| 10 | + */ | ||
| 7 | public static function marshal(array $array) | 11 | public static function marshal(array $array) |
| 8 | { | 12 | { |
| 9 | $flag = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; | 13 | $flag = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; |
| 10 | - if (0 === count($array)) { | 14 | + if (0 === \count($array)) { |
| 11 | $flag |= JSON_FORCE_OBJECT; | 15 | $flag |= JSON_FORCE_OBJECT; |
| 12 | } | 16 | } |
| 13 | return \json_encode($array, $flag); | 17 | return \json_encode($array, $flag); |
| 14 | } | 18 | } |
| 15 | 19 | ||
| 16 | - public static function unmarshal(string $value, $associative = true) | 20 | + /** |
| 21 | + * @param string $value | ||
| 22 | + * @param bool $associative | ||
| 23 | + * @return mixed | ||
| 24 | + */ | ||
| 25 | + public static function unmarshal(string $value, bool $associative = true) | ||
| 17 | { | 26 | { |
| 18 | return \json_decode($value, $associative); | 27 | return \json_decode($value, $associative); |
| 19 | } | 28 | } |
| @@ -4,6 +4,10 @@ namespace Lackoxygen\TiktokShop\Util; | @@ -4,6 +4,10 @@ namespace Lackoxygen\TiktokShop\Util; | ||
| 4 | 4 | ||
| 5 | class Preg | 5 | class Preg |
| 6 | { | 6 | { |
| 7 | + /** | ||
| 8 | + * @param string $docs | ||
| 9 | + * @return array|mixed | ||
| 10 | + */ | ||
| 7 | public static function annotation(string $docs) | 11 | public static function annotation(string $docs) |
| 8 | { | 12 | { |
| 9 | preg_match_all('/@.*?/U', $docs, $matches); | 13 | preg_match_all('/@.*?/U', $docs, $matches); |
| @@ -12,6 +16,10 @@ class Preg | @@ -12,6 +16,10 @@ class Preg | ||
| 12 | } | 16 | } |
| 13 | 17 | ||
| 14 | 18 | ||
| 19 | + /** | ||
| 20 | + * @param $string | ||
| 21 | + * @return array|string|string[]|null | ||
| 22 | + */ | ||
| 15 | public static function mergeSpaces($string) | 23 | public static function mergeSpaces($string) |
| 16 | { | 24 | { |
| 17 | return preg_replace("/\s(?=\s)/", "\\1", $string); | 25 | return preg_replace("/\s(?=\s)/", "\\1", $string); |
| @@ -4,6 +4,10 @@ namespace Lackoxygen\TiktokShop\Util; | @@ -4,6 +4,10 @@ namespace Lackoxygen\TiktokShop\Util; | ||
| 4 | 4 | ||
| 5 | class Sort | 5 | class Sort |
| 6 | { | 6 | { |
| 7 | + /** | ||
| 8 | + * @param array $arr | ||
| 9 | + * @return void | ||
| 10 | + */ | ||
| 7 | public static function kSort(array &$arr) | 11 | public static function kSort(array &$arr) |
| 8 | { | 12 | { |
| 9 | $kString = true; | 13 | $kString = true; |
-
请 注册 或 登录 后发表评论