Commit b761a7b46259f7a48245786a88a7fce35bbf05d1
Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro
Conflicts: yudao-ui-admin/yarn.lock
Showing
427 changed files
with
2007 additions
and
39922 deletions
Too many changes.
To preserve performance only 100 of 427 files are displayed.
.github/workflows/yudao-ui-admin.yml
| @@ -21,7 +21,7 @@ jobs: | @@ -21,7 +21,7 @@ jobs: | ||
| 21 | 21 | ||
| 22 | strategy: | 22 | strategy: |
| 23 | matrix: | 23 | matrix: |
| 24 | - node-version: [14.x, 16.x] | 24 | + node_version: [14.x, 16.x] |
| 25 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | 25 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
| 26 | 26 | ||
| 27 | steps: | 27 | steps: |
README.md
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | > | 21 | > |
| 22 | > ๐ ็ป้กน็ฎ็น็น Star ๅง๏ผ่ฟๅฏนๆไปฌ็็ๅพ้่ฆ๏ผ | 22 | > ๐ ็ป้กน็ฎ็น็น Star ๅง๏ผ่ฟๅฏนๆไปฌ็็ๅพ้่ฆ๏ผ |
| 23 | 23 | ||
| 24 | - | 24 | + |
| 25 | 25 | ||
| 26 | * ็ฎก็ๅๅฐ็ Vue3 ็ๆฌ้็จ [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) ๏ผVue2 ็ๆฌ้็จ [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) | 26 | * ็ฎก็ๅๅฐ็ Vue3 ็ๆฌ้็จ [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) ๏ผVue2 ็ๆฌ้็จ [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) |
| 27 | * ็ฎก็ๅๅฐ็็งปๅจ็ซฏ้็จ [uni-app](https://github.com/dcloudio/uni-app) ๆนๆก๏ผไธไปฝไปฃ็ ๅค็ป็ซฏ้้ ๏ผๅๆถๆฏๆ APPใๅฐ็จๅบใH5๏ผ | 27 | * ็ฎก็ๅๅฐ็็งปๅจ็ซฏ้็จ [uni-app](https://github.com/dcloudio/uni-app) ๆนๆก๏ผไธไปฝไปฃ็ ๅค็ป็ซฏ้้ ๏ผๅๆถๆฏๆ APPใๅฐ็จๅบใH5๏ผ |
| @@ -29,18 +29,37 @@ | @@ -29,18 +29,37 @@ | ||
| 29 | * ๆฐๆฎๅบๅฏไฝฟ็จ MySQLใOracleใPostgreSQLใSQL ServerใMariaDBใๅฝไบง่พพๆขฆ DMใTiDB ็ญ | 29 | * ๆฐๆฎๅบๅฏไฝฟ็จ MySQLใOracleใPostgreSQLใSQL ServerใMariaDBใๅฝไบง่พพๆขฆ DMใTiDB ็ญ |
| 30 | * ๆ้่ฎค่ฏไฝฟ็จ Spring Security & Token & Redis๏ผๆฏๆๅค็ป็ซฏใๅค็ง็จๆท็่ฎค่ฏ็ณป็ป๏ผๆฏๆ SSO ๅ็น็ปๅฝ | 30 | * ๆ้่ฎค่ฏไฝฟ็จ Spring Security & Token & Redis๏ผๆฏๆๅค็ป็ซฏใๅค็ง็จๆท็่ฎค่ฏ็ณป็ป๏ผๆฏๆ SSO ๅ็น็ปๅฝ |
| 31 | * ๆฏๆๅ ่ฝฝๅจๆๆ้่ๅ๏ผๆ้ฎ็บงๅซๆ้ๆงๅถ๏ผๆฌๅฐ็ผๅญๆๅๆง่ฝ | 31 | * ๆฏๆๅ ่ฝฝๅจๆๆ้่ๅ๏ผๆ้ฎ็บงๅซๆ้ๆงๅถ๏ผๆฌๅฐ็ผๅญๆๅๆง่ฝ |
| 32 | -* ๆฏๆ SaaS ๅค็งๆท็ณป็ป๏ผๅฏ่ชๅฎไนๆฏไธช็งๆท็ๆ้๏ผๆไพ้ๆๅ็ๅค็งๆทๅบๅฑๅฐ่ฃ | 32 | +* ๆฏๆ SaaS ๅค็งๆท๏ผๅฏ่ชๅฎไนๆฏไธช็งๆท็ๆ้๏ผๆไพ้ๆๅ็ๅค็งๆทๅบๅฑๅฐ่ฃ |
| 33 | * ๅทฅไฝๆตไฝฟ็จ Flowable๏ผๆฏๆๅจๆ่กจๅใๅจ็บฟ่ฎพ่ฎกๆต็จใไผ็ญพ / ๆ็ญพใๅค็งไปปๅกๅ้ ๆนๅผ | 33 | * ๅทฅไฝๆตไฝฟ็จ Flowable๏ผๆฏๆๅจๆ่กจๅใๅจ็บฟ่ฎพ่ฎกๆต็จใไผ็ญพ / ๆ็ญพใๅค็งไปปๅกๅ้ ๆนๅผ |
| 34 | * ้ซๆ็ๅผๅ๏ผไฝฟ็จไปฃ็ ็ๆๅจๅฏไปฅไธ้ฎ็ๆๅๅ็ซฏไปฃ็ + ๅๅ ๆต่ฏ + Swagger ๆฅๅฃๆๆกฃ + Validator ๅๆฐๆ ก้ช | 34 | * ้ซๆ็ๅผๅ๏ผไฝฟ็จไปฃ็ ็ๆๅจๅฏไปฅไธ้ฎ็ๆๅๅ็ซฏไปฃ็ + ๅๅ ๆต่ฏ + Swagger ๆฅๅฃๆๆกฃ + Validator ๅๆฐๆ ก้ช |
| 35 | * ้ๆๅพฎไฟกๅฐ็จๅบใๅพฎไฟกๅ ฌไผๅทใไผไธๅพฎไฟกใ้้็ญไธๆน็ป้๏ผ้ๆๆฏไปๅฎใๅพฎไฟก็ญๆฏไปไธ้ๆฌพ | 35 | * ้ๆๅพฎไฟกๅฐ็จๅบใๅพฎไฟกๅ ฌไผๅทใไผไธๅพฎไฟกใ้้็ญไธๆน็ป้๏ผ้ๆๆฏไปๅฎใๅพฎไฟก็ญๆฏไปไธ้ๆฌพ |
| 36 | * ้ๆ้ฟ้ไบใ่ พ่ฎฏไบ็ญ็ญไฟกๆธ ้๏ผ้ๆ MinIOใ้ฟ้ไบใ่ พ่ฎฏไบใไธ็ไบ็ญไบๅญๅจๆๅก | 36 | * ้ๆ้ฟ้ไบใ่ พ่ฎฏไบ็ญ็ญไฟกๆธ ้๏ผ้ๆ MinIOใ้ฟ้ไบใ่ พ่ฎฏไบใไธ็ไบ็ญไบๅญๅจๆๅก |
| 37 | * ้ๆๆฅ่กจ่ฎพ่ฎกๅจใๅคงๅฑ่ฎพ่ฎกๅจ๏ผ้่ฟๆๆฝๅณๅฏ็ๆ้ ท็ซ็ๆฅ่กจไธๅคงๅฑ | 37 | * ้ๆๆฅ่กจ่ฎพ่ฎกๅจใๅคงๅฑ่ฎพ่ฎกๅจ๏ผ้่ฟๆๆฝๅณๅฏ็ๆ้ ท็ซ็ๆฅ่กจไธๅคงๅฑ |
| 38 | 38 | ||
| 39 | -| ้กน็ฎๅ | ่ฏดๆ | ไผ ้้จ | | ||
| 40 | -|--------------------|------------------------|------------------------------------------------------------------------------------------------------------------------------------| | ||
| 41 | -| `ruoyi-vue-pro` | Spring Boot ๅคๆจกๅ | **[Gitee](https://gitee.com/zhijiantianya/ruoyi-vue-pro)** [Github](https://github.com/YunaiV/ruoyi-vue-pro) | | ||
| 42 | -| `yudao-cloud` | Spring Cloud ๅพฎๆๅก | **[Gitee](https://gitee.com/zhijiantianya/yudao-cloud)** [Github](https://github.com/YunaiV/yudao-cloud) | | ||
| 43 | -| `Spring-Boot-Labs` | Spring Boot & Cloud ๅ ฅ้จ | **[Gitee](https://gitee.com/yudaocode/SpringBoot-Labs)** [Github](https://github.com/yudaocode/SpringBoot-Labs) | | 39 | +## ๐ณ ้กน็ฎๅ ณ็ณป |
| 40 | + | ||
| 41 | + | ||
| 42 | + | ||
| 43 | +ไธไธช้กน็ฎ็ๅ่ฝๅฏนๆฏ๏ผๅฏ่ง็คพๅบๅ ฑๅๆด็็ [ๅฝไบงๅผๆบ้กน็ฎๅฏนๆฏ](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn) ่กจๆ ผใ | ||
| 44 | + | ||
| 45 | +### ๅ็ซฏ้กน็ฎ | ||
| 46 | + | ||
| 47 | + | ||
| 48 | +| ้กน็ฎ | Star | ็ฎไป | | ||
| 49 | +|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------| | ||
| 50 | +| [ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [](https://gitee.com/zhijiantianya/ruoyi-vue-pro) [](https://github.com/YunaiV/ruoyi-vue-pro) | ๅบไบ Spring Boot ๅคๆจกๅๆถๆ | | ||
| 51 | +| [yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud) | [](https://gitee.com/zhijiantianya/yudao-cloud) [](https://github.com/YunaiV/yudao-cloud) | ๅบไบ Spring Cloud ๅพฎๆๅกๆถๆ | | ||
| 52 | +| [Spring-Boot-Labs](https://gitee.com/yudaocode/SpringBoot-Labs) | [](https://gitee.com/zhijiantianya/yudao-cloud) [](https://github.com/yudaocode/SpringBoot-Labs) | ็ณป็ปๅญฆไน Spring Boot & Cloud ไธๆ | | ||
| 53 | + | ||
| 54 | +### ๅ็ซฏ้กน็ฎ | ||
| 55 | + | ||
| 56 | +| ้กน็ฎ | Star | ็ฎไป | | ||
| 57 | +|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------| | ||
| 58 | +| [yudao-ui-admin-vue3](https://gitee.com/yudaocode/yudao-ui-admin-vue3) | [](https://gitee.com/yudaocode/yudao-ui-admin-vue3) [](https://github.com/yudaocode/yudao-ui-admin-vue3) | ๅบไบ Vue3 + element-plus ๅฎ็ฐ็็ฎก็ๅๅฐ | | ||
| 59 | +| [yudao-ui-admin](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-admin) | [](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-admin) [](https://github.com/YunaiV/ruoyi-vue-pro/tree/master/yudao-ui-admin) | ๅบไบ Vue2 + element-ui ๅฎ็ฐ็็ฎก็ๅๅฐ | | ||
| 60 | +| [yudao-ui-admin-uniapp](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-admin-uniapp) | [](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-admin-uniapp) [](https://github.com/YunaiV/ruoyi-vue-pro/tree/master/yudao-ui-admin-uniapp) | ๅบไบ uni-app + uni-ui ๅฎ็ฐ็็ฎก็ๅๅฐ็ๅฐ็จๅบ | | ||
| 61 | +| [yudao-ui-go-view](https://gitee.com/yudaocode/yudao-ui-go-view) | [](https://gitee.com/yudaocode/yudao-ui-go-view) [](https://github.com/yudaocode/yudao-ui-go-view) | ๅบไบ Vue3 + naive-ui ๅฎ็ฐ็ๅคงๅฑๆฅ่กจ | | ||
| 62 | +| [yudao-ui-app](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-app) | [](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-app) [](https://github.com/YunaiV/ruoyi-vue-pro/tree/master/yudao-ui-app) | ๅบไบ uni-app + uview ๅฎ็ฐ็็จๆท App | | ||
| 44 | 63 | ||
| 45 | ## ๐ฐ ๅๆฏ่ฏดๆ | 64 | ## ๐ฐ ๅๆฏ่ฏดๆ |
| 46 | 65 | ||
| @@ -207,6 +226,8 @@ ps๏ผๆ ธๅฟๅ่ฝๅทฒ็ปๅฎ็ฐ๏ผๆญฃๅจๅฏนๆฅๅพฎไฟกๅฐ็จๅบไธญ... | @@ -207,6 +226,8 @@ ps๏ผๆ ธๅฟๅ่ฝๅทฒ็ปๅฎ็ฐ๏ผๆญฃๅจๅฏนๆฅๅพฎไฟกๅฐ็จๅบไธญ... | ||
| 207 | 226 | ||
| 208 | ## ๐จ ๆๆฏๆ | 227 | ## ๐จ ๆๆฏๆ |
| 209 | 228 | ||
| 229 | +### ๆจกๅ | ||
| 230 | + | ||
| 210 | | ้กน็ฎ | ่ฏดๆ | | 231 | | ้กน็ฎ | ่ฏดๆ | |
| 211 | |--------------------------------------------------------------------------|--------------------| | 232 | |--------------------------------------------------------------------------|--------------------| |
| 212 | | `yudao-dependencies` | Maven ไพ่ต็ๆฌ็ฎก็ | | 233 | | `yudao-dependencies` | Maven ไพ่ต็ๆฌ็ฎก็ | |
| @@ -221,15 +242,7 @@ ps๏ผๆ ธๅฟๅ่ฝๅทฒ็ปๅฎ็ฐ๏ผๆญฃๅจๅฏนๆฅๅพฎไฟกๅฐ็จๅบไธญ... | @@ -221,15 +242,7 @@ ps๏ผๆ ธๅฟๅ่ฝๅทฒ็ปๅฎ็ฐ๏ผๆญฃๅจๅฏนๆฅๅพฎไฟกๅฐ็จๅบไธญ... | ||
| 221 | | `yudao-module-mp` | ๅพฎไฟกๅ ฌไผๅท็ Module ๆจกๅ | | 242 | | `yudao-module-mp` | ๅพฎไฟกๅ ฌไผๅท็ Module ๆจกๅ | |
| 222 | | `yudao-module-report` | ๅคงๅฑๆฅ่กจ Module ๆจกๅ | | 243 | | `yudao-module-report` | ๅคงๅฑๆฅ่กจ Module ๆจกๅ | |
| 223 | 244 | ||
| 224 | -> ๅ็ซฏ้กน็ฎ็ๅฐๅ๏ผ | ||
| 225 | -> | ||
| 226 | -> * [`yudao-ui-admin-vue3`](https://gitee.com/yudaocode/yudao-ui-admin-vue3)๏ผๅบไบ Vue3 + element-plus ๅฎ็ฐ็็ฎก็ๅๅฐ | ||
| 227 | -> * `yudao-ui-admin`๏ผๅบไบ Vue2 + element-ui ๅฎ็ฐ็็ฎก็ๅๅฐ | ||
| 228 | -> * [`yudao-ui-go-view`](https://gitee.com/yudaocode/yudao-ui-go-view)๏ผๅบไบ Vue3 + naive-ui ๅฎ็ฐ็ๅคงๅฑๆฅ่กจ | ||
| 229 | -> * `yudao-ui-admin-uniapp`๏ผๅบไบ uni-app + uni-ui ๅฎ็ฐ็็ฎก็ๅๅฐ็ๅฐ็จๅบ | ||
| 230 | -> * `yudao-ui-app`๏ผๅบไบ uni-app + uview ๅฎ็ฐ็็จๆท App | ||
| 231 | - | ||
| 232 | -### ๅ็ซฏ | 245 | +### ๆกๆถ |
| 233 | 246 | ||
| 234 | | ๆกๆถ | ่ฏดๆ | ็ๆฌ | ๅญฆไน ๆๅ | | 247 | | ๆกๆถ | ่ฏดๆ | ็ๆฌ | ๅญฆไน ๆๅ | |
| 235 | |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| | 248 | |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| |
| @@ -255,20 +268,6 @@ ps๏ผๆ ธๅฟๅ่ฝๅทฒ็ปๅฎ็ฐ๏ผๆญฃๅจๅฏนๆฅๅพฎไฟกๅฐ็จๅบไธญ... | @@ -255,20 +268,6 @@ ps๏ผๆ ธๅฟๅ่ฝๅทฒ็ปๅฎ็ฐ๏ผๆญฃๅจๅฏนๆฅๅพฎไฟกๅฐ็จๅบไธญ... | ||
| 255 | | [JUnit](https://junit.org/junit5/) | Java ๅๅ ๆต่ฏๆกๆถ | 5.8.2 | - | | 268 | | [JUnit](https://junit.org/junit5/) | Java ๅๅ ๆต่ฏๆกๆถ | 5.8.2 | - | |
| 256 | | [Mockito](https://github.com/mockito/mockito) | Java Mock ๆกๆถ | 4.8.0 | - | | 269 | | [Mockito](https://github.com/mockito/mockito) | Java Mock ๆกๆถ | 4.8.0 | - | |
| 257 | 270 | ||
| 258 | -### [็ฎก็ๅๅฐ Vue2 ๅ็ซฏ](./yudao-ui-admin) | ||
| 259 | - | ||
| 260 | -| ๆกๆถ | ่ฏดๆ | ็ๆฌ | | ||
| 261 | -|------------------------------------------------------------------------------|---------------|--------| | ||
| 262 | -| [Vue](https://cn.vuejs.org/index.html) | JavaScript ๆกๆถ | 2.7.14 | | ||
| 263 | -| [Vue Element Admin](https://panjiachen.github.io/vue-element-admin-site/zh/) | ๅๅฐๅ็ซฏ่งฃๅณๆนๆก | - | | ||
| 264 | - | ||
| 265 | -### [็ฎก็ๅๅฐ uni-app ่ทจ็ซฏ](./yudao-ui-admin-uniapp) | ||
| 266 | - | ||
| 267 | -| ๆกๆถ | ่ฏดๆ | ็ๆฌ | | ||
| 268 | -|-------------------------------------------------|--------------------|--------| | ||
| 269 | -| [uni-app](hhttps://github.com/dcloudio/uni-app) | ่ทจๅนณๅฐๆกๆถ | 2.0.0 | | ||
| 270 | -| [uni-ui](https://github.com/dcloudio/uni-ui) | ๅบไบ uni-app ็ UI ๆกๆถ | 1.4.20 | | ||
| 271 | - | ||
| 272 | ## ๐ท ๆผ็คบๅพ | 271 | ## ๐ท ๆผ็คบๅพ |
| 273 | 272 | ||
| 274 | ### ็ณป็ปๅ่ฝ | 273 | ### ็ณป็ปๅ่ฝ |
pom.xml
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> | 30 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> |
| 31 | 31 | ||
| 32 | <properties> | 32 | <properties> |
| 33 | - <revision>1.7.0-snapshot</revision> | 33 | + <revision>1.7.1-snapshot</revision> |
| 34 | <!-- Maven ็ธๅ ณ --> | 34 | <!-- Maven ็ธๅ ณ --> |
| 35 | <java.version>1.8</java.version> | 35 | <java.version>1.8</java.version> |
| 36 | <maven.compiler.source>${java.version}</maven.compiler.source> | 36 | <maven.compiler.source>${java.version}</maven.compiler.source> |
sql/postgresql/ruoyi-vue-pro.sql
| @@ -2493,7 +2493,7 @@ CREATE TABLE "system_login_log" ( | @@ -2493,7 +2493,7 @@ CREATE TABLE "system_login_log" ( | ||
| 2493 | "id" int8 NOT NULL, | 2493 | "id" int8 NOT NULL, |
| 2494 | "log_type" int8 NOT NULL, | 2494 | "log_type" int8 NOT NULL, |
| 2495 | "trace_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL, | 2495 | "trace_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL, |
| 2496 | - "user_id" int8 NOT NULL, | 2496 | + "user_id" int8 NOT NULL DEFAULT 0, |
| 2497 | "user_type" int2 NOT NULL, | 2497 | "user_type" int2 NOT NULL, |
| 2498 | "username" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, | 2498 | "username" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, |
| 2499 | "result" int2 NOT NULL, | 2499 | "result" int2 NOT NULL, |
| @@ -2866,7 +2866,7 @@ CREATE TABLE "system_oauth2_access_token" ( | @@ -2866,7 +2866,7 @@ CREATE TABLE "system_oauth2_access_token" ( | ||
| 2866 | "updater" varchar(64) COLLATE "pg_catalog"."default", | 2866 | "updater" varchar(64) COLLATE "pg_catalog"."default", |
| 2867 | "update_time" timestamp(6) NOT NULL, | 2867 | "update_time" timestamp(6) NOT NULL, |
| 2868 | "deleted" int2 NOT NULL DEFAULT 0, | 2868 | "deleted" int2 NOT NULL DEFAULT 0, |
| 2869 | - "tenant_id" int8 NOT NULL, | 2869 | + "tenant_id" int8 NOT NULL DEFAULT 0, |
| 2870 | "scopes" varchar(255) COLLATE "pg_catalog"."default" DEFAULT ''::character varying | 2870 | "scopes" varchar(255) COLLATE "pg_catalog"."default" DEFAULT ''::character varying |
| 2871 | ) | 2871 | ) |
| 2872 | ; | 2872 | ; |
| @@ -2909,7 +2909,7 @@ CREATE TABLE "system_oauth2_approve" ( | @@ -2909,7 +2909,7 @@ CREATE TABLE "system_oauth2_approve" ( | ||
| 2909 | "updater" varchar(64) COLLATE "pg_catalog"."default", | 2909 | "updater" varchar(64) COLLATE "pg_catalog"."default", |
| 2910 | "update_time" timestamp(6) NOT NULL, | 2910 | "update_time" timestamp(6) NOT NULL, |
| 2911 | "deleted" int2 NOT NULL DEFAULT 0, | 2911 | "deleted" int2 NOT NULL DEFAULT 0, |
| 2912 | - "tenant_id" int8 NOT NULL | 2912 | + "tenant_id" int8 NOT NULL DEFAULT 0 |
| 2913 | ) | 2913 | ) |
| 2914 | ; | 2914 | ; |
| 2915 | COMMENT ON COLUMN "system_oauth2_approve"."id" IS '็ผๅท'; | 2915 | COMMENT ON COLUMN "system_oauth2_approve"."id" IS '็ผๅท'; |
| @@ -3011,7 +3011,7 @@ CREATE TABLE "system_oauth2_code" ( | @@ -3011,7 +3011,7 @@ CREATE TABLE "system_oauth2_code" ( | ||
| 3011 | "updater" varchar(64) COLLATE "pg_catalog"."default", | 3011 | "updater" varchar(64) COLLATE "pg_catalog"."default", |
| 3012 | "update_time" timestamp(6) NOT NULL, | 3012 | "update_time" timestamp(6) NOT NULL, |
| 3013 | "deleted" int2 NOT NULL DEFAULT 0, | 3013 | "deleted" int2 NOT NULL DEFAULT 0, |
| 3014 | - "tenant_id" int8 NOT NULL | 3014 | + "tenant_id" int8 NOT NULL DEFAULT 0 |
| 3015 | ) | 3015 | ) |
| 3016 | ; | 3016 | ; |
| 3017 | COMMENT ON COLUMN "system_oauth2_code"."id" IS '็ผๅท'; | 3017 | COMMENT ON COLUMN "system_oauth2_code"."id" IS '็ผๅท'; |
| @@ -3053,7 +3053,7 @@ CREATE TABLE "system_oauth2_refresh_token" ( | @@ -3053,7 +3053,7 @@ CREATE TABLE "system_oauth2_refresh_token" ( | ||
| 3053 | "updater" varchar(64) COLLATE "pg_catalog"."default", | 3053 | "updater" varchar(64) COLLATE "pg_catalog"."default", |
| 3054 | "update_time" timestamp(6) NOT NULL, | 3054 | "update_time" timestamp(6) NOT NULL, |
| 3055 | "deleted" int2 NOT NULL DEFAULT 0, | 3055 | "deleted" int2 NOT NULL DEFAULT 0, |
| 3056 | - "tenant_id" int8 NOT NULL, | 3056 | + "tenant_id" int8 NOT NULL DEFAULT 0, |
| 3057 | "scopes" varchar(255) COLLATE "pg_catalog"."default" DEFAULT ''::character varying | 3057 | "scopes" varchar(255) COLLATE "pg_catalog"."default" DEFAULT ''::character varying |
| 3058 | ) | 3058 | ) |
| 3059 | ; | 3059 | ; |
yudao-dependencies/pom.xml
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> | 14 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> |
| 15 | 15 | ||
| 16 | <properties> | 16 | <properties> |
| 17 | - <revision>1.7.0-snapshot</revision> | 17 | + <revision>1.7.1-snapshot</revision> |
| 18 | <!-- ็ปไธไพ่ต็ฎก็ --> | 18 | <!-- ็ปไธไพ่ต็ฎก็ --> |
| 19 | <spring.boot.version>2.7.8</spring.boot.version> | 19 | <spring.boot.version>2.7.8</spring.boot.version> |
| 20 | <!-- Web ็ธๅ ณ --> | 20 | <!-- Web ็ธๅ ณ --> |
yudao-framework/yudao-spring-boot-starter-biz-dict/pom.xml
| @@ -39,5 +39,12 @@ | @@ -39,5 +39,12 @@ | ||
| 39 | <groupId>com.google.guava</groupId> | 39 | <groupId>com.google.guava</groupId> |
| 40 | <artifactId>guava</artifactId> | 40 | <artifactId>guava</artifactId> |
| 41 | </dependency> | 41 | </dependency> |
| 42 | + | ||
| 43 | + <!-- Test ๆต่ฏ็ธๅ ณ --> | ||
| 44 | + <dependency> | ||
| 45 | + <groupId>cn.iocoder.boot</groupId> | ||
| 46 | + <artifactId>yudao-spring-boot-starter-test</artifactId> | ||
| 47 | + <scope>test</scope> | ||
| 48 | + </dependency> | ||
| 42 | </dependencies> | 49 | </dependencies> |
| 43 | </project> | 50 | </project> |
yudao-framework/yudao-spring-boot-starter-biz-dict/src/test/java/cn/iocoder/yudao/framework/dict/core/util/DictFrameworkUtilsTest.java
0 โ 100644
| 1 | +package cn.iocoder.yudao.framework.dict.core.util; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | +import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; | ||
| 5 | +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; | ||
| 6 | +import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; | ||
| 7 | +import org.junit.jupiter.api.BeforeEach; | ||
| 8 | +import org.junit.jupiter.api.Test; | ||
| 9 | +import org.mockito.Mock; | ||
| 10 | + | ||
| 11 | +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; | ||
| 12 | +import static org.junit.jupiter.api.Assertions.assertEquals; | ||
| 13 | +import static org.mockito.Mockito.when; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * {@link DictFrameworkUtils} ็ๅๅ ๆต่ฏ | ||
| 17 | + */ | ||
| 18 | +public class DictFrameworkUtilsTest extends BaseMockitoUnitTest { | ||
| 19 | + | ||
| 20 | + @Mock | ||
| 21 | + private DictDataApi dictDataApi; | ||
| 22 | + | ||
| 23 | + @BeforeEach | ||
| 24 | + public void setUp() { | ||
| 25 | + DictFrameworkUtils.init(dictDataApi); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + @Test | ||
| 29 | + public void testGetDictDataLabel() { | ||
| 30 | + // mock ๆฐๆฎ | ||
| 31 | + DictDataRespDTO dataRespDTO = randomPojo(DictDataRespDTO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus())); | ||
| 32 | + // mock ๆนๆณ | ||
| 33 | + when(dictDataApi.getDictData(dataRespDTO.getDictType(), dataRespDTO.getValue())).thenReturn(dataRespDTO); | ||
| 34 | + // ๆญ่จ่ฟๅๅผ | ||
| 35 | + assertEquals(dataRespDTO.getLabel(), DictFrameworkUtils.getDictDataLabel(dataRespDTO.getDictType(), dataRespDTO.getValue())); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Test | ||
| 39 | + public void testParseDictDataValue() { | ||
| 40 | + // mock ๆฐๆฎ | ||
| 41 | + DictDataRespDTO resp = randomPojo(DictDataRespDTO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus())); | ||
| 42 | + // mock ๆนๆณ | ||
| 43 | + when(dictDataApi.parseDictData(resp.getDictType(), resp.getLabel())).thenReturn(resp); | ||
| 44 | + // ๆญ่จ่ฟๅๅผ | ||
| 45 | + assertEquals(resp.getValue(), DictFrameworkUtils.parseDictDataValue(resp.getDictType(), resp.getLabel())); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | +} |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java
| 1 | package cn.iocoder.yudao.framework.operatelog.core.annotations; | 1 | package cn.iocoder.yudao.framework.operatelog.core.annotations; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; | 3 | import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; |
| 4 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 5 | import io.swagger.v3.oas.annotations.Operation; | 4 | import io.swagger.v3.oas.annotations.Operation; |
| 5 | +import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 6 | 6 | ||
| 7 | import java.lang.annotation.ElementType; | 7 | import java.lang.annotation.ElementType; |
| 8 | import java.lang.annotation.Retention; | 8 | import java.lang.annotation.Retention; |
| @@ -23,13 +23,13 @@ public @interface OperateLog { | @@ -23,13 +23,13 @@ public @interface OperateLog { | ||
| 23 | /** | 23 | /** |
| 24 | * ๆไฝๆจกๅ | 24 | * ๆไฝๆจกๅ |
| 25 | * | 25 | * |
| 26 | - * ไธบ็ฉบๆถ๏ผไผๅฐ่ฏ่ฏปๅ {@link Api#value()} ๅฑๆง | 26 | + * ไธบ็ฉบๆถ๏ผไผๅฐ่ฏ่ฏปๅ {@link Tag#name()} ๅฑๆง |
| 27 | */ | 27 | */ |
| 28 | String module() default ""; | 28 | String module() default ""; |
| 29 | /** | 29 | /** |
| 30 | * ๆไฝๅ | 30 | * ๆไฝๅ |
| 31 | * | 31 | * |
| 32 | - * ไธบ็ฉบๆถ๏ผไผๅฐ่ฏ่ฏปๅ {@link ApiOperation#value()} ๅฑๆง | 32 | + * ไธบ็ฉบๆถ๏ผไผๅฐ่ฏ่ฏปๅ {@link Operation#summary()} ๅฑๆง |
| 33 | */ | 33 | */ |
| 34 | String name() default ""; | 34 | String name() default ""; |
| 35 | /** | 35 | /** |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/AbstractPayCodeMapping.java deleted
| 1 | -package cn.iocoder.yudao.framework.pay.core.client; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.exception.ErrorCode; | ||
| 4 | -import cn.iocoder.yudao.framework.pay.core.enums.PayFrameworkErrorCodeConstants; | ||
| 5 | -import lombok.extern.slf4j.Slf4j; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * ๅฐ API ็้่ฏฏ็ ๏ผ่ฝฌๆขไธบ้็จ็้่ฏฏ็ | ||
| 9 | - * | ||
| 10 | - * @see PayCommonResult | ||
| 11 | - * @see PayFrameworkErrorCodeConstants | ||
| 12 | - * | ||
| 13 | - * @author ่้ๆบ็ | ||
| 14 | - */ | ||
| 15 | -@Slf4j | ||
| 16 | -public abstract class AbstractPayCodeMapping { | ||
| 17 | - | ||
| 18 | - public final ErrorCode apply(String apiCode, String apiMsg) { | ||
| 19 | - if (apiCode == null) { | ||
| 20 | - log.error("[apply][API ้่ฏฏ็ ไธบ็ฉบ๏ผ่ฏทๆๆฅ]"); | ||
| 21 | - return PayFrameworkErrorCodeConstants.EXCEPTION; | ||
| 22 | - } | ||
| 23 | - ErrorCode errorCode = this.apply0(apiCode, apiMsg); | ||
| 24 | - if (errorCode == null) { | ||
| 25 | - log.error("[apply][API ้่ฏฏ็ ({}) ้่ฏฏๆ็คบ({}) ๆ ๆณๅน้ ]", apiCode, apiMsg); | ||
| 26 | - return PayFrameworkErrorCodeConstants.PAY_UNKNOWN; | ||
| 27 | - } | ||
| 28 | - return errorCode; | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | - protected abstract ErrorCode apply0(String apiCode, String apiMsg); | ||
| 32 | - | ||
| 33 | -} |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/PayClient.java
| 1 | package cn.iocoder.yudao.framework.pay.core.client; | 1 | package cn.iocoder.yudao.framework.pay.core.client; |
| 2 | 2 | ||
| 3 | - | ||
| 4 | -import cn.iocoder.yudao.framework.pay.core.client.dto.*; | 3 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 4 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 5 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayRefundNotifyRespDTO; | ||
| 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 7 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 8 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedReqDTO; | ||
| 9 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedRespDTO; | ||
| 5 | 10 | ||
| 6 | /** | 11 | /** |
| 7 | * ๆฏไปๅฎขๆท็ซฏ๏ผ็จไบๅฏนๆฅๅๆฏไปๆธ ้็ SDK๏ผๅฎ็ฐๅ่ตทๆฏไปใ้ๆฌพ็ญๅ่ฝ | 12 | * ๆฏไปๅฎขๆท็ซฏ๏ผ็จไบๅฏนๆฅๅๆฏไปๆธ ้็ SDK๏ผๅฎ็ฐๅ่ตทๆฏไปใ้ๆฌพ็ญๅ่ฝ |
| @@ -23,51 +28,25 @@ public interface PayClient { | @@ -23,51 +28,25 @@ public interface PayClient { | ||
| 23 | * @param reqDTO ไธๅไฟกๆฏ | 28 | * @param reqDTO ไธๅไฟกๆฏ |
| 24 | * @return ๅๆฏไปๆธ ้็่ฟๅ็ปๆ | 29 | * @return ๅๆฏไปๆธ ้็่ฟๅ็ปๆ |
| 25 | */ | 30 | */ |
| 26 | - PayCommonResult<?> unifiedOrder(PayOrderUnifiedReqDTO reqDTO); | ||
| 27 | - | ||
| 28 | - /** | ||
| 29 | - * ่งฃๆๆฏไปๅ็้็ฅ็ปๆ | ||
| 30 | - * | ||
| 31 | - * @param data ้็ฅ็ปๆ | ||
| 32 | - * @return ่งฃๆ็ปๆ | ||
| 33 | - * @throws Exception ่งฃๆๅคฑ่ดฅ๏ผๆๅบๅผๅธธ | ||
| 34 | - */ | ||
| 35 | - PayOrderNotifyRespDTO parseOrderNotify(PayNotifyDataDTO data) throws Exception; | 31 | + PayOrderUnifiedRespDTO unifiedOrder(PayOrderUnifiedReqDTO reqDTO); |
| 36 | 32 | ||
| 37 | /** | 33 | /** |
| 38 | * ่ฐ็จๆฏไปๆธ ้๏ผ่ฟ่ก้ๆฌพ | 34 | * ่ฐ็จๆฏไปๆธ ้๏ผ่ฟ่ก้ๆฌพ |
| 39 | * @param reqDTO ็ปไธ้ๆฌพ่ฏทๆฑไฟกๆฏ | 35 | * @param reqDTO ็ปไธ้ๆฌพ่ฏทๆฑไฟกๆฏ |
| 40 | * @return ๅๆฏไปๆธ ้็็ปไธ่ฟๅ็ปๆ | 36 | * @return ๅๆฏไปๆธ ้็็ปไธ่ฟๅ็ปๆ |
| 41 | */ | 37 | */ |
| 42 | - PayCommonResult<PayRefundUnifiedRespDTO> unifiedRefund(PayRefundUnifiedReqDTO reqDTO); | ||
| 43 | - | ||
| 44 | - /** | ||
| 45 | - * ่งฃๆๆฏไป้ๆฌพ้็ฅๆฐๆฎ | ||
| 46 | - * @param notifyData ๆฏไป้ๆฌพ้็ฅ่ฏทๆฑๆฐๆฎ | ||
| 47 | - * @return ๆฏไป้ๆฌพ้็ฅ็Notify DTO | ||
| 48 | - */ | ||
| 49 | - PayRefundNotifyDTO parseRefundNotify(PayNotifyDataDTO notifyData); | ||
| 50 | - | ||
| 51 | - // TODO @่่ฟ๏ผๅ็ปญๆนๆ้ default๏ผ้ฟๅ ไธ็ฅ้ๅปๅฎ็ฐ | ||
| 52 | - /** | ||
| 53 | - * ้ช่ฏๆฏๅฆๆธ ้้็ฅ | ||
| 54 | - * | ||
| 55 | - * @param notifyData ้็ฅๆฐๆฎ | ||
| 56 | - * @return ้ป่ฎคๆฏ true | ||
| 57 | - */ | ||
| 58 | - default boolean verifyNotifyData(PayNotifyDataDTO notifyData) { | ||
| 59 | - return true; | ||
| 60 | - } | 38 | + PayRefundUnifiedRespDTO unifiedRefund(PayRefundUnifiedReqDTO reqDTO); |
| 61 | 39 | ||
| 62 | - // TODO @่่ฟ๏ผๅ็ปญๆนๆ้ default๏ผ้ฟๅ ไธ็ฅ้ๅปๅฎ็ฐ | ||
| 63 | /** | 40 | /** |
| 64 | - * ๅคๆญๆฏๅฆไธบ้ๆฌพ้็ฅ | 41 | + * ่งฃๆๅ่ฐๆฐๆฎ |
| 65 | * | 42 | * |
| 66 | - * @param notifyData ้็ฅๆฐๆฎ | ||
| 67 | - * @return ้ป่ฎคๆฏ false | 43 | + * @param rawNotify ้็ฅๅ ๅฎน |
| 44 | + * @return ๅ่ฐๅฏน่ฑก | ||
| 45 | + * 1. {@link PayRefundNotifyRespDTO} ้ๆฌพ้็ฅ | ||
| 46 | + * 2. {@link PayOrderNotifyRespDTO} ๆฏไป้็ฅ | ||
| 68 | */ | 47 | */ |
| 69 | - default boolean isRefundNotify(PayNotifyDataDTO notifyData){ | ||
| 70 | - return false; | 48 | + default Object parseNotify(PayNotifyReqDTO rawNotify) { |
| 49 | + throw new UnsupportedOperationException("ๆชๅฎ็ฐ parseNotify ๆนๆณ๏ผ"); | ||
| 71 | } | 50 | } |
| 72 | 51 | ||
| 73 | } | 52 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/PayCommonResult.java deleted
| 1 | -package cn.iocoder.yudao.framework.pay.core.client; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.exceptions.ExceptionUtil; | ||
| 4 | -import cn.hutool.core.lang.Assert; | ||
| 5 | -import cn.iocoder.yudao.framework.common.exception.ErrorCode; | ||
| 6 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 7 | -import cn.iocoder.yudao.framework.pay.core.enums.PayFrameworkErrorCodeConstants; | ||
| 8 | -import lombok.Data; | ||
| 9 | -import lombok.EqualsAndHashCode; | ||
| 10 | -import lombok.ToString; | ||
| 11 | - | ||
| 12 | -/** | ||
| 13 | - * ๆฏไป็ CommonResult ๆๅฑ็ฑป | ||
| 14 | - * | ||
| 15 | - * ่่ๅฐไธๅ็ๅนณๅฐ๏ผ่ฟๅ็ code ๅ msg ๆฏไธๅ็๏ผๆไปฅ็ปไธ้ขๅค่ฟๅ {@link #apiCode} ๅ {@link #apiMsg} ๅญๆฎต | ||
| 16 | - * | ||
| 17 | - * @author ่้ๆบ็ | ||
| 18 | - */ | ||
| 19 | -@Data | ||
| 20 | -@EqualsAndHashCode(callSuper = true) | ||
| 21 | -@ToString(callSuper = true) | ||
| 22 | -public class PayCommonResult<T> extends CommonResult<T> { | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * API ่ฟๅ้่ฏฏ็ | ||
| 26 | - * | ||
| 27 | - * ็ฑไบ็ฌฌไธๆน็้่ฏฏ็ ๅฏ่ฝๆฏๅญ็ฌฆไธฒ๏ผๆไปฅไฝฟ็จ String ็ฑปๅ | ||
| 28 | - */ | ||
| 29 | - private String apiCode; | ||
| 30 | - /** | ||
| 31 | - * API ่ฟๅๆ็คบ | ||
| 32 | - */ | ||
| 33 | - private String apiMsg; | ||
| 34 | - | ||
| 35 | - private PayCommonResult() { | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - public static <T> PayCommonResult<T> build(String apiCode, String apiMsg, T data, AbstractPayCodeMapping codeMapping) { | ||
| 39 | - Assert.notNull(codeMapping, "ๅๆฐ codeMapping ไธ่ฝไธบ็ฉบ"); | ||
| 40 | - PayCommonResult<T> result = new PayCommonResult<T>().setApiCode(apiCode).setApiMsg(apiMsg); | ||
| 41 | - result.setData(data); | ||
| 42 | - // ็ฟป่ฏ้่ฏฏ็ | ||
| 43 | - if (codeMapping != null) { | ||
| 44 | - ErrorCode errorCode = codeMapping.apply(apiCode, apiMsg); | ||
| 45 | - result.setCode(errorCode.getCode()).setMsg(errorCode.getMsg()); | ||
| 46 | - } | ||
| 47 | - return result; | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - public static <T> PayCommonResult<T> error(Throwable ex) { | ||
| 51 | - PayCommonResult<T> result = new PayCommonResult<>(); | ||
| 52 | - result.setCode(PayFrameworkErrorCodeConstants.EXCEPTION.getCode()); | ||
| 53 | - result.setMsg(ExceptionUtil.getRootCauseMessage(ex)); | ||
| 54 | - return result; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | -} |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/PayNotifyDataDTO.java renamed to yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/notify/PayNotifyReqDTO.java
| 1 | -package cn.iocoder.yudao.framework.pay.core.client.dto; | 1 | +package cn.iocoder.yudao.framework.pay.core.client.dto.notify; |
| 2 | 2 | ||
| 3 | import lombok.Builder; | 3 | import lombok.Builder; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| @@ -13,11 +13,11 @@ import java.util.Map; | @@ -13,11 +13,11 @@ import java.util.Map; | ||
| 13 | @Data | 13 | @Data |
| 14 | @ToString | 14 | @ToString |
| 15 | @Builder | 15 | @Builder |
| 16 | -public class PayNotifyDataDTO { | 16 | +public class PayNotifyReqDTO { |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | /** | 19 | /** |
| 20 | - * HTTP ๅ่ฐๆฅๅฃ็ request body | 20 | + * HTTP ๅ่ฐๆฅๅฃ็ request body |
| 21 | */ | 21 | */ |
| 22 | private String body; | 22 | private String body; |
| 23 | 23 |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/PayOrderNotifyRespDTO.java renamed to yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/notify/PayOrderNotifyRespDTO.java
| 1 | -package cn.iocoder.yudao.framework.pay.core.client.dto; | 1 | +package cn.iocoder.yudao.framework.pay.core.client.dto.notify; |
| 2 | 2 | ||
| 3 | import lombok.AllArgsConstructor; | 3 | import lombok.AllArgsConstructor; |
| 4 | import lombok.Builder; | 4 | import lombok.Builder; |
| @@ -36,14 +36,8 @@ public class PayOrderNotifyRespDTO { | @@ -36,14 +36,8 @@ public class PayOrderNotifyRespDTO { | ||
| 36 | private LocalDateTime successTime; | 36 | private LocalDateTime successTime; |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| 39 | - * ้็ฅ็ๅๅงๆฐๆฎ | ||
| 40 | - * | ||
| 41 | - * ไธป่ฆ็จไบๆไน ๅ๏ผๆนไพฟๅ็ปญไฟฎๅคๆฐๆฎ๏ผๆ่ ๆ้ | ||
| 42 | - */ | ||
| 43 | - private String data; | ||
| 44 | - | ||
| 45 | - /** | ||
| 46 | * TODO @jason ็ปๅๅ ถไป็ๆธ ้ๅฎไนๆๆไธพ, | 39 | * TODO @jason ็ปๅๅ ถไป็ๆธ ้ๅฎไนๆๆไธพ, |
| 40 | + * | ||
| 47 | * alipay | 41 | * alipay |
| 48 | * TRADE_CLOSED,ๆชไปๆฌพไบคๆ่ถ ๆถๅ ณ้ญ๏ผๆๆฏไปๅฎๆๅๅ จ้ข้ๆฌพใ | 42 | * TRADE_CLOSED,ๆชไปๆฌพไบคๆ่ถ ๆถๅ ณ้ญ๏ผๆๆฏไปๅฎๆๅๅ จ้ข้ๆฌพใ |
| 49 | * TRADE_SUCCESS, ไบคๆๆฏไปๆๅ | 43 | * TRADE_SUCCESS, ไบคๆๆฏไปๆๅ |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/PayRefundNotifyDTO.java renamed to yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/notify/PayRefundNotifyRespDTO.java
| 1 | -package cn.iocoder.yudao.framework.pay.core.client.dto; | 1 | +package cn.iocoder.yudao.framework.pay.core.client.dto.notify; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.pay.core.enums.PayNotifyRefundStatusEnum; | 3 | import cn.iocoder.yudao.framework.pay.core.enums.PayNotifyRefundStatusEnum; |
| 4 | import lombok.Builder; | 4 | import lombok.Builder; |
| @@ -15,14 +15,13 @@ import java.time.LocalDateTime; | @@ -15,14 +15,13 @@ import java.time.LocalDateTime; | ||
| 15 | @Data | 15 | @Data |
| 16 | @ToString | 16 | @ToString |
| 17 | @Builder | 17 | @Builder |
| 18 | -public class PayRefundNotifyDTO { | 18 | +public class PayRefundNotifyRespDTO { |
| 19 | 19 | ||
| 20 | /** | 20 | /** |
| 21 | * ๆฏไปๆธ ้็ผๅท | 21 | * ๆฏไปๆธ ้็ผๅท |
| 22 | */ | 22 | */ |
| 23 | private String channelOrderNo; | 23 | private String channelOrderNo; |
| 24 | 24 | ||
| 25 | - | ||
| 26 | /** | 25 | /** |
| 27 | * ไบคๆ่ฎขๅๅท๏ผๆ นๆฎ่งๅ็ๆ | 26 | * ไบคๆ่ฎขๅๅท๏ผๆ นๆฎ่งๅ็ๆ |
| 28 | * ่ฐ็จๆฏไปๆธ ้ๆถ๏ผไฝฟ็จ่ฏฅๅญๆฎตไฝไธบๅฏนๆฅ็่ฎขๅๅทใ | 27 | * ่ฐ็จๆฏไปๆธ ้ๆถ๏ผไฝฟ็จ่ฏฅๅญๆฎตไฝไธบๅฏนๆฅ็่ฎขๅๅทใ |
| @@ -46,18 +45,14 @@ public class PayRefundNotifyDTO { | @@ -46,18 +45,14 @@ public class PayRefundNotifyDTO { | ||
| 46 | */ | 45 | */ |
| 47 | private String reqNo; | 46 | private String reqNo; |
| 48 | 47 | ||
| 49 | - | ||
| 50 | /** | 48 | /** |
| 51 | * ้ๆฌพๆฏๅฆๆๅ | 49 | * ้ๆฌพๆฏๅฆๆๅ |
| 52 | */ | 50 | */ |
| 53 | private PayNotifyRefundStatusEnum status; | 51 | private PayNotifyRefundStatusEnum status; |
| 54 | 52 | ||
| 55 | - | ||
| 56 | - | ||
| 57 | /** | 53 | /** |
| 58 | * ้ๆฌพๆๅๆถ้ด | 54 | * ้ๆฌพๆๅๆถ้ด |
| 59 | */ | 55 | */ |
| 60 | private LocalDateTime refundSuccessTime; | 56 | private LocalDateTime refundSuccessTime; |
| 61 | 57 | ||
| 62 | - | ||
| 63 | } | 58 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/PayOrderUnifiedReqDTO.java renamed to yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/order/PayOrderUnifiedReqDTO.java
| 1 | -package cn.iocoder.yudao.framework.pay.core.client.dto; | 1 | +package cn.iocoder.yudao.framework.pay.core.client.dto.order; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.framework.pay.core.enums.PayDisplayModeEnum; | ||
| 3 | import lombok.Data; | 4 | import lombok.Data; |
| 4 | import org.hibernate.validator.constraints.Length; | 5 | import org.hibernate.validator.constraints.Length; |
| 5 | import org.hibernate.validator.constraints.URL; | 6 | import org.hibernate.validator.constraints.URL; |
| @@ -7,6 +8,7 @@ import org.hibernate.validator.constraints.URL; | @@ -7,6 +8,7 @@ import org.hibernate.validator.constraints.URL; | ||
| 7 | import javax.validation.constraints.DecimalMin; | 8 | import javax.validation.constraints.DecimalMin; |
| 8 | import javax.validation.constraints.NotEmpty; | 9 | import javax.validation.constraints.NotEmpty; |
| 9 | import javax.validation.constraints.NotNull; | 10 | import javax.validation.constraints.NotNull; |
| 11 | +import java.awt.*; | ||
| 10 | import java.time.LocalDateTime; | 12 | import java.time.LocalDateTime; |
| 11 | import java.util.Map; | 13 | import java.util.Map; |
| 12 | 14 | ||
| @@ -78,4 +80,13 @@ public class PayOrderUnifiedReqDTO { | @@ -78,4 +80,13 @@ public class PayOrderUnifiedReqDTO { | ||
| 78 | */ | 80 | */ |
| 79 | private Map<String, String> channelExtras; | 81 | private Map<String, String> channelExtras; |
| 80 | 82 | ||
| 83 | + /** | ||
| 84 | + * ๅฑ็คบๆจกๅผ | ||
| 85 | + * | ||
| 86 | + * ๅฆๆไธไผ ้๏ผๅๆฏไธชๆฏไปๆธ ้ไฝฟ็จ้ป่ฎค็ๆนๅผ | ||
| 87 | + * | ||
| 88 | + * ๆไธพ {@link PayDisplayModeEnum} | ||
| 89 | + */ | ||
| 90 | + private String displayMode; | ||
| 91 | + | ||
| 81 | } | 92 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitRespDTO.java renamed to yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/order/PayOrderUnifiedRespDTO.java
| 1 | -package cn.iocoder.yudao.module.pay.service.order.dto; | 1 | +package cn.iocoder.yudao.framework.pay.core.client.dto.order; |
| 2 | 2 | ||
| 3 | +import lombok.AllArgsConstructor; | ||
| 3 | import lombok.Data; | 4 | import lombok.Data; |
| 4 | 5 | ||
| 5 | -import java.io.Serializable; | ||
| 6 | - | ||
| 7 | /** | 6 | /** |
| 8 | - * ๆฏไปๅๆไบค Response DTO | 7 | + * ็ปไธไธๅ Response DTO |
| 8 | + * | ||
| 9 | + * @author ่้ๆบ็ | ||
| 9 | */ | 10 | */ |
| 10 | @Data | 11 | @Data |
| 11 | -public class PayOrderSubmitRespDTO implements Serializable { | 12 | +public class PayOrderUnifiedRespDTO { |
| 12 | 13 | ||
| 13 | /** | 14 | /** |
| 14 | - * ๆฏไปๆๅฑๅ็็ผๅท | 15 | + * ๅฑ็คบๆจกๅผ |
| 15 | */ | 16 | */ |
| 16 | - private Long extensionId; | ||
| 17 | - | 17 | + private String displayMode; |
| 18 | /** | 18 | /** |
| 19 | - * ่ฐ็จๆฏไปๆธ ้็ๅๅบ็ปๆ | 19 | + * ๅฑ็คบๅ ๅฎน |
| 20 | */ | 20 | */ |
| 21 | - private Object invokeResponse; | 21 | + private String displayContent; |
| 22 | 22 | ||
| 23 | } | 23 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/PayRefundUnifiedReqDTO.java renamed to yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/refund/PayRefundUnifiedReqDTO.java
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/PayRefundUnifiedRespDTO.java renamed to yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/dto/refund/PayRefundUnifiedRespDTO.java
| 1 | -package cn.iocoder.yudao.framework.pay.core.client.dto; | 1 | +package cn.iocoder.yudao.framework.pay.core.client.dto.refund; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelRefundRespEnum; | 3 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelRefundRespEnum; |
| 4 | import lombok.AllArgsConstructor; | 4 | import lombok.AllArgsConstructor; |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/AbstractPayClient.java
| 1 | package cn.iocoder.yudao.framework.pay.core.client.impl; | 1 | package cn.iocoder.yudao.framework.pay.core.client.impl; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.framework.pay.core.client.AbstractPayCodeMapping; | 3 | +import cn.hutool.core.date.LocalDateTimeUtil; |
| 4 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; | 4 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; |
| 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; | 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; |
| 6 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 7 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | ||
| 8 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundUnifiedReqDTO; | ||
| 9 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundUnifiedRespDTO; | ||
| 10 | -import lombok.extern.slf4j.Slf4j; | 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; |
| 7 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 8 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedReqDTO; | ||
| 9 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedRespDTO; | ||
| 10 | +import com.alipay.api.AlipayResponse;import lombok.extern.slf4j.Slf4j; | ||
| 11 | 11 | ||
| 12 | import javax.validation.Validation; | 12 | import javax.validation.Validation; |
| 13 | +import java.time.LocalDateTime; | ||
| 13 | 14 | ||
| 15 | +import static cn.hutool.core.date.DatePattern.NORM_DATETIME_FORMATTER; | ||
| 16 | +import static cn.hutool.core.date.DatePattern.NORM_DATETIME_MS_FORMATTER; | ||
| 17 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 18 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0; | ||
| 14 | import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | 19 | import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; |
| 20 | +import static cn.iocoder.yudao.framework.pay.core.enums.PayFrameworkErrorCodeConstants.PAY_EXCEPTION; | ||
| 15 | 21 | ||
| 16 | /** | 22 | /** |
| 17 | * ๆฏไปๅฎขๆท็ซฏ็ๆฝ่ฑก็ฑป๏ผๆไพๆจกๆฟๆนๆณ๏ผๅๅฐๅญ็ฑป็ๅไฝไปฃ็ | 23 | * ๆฏไปๅฎขๆท็ซฏ็ๆฝ่ฑก็ฑป๏ผๆไพๆจกๆฟๆนๆณ๏ผๅๅฐๅญ็ฑป็ๅไฝไปฃ็ |
| @@ -30,18 +36,13 @@ public abstract class AbstractPayClient<Config extends PayClientConfig> implemen | @@ -30,18 +36,13 @@ public abstract class AbstractPayClient<Config extends PayClientConfig> implemen | ||
| 30 | */ | 36 | */ |
| 31 | private final String channelCode; | 37 | private final String channelCode; |
| 32 | /** | 38 | /** |
| 33 | - * ้่ฏฏ็ ๆไธพ็ฑป | ||
| 34 | - */ | ||
| 35 | - protected AbstractPayCodeMapping codeMapping; | ||
| 36 | - /** | ||
| 37 | * ๆฏไป้ ็ฝฎ | 39 | * ๆฏไป้ ็ฝฎ |
| 38 | */ | 40 | */ |
| 39 | protected Config config; | 41 | protected Config config; |
| 40 | 42 | ||
| 41 | - public AbstractPayClient(Long channelId, String channelCode, Config config, AbstractPayCodeMapping codeMapping) { | 43 | + public AbstractPayClient(Long channelId, String channelCode, Config config) { |
| 42 | this.channelId = channelId; | 44 | this.channelId = channelId; |
| 43 | this.channelCode = channelCode; | 45 | this.channelCode = channelCode; |
| 44 | - this.codeMapping = codeMapping; | ||
| 45 | this.config = config; | 46 | this.config = config; |
| 46 | } | 47 | } |
| 47 | 48 | ||
| @@ -69,47 +70,72 @@ public abstract class AbstractPayClient<Config extends PayClientConfig> implemen | @@ -69,47 +70,72 @@ public abstract class AbstractPayClient<Config extends PayClientConfig> implemen | ||
| 69 | this.init(); | 70 | this.init(); |
| 70 | } | 71 | } |
| 71 | 72 | ||
| 72 | - protected Double calculateAmount(Integer amount) { | ||
| 73 | - return amount / 100.0; | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | @Override | 73 | @Override |
| 77 | public Long getId() { | 74 | public Long getId() { |
| 78 | return channelId; | 75 | return channelId; |
| 79 | } | 76 | } |
| 80 | 77 | ||
| 81 | @Override | 78 | @Override |
| 82 | - public final PayCommonResult<?> unifiedOrder(PayOrderUnifiedReqDTO reqDTO) { | 79 | + public final PayOrderUnifiedRespDTO unifiedOrder(PayOrderUnifiedReqDTO reqDTO) { |
| 83 | Validation.buildDefaultValidatorFactory().getValidator().validate(reqDTO); | 80 | Validation.buildDefaultValidatorFactory().getValidator().validate(reqDTO); |
| 84 | // ๆง่ก็ญไฟกๅ้ | 81 | // ๆง่ก็ญไฟกๅ้ |
| 85 | - PayCommonResult<?> result; | 82 | + PayOrderUnifiedRespDTO result; |
| 86 | try { | 83 | try { |
| 87 | result = doUnifiedOrder(reqDTO); | 84 | result = doUnifiedOrder(reqDTO); |
| 88 | } catch (Throwable ex) { | 85 | } catch (Throwable ex) { |
| 89 | // ๆๅฐๅผๅธธๆฅๅฟ | 86 | // ๆๅฐๅผๅธธๆฅๅฟ |
| 90 | log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ]", toJsonString(reqDTO), ex); | 87 | log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ]", toJsonString(reqDTO), ex); |
| 91 | - // ๅฐ่ฃ ่ฟๅ | ||
| 92 | - return PayCommonResult.error(ex); | 88 | + throw buildException(ex); |
| 93 | } | 89 | } |
| 94 | return result; | 90 | return result; |
| 95 | } | 91 | } |
| 96 | 92 | ||
| 97 | - protected abstract PayCommonResult<?> doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) | 93 | + protected abstract PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) |
| 98 | throws Throwable; | 94 | throws Throwable; |
| 99 | 95 | ||
| 100 | @Override | 96 | @Override |
| 101 | - public PayCommonResult<PayRefundUnifiedRespDTO> unifiedRefund(PayRefundUnifiedReqDTO reqDTO) { | ||
| 102 | - PayCommonResult<PayRefundUnifiedRespDTO> resp; | 97 | + public PayRefundUnifiedRespDTO unifiedRefund(PayRefundUnifiedReqDTO reqDTO) { |
| 98 | + PayRefundUnifiedRespDTO resp; | ||
| 103 | try { | 99 | try { |
| 104 | resp = doUnifiedRefund(reqDTO); | 100 | resp = doUnifiedRefund(reqDTO); |
| 105 | } catch (Throwable ex) { | 101 | } catch (Throwable ex) { |
| 106 | // ่ฎฐๅฝๅผๅธธๆฅๅฟ | 102 | // ่ฎฐๅฝๅผๅธธๆฅๅฟ |
| 107 | log.error("[unifiedRefund][request({}) ๅ่ตท้ๆฌพๅคฑ่ดฅ]", toJsonString(reqDTO), ex); | 103 | log.error("[unifiedRefund][request({}) ๅ่ตท้ๆฌพๅคฑ่ดฅ]", toJsonString(reqDTO), ex); |
| 108 | - resp = PayCommonResult.error(ex); | 104 | + throw buildException(ex); |
| 109 | } | 105 | } |
| 110 | return resp; | 106 | return resp; |
| 111 | } | 107 | } |
| 112 | 108 | ||
| 113 | - protected abstract PayCommonResult<PayRefundUnifiedRespDTO> doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) throws Throwable; | 109 | + protected abstract PayRefundUnifiedRespDTO doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) throws Throwable; |
| 110 | + | ||
| 111 | + // ========== ๅ็งๅทฅๅ ทๆนๆณ ========== | ||
| 112 | + | ||
| 113 | + private RuntimeException buildException(Throwable ex) { | ||
| 114 | + if (ex instanceof RuntimeException) { | ||
| 115 | + return (RuntimeException) ex; | ||
| 116 | + } | ||
| 117 | + throw new RuntimeException(ex); | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + protected void validateSuccess(AlipayResponse response) { | ||
| 121 | + if (response.isSuccess()) { | ||
| 122 | + return; | ||
| 123 | + } | ||
| 124 | + throw exception0(PAY_EXCEPTION.getCode(), response.getSubMsg()); | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + protected String formatAmount(Integer amount) { | ||
| 128 | + return String.valueOf(amount / 100.0); | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + protected String formatTime(LocalDateTime time) { | ||
| 132 | + // "yyyy-MM-dd HH:mm:ss" | ||
| 133 | + return LocalDateTimeUtil.format(time, NORM_DATETIME_FORMATTER); | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + protected LocalDateTime parseTime(String str) { | ||
| 137 | + // "yyyy-MM-dd HH:mm:ss" | ||
| 138 | + return LocalDateTimeUtil.parse(str, NORM_DATETIME_FORMATTER); | ||
| 139 | + } | ||
| 114 | 140 | ||
| 115 | } | 141 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/PayClientFactoryImpl.java
| @@ -4,10 +4,7 @@ import cn.hutool.core.lang.Assert; | @@ -4,10 +4,7 @@ import cn.hutool.core.lang.Assert; | ||
| 4 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; | 4 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; |
| 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; | 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; |
| 6 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; | 6 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; |
| 7 | -import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientConfig; | ||
| 8 | -import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPcPayClient; | ||
| 9 | -import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayQrPayClient; | ||
| 10 | -import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayWapPayClient; | 7 | +import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.*; |
| 11 | import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXLitePayClient; | 8 | import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXLitePayClient; |
| 12 | import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXNativePayClient; | 9 | import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXNativePayClient; |
| 13 | import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig; | 10 | import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig; |
| @@ -69,8 +66,9 @@ public class PayClientFactoryImpl implements PayClientFactory { | @@ -69,8 +66,9 @@ public class PayClientFactoryImpl implements PayClientFactory { | ||
| 69 | case WX_NATIVE: return (AbstractPayClient<Config>) new WXNativePayClient(channelId, (WXPayClientConfig) config); | 66 | case WX_NATIVE: return (AbstractPayClient<Config>) new WXNativePayClient(channelId, (WXPayClientConfig) config); |
| 70 | case ALIPAY_WAP: return (AbstractPayClient<Config>) new AlipayWapPayClient(channelId, (AlipayPayClientConfig) config); | 67 | case ALIPAY_WAP: return (AbstractPayClient<Config>) new AlipayWapPayClient(channelId, (AlipayPayClientConfig) config); |
| 71 | case ALIPAY_QR: return (AbstractPayClient<Config>) new AlipayQrPayClient(channelId, (AlipayPayClientConfig) config); | 68 | case ALIPAY_QR: return (AbstractPayClient<Config>) new AlipayQrPayClient(channelId, (AlipayPayClientConfig) config); |
| 72 | - case ALIPAY_APP: return (AbstractPayClient<Config>) new AlipayQrPayClient(channelId, (AlipayPayClientConfig) config); | 69 | + case ALIPAY_APP: return (AbstractPayClient<Config>) new AlipayAppPayClient(channelId, (AlipayPayClientConfig) config); |
| 73 | case ALIPAY_PC: return (AbstractPayClient<Config>) new AlipayPcPayClient(channelId, (AlipayPayClientConfig) config); | 70 | case ALIPAY_PC: return (AbstractPayClient<Config>) new AlipayPcPayClient(channelId, (AlipayPayClientConfig) config); |
| 71 | + case ALIPAY_BAR: return (AbstractPayClient<Config>) new AlipayBarPayClient(channelId, (AlipayPayClientConfig) config); | ||
| 74 | } | 72 | } |
| 75 | // ๅๅปบๅคฑ่ดฅ๏ผ้่ฏฏๆฅๅฟ + ๆๅบๅผๅธธ | 73 | // ๅๅปบๅคฑ่ดฅ๏ผ้่ฏฏๆฅๅฟ + ๆๅบๅผๅธธ |
| 76 | log.error("[createPayClient][้ ็ฝฎ({}) ๆพไธๅฐๅ้็ๅฎขๆท็ซฏๅฎ็ฐ]", config); | 74 | log.error("[createPayClient][้ ็ฝฎ({}) ๆพไธๅฐๅ้็ๅฎขๆท็ซฏๅฎ็ฐ]", config); |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AbstractAlipayClient.java
| 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.bean.BeanUtil; | 3 | import cn.hutool.core.bean.BeanUtil; |
| 4 | -import cn.hutool.core.date.LocalDateTimeUtil; | ||
| 5 | -import cn.iocoder.yudao.framework.pay.core.client.AbstractPayCodeMapping; | ||
| 6 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 7 | -import cn.iocoder.yudao.framework.pay.core.client.dto.*; | 4 | +import cn.hutool.http.HttpUtil; |
| 5 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; | ||
| 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 7 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayRefundNotifyRespDTO; | ||
| 8 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedReqDTO; | ||
| 9 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedRespDTO; | ||
| 8 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; | 10 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; |
| 9 | import cn.iocoder.yudao.framework.pay.core.enums.PayNotifyRefundStatusEnum; | 11 | import cn.iocoder.yudao.framework.pay.core.enums.PayNotifyRefundStatusEnum; |
| 10 | import com.alipay.api.AlipayApiException; | 12 | import com.alipay.api.AlipayApiException; |
| @@ -18,7 +20,6 @@ import lombok.SneakyThrows; | @@ -18,7 +20,6 @@ import lombok.SneakyThrows; | ||
| 18 | import lombok.extern.slf4j.Slf4j; | 20 | import lombok.extern.slf4j.Slf4j; |
| 19 | 21 | ||
| 20 | import java.nio.charset.StandardCharsets; | 22 | import java.nio.charset.StandardCharsets; |
| 21 | -import java.util.HashMap; | ||
| 22 | import java.util.Map; | 23 | import java.util.Map; |
| 23 | 24 | ||
| 24 | import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | 25 | import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; |
| @@ -33,9 +34,8 @@ public abstract class AbstractAlipayClient extends AbstractPayClient<AlipayPayCl | @@ -33,9 +34,8 @@ public abstract class AbstractAlipayClient extends AbstractPayClient<AlipayPayCl | ||
| 33 | 34 | ||
| 34 | protected DefaultAlipayClient client; | 35 | protected DefaultAlipayClient client; |
| 35 | 36 | ||
| 36 | - public AbstractAlipayClient(Long channelId, String channelCode, | ||
| 37 | - AlipayPayClientConfig config, AbstractPayCodeMapping codeMapping) { | ||
| 38 | - super(channelId, channelCode, config, codeMapping); | 37 | + public AbstractAlipayClient(Long channelId, String channelCode, AlipayPayClientConfig config) { |
| 38 | + super(channelId, channelCode, config); | ||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | @Override | 41 | @Override |
| @@ -47,70 +47,24 @@ public abstract class AbstractAlipayClient extends AbstractPayClient<AlipayPayCl | @@ -47,70 +47,24 @@ public abstract class AbstractAlipayClient extends AbstractPayClient<AlipayPayCl | ||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| 50 | - * ไปๆฏไปๅฎ้็ฅ่ฟๅๅๆฐไธญ่งฃๆ PayOrderNotifyRespDTO, ้็ฅๅ ทไฝๅๆฐๅ่ | ||
| 51 | - * //https://opendocs.alipay.com/open/203/105286 | ||
| 52 | - * @param data ้็ฅ็ปๆ | ||
| 53 | - * @return ่งฃๆ็ปๆ PayOrderNotifyRespDTO | ||
| 54 | - * @throws Exception ่งฃๆๅคฑ่ดฅ๏ผๆๅบๅผๅธธ | ||
| 55 | - */ | ||
| 56 | - @Override | ||
| 57 | - public PayOrderNotifyRespDTO parseOrderNotify(PayNotifyDataDTO data) throws Exception { | ||
| 58 | - Map<String, String> params = strToMap(data.getBody()); | ||
| 59 | - | ||
| 60 | - return PayOrderNotifyRespDTO.builder().orderExtensionNo(params.get("out_trade_no")) | ||
| 61 | - .channelOrderNo(params.get("trade_no")).channelUserId(params.get("seller_id")) | ||
| 62 | - .tradeStatus(params.get("trade_status")) | ||
| 63 | - .successTime(LocalDateTimeUtil.parse(params.get("notify_time"), "yyyy-MM-dd HH:mm:ss")) | ||
| 64 | - .data(data.getBody()).build(); | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - @Override | ||
| 68 | - public PayRefundNotifyDTO parseRefundNotify(PayNotifyDataDTO notifyData) { | ||
| 69 | - Map<String, String> params = strToMap(notifyData.getBody()); | ||
| 70 | - PayRefundNotifyDTO notifyDTO = PayRefundNotifyDTO.builder().channelOrderNo(params.get("trade_no")) | ||
| 71 | - .tradeNo(params.get("out_trade_no")) | ||
| 72 | - .reqNo(params.get("out_biz_no")) | ||
| 73 | - .status(PayNotifyRefundStatusEnum.SUCCESS) | ||
| 74 | - .refundSuccessTime(LocalDateTimeUtil.parse(params.get("gmt_refund"), "yyyy-MM-dd HH:mm:ss")) | ||
| 75 | - .build(); | ||
| 76 | - return notifyDTO; | ||
| 77 | - } | ||
| 78 | - | ||
| 79 | - @Override | ||
| 80 | - public boolean isRefundNotify(PayNotifyDataDTO notifyData) { | ||
| 81 | - if (notifyData.getParams().containsKey("refund_fee")) { | ||
| 82 | - return true; | ||
| 83 | - } else { | ||
| 84 | - return false; | ||
| 85 | - } | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - @Override | ||
| 89 | - public boolean verifyNotifyData(PayNotifyDataDTO notifyData) { | ||
| 90 | - boolean verifyResult = false; | ||
| 91 | - try { | ||
| 92 | - verifyResult = AlipaySignature.rsaCheckV1(notifyData.getParams(), config.getAlipayPublicKey(), StandardCharsets.UTF_8.name(), "RSA2"); | ||
| 93 | - } catch (AlipayApiException e) { | ||
| 94 | - log.error("[AlipayClient verifyNotifyData][(notify param is :{}) ้ช่ฏๅคฑ่ดฅ]", toJsonString(notifyData.getParams()), e); | ||
| 95 | - } | ||
| 96 | - return verifyResult; | ||
| 97 | - } | ||
| 98 | - | ||
| 99 | - /** | ||
| 100 | * ๆฏไปๅฎ็ปไธ็้ๆฌพๆฅๅฃ alipay.trade.refund | 50 | * ๆฏไปๅฎ็ปไธ็้ๆฌพๆฅๅฃ alipay.trade.refund |
| 101 | * @param reqDTO ้ๆฌพ่ฏทๆฑ request DTO | 51 | * @param reqDTO ้ๆฌพ่ฏทๆฑ request DTO |
| 102 | * @return ้ๆฌพ่ฏทๆฑ Response | 52 | * @return ้ๆฌพ่ฏทๆฑ Response |
| 103 | */ | 53 | */ |
| 104 | @Override | 54 | @Override |
| 105 | - protected PayCommonResult<PayRefundUnifiedRespDTO> doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) { | 55 | + protected PayRefundUnifiedRespDTO doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) { |
| 106 | AlipayTradeRefundModel model=new AlipayTradeRefundModel(); | 56 | AlipayTradeRefundModel model=new AlipayTradeRefundModel(); |
| 107 | model.setTradeNo(reqDTO.getChannelOrderNo()); | 57 | model.setTradeNo(reqDTO.getChannelOrderNo()); |
| 108 | model.setOutTradeNo(reqDTO.getPayTradeNo()); | 58 | model.setOutTradeNo(reqDTO.getPayTradeNo()); |
| 59 | + | ||
| 109 | model.setOutRequestNo(reqDTO.getMerchantRefundId()); | 60 | model.setOutRequestNo(reqDTO.getMerchantRefundId()); |
| 110 | - model.setRefundAmount(calculateAmount(reqDTO.getAmount()).toString()); | 61 | + model.setRefundAmount(formatAmount(reqDTO.getAmount()).toString()); |
| 111 | model.setRefundReason(reqDTO.getReason()); | 62 | model.setRefundReason(reqDTO.getReason()); |
| 63 | + | ||
| 112 | AlipayTradeRefundRequest refundRequest = new AlipayTradeRefundRequest(); | 64 | AlipayTradeRefundRequest refundRequest = new AlipayTradeRefundRequest(); |
| 113 | refundRequest.setBizModel(model); | 65 | refundRequest.setBizModel(model); |
| 66 | + refundRequest.setNotifyUrl(reqDTO.getNotifyUrl()); | ||
| 67 | + refundRequest.setReturnUrl(reqDTO.getNotifyUrl()); | ||
| 114 | try { | 68 | try { |
| 115 | AlipayTradeRefundResponse response = client.execute(refundRequest); | 69 | AlipayTradeRefundResponse response = client.execute(refundRequest); |
| 116 | log.info("[doUnifiedRefund][response({}) ๅ่ตท้ๆฌพ ๆธ ้่ฟๅ", toJsonString(response)); | 70 | log.info("[doUnifiedRefund][response({}) ๅ่ตท้ๆฌพ ๆธ ้่ฟๅ", toJsonString(response)); |
| @@ -119,38 +73,43 @@ public abstract class AbstractAlipayClient extends AbstractPayClient<AlipayPayCl | @@ -119,38 +73,43 @@ public abstract class AbstractAlipayClient extends AbstractPayClient<AlipayPayCl | ||
| 119 | //ๆฏไปๅฎไธ่ฟๅ้ๆฌพๅๅท๏ผ่ฎพ็ฝฎไธบ็ฉบ | 73 | //ๆฏไปๅฎไธ่ฟๅ้ๆฌพๅๅท๏ผ่ฎพ็ฝฎไธบ็ฉบ |
| 120 | PayRefundUnifiedRespDTO respDTO = new PayRefundUnifiedRespDTO(); | 74 | PayRefundUnifiedRespDTO respDTO = new PayRefundUnifiedRespDTO(); |
| 121 | respDTO.setChannelRefundId(""); | 75 | respDTO.setChannelRefundId(""); |
| 122 | - return PayCommonResult.build(response.getCode(), response.getMsg(), respDTO, codeMapping); | 76 | +// return PayCommonResult.build(response.getCode(), response.getMsg(), respDTO, codeMapping); TODO |
| 77 | + return null; | ||
| 123 | } | 78 | } |
| 124 | // ๅคฑ่ดฅใ้่ฆๆๅบๅผๅธธ | 79 | // ๅคฑ่ดฅใ้่ฆๆๅบๅผๅธธ |
| 125 | - return PayCommonResult.build(response.getCode(), response.getMsg(), null, codeMapping); | 80 | +// return PayCommonResult.build(response.getCode(), response.getMsg(), null, codeMapping); TODO |
| 81 | + return null; | ||
| 126 | } catch (AlipayApiException e) { | 82 | } catch (AlipayApiException e) { |
| 127 | // TODO ่ฎฐๅฝๅผๅธธๆฅๅฟ | 83 | // TODO ่ฎฐๅฝๅผๅธธๆฅๅฟ |
| 128 | log.error("[doUnifiedRefund][request({}) ๅ่ตท้ๆฌพๅคฑ่ดฅ,็ฝ็ป่ฏป่ถ ๆถ๏ผ้ๆฌพ็ถๆๆช็ฅ]", toJsonString(reqDTO), e); | 84 | log.error("[doUnifiedRefund][request({}) ๅ่ตท้ๆฌพๅคฑ่ดฅ,็ฝ็ป่ฏป่ถ ๆถ๏ผ้ๆฌพ็ถๆๆช็ฅ]", toJsonString(reqDTO), e); |
| 129 | - return PayCommonResult.build(e.getErrCode(), e.getErrMsg(), null, codeMapping); | 85 | +// return PayCommonResult.build(e.getErrCode(), e.getErrMsg(), null, codeMapping); TODO |
| 86 | + return null; | ||
| 130 | } | 87 | } |
| 131 | } | 88 | } |
| 132 | 89 | ||
| 133 | - | ||
| 134 | - | ||
| 135 | - /** | ||
| 136 | - * ๆฏไปๅฎ็ปไธๅ่ฐๅๆฐ str ่ฝฌ map | ||
| 137 | - * | ||
| 138 | - * @param s ๆฏไปๅฎๆฏไป้็ฅๅ่ฐๅๆฐ | ||
| 139 | - * @return map ๆฏไปๅฎ้ๅ | ||
| 140 | - */ | ||
| 141 | - public static Map<String, String> strToMap(String s) { | ||
| 142 | - // TODO @zxy๏ผ่ฟไธชๅฏไปฅไฝฟ็จ hutool ็ HttpUtil decodeParams ๆนๆณไน๏ผ | ||
| 143 | - Map<String, String> stringStringMap = new HashMap<>(); | ||
| 144 | - // ่ฐๆดๆถ้ดๆ ผๅผ | ||
| 145 | - String s3 = s.replaceAll("%3A", ":"); | ||
| 146 | - // ่ทๅ map | ||
| 147 | - String s4 = s3.replace("+", " "); | ||
| 148 | - String[] split = s4.split("&"); | ||
| 149 | - for (String s1 : split) { | ||
| 150 | - String[] split1 = s1.split("="); | ||
| 151 | - stringStringMap.put(split1[0], split1[1]); | 90 | + @Override |
| 91 | + @SneakyThrows | ||
| 92 | + public Object parseNotify(PayNotifyReqDTO rawNotify) { | ||
| 93 | + // 1. ๆ ก้ชๅ่ฐๆฐๆฎ | ||
| 94 | + String body = rawNotify.getBody(); | ||
| 95 | + Map<String, String> params = rawNotify.getParams(); | ||
| 96 | + Map<String, String> bodyObj = HttpUtil.decodeParamMap(body, StandardCharsets.UTF_8); | ||
| 97 | + AlipaySignature.rsaCheckV1(bodyObj, config.getAlipayPublicKey(), | ||
| 98 | + StandardCharsets.UTF_8.name(), "RSA2"); | ||
| 99 | + | ||
| 100 | + // 2.1 ้ๆฌพ็ๆ ๅต | ||
| 101 | + if (bodyObj.containsKey("refund_fee")) { | ||
| 102 | + return PayRefundNotifyRespDTO.builder().channelOrderNo(bodyObj.get("trade_no")) | ||
| 103 | + .tradeNo(bodyObj.get("out_trade_no")).reqNo(bodyObj.get("out_biz_no")) | ||
| 104 | + .status(PayNotifyRefundStatusEnum.SUCCESS) | ||
| 105 | + .refundSuccessTime(parseTime(params.get("gmt_refund"))) | ||
| 106 | + .build(); | ||
| 152 | } | 107 | } |
| 153 | - return stringStringMap; | 108 | + // 2.2 ๆฏไป็ๆ ๅต |
| 109 | + return PayOrderNotifyRespDTO.builder().orderExtensionNo(bodyObj.get("out_trade_no")) | ||
| 110 | + .channelOrderNo(bodyObj.get("trade_no")).channelUserId(bodyObj.get("seller_id")) | ||
| 111 | + .tradeStatus(bodyObj.get("trade_status")).successTime(parseTime(params.get("notify_time"))) | ||
| 112 | + .build(); | ||
| 154 | } | 113 | } |
| 155 | 114 | ||
| 156 | } | 115 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AlipayAppPayClient.java
0 โ 100644
| 1 | +package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 4 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 5 | +import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | ||
| 6 | +import cn.iocoder.yudao.framework.pay.core.enums.PayDisplayModeEnum; | ||
| 7 | +import com.alipay.api.AlipayApiException; | ||
| 8 | +import com.alipay.api.domain.AlipayTradeAppPayModel; | ||
| 9 | +import com.alipay.api.request.AlipayTradeAppPayRequest; | ||
| 10 | +import com.alipay.api.response.AlipayTradeAppPayResponse; | ||
| 11 | +import lombok.extern.slf4j.Slf4j; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * ๆฏไปๅฎใApp ๆฏไปใ็ PayClient ๅฎ็ฐ็ฑป | ||
| 15 | + * | ||
| 16 | + * ๆๆกฃ๏ผ<a href="https://opendocs.alipay.com/open/02e7gq">App ๆฏไป</a> | ||
| 17 | + * | ||
| 18 | + * // TODO ่่ฟ๏ผๆช่ฏฆ็ปๆต่ฏ๏ผๅ ไธบๆๅคดๆฒก App | ||
| 19 | + * | ||
| 20 | + * @author ่้ๆบ็ | ||
| 21 | + */ | ||
| 22 | +@Slf4j | ||
| 23 | +public class AlipayAppPayClient extends AbstractAlipayClient { | ||
| 24 | + | ||
| 25 | + public AlipayAppPayClient(Long channelId, AlipayPayClientConfig config) { | ||
| 26 | + super(channelId, PayChannelEnum.ALIPAY_APP.getCode(), config); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) throws AlipayApiException { | ||
| 31 | + // 1.1 ๆๅปบ AlipayTradeAppPayModel ่ฏทๆฑ | ||
| 32 | + AlipayTradeAppPayModel model = new AlipayTradeAppPayModel(); | ||
| 33 | + // โ ้็จ็ๅๆฐ | ||
| 34 | + model.setOutTradeNo(reqDTO.getMerchantOrderId()); | ||
| 35 | + model.setSubject(reqDTO.getSubject()); | ||
| 36 | + model.setBody(reqDTO.getBody()); | ||
| 37 | + model.setTotalAmount(formatAmount(reqDTO.getAmount())); | ||
| 38 | + model.setProductCode(" QUICK_MSECURITY_PAY"); // ้ๅฎไบงๅ็ ๏ผๆ ็บฟๅฟซๆทๆฏไปไบงๅ | ||
| 39 | + // โก ไธชๆงๅ็ๅๆฐใๆ ใ | ||
| 40 | + // โข ๆฏไปๅฎๆซ็ ๆฏไปๅชๆไธ็งๅฑ็คบ | ||
| 41 | + String displayMode = PayDisplayModeEnum.APP.getMode(); | ||
| 42 | + | ||
| 43 | + // 1.2 ๆๅปบ AlipayTradePrecreateRequest ่ฏทๆฑ | ||
| 44 | + AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest(); | ||
| 45 | + request.setBizModel(model); | ||
| 46 | + request.setNotifyUrl(reqDTO.getNotifyUrl()); | ||
| 47 | + request.setReturnUrl(reqDTO.getReturnUrl()); | ||
| 48 | + | ||
| 49 | + // 2.1 ๆง่ก่ฏทๆฑ | ||
| 50 | + AlipayTradeAppPayResponse response = client.execute(request); | ||
| 51 | + // 2.2 ๅค็็ปๆ | ||
| 52 | + validateSuccess(response); | ||
| 53 | + return new PayOrderUnifiedRespDTO() | ||
| 54 | + .setDisplayMode(displayMode).setDisplayContent(""); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | +} |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AlipayBarPayClient.java
0 โ 100644
| 1 | +package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | ||
| 2 | + | ||
| 3 | +import cn.hutool.core.map.MapUtil; | ||
| 4 | +import cn.hutool.core.util.StrUtil; | ||
| 5 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 7 | +import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | ||
| 8 | +import cn.iocoder.yudao.framework.pay.core.enums.PayDisplayModeEnum; | ||
| 9 | +import com.alipay.api.AlipayApiException; | ||
| 10 | +import com.alipay.api.domain.AlipayTradePayModel; | ||
| 11 | +import com.alipay.api.request.AlipayTradePayRequest; | ||
| 12 | +import com.alipay.api.response.AlipayTradePayResponse; | ||
| 13 | +import lombok.extern.slf4j.Slf4j; | ||
| 14 | + | ||
| 15 | +import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST; | ||
| 16 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 17 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * ๆฏไปๅฎใๆก็ ๆฏไปใ็ PayClient ๅฎ็ฐ็ฑป | ||
| 21 | + * | ||
| 22 | + * ๆๆกฃ๏ผ<a href="https://opendocs.alipay.com/open/194/105072">ๅฝ้ขไป</a> | ||
| 23 | + * | ||
| 24 | + * @author ่้ๆบ็ | ||
| 25 | + */ | ||
| 26 | +@Slf4j | ||
| 27 | +public class AlipayBarPayClient extends AbstractAlipayClient { | ||
| 28 | + | ||
| 29 | + public AlipayBarPayClient(Long channelId, AlipayPayClientConfig config) { | ||
| 30 | + super(channelId, PayChannelEnum.ALIPAY_BAR.getCode(), config); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + @Override | ||
| 34 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) throws AlipayApiException { | ||
| 35 | + String authCode = MapUtil.getStr(reqDTO.getChannelExtras(), "auth_code"); | ||
| 36 | + if (StrUtil.isEmpty(authCode)) { | ||
| 37 | + throw exception0(BAD_REQUEST.getCode(), "ๆกๅฝข็ ไธ่ฝไธบ็ฉบ"); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + // 1.1 ๆๅปบ AlipayTradePayModel ่ฏทๆฑ | ||
| 41 | + AlipayTradePayModel model = new AlipayTradePayModel(); | ||
| 42 | + // โ ้็จ็ๅๆฐ | ||
| 43 | + model.setOutTradeNo(reqDTO.getMerchantOrderId()); | ||
| 44 | + model.setSubject(reqDTO.getSubject()); | ||
| 45 | + model.setBody(reqDTO.getBody()); | ||
| 46 | + model.setTotalAmount(formatAmount(reqDTO.getAmount())); | ||
| 47 | + model.setScene("bar_code"); // ๅฝ้ขไปๆก็ ๆฏไปๅบๆฏ | ||
| 48 | + // โก ไธชๆงๅ็ๅๆฐ | ||
| 49 | + model.setAuthCode(authCode); | ||
| 50 | + // โข ๆฏไปๅฎๆก็ ๆฏไปๅชๆไธ็งๅฑ็คบ | ||
| 51 | + String displayMode = PayDisplayModeEnum.BAR_CODE.getMode(); | ||
| 52 | + | ||
| 53 | + // 1.2 ๆๅปบ AlipayTradePayRequest ่ฏทๆฑ | ||
| 54 | + AlipayTradePayRequest request = new AlipayTradePayRequest(); | ||
| 55 | + request.setBizModel(model); | ||
| 56 | + request.setNotifyUrl(reqDTO.getNotifyUrl()); | ||
| 57 | + request.setReturnUrl(reqDTO.getReturnUrl()); | ||
| 58 | + | ||
| 59 | + // 2.1 ๆง่ก่ฏทๆฑ | ||
| 60 | + AlipayTradePayResponse response = client.execute(request); | ||
| 61 | + // 2.2 ๅค็็ปๆ | ||
| 62 | + validateSuccess(response); | ||
| 63 | + return new PayOrderUnifiedRespDTO() | ||
| 64 | + .setDisplayMode(displayMode).setDisplayContent(""); | ||
| 65 | + } | ||
| 66 | +} |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AlipayPayCodeMapping.java deleted
| 1 | -package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.exception.ErrorCode; | ||
| 4 | -import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | ||
| 5 | -import cn.iocoder.yudao.framework.pay.core.client.AbstractPayCodeMapping; | ||
| 6 | - | ||
| 7 | -import java.util.Objects; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๆฏไปๅฎ็ PayCodeMapping ๅฎ็ฐ็ฑป | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -public class AlipayPayCodeMapping extends AbstractPayCodeMapping { | ||
| 15 | - | ||
| 16 | - @Override | ||
| 17 | - protected ErrorCode apply0(String apiCode, String apiMsg) { | ||
| 18 | - if (Objects.equals(apiCode, "10000")) { | ||
| 19 | - return GlobalErrorCodeConstants.SUCCESS; | ||
| 20 | - } | ||
| 21 | - // alipay wap api code ่ฟๅไธบnull, ๆๆถๅฎไธบ-9999 | ||
| 22 | - if (Objects.equals(apiCode, "-9999")) { | ||
| 23 | - return GlobalErrorCodeConstants.SUCCESS; | ||
| 24 | - } | ||
| 25 | - return null; | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | -} |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AlipayPcPayClient.java
| 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; |
| 2 | 2 | ||
| 3 | +import cn.hutool.core.map.MapUtil; | ||
| 3 | import cn.hutool.core.util.StrUtil; | 4 | import cn.hutool.core.util.StrUtil; |
| 4 | -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | ||
| 5 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 6 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | 5 | +import cn.hutool.http.Method; |
| 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 7 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 7 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | 8 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; |
| 8 | -import com.alibaba.fastjson.JSONObject; | 9 | +import cn.iocoder.yudao.framework.pay.core.enums.PayDisplayModeEnum; |
| 9 | import com.alipay.api.AlipayApiException; | 10 | import com.alipay.api.AlipayApiException; |
| 10 | import com.alipay.api.domain.AlipayTradePagePayModel; | 11 | import com.alipay.api.domain.AlipayTradePagePayModel; |
| 11 | import com.alipay.api.request.AlipayTradePagePayRequest; | 12 | import com.alipay.api.request.AlipayTradePagePayRequest; |
| 12 | import com.alipay.api.response.AlipayTradePagePayResponse; | 13 | import com.alipay.api.response.AlipayTradePagePayResponse; |
| 13 | import lombok.extern.slf4j.Slf4j; | 14 | import lombok.extern.slf4j.Slf4j; |
| 14 | 15 | ||
| 16 | +import java.util.Objects; | ||
| 15 | 17 | ||
| 16 | /** | 18 | /** |
| 17 | - * ๆฏไปๅฎใPC็ฝ็ซๆฏไปใ็ PayClient ๅฎ็ฐ็ฑป | ||
| 18 | - * ๆๆกฃ๏ผhttps://opendocs.alipay.com/open/270/105898 | 19 | + * ๆฏไปๅฎใPC ็ฝ็ซใ็ PayClient ๅฎ็ฐ็ฑป |
| 20 | + * | ||
| 21 | + * ๆๆกฃ๏ผ<a href="https://opendocs.alipay.com/open/270/105898">็ต่็ฝ็ซๆฏไป</a> | ||
| 19 | * | 22 | * |
| 20 | * @author XGD | 23 | * @author XGD |
| 21 | */ | 24 | */ |
| @@ -23,38 +26,66 @@ import lombok.extern.slf4j.Slf4j; | @@ -23,38 +26,66 @@ import lombok.extern.slf4j.Slf4j; | ||
| 23 | public class AlipayPcPayClient extends AbstractAlipayClient { | 26 | public class AlipayPcPayClient extends AbstractAlipayClient { |
| 24 | 27 | ||
| 25 | public AlipayPcPayClient(Long channelId, AlipayPayClientConfig config) { | 28 | public AlipayPcPayClient(Long channelId, AlipayPayClientConfig config) { |
| 26 | - super(channelId, PayChannelEnum.ALIPAY_PC.getCode(), config, new AlipayPayCodeMapping()); | 29 | + super(channelId, PayChannelEnum.ALIPAY_PC.getCode(), config); |
| 27 | } | 30 | } |
| 28 | 31 | ||
| 29 | @Override | 32 | @Override |
| 30 | - public PayCommonResult<AlipayTradePagePayResponse> doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { | ||
| 31 | - // ๆๅปบ AlipayTradePagePayModel ่ฏทๆฑ | 33 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) throws AlipayApiException { |
| 34 | + // 1.1 ๆๅปบ AlipayTradePagePayModel ่ฏทๆฑ | ||
| 32 | AlipayTradePagePayModel model = new AlipayTradePagePayModel(); | 35 | AlipayTradePagePayModel model = new AlipayTradePagePayModel(); |
| 33 | - // ๆๅปบ AlipayTradePagePayRequest | 36 | + // โ ้็จ็ๅๆฐ |
| 37 | + model.setOutTradeNo(reqDTO.getMerchantOrderId()); | ||
| 38 | + model.setSubject(reqDTO.getSubject()); | ||
| 39 | + model.setBody(reqDTO.getBody()); | ||
| 40 | + model.setTotalAmount(formatAmount(reqDTO.getAmount())); | ||
| 41 | + model.setTimeExpire(formatTime(reqDTO.getExpireTime())); | ||
| 42 | + model.setProductCode("FAST_INSTANT_TRADE_PAY"); // ้ๅฎไบงๅ็ . ็ฎๅ PC ๆฏไปๅบๆฏไธไป ๆฏๆ FAST_INSTANT_TRADE_PAY | ||
| 43 | + // โก ไธชๆงๅ็ๅๆฐ | ||
| 44 | + // ๅ่ https://www.pingxx.com/api/ๆฏไปๆธ ้ extra ๅๆฐ่ฏดๆ.html ็ alipay_pc_direct ้จๅ | ||
| 45 | + model.setQrPayMode(MapUtil.getStr(reqDTO.getChannelExtras(), "qr_pay_mode")); | ||
| 46 | + model.setQrcodeWidth(MapUtil.getLong(reqDTO.getChannelExtras(), "qr_code_width")); | ||
| 47 | + // โข ๆฏไปๅฎ PC ๆฏไปๆๅค็งๅฑ็คบๆจกๅผ๏ผๅ ๆญค่ฟ้้่ฆ่ฎก็ฎ | ||
| 48 | + String displayMode = getDisplayMode(reqDTO.getDisplayMode(), model.getQrPayMode()); | ||
| 49 | + | ||
| 50 | + // 1.2 ๆๅปบ AlipayTradePagePayRequest ่ฏทๆฑ | ||
| 34 | AlipayTradePagePayRequest request = new AlipayTradePagePayRequest(); | 51 | AlipayTradePagePayRequest request = new AlipayTradePagePayRequest(); |
| 35 | request.setBizModel(model); | 52 | request.setBizModel(model); |
| 36 | - JSONObject bizContent = new JSONObject(); | ||
| 37 | - // ๅๆฐ่ฏดๆๅฏๆฅ็: https://opendocs.alipay.com/open/028r8t?scene=22 | ||
| 38 | - bizContent.put("out_trade_no", reqDTO.getMerchantOrderId()); | ||
| 39 | - bizContent.put("total_amount", calculateAmount(reqDTO.getAmount())); | ||
| 40 | - bizContent.put("subject", reqDTO.getSubject()); | ||
| 41 | - bizContent.put("product_code", "FAST_INSTANT_TRADE_PAY"); | ||
| 42 | - // PCๆซ็ ๆฏไป็ๆนๅผ๏ผๆฏๆๅ็ฝฎๆจกๅผๅ่ทณ่ฝฌๆจกๅผใ4: ่ฎขๅ็ -ๅฏๅฎไนๅฎฝๅบฆ็ๅตๅ ฅๅผไบ็ปด็ | ||
| 43 | - bizContent.put("qr_pay_mode", "4"); | ||
| 44 | - // ่ชๅฎไนไบ็ปด็ ๅฎฝๅบฆ | ||
| 45 | - bizContent.put("qrcode_width", "150"); | ||
| 46 | - request.setBizContent(bizContent.toJSONString()); | ||
| 47 | request.setNotifyUrl(reqDTO.getNotifyUrl()); | 53 | request.setNotifyUrl(reqDTO.getNotifyUrl()); |
| 48 | - request.setReturnUrl(""); | ||
| 49 | - // ๆง่ก่ฏทๆฑ | 54 | + request.setReturnUrl(reqDTO.getReturnUrl()); |
| 55 | + | ||
| 56 | + // 2.1 ๆง่ก่ฏทๆฑ | ||
| 50 | AlipayTradePagePayResponse response; | 57 | AlipayTradePagePayResponse response; |
| 51 | - try { | ||
| 52 | - response = client.pageExecute(request); | ||
| 53 | - } catch (AlipayApiException e) { | ||
| 54 | - log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ]", JsonUtils.toJsonString(reqDTO), e); | ||
| 55 | - return PayCommonResult.build(e.getErrCode(), e.getErrMsg(), null, codeMapping); | 58 | + if (Objects.equals(displayMode, PayDisplayModeEnum.FORM.getMode())) { |
| 59 | + response = client.pageExecute(request, Method.POST.name()); // ้่ฆ็นๆฎไฝฟ็จ POST ่ฏทๆฑ | ||
| 60 | + } else { | ||
| 61 | + response = client.pageExecute(request, Method.GET.name()); | ||
| 56 | } | 62 | } |
| 57 | - // ๅๅบไธบ่กจๅๆ ผๅผ๏ผๅ็ซฏๅฏๅตๅ ฅๅๅบ็้กต้ขๆๅ ณ้ญๅฝๅๆฏไป็ชๅฃ | ||
| 58 | - return PayCommonResult.build(StrUtil.blankToDefault(response.getCode(),"10000") ,response.getMsg(), response, codeMapping); | 63 | + |
| 64 | + // 2.2 ๅค็็ปๆ | ||
| 65 | + validateSuccess(response); | ||
| 66 | + return new PayOrderUnifiedRespDTO().setDisplayMode(displayMode) | ||
| 67 | + .setDisplayContent(response.getBody()); | ||
| 59 | } | 68 | } |
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * ่ทๅพๆ็ป็ๆฏไป UI ๅฑ็คบๆจกๅผ | ||
| 72 | + * | ||
| 73 | + * @param displayMode ๅ็ซฏไผ ้็ UI ๅฑ็คบๆจกๅผ | ||
| 74 | + * @param qrPayMode ๅ็ซฏไผ ้็ไบ็ปด็ ๆจกๅผ | ||
| 75 | + * @return ๆ็ป็ๆฏไป UI ๅฑ็คบๆจกๅผ | ||
| 76 | + */ | ||
| 77 | + private String getDisplayMode(String displayMode, String qrPayMode) { | ||
| 78 | + // 1.1 ๆฏไปๅฎไบ็ปด็ ็ๅ็ฝฎๆจกๅผ | ||
| 79 | + if (StrUtil.equalsAny(qrPayMode, "0", "1", "3", "4")) { | ||
| 80 | + return PayDisplayModeEnum.IFRAME.getMode(); | ||
| 81 | + } | ||
| 82 | + // 1.2 ๆฏไปๅฎไบ็ปด็ ็่ทณ่ฝฌๆจกๅผ | ||
| 83 | + if (StrUtil.equals(qrPayMode, "2")) { | ||
| 84 | + return PayDisplayModeEnum.URL.getMode(); | ||
| 85 | + } | ||
| 86 | + // 2. ๅ็ซฏไผ ้ไบ UI ๅฑ็คบๆจกๅผ | ||
| 87 | + return displayMode != null ? displayMode : | ||
| 88 | + PayDisplayModeEnum.URL.getMode(); // ๆจกๅผไฝฟ็จ URL ่ทณ่ฝฌ | ||
| 89 | + } | ||
| 90 | + | ||
| 60 | } | 91 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AlipayQrPayClient.java
| 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 4 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | 3 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; |
| 4 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 5 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | 5 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; |
| 6 | +import cn.iocoder.yudao.framework.pay.core.enums.PayDisplayModeEnum; | ||
| 6 | import com.alipay.api.AlipayApiException; | 7 | import com.alipay.api.AlipayApiException; |
| 7 | import com.alipay.api.domain.AlipayTradePrecreateModel; | 8 | import com.alipay.api.domain.AlipayTradePrecreateModel; |
| 8 | import com.alipay.api.request.AlipayTradePrecreateRequest; | 9 | import com.alipay.api.request.AlipayTradePrecreateRequest; |
| 9 | import com.alipay.api.response.AlipayTradePrecreateResponse; | 10 | import com.alipay.api.response.AlipayTradePrecreateResponse; |
| 10 | import lombok.extern.slf4j.Slf4j; | 11 | import lombok.extern.slf4j.Slf4j; |
| 11 | 12 | ||
| 12 | -import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | ||
| 13 | - | ||
| 14 | /** | 13 | /** |
| 15 | * ๆฏไปๅฎใๆซ็ ๆฏไปใ็ PayClient ๅฎ็ฐ็ฑป | 14 | * ๆฏไปๅฎใๆซ็ ๆฏไปใ็ PayClient ๅฎ็ฐ็ฑป |
| 16 | - * ๆๆกฃ๏ผhttps://opendocs.alipay.com/apis/02890k | 15 | + * |
| 16 | + * ๆๆกฃ๏ผ<a href="https://opendocs.alipay.com/apis/02890k">ๆซ็ ๆฏไป</a> | ||
| 17 | * | 17 | * |
| 18 | * @author ่้ๆบ็ | 18 | * @author ่้ๆบ็ |
| 19 | */ | 19 | */ |
| @@ -21,32 +21,34 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString | @@ -21,32 +21,34 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString | ||
| 21 | public class AlipayQrPayClient extends AbstractAlipayClient { | 21 | public class AlipayQrPayClient extends AbstractAlipayClient { |
| 22 | 22 | ||
| 23 | public AlipayQrPayClient(Long channelId, AlipayPayClientConfig config) { | 23 | public AlipayQrPayClient(Long channelId, AlipayPayClientConfig config) { |
| 24 | - super(channelId, PayChannelEnum.ALIPAY_QR.getCode(), config, new AlipayPayCodeMapping()); | 24 | + super(channelId, PayChannelEnum.ALIPAY_QR.getCode(), config); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | @Override | 27 | @Override |
| 28 | - public PayCommonResult<AlipayTradePrecreateResponse> doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { | ||
| 29 | - // ๆๅปบ AlipayTradePrecreateModel ่ฏทๆฑ | 28 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) throws AlipayApiException { |
| 29 | + // 1.1 ๆๅปบ AlipayTradePrecreateModel ่ฏทๆฑ | ||
| 30 | AlipayTradePrecreateModel model = new AlipayTradePrecreateModel(); | 30 | AlipayTradePrecreateModel model = new AlipayTradePrecreateModel(); |
| 31 | + // โ ้็จ็ๅๆฐ | ||
| 31 | model.setOutTradeNo(reqDTO.getMerchantOrderId()); | 32 | model.setOutTradeNo(reqDTO.getMerchantOrderId()); |
| 32 | model.setSubject(reqDTO.getSubject()); | 33 | model.setSubject(reqDTO.getSubject()); |
| 33 | model.setBody(reqDTO.getBody()); | 34 | model.setBody(reqDTO.getBody()); |
| 34 | - model.setTotalAmount(calculateAmount(reqDTO.getAmount()).toString()); // ๅไฝ๏ผๅ | ||
| 35 | - // TODO ่่ฟ๏ผuserIp + expireTime | ||
| 36 | - // ๆๅปบ AlipayTradePrecreateRequest | 35 | + model.setTotalAmount(formatAmount(reqDTO.getAmount())); |
| 36 | + model.setProductCode("FACE_TO_FACE_PAYMENT"); // ้ๅฎไบงๅ็ . ็ฎๅๆซ็ ๆฏไปๅบๆฏไธไป ๆฏๆ FACE_TO_FACE_PAYMENT | ||
| 37 | + // โก ไธชๆงๅ็ๅๆฐใๆ ใ | ||
| 38 | + // โข ๆฏไปๅฎๆซ็ ๆฏไปๅชๆไธ็งๅฑ็คบ๏ผ่่ๅฐๅ็ซฏๅฏ่ฝๅธๆไบ็ปด็ ๆซๆๅ๏ผๆๆบๆๅผ | ||
| 39 | + String displayMode = PayDisplayModeEnum.QR_CODE.getMode(); | ||
| 40 | + | ||
| 41 | + // 1.2 ๆๅปบ AlipayTradePrecreateRequest ่ฏทๆฑ | ||
| 37 | AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest(); | 42 | AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest(); |
| 38 | request.setBizModel(model); | 43 | request.setBizModel(model); |
| 39 | request.setNotifyUrl(reqDTO.getNotifyUrl()); | 44 | request.setNotifyUrl(reqDTO.getNotifyUrl()); |
| 40 | request.setReturnUrl(reqDTO.getReturnUrl()); | 45 | request.setReturnUrl(reqDTO.getReturnUrl()); |
| 41 | - // ๆง่ก่ฏทๆฑ | ||
| 42 | - AlipayTradePrecreateResponse response; | ||
| 43 | - try { | ||
| 44 | - response = client.execute(request); | ||
| 45 | - } catch (AlipayApiException e) { | ||
| 46 | - log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ]", toJsonString(reqDTO), e); | ||
| 47 | - return PayCommonResult.build(e.getErrCode(), e.getErrMsg(), null, codeMapping); | ||
| 48 | - } | ||
| 49 | - // TODO ่่ฟ๏ผsub Code ้่ฆๆต่ฏไธๅ็งๅคฑ่ดฅ็ๆ ๅต | ||
| 50 | - return PayCommonResult.build(response.getCode(), response.getMsg(), response, codeMapping); | 46 | + |
| 47 | + // 2.1 ๆง่ก่ฏทๆฑ | ||
| 48 | + AlipayTradePrecreateResponse response = client.execute(request); | ||
| 49 | + // 2.2 ๅค็็ปๆ | ||
| 50 | + validateSuccess(response); | ||
| 51 | + return new PayOrderUnifiedRespDTO() | ||
| 52 | + .setDisplayMode(displayMode).setDisplayContent(response.getQrCode()); | ||
| 51 | } | 53 | } |
| 52 | } | 54 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AlipayWapPayClient.java
| 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; |
| 2 | 2 | ||
| 3 | -import cn.hutool.core.date.DateUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 5 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | 3 | +import cn.hutool.core.util.ObjectUtil; |
| 4 | +import cn.hutool.http.Method; | ||
| 5 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 6 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | 7 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; |
| 8 | +import cn.iocoder.yudao.framework.pay.core.enums.PayDisplayModeEnum; | ||
| 7 | import com.alipay.api.AlipayApiException; | 9 | import com.alipay.api.AlipayApiException; |
| 8 | import com.alipay.api.domain.AlipayTradeWapPayModel; | 10 | import com.alipay.api.domain.AlipayTradeWapPayModel; |
| 9 | import com.alipay.api.request.AlipayTradeWapPayRequest; | 11 | import com.alipay.api.request.AlipayTradeWapPayRequest; |
| 10 | import com.alipay.api.response.AlipayTradeWapPayResponse; | 12 | import com.alipay.api.response.AlipayTradeWapPayResponse; |
| 11 | import lombok.extern.slf4j.Slf4j; | 13 | import lombok.extern.slf4j.Slf4j; |
| 12 | 14 | ||
| 13 | -import java.util.Objects; | ||
| 14 | - | ||
| 15 | /** | 15 | /** |
| 16 | - * ๆฏไปๅฎใๆๆบ็ฝ็ซใ็ PayClient ๅฎ็ฐ็ฑป | ||
| 17 | - * ๆๆกฃ๏ผhttps://opendocs.alipay.com/apis/api_1/alipay.trade.wap.pay | 16 | + * ๆฏไปๅฎใWap ็ฝ็ซใ็ PayClient ๅฎ็ฐ็ฑป |
| 17 | + * | ||
| 18 | + * ๆๆกฃ๏ผ<a href="https://opendocs.alipay.com/apis/api_1/alipay.trade.wap.pay">ๆๆบ็ฝ็ซๆฏไปๆฅๅฃ</a> | ||
| 18 | * | 19 | * |
| 19 | * @author ่้ๆบ็ | 20 | * @author ่้ๆบ็ |
| 20 | */ | 21 | */ |
| 21 | @Slf4j | 22 | @Slf4j |
| 22 | public class AlipayWapPayClient extends AbstractAlipayClient { | 23 | public class AlipayWapPayClient extends AbstractAlipayClient { |
| 23 | 24 | ||
| 24 | - | ||
| 25 | public AlipayWapPayClient(Long channelId, AlipayPayClientConfig config) { | 25 | public AlipayWapPayClient(Long channelId, AlipayPayClientConfig config) { |
| 26 | - super(channelId, PayChannelEnum.ALIPAY_WAP.getCode(), config, new AlipayPayCodeMapping()); | 26 | + super(channelId, PayChannelEnum.ALIPAY_WAP.getCode(), config); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | @Override | 29 | @Override |
| 30 | - public PayCommonResult<AlipayTradeWapPayResponse> doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { | ||
| 31 | - // ๆๅปบ AlipayTradeWapPayModel ่ฏทๆฑ | 30 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) throws AlipayApiException { |
| 31 | + // 1.1 ๆๅปบ AlipayTradeWapPayModel ่ฏทๆฑ | ||
| 32 | AlipayTradeWapPayModel model = new AlipayTradeWapPayModel(); | 32 | AlipayTradeWapPayModel model = new AlipayTradeWapPayModel(); |
| 33 | + // โ ้็จ็ๅๆฐ | ||
| 33 | model.setOutTradeNo(reqDTO.getMerchantOrderId()); | 34 | model.setOutTradeNo(reqDTO.getMerchantOrderId()); |
| 34 | model.setSubject(reqDTO.getSubject()); | 35 | model.setSubject(reqDTO.getSubject()); |
| 35 | model.setBody(reqDTO.getBody()); | 36 | model.setBody(reqDTO.getBody()); |
| 36 | - model.setTotalAmount(calculateAmount(reqDTO.getAmount()).toString()); | ||
| 37 | - model.setProductCode("QUICK_WAP_PAY"); // TODO ่่ฟ๏ผ่ฟ้ๅๆด | ||
| 38 | - //TODO ่่ฟ๏ผ่ฟ้ๅๆด jason @่่ฟ ๅฏไปฅๅปๆๅง, | ||
| 39 | - // TODO ่่ฟ ไผผไน่ฟ้ไธ็จไผ sellerId | ||
| 40 | - // https://opendocs.alipay.com/apis/api_1/alipay.trade.wap.pay | ||
| 41 | - //model.setSellerId("2088102147948060"); | ||
| 42 | - model.setTimeExpire(DateUtil.format(reqDTO.getExpireTime(),"yyyy-MM-dd HH:mm:ss")); | ||
| 43 | - // TODO ่่ฟ๏ผuserIp | ||
| 44 | - // ๆๅปบ AlipayTradeWapPayRequest | 37 | + model.setTotalAmount(formatAmount(reqDTO.getAmount())); |
| 38 | + model.setProductCode("QUICK_WAP_PAY"); // ้ๅฎไบงๅ็ . ็ฎๅ Wap ๆฏไปๅบๆฏไธไป ๆฏๆ QUICK_WAP_PAY | ||
| 39 | + // โก ไธชๆงๅ็ๅๆฐใๆ ใ | ||
| 40 | + // โข ๆฏไปๅฎ Wap ๆฏไปๅชๆไธ็งๅฑ็คบ๏ผ่่ๅฐๅ็ซฏๅฏ่ฝๅธๆไบ็ปด็ ๆซๆๅ๏ผๆๆบๆๅผ | ||
| 41 | + String displayMode = ObjectUtil.defaultIfNull(reqDTO.getDisplayMode(), | ||
| 42 | + PayDisplayModeEnum.URL.getMode()); | ||
| 43 | + | ||
| 44 | + // 1.2 ๆๅปบ AlipayTradeWapPayRequest ่ฏทๆฑ | ||
| 45 | AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest(); | 45 | AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest(); |
| 46 | request.setBizModel(model); | 46 | request.setBizModel(model); |
| 47 | request.setNotifyUrl(reqDTO.getNotifyUrl()); | 47 | request.setNotifyUrl(reqDTO.getNotifyUrl()); |
| 48 | request.setReturnUrl(reqDTO.getReturnUrl()); | 48 | request.setReturnUrl(reqDTO.getReturnUrl()); |
| 49 | + model.setQuitUrl(reqDTO.getReturnUrl()); | ||
| 49 | 50 | ||
| 50 | - // ๆง่ก่ฏทๆฑ | ||
| 51 | - AlipayTradeWapPayResponse response; | ||
| 52 | - try { | ||
| 53 | - response = client.pageExecute(request); | ||
| 54 | - } catch (AlipayApiException e) { | ||
| 55 | - return PayCommonResult.build(e.getErrCode(), e.getErrMsg(), null, codeMapping); | ||
| 56 | - } | 51 | + // 2.1 ๆง่ก่ฏทๆฑ |
| 52 | + AlipayTradeWapPayResponse response = client.pageExecute(request, Method.GET.name()); | ||
| 57 | 53 | ||
| 58 | - // TODO ่่ฟ๏ผsub Code | ||
| 59 | - if(response.isSuccess() && Objects.isNull(response.getCode()) && Objects.nonNull(response.getBody())){ | ||
| 60 | - //ๆๅalipay wap ๆๅ code ไธบ null , body ไธบform ่กจๅ | ||
| 61 | - return PayCommonResult.build("-9999", "Success", response, codeMapping); | ||
| 62 | - }else { | ||
| 63 | - return PayCommonResult.build(response.getCode(), response.getMsg(), response, codeMapping); | ||
| 64 | - } | 54 | + // 2.2 ๅค็็ปๆ |
| 55 | + validateSuccess(response); | ||
| 56 | + return new PayOrderUnifiedRespDTO() | ||
| 57 | + .setDisplayMode(displayMode).setDisplayContent(response.getBody()); | ||
| 65 | } | 58 | } |
| 66 | 59 | ||
| 67 | - | ||
| 68 | - | ||
| 69 | - | ||
| 70 | - | ||
| 71 | - | ||
| 72 | - | ||
| 73 | - | ||
| 74 | - | ||
| 75 | } | 60 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXCodeMapping.java deleted
| 1 | -package cn.iocoder.yudao.framework.pay.core.client.impl.wx; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.util.StrUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.common.exception.ErrorCode; | ||
| 5 | -import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | ||
| 6 | -import cn.iocoder.yudao.framework.pay.core.client.AbstractPayCodeMapping; | ||
| 7 | - | ||
| 8 | -import java.util.Objects; | ||
| 9 | - | ||
| 10 | -import static cn.iocoder.yudao.framework.pay.core.enums.PayFrameworkErrorCodeConstants.*; | ||
| 11 | - | ||
| 12 | -/** | ||
| 13 | - * ๅพฎไฟกๆฏไป PayCodeMapping ๅฎ็ฐ็ฑป | ||
| 14 | - * | ||
| 15 | - * @author ่้ๆบ็ | ||
| 16 | - */ | ||
| 17 | -public class WXCodeMapping extends AbstractPayCodeMapping { | ||
| 18 | - | ||
| 19 | - /** | ||
| 20 | - * ้่ฏฏ็ - ๆๅ | ||
| 21 | - * ็ฑไบ weixin-java-pay ๅฐ่ฃ ็ Result ๆช่ฟๅ code๏ผๆไปฅ่ชๅทฑๅฎไนไธ | ||
| 22 | - */ | ||
| 23 | - public static final String CODE_SUCCESS = "SUCCESS"; | ||
| 24 | - /** | ||
| 25 | - * ้่ฏฏๆ็คบ - ๆๅ | ||
| 26 | - */ | ||
| 27 | - public static final String MESSAGE_SUCCESS = "ๆๅ"; | ||
| 28 | - | ||
| 29 | - @Override | ||
| 30 | - protected ErrorCode apply0(String apiCode, String apiMsg) { | ||
| 31 | - if (Objects.equals(apiCode, CODE_SUCCESS)) { | ||
| 32 | - return GlobalErrorCodeConstants.SUCCESS; | ||
| 33 | - } | ||
| 34 | - if (Objects.equals(apiCode, "FAIL")) { | ||
| 35 | - if (Objects.equals(apiMsg, "AppIDไธๅญๅจ๏ผ่ฏทๆฃๆฅๅๅ่ฏ")) { | ||
| 36 | - return PAY_CONFIG_APP_ID_ERROR; | ||
| 37 | - } | ||
| 38 | - if (Objects.equals(apiMsg, "็ญพๅ้่ฏฏ๏ผ่ฏทๆฃๆฅๅๅ่ฏ") | ||
| 39 | - || Objects.equals(apiMsg, "็ญพๅ้่ฏฏ")) { | ||
| 40 | - return PAY_CONFIG_SIGN_ERROR; | ||
| 41 | - } | ||
| 42 | - } | ||
| 43 | - if (Objects.equals(apiCode, "PARAM_ERROR")) { | ||
| 44 | - if (Objects.equals(apiMsg, "ๆ ๆ็openid")) { | ||
| 45 | - return PAY_OPENID_ERROR; | ||
| 46 | - } | ||
| 47 | - } | ||
| 48 | - if (Objects.equals(apiCode, "CustomErrorCode")) { | ||
| 49 | - if (StrUtil.contains(apiMsg, "ๅฟ ๅกซๅญๆฎต")) { | ||
| 50 | - return PAY_PARAM_MISSING; | ||
| 51 | - } | ||
| 52 | - } | ||
| 53 | - return null; | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | -} |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXLitePayClient.java
| @@ -7,9 +7,13 @@ import cn.hutool.core.lang.Assert; | @@ -7,9 +7,13 @@ import cn.hutool.core.lang.Assert; | ||
| 7 | import cn.hutool.core.map.MapUtil; | 7 | import cn.hutool.core.map.MapUtil; |
| 8 | import cn.hutool.core.util.StrUtil; | 8 | import cn.hutool.core.util.StrUtil; |
| 9 | import cn.iocoder.yudao.framework.common.util.io.FileUtils; | 9 | import cn.iocoder.yudao.framework.common.util.io.FileUtils; |
| 10 | -import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; | ||
| 11 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 12 | -import cn.iocoder.yudao.framework.pay.core.client.dto.*; | 10 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 11 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 12 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayRefundNotifyRespDTO; | ||
| 13 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 14 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 15 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedReqDTO; | ||
| 16 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedRespDTO; | ||
| 13 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; | 17 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; |
| 14 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | 18 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; |
| 15 | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; | 19 | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; |
| @@ -30,11 +34,6 @@ import java.time.ZoneId; | @@ -30,11 +34,6 @@ import java.time.ZoneId; | ||
| 30 | import java.util.Date; | 34 | import java.util.Date; |
| 31 | import java.util.Objects; | 35 | import java.util.Objects; |
| 32 | 36 | ||
| 33 | -import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | ||
| 34 | -import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.CODE_SUCCESS; | ||
| 35 | -import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.MESSAGE_SUCCESS; | ||
| 36 | - | ||
| 37 | - | ||
| 38 | /** | 37 | /** |
| 39 | * ๅพฎไฟกๅฐ็จๅบไธๆฏไป | 38 | * ๅพฎไฟกๅฐ็จๅบไธๆฏไป |
| 40 | * | 39 | * |
| @@ -46,7 +45,7 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -46,7 +45,7 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 46 | private WxPayService client; | 45 | private WxPayService client; |
| 47 | 46 | ||
| 48 | public WXLitePayClient(Long channelId, WXPayClientConfig config) { | 47 | public WXLitePayClient(Long channelId, WXPayClientConfig config) { |
| 49 | - super(channelId, PayChannelEnum.WX_LITE.getCode(), config, new WXCodeMapping()); | 48 | + super(channelId, PayChannelEnum.WX_LITE.getCode(), config); |
| 50 | } | 49 | } |
| 51 | 50 | ||
| 52 | @Override | 51 | @Override |
| @@ -71,28 +70,29 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -71,28 +70,29 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 71 | } | 70 | } |
| 72 | 71 | ||
| 73 | @Override | 72 | @Override |
| 74 | - public PayCommonResult<WxPayMpOrderResult> doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { | ||
| 75 | - WxPayMpOrderResult response; | ||
| 76 | - try { | ||
| 77 | - switch (config.getApiVersion()) { | ||
| 78 | - case WXPayClientConfig.API_VERSION_V2: | ||
| 79 | - response = this.unifiedOrderV2(reqDTO); | ||
| 80 | - break; | ||
| 81 | - case WXPayClientConfig.API_VERSION_V3: | ||
| 82 | - WxPayUnifiedOrderV3Result.JsapiResult responseV3 = this.unifiedOrderV3(reqDTO); | ||
| 83 | - // ๅฐ V3 ็็ปๆ๏ผ็ปไธ่ฝฌๆขๆ V2ใ่ฟๅ็ๅญๆฎตๆฏไธ่ด็ | ||
| 84 | - response = new WxPayMpOrderResult(); | ||
| 85 | - BeanUtil.copyProperties(responseV3, response, true); | ||
| 86 | - break; | ||
| 87 | - default: | ||
| 88 | - throw new IllegalArgumentException(String.format("ๆช็ฅ็ API ็ๆฌ(%s)", config.getApiVersion())); | ||
| 89 | - } | ||
| 90 | - } catch (WxPayException e) { | ||
| 91 | - log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ๏ผๅๅ ({})]", toJsonString(reqDTO), e); | ||
| 92 | - return PayCommonResult.build(ObjectUtils.defaultIfNull(e.getErrCode(), e.getReturnCode(), "CustomErrorCode"), | ||
| 93 | - ObjectUtils.defaultIfNull(e.getErrCodeDes(), e.getCustomErrorMsg()), null, codeMapping); | ||
| 94 | - } | ||
| 95 | - return PayCommonResult.build(CODE_SUCCESS, MESSAGE_SUCCESS, response, codeMapping); | 73 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { |
| 74 | + throw new UnsupportedOperationException(); | ||
| 75 | +// WxPayMpOrderResult response; | ||
| 76 | +// try { | ||
| 77 | +// switch (config.getApiVersion()) { | ||
| 78 | +// case WXPayClientConfig.API_VERSION_V2: | ||
| 79 | +// response = this.unifiedOrderV2(reqDTO); | ||
| 80 | +// break; | ||
| 81 | +// case WXPayClientConfig.API_VERSION_V3: | ||
| 82 | +// WxPayUnifiedOrderV3Result.JsapiResult responseV3 = this.unifiedOrderV3(reqDTO); | ||
| 83 | +// // ๅฐ V3 ็็ปๆ๏ผ็ปไธ่ฝฌๆขๆ V2ใ่ฟๅ็ๅญๆฎตๆฏไธ่ด็ | ||
| 84 | +// response = new WxPayMpOrderResult(); | ||
| 85 | +// BeanUtil.copyProperties(responseV3, response, true); | ||
| 86 | +// break; | ||
| 87 | +// default: | ||
| 88 | +// throw new IllegalArgumentException(String.format("ๆช็ฅ็ API ็ๆฌ(%s)", config.getApiVersion())); | ||
| 89 | +// } | ||
| 90 | +// } catch (WxPayException e) { | ||
| 91 | +// log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ๏ผๅๅ ({})]", toJsonString(reqDTO), e); | ||
| 92 | +// return PayCommonResult.build(ObjectUtils.defaultIfNull(e.getErrCode(), e.getReturnCode(), "CustomErrorCode"), | ||
| 93 | +// ObjectUtils.defaultIfNull(e.getErrCodeDes(), e.getCustomErrorMsg()), null, codeMapping); | ||
| 94 | +// } | ||
| 95 | +// return PayCommonResult.build(CODE_SUCCESS, MESSAGE_SUCCESS, response, codeMapping); | ||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | private WxPayMpOrderResult unifiedOrderV2(PayOrderUnifiedReqDTO reqDTO) throws WxPayException { | 98 | private WxPayMpOrderResult unifiedOrderV2(PayOrderUnifiedReqDTO reqDTO) throws WxPayException { |
| @@ -145,8 +145,8 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -145,8 +145,8 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 145 | * @return ๆฏไปๅ่ฐๅฏน่ฑก | 145 | * @return ๆฏไปๅ่ฐๅฏน่ฑก |
| 146 | * @throws WxPayException ๅพฎไฟกๅผๅธธ็ฑป | 146 | * @throws WxPayException ๅพฎไฟกๅผๅธธ็ฑป |
| 147 | */ | 147 | */ |
| 148 | - @Override | ||
| 149 | - public PayOrderNotifyRespDTO parseOrderNotify(PayNotifyDataDTO data) throws WxPayException { | 148 | +// @Override |
| 149 | + public PayOrderNotifyRespDTO parseOrderNotify(PayNotifyReqDTO data) throws WxPayException { | ||
| 150 | log.info("[parseOrderNotify][ๅพฎไฟกๆฏไปๅ่ฐdataๆฐๆฎ:{}]", data.getBody()); | 150 | log.info("[parseOrderNotify][ๅพฎไฟกๆฏไปๅ่ฐdataๆฐๆฎ:{}]", data.getBody()); |
| 151 | // ๅพฎไฟกๆฏไป v2 ๅ่ฐ็ปๆๅค็ | 151 | // ๅพฎไฟกๆฏไป v2 ๅ่ฐ็ปๆๅค็ |
| 152 | switch (config.getApiVersion()) { | 152 | switch (config.getApiVersion()) { |
| @@ -159,7 +159,7 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -159,7 +159,7 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 159 | } | 159 | } |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | - private PayOrderNotifyRespDTO parseOrderNotifyV3(PayNotifyDataDTO data) throws WxPayException { | 162 | + private PayOrderNotifyRespDTO parseOrderNotifyV3(PayNotifyReqDTO data) throws WxPayException { |
| 163 | WxPayOrderNotifyV3Result wxPayOrderNotifyV3Result = client.parseOrderNotifyV3Result(data.getBody(), null); | 163 | WxPayOrderNotifyV3Result wxPayOrderNotifyV3Result = client.parseOrderNotifyV3Result(data.getBody(), null); |
| 164 | WxPayOrderNotifyV3Result.DecryptNotifyResult result = wxPayOrderNotifyV3Result.getResult(); | 164 | WxPayOrderNotifyV3Result.DecryptNotifyResult result = wxPayOrderNotifyV3Result.getResult(); |
| 165 | // ่ฝฌๆข็ปๆ | 165 | // ่ฝฌๆข็ปๆ |
| @@ -172,11 +172,10 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -172,11 +172,10 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 172 | .channelOrderNo(result.getTransactionId()) | 172 | .channelOrderNo(result.getTransactionId()) |
| 173 | .channelUserId(result.getPayer().getOpenid()) | 173 | .channelUserId(result.getPayer().getOpenid()) |
| 174 | .successTime(LocalDateTimeUtil.parse(result.getSuccessTime(), "yyyy-MM-dd'T'HH:mm:ssXXX")) | 174 | .successTime(LocalDateTimeUtil.parse(result.getSuccessTime(), "yyyy-MM-dd'T'HH:mm:ssXXX")) |
| 175 | - .data(data.getBody()) | ||
| 176 | .build(); | 175 | .build(); |
| 177 | } | 176 | } |
| 178 | 177 | ||
| 179 | - private PayOrderNotifyRespDTO parseOrderNotifyV2(PayNotifyDataDTO data) throws WxPayException { | 178 | + private PayOrderNotifyRespDTO parseOrderNotifyV2(PayNotifyReqDTO data) throws WxPayException { |
| 180 | WxPayOrderNotifyResult notifyResult = client.parseOrderNotifyResult(data.getBody()); | 179 | WxPayOrderNotifyResult notifyResult = client.parseOrderNotifyResult(data.getBody()); |
| 181 | Assert.isTrue(Objects.equals(notifyResult.getResultCode(), "SUCCESS"), "ๆฏไป็ปๆ้ SUCCESS"); | 180 | Assert.isTrue(Objects.equals(notifyResult.getResultCode(), "SUCCESS"), "ๆฏไป็ปๆ้ SUCCESS"); |
| 182 | // ่ฝฌๆข็ปๆ | 181 | // ่ฝฌๆข็ปๆ |
| @@ -186,20 +185,12 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -186,20 +185,12 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 186 | .channelOrderNo(notifyResult.getTransactionId()) | 185 | .channelOrderNo(notifyResult.getTransactionId()) |
| 187 | .channelUserId(notifyResult.getOpenid()) | 186 | .channelUserId(notifyResult.getOpenid()) |
| 188 | .successTime(LocalDateTimeUtil.parse(notifyResult.getTimeEnd(), "yyyyMMddHHmmss")) | 187 | .successTime(LocalDateTimeUtil.parse(notifyResult.getTimeEnd(), "yyyyMMddHHmmss")) |
| 189 | - .data(data.getBody()) | ||
| 190 | .build(); | 188 | .build(); |
| 191 | 189 | ||
| 192 | } | 190 | } |
| 193 | 191 | ||
| 194 | @Override | 192 | @Override |
| 195 | - public PayRefundNotifyDTO parseRefundNotify(PayNotifyDataDTO notifyData) { | ||
| 196 | - //TODO ้่ฆๅฎ็ฐ | ||
| 197 | - throw new UnsupportedOperationException("้่ฆๅฎ็ฐ"); | ||
| 198 | - } | ||
| 199 | - | ||
| 200 | - | ||
| 201 | - @Override | ||
| 202 | - protected PayCommonResult<PayRefundUnifiedRespDTO> doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) throws Throwable { | 193 | + protected PayRefundUnifiedRespDTO doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) { |
| 203 | //TODO ้่ฆๅฎ็ฐ | 194 | //TODO ้่ฆๅฎ็ฐ |
| 204 | throw new UnsupportedOperationException(); | 195 | throw new UnsupportedOperationException(); |
| 205 | } | 196 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXNativePayClient.java
| @@ -6,9 +6,13 @@ import cn.hutool.core.date.LocalDateTimeUtil; | @@ -6,9 +6,13 @@ import cn.hutool.core.date.LocalDateTimeUtil; | ||
| 6 | import cn.hutool.core.lang.Assert; | 6 | import cn.hutool.core.lang.Assert; |
| 7 | import cn.hutool.core.util.StrUtil; | 7 | import cn.hutool.core.util.StrUtil; |
| 8 | import cn.iocoder.yudao.framework.common.util.io.FileUtils; | 8 | import cn.iocoder.yudao.framework.common.util.io.FileUtils; |
| 9 | -import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; | ||
| 10 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 11 | -import cn.iocoder.yudao.framework.pay.core.client.dto.*; | 9 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 10 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 11 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayRefundNotifyRespDTO; | ||
| 12 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 13 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 14 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedReqDTO; | ||
| 15 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedRespDTO; | ||
| 12 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; | 16 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; |
| 13 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | 17 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; |
| 14 | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; | 18 | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; |
| @@ -28,10 +32,6 @@ import java.time.ZoneId; | @@ -28,10 +32,6 @@ import java.time.ZoneId; | ||
| 28 | import java.util.Date; | 32 | import java.util.Date; |
| 29 | import java.util.Objects; | 33 | import java.util.Objects; |
| 30 | 34 | ||
| 31 | -import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | ||
| 32 | -import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.CODE_SUCCESS; | ||
| 33 | -import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.MESSAGE_SUCCESS; | ||
| 34 | - | ||
| 35 | /** | 35 | /** |
| 36 | * ๅพฎไฟก App ๆฏไป | 36 | * ๅพฎไฟก App ๆฏไป |
| 37 | * | 37 | * |
| @@ -43,7 +43,7 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -43,7 +43,7 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 43 | private WxPayService client; | 43 | private WxPayService client; |
| 44 | 44 | ||
| 45 | public WXNativePayClient(Long channelId, WXPayClientConfig config) { | 45 | public WXNativePayClient(Long channelId, WXPayClientConfig config) { |
| 46 | - super(channelId, PayChannelEnum.WX_NATIVE.getCode(), config, new WXCodeMapping()); | 46 | + super(channelId, PayChannelEnum.WX_NATIVE.getCode(), config); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | @Override | 49 | @Override |
| @@ -68,27 +68,28 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -68,27 +68,28 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | @Override | 70 | @Override |
| 71 | - public PayCommonResult<String> doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { | ||
| 72 | - // ่ฟ้ๅ็็่ฟๅ็ๆฏๆฏไป็ url ๆไปฅ็ดๆฅไฝฟ็จstringๆฅๆถ | ||
| 73 | - // "invokeResponse": "weixin://wxpay/bizpayurl?pr=EGYAem7zz" | ||
| 74 | - String responseV3; | ||
| 75 | - try { | ||
| 76 | - switch (config.getApiVersion()) { | ||
| 77 | - case WXPayClientConfig.API_VERSION_V2: | ||
| 78 | - responseV3 = unifiedOrderV2(reqDTO).getCodeUrl(); | ||
| 79 | - break; | ||
| 80 | - case WXPayClientConfig.API_VERSION_V3: | ||
| 81 | - responseV3 = this.unifiedOrderV3(reqDTO); | ||
| 82 | - break; | ||
| 83 | - default: | ||
| 84 | - throw new IllegalArgumentException(String.format("ๆช็ฅ็ API ็ๆฌ(%s)", config.getApiVersion())); | ||
| 85 | - } | ||
| 86 | - } catch (WxPayException e) { | ||
| 87 | - log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ๏ผๅๅ ({})]", toJsonString(reqDTO), e); | ||
| 88 | - return PayCommonResult.build(ObjectUtils.defaultIfNull(e.getErrCode(), e.getReturnCode(), "CustomErrorCode"), | ||
| 89 | - ObjectUtils.defaultIfNull(e.getErrCodeDes(), e.getCustomErrorMsg()), null, codeMapping); | ||
| 90 | - } | ||
| 91 | - return PayCommonResult.build(CODE_SUCCESS, MESSAGE_SUCCESS, responseV3, codeMapping); | 71 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { |
| 72 | + throw new UnsupportedOperationException(); | ||
| 73 | +// // ่ฟ้ๅ็็่ฟๅ็ๆฏๆฏไป็ url ๆไปฅ็ดๆฅไฝฟ็จstringๆฅๆถ | ||
| 74 | +// // "invokeResponse": "weixin://wxpay/bizpayurl?pr=EGYAem7zz" | ||
| 75 | +// String responseV3; | ||
| 76 | +// try { | ||
| 77 | +// switch (config.getApiVersion()) { | ||
| 78 | +// case WXPayClientConfig.API_VERSION_V2: | ||
| 79 | +// responseV3 = unifiedOrderV2(reqDTO).getCodeUrl(); | ||
| 80 | +// break; | ||
| 81 | +// case WXPayClientConfig.API_VERSION_V3: | ||
| 82 | +// responseV3 = this.unifiedOrderV3(reqDTO); | ||
| 83 | +// break; | ||
| 84 | +// default: | ||
| 85 | +// throw new IllegalArgumentException(String.format("ๆช็ฅ็ API ็ๆฌ(%s)", config.getApiVersion())); | ||
| 86 | +// } | ||
| 87 | +// } catch (WxPayException e) { | ||
| 88 | +// log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ๏ผๅๅ ({})]", toJsonString(reqDTO), e); | ||
| 89 | +// return PayCommonResult.build(ObjectUtils.defaultIfNull(e.getErrCode(), e.getReturnCode(), "CustomErrorCode"), | ||
| 90 | +// ObjectUtils.defaultIfNull(e.getErrCodeDes(), e.getCustomErrorMsg()), null, codeMapping); | ||
| 91 | +// } | ||
| 92 | +// return PayCommonResult.build(CODE_SUCCESS, MESSAGE_SUCCESS, responseV3, codeMapping); | ||
| 92 | } | 93 | } |
| 93 | 94 | ||
| 94 | private WxPayNativeOrderResult unifiedOrderV2(PayOrderUnifiedReqDTO reqDTO) throws WxPayException { | 95 | private WxPayNativeOrderResult unifiedOrderV2(PayOrderUnifiedReqDTO reqDTO) throws WxPayException { |
| @@ -129,8 +130,8 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -129,8 +130,8 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 129 | * @return ๆฏไปๅ่ฐๅฏน่ฑก | 130 | * @return ๆฏไปๅ่ฐๅฏน่ฑก |
| 130 | * @throws WxPayException ๅพฎไฟกๅผๅธธ็ฑป | 131 | * @throws WxPayException ๅพฎไฟกๅผๅธธ็ฑป |
| 131 | */ | 132 | */ |
| 132 | - @Override | ||
| 133 | - public PayOrderNotifyRespDTO parseOrderNotify(PayNotifyDataDTO data) throws WxPayException { | 133 | +// @Override |
| 134 | + public PayOrderNotifyRespDTO parseOrderNotify(PayNotifyReqDTO data) throws WxPayException { | ||
| 134 | log.info("ๅพฎไฟกๆฏไปๅ่ฐdataๆฐๆฎ:{}", data.getBody()); | 135 | log.info("ๅพฎไฟกๆฏไปๅ่ฐdataๆฐๆฎ:{}", data.getBody()); |
| 135 | // ๅพฎไฟกๆฏไป v2 ๅ่ฐ็ปๆๅค็ | 136 | // ๅพฎไฟกๆฏไป v2 ๅ่ฐ็ปๆๅค็ |
| 136 | switch (config.getApiVersion()) { | 137 | switch (config.getApiVersion()) { |
| @@ -143,7 +144,7 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -143,7 +144,7 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 143 | } | 144 | } |
| 144 | } | 145 | } |
| 145 | 146 | ||
| 146 | - private PayOrderNotifyRespDTO parseOrderNotifyV3(PayNotifyDataDTO data) throws WxPayException { | 147 | + private PayOrderNotifyRespDTO parseOrderNotifyV3(PayNotifyReqDTO data) throws WxPayException { |
| 147 | WxPayOrderNotifyV3Result wxPayOrderNotifyV3Result = client.parseOrderNotifyV3Result(data.getBody(), null); | 148 | WxPayOrderNotifyV3Result wxPayOrderNotifyV3Result = client.parseOrderNotifyV3Result(data.getBody(), null); |
| 148 | WxPayOrderNotifyV3Result.DecryptNotifyResult result = wxPayOrderNotifyV3Result.getResult(); | 149 | WxPayOrderNotifyV3Result.DecryptNotifyResult result = wxPayOrderNotifyV3Result.getResult(); |
| 149 | // ่ฝฌๆข็ปๆ | 150 | // ่ฝฌๆข็ปๆ |
| @@ -154,11 +155,10 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -154,11 +155,10 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 154 | .orderExtensionNo(result.getOutTradeNo()) | 155 | .orderExtensionNo(result.getOutTradeNo()) |
| 155 | .channelOrderNo(result.getTradeState()) | 156 | .channelOrderNo(result.getTradeState()) |
| 156 | .successTime(LocalDateTimeUtil.parse(result.getSuccessTime(), "yyyy-MM-dd'T'HH:mm:ssXXX")) | 157 | .successTime(LocalDateTimeUtil.parse(result.getSuccessTime(), "yyyy-MM-dd'T'HH:mm:ssXXX")) |
| 157 | - .data(data.getBody()) | ||
| 158 | .build(); | 158 | .build(); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | - private PayOrderNotifyRespDTO parseOrderNotifyV2(PayNotifyDataDTO data) throws WxPayException { | 161 | + private PayOrderNotifyRespDTO parseOrderNotifyV2(PayNotifyReqDTO data) throws WxPayException { |
| 162 | WxPayOrderNotifyResult notifyResult = client.parseOrderNotifyResult(data.getBody()); | 162 | WxPayOrderNotifyResult notifyResult = client.parseOrderNotifyResult(data.getBody()); |
| 163 | Assert.isTrue(Objects.equals(notifyResult.getResultCode(), "SUCCESS"), "ๆฏไป็ปๆ้ SUCCESS"); | 163 | Assert.isTrue(Objects.equals(notifyResult.getResultCode(), "SUCCESS"), "ๆฏไป็ปๆ้ SUCCESS"); |
| 164 | // ่ฝฌๆข็ปๆ | 164 | // ่ฝฌๆข็ปๆ |
| @@ -168,20 +168,12 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -168,20 +168,12 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 168 | .channelOrderNo(notifyResult.getTransactionId()) | 168 | .channelOrderNo(notifyResult.getTransactionId()) |
| 169 | .channelUserId(notifyResult.getOpenid()) | 169 | .channelUserId(notifyResult.getOpenid()) |
| 170 | .successTime(LocalDateTimeUtil.parse(notifyResult.getTimeEnd(), "yyyyMMddHHmmss")) | 170 | .successTime(LocalDateTimeUtil.parse(notifyResult.getTimeEnd(), "yyyyMMddHHmmss")) |
| 171 | - .data(data.getBody()) | ||
| 172 | .build(); | 171 | .build(); |
| 173 | 172 | ||
| 174 | } | 173 | } |
| 175 | 174 | ||
| 176 | @Override | 175 | @Override |
| 177 | - public PayRefundNotifyDTO parseRefundNotify(PayNotifyDataDTO notifyData) { | ||
| 178 | - // TODO ้่ฆๅฎ็ฐ | ||
| 179 | - throw new UnsupportedOperationException("้่ฆๅฎ็ฐ"); | ||
| 180 | - } | ||
| 181 | - | ||
| 182 | - | ||
| 183 | - @Override | ||
| 184 | - protected PayCommonResult<PayRefundUnifiedRespDTO> doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) throws Throwable { | 176 | + protected PayRefundUnifiedRespDTO doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) { |
| 185 | // TODO ้่ฆๅฎ็ฐ | 177 | // TODO ้่ฆๅฎ็ฐ |
| 186 | throw new UnsupportedOperationException(); | 178 | throw new UnsupportedOperationException(); |
| 187 | } | 179 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXPubPayClient.java
| @@ -7,9 +7,12 @@ import cn.hutool.core.lang.Assert; | @@ -7,9 +7,12 @@ import cn.hutool.core.lang.Assert; | ||
| 7 | import cn.hutool.core.map.MapUtil; | 7 | import cn.hutool.core.map.MapUtil; |
| 8 | import cn.hutool.core.util.StrUtil; | 8 | import cn.hutool.core.util.StrUtil; |
| 9 | import cn.iocoder.yudao.framework.common.util.io.FileUtils; | 9 | import cn.iocoder.yudao.framework.common.util.io.FileUtils; |
| 10 | -import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; | ||
| 11 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 12 | -import cn.iocoder.yudao.framework.pay.core.client.dto.*; | 10 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 11 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 12 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 13 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 14 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedReqDTO; | ||
| 15 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedRespDTO; | ||
| 13 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; | 16 | import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient; |
| 14 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | 17 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; |
| 15 | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; | 18 | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; |
| @@ -30,10 +33,6 @@ import java.time.LocalDateTime; | @@ -30,10 +33,6 @@ import java.time.LocalDateTime; | ||
| 30 | import java.time.ZoneId; | 33 | import java.time.ZoneId; |
| 31 | import java.util.Objects; | 34 | import java.util.Objects; |
| 32 | 35 | ||
| 33 | -import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | ||
| 34 | -import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.CODE_SUCCESS; | ||
| 35 | -import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.MESSAGE_SUCCESS; | ||
| 36 | - | ||
| 37 | /** | 36 | /** |
| 38 | * ๅพฎไฟกๆฏไป๏ผๅ ฌไผๅท๏ผ็ PayClient ๅฎ็ฐ็ฑป | 37 | * ๅพฎไฟกๆฏไป๏ผๅ ฌไผๅท๏ผ็ PayClient ๅฎ็ฐ็ฑป |
| 39 | * | 38 | * |
| @@ -45,7 +44,7 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -45,7 +44,7 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 45 | private WxPayService client; | 44 | private WxPayService client; |
| 46 | 45 | ||
| 47 | public WXPubPayClient(Long channelId, WXPayClientConfig config) { | 46 | public WXPubPayClient(Long channelId, WXPayClientConfig config) { |
| 48 | - super(channelId, PayChannelEnum.WX_PUB.getCode(), config, new WXCodeMapping()); | 47 | + super(channelId, PayChannelEnum.WX_PUB.getCode(), config); |
| 49 | } | 48 | } |
| 50 | 49 | ||
| 51 | @Override | 50 | @Override |
| @@ -70,28 +69,30 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -70,28 +69,30 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | @Override | 71 | @Override |
| 73 | - public PayCommonResult<WxPayMpOrderResult> doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { | ||
| 74 | - WxPayMpOrderResult response; | ||
| 75 | - try { | ||
| 76 | - switch (config.getApiVersion()) { | ||
| 77 | - case WXPayClientConfig.API_VERSION_V2: | ||
| 78 | - response = this.unifiedOrderV2(reqDTO); | ||
| 79 | - break; | ||
| 80 | - case WXPayClientConfig.API_VERSION_V3: | ||
| 81 | - WxPayUnifiedOrderV3Result.JsapiResult responseV3 = this.unifiedOrderV3(reqDTO); | ||
| 82 | - // ๅฐ V3 ็็ปๆ๏ผ็ปไธ่ฝฌๆขๆ V2ใ่ฟๅ็ๅญๆฎตๆฏไธ่ด็ | ||
| 83 | - response = new WxPayMpOrderResult(); | ||
| 84 | - BeanUtil.copyProperties(responseV3, response, true); | ||
| 85 | - break; | ||
| 86 | - default: | ||
| 87 | - throw new IllegalArgumentException(String.format("ๆช็ฅ็ API ็ๆฌ(%s)", config.getApiVersion())); | ||
| 88 | - } | ||
| 89 | - } catch (WxPayException e) { | ||
| 90 | - log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ๏ผๅๅ ({})]", toJsonString(reqDTO), e); | ||
| 91 | - return PayCommonResult.build(ObjectUtils.defaultIfNull(e.getErrCode(), e.getReturnCode(), "CustomErrorCode"), | ||
| 92 | - ObjectUtils.defaultIfNull(e.getErrCodeDes(), e.getCustomErrorMsg()),null, codeMapping); | ||
| 93 | - } | ||
| 94 | - return PayCommonResult.build(CODE_SUCCESS, MESSAGE_SUCCESS, response, codeMapping); | 72 | + public PayOrderUnifiedRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) { |
| 73 | + throw new UnsupportedOperationException(); | ||
| 74 | +// | ||
| 75 | +// WxPayMpOrderResult response; | ||
| 76 | +// try { | ||
| 77 | +// switch (config.getApiVersion()) { | ||
| 78 | +// case WXPayClientConfig.API_VERSION_V2: | ||
| 79 | +// response = this.unifiedOrderV2(reqDTO); | ||
| 80 | +// break; | ||
| 81 | +// case WXPayClientConfig.API_VERSION_V3: | ||
| 82 | +// WxPayUnifiedOrderV3Result.JsapiResult responseV3 = this.unifiedOrderV3(reqDTO); | ||
| 83 | +// // ๅฐ V3 ็็ปๆ๏ผ็ปไธ่ฝฌๆขๆ V2ใ่ฟๅ็ๅญๆฎตๆฏไธ่ด็ | ||
| 84 | +// response = new WxPayMpOrderResult(); | ||
| 85 | +// BeanUtil.copyProperties(responseV3, response, true); | ||
| 86 | +// break; | ||
| 87 | +// default: | ||
| 88 | +// throw new IllegalArgumentException(String.format("ๆช็ฅ็ API ็ๆฌ(%s)", config.getApiVersion())); | ||
| 89 | +// } | ||
| 90 | +// } catch (WxPayException e) { | ||
| 91 | +// log.error("[unifiedOrder][request({}) ๅ่ตทๆฏไปๅคฑ่ดฅ๏ผๅๅ ({})]", toJsonString(reqDTO), e); | ||
| 92 | +// return PayCommonResult.build(ObjectUtils.defaultIfNull(e.getErrCode(), e.getReturnCode(), "CustomErrorCode"), | ||
| 93 | +// ObjectUtils.defaultIfNull(e.getErrCodeDes(), e.getCustomErrorMsg()),null, codeMapping); | ||
| 94 | +// } | ||
| 95 | +// return PayCommonResult.build(CODE_SUCCESS, MESSAGE_SUCCESS, response, codeMapping); | ||
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | 98 | ||
| @@ -140,8 +141,8 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -140,8 +141,8 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 140 | * @return ๆฏไปๅ่ฐๅฏน่ฑก | 141 | * @return ๆฏไปๅ่ฐๅฏน่ฑก |
| 141 | * @throws WxPayException ๅพฎไฟกๅผๅธธ็ฑป | 142 | * @throws WxPayException ๅพฎไฟกๅผๅธธ็ฑป |
| 142 | */ | 143 | */ |
| 143 | - @Override | ||
| 144 | - public PayOrderNotifyRespDTO parseOrderNotify(PayNotifyDataDTO data) throws WxPayException { | 144 | +// @Override |
| 145 | + public PayOrderNotifyRespDTO parseOrderNotify(PayNotifyReqDTO data) throws WxPayException { | ||
| 145 | log.info("[parseOrderNotify][ๅพฎไฟกๆฏไปๅ่ฐdataๆฐๆฎ: {}]", data.getBody()); | 146 | log.info("[parseOrderNotify][ๅพฎไฟกๆฏไปๅ่ฐdataๆฐๆฎ: {}]", data.getBody()); |
| 146 | // ๅพฎไฟกๆฏไป v2 ๅ่ฐ็ปๆๅค็ | 147 | // ๅพฎไฟกๆฏไป v2 ๅ่ฐ็ปๆๅค็ |
| 147 | switch (config.getApiVersion()) { | 148 | switch (config.getApiVersion()) { |
| @@ -154,7 +155,7 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -154,7 +155,7 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 154 | } | 155 | } |
| 155 | } | 156 | } |
| 156 | 157 | ||
| 157 | - private PayOrderNotifyRespDTO parseOrderNotifyV3(PayNotifyDataDTO data) throws WxPayException { | 158 | + private PayOrderNotifyRespDTO parseOrderNotifyV3(PayNotifyReqDTO data) throws WxPayException { |
| 158 | WxPayOrderNotifyV3Result wxPayOrderNotifyV3Result = client.parseOrderNotifyV3Result(data.getBody(), null); | 159 | WxPayOrderNotifyV3Result wxPayOrderNotifyV3Result = client.parseOrderNotifyV3Result(data.getBody(), null); |
| 159 | WxPayOrderNotifyV3Result.DecryptNotifyResult result = wxPayOrderNotifyV3Result.getResult(); | 160 | WxPayOrderNotifyV3Result.DecryptNotifyResult result = wxPayOrderNotifyV3Result.getResult(); |
| 160 | // ่ฝฌๆข็ปๆ | 161 | // ่ฝฌๆข็ปๆ |
| @@ -165,11 +166,10 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -165,11 +166,10 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 165 | .orderExtensionNo(result.getOutTradeNo()) | 166 | .orderExtensionNo(result.getOutTradeNo()) |
| 166 | .channelOrderNo(result.getTradeState()) | 167 | .channelOrderNo(result.getTradeState()) |
| 167 | .successTime(LocalDateTimeUtil.parse(result.getSuccessTime(), "yyyy-MM-dd'T'HH:mm:ssXXX")) | 168 | .successTime(LocalDateTimeUtil.parse(result.getSuccessTime(), "yyyy-MM-dd'T'HH:mm:ssXXX")) |
| 168 | - .data(data.getBody()) | ||
| 169 | .build(); | 169 | .build(); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | - private PayOrderNotifyRespDTO parseOrderNotifyV2(PayNotifyDataDTO data) throws WxPayException { | 172 | + private PayOrderNotifyRespDTO parseOrderNotifyV2(PayNotifyReqDTO data) throws WxPayException { |
| 173 | WxPayOrderNotifyResult notifyResult = client.parseOrderNotifyResult(data.getBody()); | 173 | WxPayOrderNotifyResult notifyResult = client.parseOrderNotifyResult(data.getBody()); |
| 174 | Assert.isTrue(Objects.equals(notifyResult.getResultCode(), "SUCCESS"), "ๆฏไป็ปๆ้ SUCCESS"); | 174 | Assert.isTrue(Objects.equals(notifyResult.getResultCode(), "SUCCESS"), "ๆฏไป็ปๆ้ SUCCESS"); |
| 175 | // ่ฝฌๆข็ปๆ | 175 | // ่ฝฌๆข็ปๆ |
| @@ -179,19 +179,12 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | @@ -179,19 +179,12 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> { | ||
| 179 | .channelOrderNo(notifyResult.getTransactionId()) | 179 | .channelOrderNo(notifyResult.getTransactionId()) |
| 180 | .channelUserId(notifyResult.getOpenid()) | 180 | .channelUserId(notifyResult.getOpenid()) |
| 181 | .successTime(LocalDateTimeUtil.parse(notifyResult.getTimeEnd(), "yyyyMMddHHmmss")) | 181 | .successTime(LocalDateTimeUtil.parse(notifyResult.getTimeEnd(), "yyyyMMddHHmmss")) |
| 182 | - .data(data.getBody()) | ||
| 183 | .build(); | 182 | .build(); |
| 184 | 183 | ||
| 185 | } | 184 | } |
| 186 | 185 | ||
| 187 | @Override | 186 | @Override |
| 188 | - public PayRefundNotifyDTO parseRefundNotify(PayNotifyDataDTO notifyData) { | ||
| 189 | - // TODO ้่ฆๅฎ็ฐ | ||
| 190 | - throw new UnsupportedOperationException("้่ฆๅฎ็ฐ"); | ||
| 191 | - } | ||
| 192 | - | ||
| 193 | - @Override | ||
| 194 | - protected PayCommonResult<PayRefundUnifiedRespDTO> doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) throws Throwable { | 187 | + protected PayRefundUnifiedRespDTO doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) throws Throwable { |
| 195 | // TODO ้่ฆๅฎ็ฐ | 188 | // TODO ้่ฆๅฎ็ฐ |
| 196 | throw new UnsupportedOperationException(); | 189 | throw new UnsupportedOperationException(); |
| 197 | } | 190 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayChannelEnum.java
| @@ -25,7 +25,8 @@ public enum PayChannelEnum { | @@ -25,7 +25,8 @@ public enum PayChannelEnum { | ||
| 25 | ALIPAY_PC("alipay_pc", "ๆฏไปๅฎ PC ็ฝ็ซๆฏไป", AlipayPayClientConfig.class), | 25 | ALIPAY_PC("alipay_pc", "ๆฏไปๅฎ PC ็ฝ็ซๆฏไป", AlipayPayClientConfig.class), |
| 26 | ALIPAY_WAP("alipay_wap", "ๆฏไปๅฎ Wap ็ฝ็ซๆฏไป", AlipayPayClientConfig.class), | 26 | ALIPAY_WAP("alipay_wap", "ๆฏไปๅฎ Wap ็ฝ็ซๆฏไป", AlipayPayClientConfig.class), |
| 27 | ALIPAY_APP("alipay_app", "ๆฏไปๅฎApp ๆฏไป", AlipayPayClientConfig.class), | 27 | ALIPAY_APP("alipay_app", "ๆฏไปๅฎApp ๆฏไป", AlipayPayClientConfig.class), |
| 28 | - ALIPAY_QR("alipay_qr", "ๆฏไปๅฎๆซ็ ๆฏไป", AlipayPayClientConfig.class); | 28 | + ALIPAY_QR("alipay_qr", "ๆฏไปๅฎๆซ็ ๆฏไป", AlipayPayClientConfig.class), |
| 29 | + ALIPAY_BAR("alipay_bar", "ๆฏไปๅฎๆก็ ๆฏไป", AlipayPayClientConfig.class); | ||
| 29 | 30 | ||
| 30 | /** | 31 | /** |
| 31 | * ็ผ็ | 32 | * ็ผ็ |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayDisplayModeEnum.java
0 โ 100644
| 1 | +package cn.iocoder.yudao.framework.pay.core.enums; | ||
| 2 | + | ||
| 3 | +import lombok.AllArgsConstructor; | ||
| 4 | +import lombok.Getter; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * ๆฏไป UI ๅฑ็คบๆจกๅผ | ||
| 8 | + * | ||
| 9 | + * @author ่้ๆบ็ | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +@AllArgsConstructor | ||
| 13 | +public enum PayDisplayModeEnum { | ||
| 14 | + | ||
| 15 | + URL("url"), // Redirect ่ทณ่ฝฌ้พๆฅ็ๆนๅผ | ||
| 16 | + IFRAME("iframe"), // IFrame ๅ ๅต้พๆฅ็ๆนๅผ | ||
| 17 | + FORM("form"), // HTML ่กจๅๆไบค | ||
| 18 | + QR_CODE("qr_code"), // ไบ็ปด็ ็ๆๅญๅ ๅฎน | ||
| 19 | + QR_CODE_URL("qr_code_url"), // ไบ็ปด็ ็ๅพ็้พๆฅ | ||
| 20 | + BAR_CODE("bar_code"), // ๆกๅฝข็ | ||
| 21 | + APP("app"), // ๅบ็จ | ||
| 22 | + ; | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * ๅฑ็คบๆจกๅผ | ||
| 26 | + */ | ||
| 27 | + private final String mode; | ||
| 28 | + | ||
| 29 | +} |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayFrameworkErrorCodeConstants.java
| @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; | @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; | ||
| 5 | /** | 5 | /** |
| 6 | * ๆฏไปๆกๆถ็้่ฏฏ็ ๆไธพ | 6 | * ๆฏไปๆกๆถ็้่ฏฏ็ ๆไธพ |
| 7 | * | 7 | * |
| 8 | - * ็ญไฟกๆกๆถ๏ผไฝฟ็จ 2-002-000-000 ๆฎต | 8 | + * ๆฏไปๆกๆถ๏ผไฝฟ็จ 2-002-000-000 ๆฎต |
| 9 | * | 9 | * |
| 10 | * @author ่้ๆบ็ | 10 | * @author ่้ๆบ็ |
| 11 | */ | 11 | */ |
| @@ -14,14 +14,16 @@ public interface PayFrameworkErrorCodeConstants { | @@ -14,14 +14,16 @@ public interface PayFrameworkErrorCodeConstants { | ||
| 14 | ErrorCode PAY_UNKNOWN = new ErrorCode(2002000000, "ๆช็ฅ้่ฏฏ๏ผ้่ฆ่งฃๆ"); | 14 | ErrorCode PAY_UNKNOWN = new ErrorCode(2002000000, "ๆช็ฅ้่ฏฏ๏ผ้่ฆ่งฃๆ"); |
| 15 | 15 | ||
| 16 | // ========== ้ ็ฝฎ็ธๅ ณ็ธๅ ณ 2002000100 ========== | 16 | // ========== ้ ็ฝฎ็ธๅ ณ็ธๅ ณ 2002000100 ========== |
| 17 | + // todo ่่ฟ๏ผๅฆไธ็้่ฏฏ็ ๏ผๆไนๅค็ๆ | ||
| 17 | ErrorCode PAY_CONFIG_APP_ID_ERROR = new ErrorCode(2002000100, "ๆฏไปๆธ ้ AppId ไธๆญฃ็กฎ"); | 18 | ErrorCode PAY_CONFIG_APP_ID_ERROR = new ErrorCode(2002000100, "ๆฏไปๆธ ้ AppId ไธๆญฃ็กฎ"); |
| 18 | ErrorCode PAY_CONFIG_SIGN_ERROR = new ErrorCode(2002000100, "็ญพๅ้่ฏฏ"); // ไพๅฆ่ฏด๏ผๅพฎไฟกๆฏไป๏ผ้ ็ฝฎ้ไบ mchId ๆ่ mchKey | 19 | ErrorCode PAY_CONFIG_SIGN_ERROR = new ErrorCode(2002000100, "็ญพๅ้่ฏฏ"); // ไพๅฆ่ฏด๏ผๅพฎไฟกๆฏไป๏ผ้ ็ฝฎ้ไบ mchId ๆ่ mchKey |
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | // ========== ๅ ถๅฎ็ธๅ ณ 2002000900 ๅผๅคด ========== | 22 | // ========== ๅ ถๅฎ็ธๅ ณ 2002000900 ๅผๅคด ========== |
| 23 | + // todo ่่ฟ๏ผๅฆไธ็้่ฏฏ็ ๏ผๆไนๅค็ๆ | ||
| 22 | ErrorCode PAY_OPENID_ERROR = new ErrorCode(2002000900, "ๆ ๆ็ openid"); // ไพๅฆ่ฏด๏ผๅพฎไฟก openid ๆชๆๆ่ฟ | 24 | ErrorCode PAY_OPENID_ERROR = new ErrorCode(2002000900, "ๆ ๆ็ openid"); // ไพๅฆ่ฏด๏ผๅพฎไฟก openid ๆชๆๆ่ฟ |
| 23 | ErrorCode PAY_PARAM_MISSING = new ErrorCode(2002000901, "่ฏทๆฑๅๆฐ็ผบๅคฑ"); // ไพๅฆ่ฏด๏ผๆฏไปๅฐไผ ไบ้้ข | 25 | ErrorCode PAY_PARAM_MISSING = new ErrorCode(2002000901, "่ฏทๆฑๅๆฐ็ผบๅคฑ"); // ไพๅฆ่ฏด๏ผๆฏไปๅฐไผ ไบ้้ข |
| 24 | 26 | ||
| 25 | - ErrorCode EXCEPTION = new ErrorCode(2002000999, "่ฐ็จๅผๅธธ"); | 27 | + ErrorCode PAY_EXCEPTION = new ErrorCode(2002000999, "่ฐ็จๅผๅธธ"); |
| 26 | 28 | ||
| 27 | } | 29 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayNotifyRefundStatusEnum.java
| @@ -6,6 +6,7 @@ package cn.iocoder.yudao.framework.pay.core.enums; | @@ -6,6 +6,7 @@ package cn.iocoder.yudao.framework.pay.core.enums; | ||
| 6 | * @author jason | 6 | * @author jason |
| 7 | */ | 7 | */ |
| 8 | public enum PayNotifyRefundStatusEnum { | 8 | public enum PayNotifyRefundStatusEnum { |
| 9 | + | ||
| 9 | /** | 10 | /** |
| 10 | * ๆฏไปๅฎ ไธญ ๅ จ้ข้ๆฌพ trade_status=TRADE_CLOSED๏ผ ้จๅ้ๆฌพ trade_status=TRADE_SUCCESS | 11 | * ๆฏไปๅฎ ไธญ ๅ จ้ข้ๆฌพ trade_status=TRADE_CLOSED๏ผ ้จๅ้ๆฌพ trade_status=TRADE_SUCCESS |
| 11 | * ้ๆฌพๆๅ | 12 | * ้ๆฌพๆๅ |
| @@ -17,4 +18,5 @@ public enum PayNotifyRefundStatusEnum { | @@ -17,4 +18,5 @@ public enum PayNotifyRefundStatusEnum { | ||
| 17 | * ้ๆฌพๅผๅธธ | 18 | * ้ๆฌพๅผๅธธ |
| 18 | */ | 19 | */ |
| 19 | ABNORMAL; | 20 | ABNORMAL; |
| 21 | + | ||
| 20 | } | 22 | } |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/test/java/cn.iocoder.yudao.framework.pay.core.client.impl/PayClientFactoryImplIntegrationTest.java
| @@ -5,7 +5,7 @@ import cn.hutool.core.util.RandomUtil; | @@ -5,7 +5,7 @@ import cn.hutool.core.util.RandomUtil; | ||
| 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | 6 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 7 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; | 7 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; |
| 8 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | 8 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; |
| 9 | import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientConfig; | 9 | import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientConfig; |
| 10 | import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayQrPayClient; | 10 | import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayQrPayClient; |
| 11 | import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayWapPayClient; | 11 | import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayWapPayClient; |
| @@ -46,8 +46,8 @@ public class PayClientFactoryImplIntegrationTest { | @@ -46,8 +46,8 @@ public class PayClientFactoryImplIntegrationTest { | ||
| 46 | PayClient client = payClientFactory.getPayClient(channelId); | 46 | PayClient client = payClientFactory.getPayClient(channelId); |
| 47 | // ๅ่ตทๆฏไป | 47 | // ๅ่ตทๆฏไป |
| 48 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); | 48 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); |
| 49 | - CommonResult<?> result = client.unifiedOrder(reqDTO); | ||
| 50 | - System.out.println(result); | 49 | +// CommonResult<?> result = client.unifiedOrder(reqDTO); |
| 50 | +// System.out.println(result); | ||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | /** | 53 | /** |
| @@ -69,8 +69,8 @@ public class PayClientFactoryImplIntegrationTest { | @@ -69,8 +69,8 @@ public class PayClientFactoryImplIntegrationTest { | ||
| 69 | PayClient client = payClientFactory.getPayClient(channelId); | 69 | PayClient client = payClientFactory.getPayClient(channelId); |
| 70 | // ๅ่ตทๆฏไป | 70 | // ๅ่ตทๆฏไป |
| 71 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); | 71 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); |
| 72 | - CommonResult<?> result = client.unifiedOrder(reqDTO); | ||
| 73 | - System.out.println(result); | 72 | +// CommonResult<?> result = client.unifiedOrder(reqDTO); |
| 73 | +// System.out.println(result); | ||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | /** | 76 | /** |
| @@ -93,9 +93,9 @@ public class PayClientFactoryImplIntegrationTest { | @@ -93,9 +93,9 @@ public class PayClientFactoryImplIntegrationTest { | ||
| 93 | // ๅ่ตทๆฏไป | 93 | // ๅ่ตทๆฏไป |
| 94 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); | 94 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); |
| 95 | reqDTO.setNotifyUrl("http://yunai.natapp1.cc/admin-api/pay/notify/callback/18"); // TODO @tina: ่ฟ้ๆนๆไฝ ็ natapp ๅ่ฐๅฐๅ | 95 | reqDTO.setNotifyUrl("http://yunai.natapp1.cc/admin-api/pay/notify/callback/18"); // TODO @tina: ่ฟ้ๆนๆไฝ ็ natapp ๅ่ฐๅฐๅ |
| 96 | - CommonResult<AlipayTradePrecreateResponse> result = (CommonResult<AlipayTradePrecreateResponse>) client.unifiedOrder(reqDTO); | ||
| 97 | - System.out.println(JsonUtils.toJsonString(result)); | ||
| 98 | - System.out.println(result.getData().getQrCode()); | 96 | +// CommonResult<AlipayTradePrecreateResponse> result = (CommonResult<AlipayTradePrecreateResponse>) client.unifiedOrder(reqDTO); |
| 97 | +// System.out.println(JsonUtils.toJsonString(result)); | ||
| 98 | +// System.out.println(result.getData().getQrCode()); | ||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | /** | 101 | /** |
| @@ -116,8 +116,8 @@ public class PayClientFactoryImplIntegrationTest { | @@ -116,8 +116,8 @@ public class PayClientFactoryImplIntegrationTest { | ||
| 116 | PayClient client = payClientFactory.getPayClient(channelId); | 116 | PayClient client = payClientFactory.getPayClient(channelId); |
| 117 | // ๅ่ตทๆฏไป | 117 | // ๅ่ตทๆฏไป |
| 118 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); | 118 | PayOrderUnifiedReqDTO reqDTO = buildPayOrderUnifiedReqDTO(); |
| 119 | - CommonResult<?> result = client.unifiedOrder(reqDTO); | ||
| 120 | - System.out.println(JsonUtils.toJsonString(result)); | 119 | +// CommonResult<?> result = client.unifiedOrder(reqDTO); |
| 120 | +// System.out.println(JsonUtils.toJsonString(result)); | ||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | private static PayOrderUnifiedReqDTO buildPayOrderUnifiedReqDTO() { | 123 | private static PayOrderUnifiedReqDTO buildPayOrderUnifiedReqDTO() { |
yudao-framework/yudao-spring-boot-starter-biz-pay/src/test/java/cn.iocoder.yudao.framework.pay.core.client.impl/alipay/AlipayQrPayClientTest.java
| 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; | 1 | package cn.iocoder.yudao.framework.pay.core.client.impl.alipay; |
| 2 | import cn.hutool.core.util.ReflectUtil; | 2 | import cn.hutool.core.util.ReflectUtil; |
| 3 | import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | 3 | import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; |
| 4 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 5 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | 4 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; |
| 5 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 6 | import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; | 6 | import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest; |
| 7 | import com.alipay.api.AlipayApiException; | 7 | import com.alipay.api.AlipayApiException; |
| 8 | import com.alipay.api.DefaultAlipayClient; | 8 | import com.alipay.api.DefaultAlipayClient; |
| @@ -87,13 +87,13 @@ public class AlipayQrPayClientTest extends BaseMockitoUnitTest { | @@ -87,13 +87,13 @@ public class AlipayQrPayClientTest extends BaseMockitoUnitTest { | ||
| 87 | }))).thenReturn(response); | 87 | }))).thenReturn(response); |
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | - PayCommonResult<AlipayTradePrecreateResponse> result = client.doUnifiedOrder(reqDTO); | ||
| 91 | - // ๆญ่จ | ||
| 92 | - assertEquals(response.getCode(), result.getApiCode()); | ||
| 93 | - assertEquals(response.getMsg(), result.getApiMsg()); | ||
| 94 | - // TODO @tina๏ผ่ฟไธชๆญ่จๆจๆ่ฟ๏ผ | ||
| 95 | - assertEquals(GlobalErrorCodeConstants.SUCCESS.getCode(), result.getCode()); | ||
| 96 | - assertEquals(GlobalErrorCodeConstants.SUCCESS.getMsg(), result.getMsg()); | 90 | +// PayCommonResult<PayOrderUnifiedRespDTO> result = client.doUnifiedOrder(reqDTO); |
| 91 | +// // ๆญ่จ | ||
| 92 | +// assertEquals(response.getCode(), result.getApiCode()); | ||
| 93 | +// assertEquals(response.getMsg(), result.getApiMsg()); | ||
| 94 | +// // TODO @tina๏ผ่ฟไธชๆญ่จๆจๆ่ฟ๏ผ | ||
| 95 | +// assertEquals(GlobalErrorCodeConstants.SUCCESS.getCode(), result.getCode()); | ||
| 96 | +// assertEquals(GlobalErrorCodeConstants.SUCCESS.getMsg(), result.getMsg()); | ||
| 97 | 97 | ||
| 98 | } | 98 | } |
| 99 | } | 99 | } |
yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java
| @@ -56,7 +56,7 @@ public class YudaoMQAutoConfiguration { | @@ -56,7 +56,7 @@ public class YudaoMQAutoConfiguration { | ||
| 56 | /** | 56 | /** |
| 57 | * ๅๅปบ Redis Pub/Sub ๅนฟๆญๆถ่ดน็ๅฎนๅจ | 57 | * ๅๅปบ Redis Pub/Sub ๅนฟๆญๆถ่ดน็ๅฎนๅจ |
| 58 | */ | 58 | */ |
| 59 | - @Bean | 59 | + @Bean(initMethod = "start", destroyMethod = "stop") |
| 60 | public RedisMessageListenerContainer redisMessageListenerContainer( | 60 | public RedisMessageListenerContainer redisMessageListenerContainer( |
| 61 | RedisMQTemplate redisMQTemplate, List<AbstractChannelMessageListener<?>> listeners) { | 61 | RedisMQTemplate redisMQTemplate, List<AbstractChannelMessageListener<?>> listeners) { |
| 62 | // ๅๅปบ RedisMessageListenerContainer ๅฏน่ฑก | 62 | // ๅๅปบ RedisMessageListenerContainer ๅฏน่ฑก |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java
| @@ -52,8 +52,7 @@ public class YudaoSwaggerAutoConfiguration { | @@ -52,8 +52,7 @@ public class YudaoSwaggerAutoConfiguration { | ||
| 52 | // ๆฅๅฃไฟกๆฏ | 52 | // ๆฅๅฃไฟกๆฏ |
| 53 | .info(buildInfo(properties)) | 53 | .info(buildInfo(properties)) |
| 54 | // ๆฅๅฃๅฎๅ จ้ ็ฝฎ | 54 | // ๆฅๅฃๅฎๅ จ้ ็ฝฎ |
| 55 | - .components(new Components().securitySchemes(securitySchemas)) | ||
| 56 | - .addSecurityItem(new SecurityRequirement().addList(HttpHeaders.AUTHORIZATION)); | 55 | + .components(new Components().securitySchemes(securitySchemas)); |
| 57 | securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key))); | 56 | securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key))); |
| 58 | return openAPI; | 57 | return openAPI; |
| 59 | } | 58 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java
| @@ -158,7 +158,7 @@ public class CodegenServiceImpl implements CodegenService { | @@ -158,7 +158,7 @@ public class CodegenServiceImpl implements CodegenService { | ||
| 158 | 158 | ||
| 159 | //่ฎก็ฎ้่ฆไฟฎๆน็ๅญๆฎต๏ผๆๅ ฅๆถ้ๆฐๆๅ ฅ๏ผๅ ้คๆถๅฐๅๆฅ็ๅ ้ค | 159 | //่ฎก็ฎ้่ฆไฟฎๆน็ๅญๆฎต๏ผๆๅ ฅๆถ้ๆฐๆๅ ฅ๏ผๅ ้คๆถๅฐๅๆฅ็ๅ ้ค |
| 160 | BiPredicate<TableField, CodegenColumnDO> pr = | 160 | BiPredicate<TableField, CodegenColumnDO> pr = |
| 161 | - (tableField, codegenColumn) -> tableField.getType().equals(codegenColumn.getDataType()) | 161 | + (tableField, codegenColumn) -> tableField.getMetaInfo().getJdbcType().name().equals(codegenColumn.getDataType()) |
| 162 | && tableField.getMetaInfo().isNullable() == codegenColumn.getNullable() | 162 | && tableField.getMetaInfo().isNullable() == codegenColumn.getNullable() |
| 163 | && tableField.isKeyFlag() == codegenColumn.getPrimaryKey() | 163 | && tableField.isKeyFlag() == codegenColumn.getPrimaryKey() |
| 164 | && tableField.getComment().equals(codegenColumn.getColumnComment()); | 164 | && tableField.getComment().equals(codegenColumn.getColumnComment()); |
yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/seckillactivity/SeckillActivityServiceImplTest.java
| @@ -29,6 +29,7 @@ import static org.junit.jupiter.api.Assertions.*; | @@ -29,6 +29,7 @@ import static org.junit.jupiter.api.Assertions.*; | ||
| 29 | * @author ่้ๆบ็ | 29 | * @author ่้ๆบ็ |
| 30 | */ | 30 | */ |
| 31 | @Import(SeckillActivityServiceImpl.class) | 31 | @Import(SeckillActivityServiceImpl.class) |
| 32 | +@Disabled // TODO ่่ฟ๏ผๆชๆฅๅผๅฏ | ||
| 32 | public class SeckillActivityServiceImplTest extends BaseDbUnitTest { | 33 | public class SeckillActivityServiceImplTest extends BaseDbUnitTest { |
| 33 | 34 | ||
| 34 | @Resource | 35 | @Resource |
yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/seckilltime/SeckillTimeServiceImplTest.java
| @@ -29,6 +29,7 @@ import static org.junit.jupiter.api.Assertions.*; | @@ -29,6 +29,7 @@ import static org.junit.jupiter.api.Assertions.*; | ||
| 29 | * @author ่้ๆบ็ | 29 | * @author ่้ๆบ็ |
| 30 | */ | 30 | */ |
| 31 | @Import(SeckillTimeServiceImpl.class) | 31 | @Import(SeckillTimeServiceImpl.class) |
| 32 | +@Disabled // TODO ่่ฟ๏ผๆชๆฅๅผๅฏ | ||
| 32 | public class SeckillTimeServiceImplTest extends BaseDbUnitTest { | 33 | public class SeckillTimeServiceImplTest extends BaseDbUnitTest { |
| 33 | 34 | ||
| 34 | @Resource | 35 | @Resource |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/aftersale/TradeAfterSaleConvert.java
| @@ -37,7 +37,6 @@ public interface TradeAfterSaleConvert { | @@ -37,7 +37,6 @@ public interface TradeAfterSaleConvert { | ||
| 37 | TradeAfterSaleDO convert(AppTradeAfterSaleCreateReqVO createReqVO, TradeOrderItemDO tradeOrderItem); | 37 | TradeAfterSaleDO convert(AppTradeAfterSaleCreateReqVO createReqVO, TradeOrderItemDO tradeOrderItem); |
| 38 | 38 | ||
| 39 | @Mappings({ | 39 | @Mappings({ |
| 40 | - @Mapping(source = "afterSale.orderId", target = "merchantOrderId"), | ||
| 41 | @Mapping(source = "afterSale.applyReason", target = "reason"), | 40 | @Mapping(source = "afterSale.applyReason", target = "reason"), |
| 42 | @Mapping(source = "afterSale.refundPrice", target = "amount") | 41 | @Mapping(source = "afterSale.refundPrice", target = "amount") |
| 43 | }) | 42 | }) |
yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceTest.java
| @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.enums.TerminalEnum; | @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.enums.TerminalEnum; | ||
| 5 | import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; | 5 | import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; |
| 6 | import cn.iocoder.yudao.module.member.api.address.AddressApi; | 6 | import cn.iocoder.yudao.module.member.api.address.AddressApi; |
| 7 | import cn.iocoder.yudao.module.member.api.address.dto.AddressRespDTO; | 7 | import cn.iocoder.yudao.module.member.api.address.dto.AddressRespDTO; |
| 8 | +import cn.iocoder.yudao.module.member.api.user.MemberUserApi; | ||
| 8 | import cn.iocoder.yudao.module.pay.api.order.PayOrderApi; | 9 | import cn.iocoder.yudao.module.pay.api.order.PayOrderApi; |
| 9 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO; | 10 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO; |
| 10 | import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; | 11 | import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; |
| @@ -64,6 +65,8 @@ public class TradeOrderServiceTest extends BaseDbUnitTest { | @@ -64,6 +65,8 @@ public class TradeOrderServiceTest extends BaseDbUnitTest { | ||
| 64 | private TradeOrderItemMapper tradeOrderItemMapper; | 65 | private TradeOrderItemMapper tradeOrderItemMapper; |
| 65 | 66 | ||
| 66 | @MockBean | 67 | @MockBean |
| 68 | + private MemberUserApi memberUserApi; | ||
| 69 | + @MockBean | ||
| 67 | private ProductSpuApi productSpuApi; | 70 | private ProductSpuApi productSpuApi; |
| 68 | @MockBean | 71 | @MockBean |
| 69 | private ProductSkuApi productSkuApi; | 72 | private ProductSkuApi productSkuApi; |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java
| @@ -86,7 +86,7 @@ public class AppAuthController { | @@ -86,7 +86,7 @@ public class AppAuthController { | ||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | @PostMapping("/update-password") | 88 | @PostMapping("/update-password") |
| 89 | - @Operation(summary = "ไฟฎๆน็จๆทๅฏ็ ",description = "็จๆทไฟฎๆนๅฏ็ ๆถไฝฟ็จ") | 89 | + @Operation(summary = "ไฟฎๆน็จๆทๅฏ็ ", description = "็จๆทไฟฎๆนๅฏ็ ๆถไฝฟ็จ") |
| 90 | @PreAuthenticated | 90 | @PreAuthenticated |
| 91 | public CommonResult<Boolean> updatePassword(@RequestBody @Valid AppAuthUpdatePasswordReqVO reqVO) { | 91 | public CommonResult<Boolean> updatePassword(@RequestBody @Valid AppAuthUpdatePasswordReqVO reqVO) { |
| 92 | authService.updatePassword(getLoginUserId(), reqVO); | 92 | authService.updatePassword(getLoginUserId(), reqVO); |
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/notify/dto/PayRefundNotifyReqDTO.java
| 1 | package cn.iocoder.yudao.module.pay.api.notify.dto; | 1 | package cn.iocoder.yudao.module.pay.api.notify.dto; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; | ||
| 3 | import lombok.AllArgsConstructor; | 4 | import lombok.AllArgsConstructor; |
| 4 | import lombok.Builder; | 5 | import lombok.Builder; |
| 5 | import lombok.Data; | 6 | import lombok.Data; |
| @@ -31,12 +32,4 @@ public class PayRefundNotifyReqDTO { | @@ -31,12 +32,4 @@ public class PayRefundNotifyReqDTO { | ||
| 31 | @NotNull(message = "ๆฏไป้ๆฌพ็ผๅทไธ่ฝไธบ็ฉบ") | 32 | @NotNull(message = "ๆฏไป้ๆฌพ็ผๅทไธ่ฝไธบ็ฉบ") |
| 32 | private Long payRefundId; | 33 | private Long payRefundId; |
| 33 | 34 | ||
| 34 | - /** | ||
| 35 | - * ้ๆฌพ็ถๆ | ||
| 36 | - * | ||
| 37 | - * (ๆๅ๏ผๅคฑ่ดฅ) TODO ่่ฟ๏ผๆไธพ | ||
| 38 | - */ | ||
| 39 | - @NotNull(message = "้ๆฌพ็ถๆไธ่ฝไธบ็ฉบ") | ||
| 40 | - private Integer status; | ||
| 41 | - | ||
| 42 | } | 35 | } |
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/refund/dto/PayRefundCreateReqDTO.java
| @@ -29,12 +29,6 @@ public class PayRefundCreateReqDTO { | @@ -29,12 +29,6 @@ public class PayRefundCreateReqDTO { | ||
| 29 | // ========== ๅๆท็ธๅ ณๅญๆฎต ========== | 29 | // ========== ๅๆท็ธๅ ณๅญๆฎต ========== |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| 32 | - * ๅๆท่ฎขๅ็ผๅท | ||
| 33 | - */ | ||
| 34 | - @NotEmpty(message = "ๅๆท่ฎขๅ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 35 | - private String merchantOrderId; | ||
| 36 | - | ||
| 37 | - /** | ||
| 38 | * ้ๆฌพๆ่ฟฐ | 32 | * ้ๆฌพๆ่ฟฐ |
| 39 | */ | 33 | */ |
| 40 | @NotEmpty(message = "้ๆฌพๆ่ฟฐไธ่ฝไธบ็ฉบ") | 34 | @NotEmpty(message = "้ๆฌพๆ่ฟฐไธ่ฝไธบ็ฉบ") |
| @@ -44,6 +38,12 @@ public class PayRefundCreateReqDTO { | @@ -44,6 +38,12 @@ public class PayRefundCreateReqDTO { | ||
| 44 | // ========== ่ฎขๅ็ธๅ ณๅญๆฎต ========== | 38 | // ========== ่ฎขๅ็ธๅ ณๅญๆฎต ========== |
| 45 | 39 | ||
| 46 | /** | 40 | /** |
| 41 | + * ๆฏไปๅๅท | ||
| 42 | + */ | ||
| 43 | + @NotNull(message = "ๆฏไปๅๅทไธ่ฝไธบ็ฉบ") | ||
| 44 | + private Long payOrderId; | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | * ้ๆฌพ้้ข๏ผๅไฝ๏ผๅ | 47 | * ้ๆฌพ้้ข๏ผๅไฝ๏ผๅ |
| 48 | */ | 48 | */ |
| 49 | @NotNull(message = "้ๆฌพ้้ขไธ่ฝไธบ็ฉบ") | 49 | @NotNull(message = "้ๆฌพ้้ขไธ่ฝไธบ็ฉบ") |
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/refund/dto/PayRefundRespDTO.java
| @@ -27,8 +27,16 @@ public class PayRefundRespDTO { | @@ -27,8 +27,16 @@ public class PayRefundRespDTO { | ||
| 27 | * ๆไธพ {@link PayRefundStatusEnum} | 27 | * ๆไธพ {@link PayRefundStatusEnum} |
| 28 | */ | 28 | */ |
| 29 | private Integer status; | 29 | private Integer status; |
| 30 | + /** | ||
| 31 | + * ้ๆฌพ้้ข๏ผๅไฝ๏ผๅ | ||
| 32 | + */ | ||
| 33 | + private Integer refundAmount; | ||
| 30 | 34 | ||
| 31 | - // ========== ๆธ ้็ธๅ ณๅญๆฎต ========== | 35 | + // ========== ๅๆท็ธๅ ณๅญๆฎต ========== |
| 36 | + /** | ||
| 37 | + * ๅๆท่ฎขๅ็ผๅท | ||
| 38 | + */ | ||
| 39 | + private String merchantOrderId; | ||
| 32 | /** | 40 | /** |
| 33 | * ้ๆฌพๆๅๆถ้ด | 41 | * ้ๆฌพๆๅๆถ้ด |
| 34 | */ | 42 | */ |
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java
| 1 | package cn.iocoder.yudao.module.pay.enums; | 1 | package cn.iocoder.yudao.module.pay.enums; |
| 2 | 2 | ||
| 3 | +import cn.hutool.core.util.ObjectUtil; | ||
| 3 | import cn.iocoder.yudao.framework.common.exception.ErrorCode; | 4 | import cn.iocoder.yudao.framework.common.exception.ErrorCode; |
| 4 | 5 | ||
| 5 | /** | 6 | /** |
| @@ -50,11 +51,23 @@ public interface ErrorCodeConstants { | @@ -50,11 +51,23 @@ public interface ErrorCodeConstants { | ||
| 50 | ErrorCode PAY_REFUND_SUCCEED = new ErrorCode(1007006003, "ๅทฒ็ป้ๆฌพๆๅ"); | 51 | ErrorCode PAY_REFUND_SUCCEED = new ErrorCode(1007006003, "ๅทฒ็ป้ๆฌพๆๅ"); |
| 51 | ErrorCode PAY_REFUND_NOT_FOUND = new ErrorCode(1007006004, "ๆฏไป้ๆฌพๅไธๅญๅจ"); | 52 | ErrorCode PAY_REFUND_NOT_FOUND = new ErrorCode(1007006004, "ๆฏไป้ๆฌพๅไธๅญๅจ"); |
| 52 | 53 | ||
| 53 | - | ||
| 54 | /** | 54 | /** |
| 55 | * ========== ๆฏไปๅๆทไฟกๆฏ 1-007-004-000 ========== | 55 | * ========== ๆฏไปๅๆทไฟกๆฏ 1-007-004-000 ========== |
| 56 | */ | 56 | */ |
| 57 | ErrorCode PAY_MERCHANT_NOT_EXISTS = new ErrorCode(1007004000, "ๆฏไปๅๆทไฟกๆฏไธๅญๅจ"); | 57 | ErrorCode PAY_MERCHANT_NOT_EXISTS = new ErrorCode(1007004000, "ๆฏไปๅๆทไฟกๆฏไธๅญๅจ"); |
| 58 | ErrorCode PAY_MERCHANT_EXIST_APP_CANT_DELETE = new ErrorCode(1007004001, "ๆฏไปๅๆทๅญๅจๆฏไปๅบ็จ,ๆ ๆณๅ ้ค"); | 58 | ErrorCode PAY_MERCHANT_EXIST_APP_CANT_DELETE = new ErrorCode(1007004001, "ๆฏไปๅๆทๅญๅจๆฏไปๅบ็จ,ๆ ๆณๅ ้ค"); |
| 59 | 59 | ||
| 60 | + // ========== ็คบไพ่ฎขๅ 1-007-900-000 ========== | ||
| 61 | + ErrorCode PAY_DEMO_ORDER_NOT_FOUND = new ErrorCode(100790000, "็คบไพ่ฎขๅไธๅญๅจ"); | ||
| 62 | + ErrorCode PAY_DEMO_ORDER_UPDATE_PAID_STATUS_NOT_UNPAID = new ErrorCode(100790001, "็คบไพ่ฎขๅๆดๆฐๆฏไป็ถๆๅคฑ่ดฅ๏ผ่ฎขๅไธๆฏใๆชๆฏไปใ็ถๆ"); | ||
| 63 | + ErrorCode PAY_DEMO_ORDER_UPDATE_PAID_FAIL_PAY_ORDER_ID_ERROR = new ErrorCode(100790002, "็คบไพ่ฎขๅๆดๆฐๆฏไป็ถๆๅคฑ่ดฅ๏ผๆฏไปๅ็ผๅทไธๅน้ "); | ||
| 64 | + ErrorCode PAY_DEMO_ORDER_UPDATE_PAID_FAIL_PAY_ORDER_STATUS_NOT_SUCCESS = new ErrorCode(100790003, "็คบไพ่ฎขๅๆดๆฐๆฏไป็ถๆๅคฑ่ดฅ๏ผๆฏไปๅ็ถๆไธๆฏใๆฏไปๆๅใ็ถๆ"); | ||
| 65 | + ErrorCode PAY_DEMO_ORDER_UPDATE_PAID_FAIL_PAY_PRICE_NOT_MATCH = new ErrorCode(100790004, "็คบไพ่ฎขๅๆดๆฐๆฏไป็ถๆๅคฑ่ดฅ๏ผๆฏไปๅ้้ขไธๅน้ "); | ||
| 66 | + ErrorCode PAY_DEMO_ORDER_REFUND_FAIL_NOT_PAID = new ErrorCode(100790005, "ๅ่ตท้ๆฌพๅคฑ่ดฅ๏ผ็คบไพ่ฎขๅๆชๆฏไป"); | ||
| 67 | + ErrorCode PAY_DEMO_ORDER_REFUND_FAIL_REFUNDED = new ErrorCode(100790006, "ๅ่ตท้ๆฌพๅคฑ่ดฅ๏ผ็คบไพ่ฎขๅๅทฒ้ๆฌพ"); | ||
| 68 | + ErrorCode PAY_DEMO_ORDER_REFUND_FAIL_REFUND_NOT_FOUND = new ErrorCode(100790007, "ๅ่ตท้ๆฌพๅคฑ่ดฅ๏ผ้ๆฌพ่ฎขๅไธๅญๅจ"); | ||
| 69 | + ErrorCode PAY_DEMO_ORDER_REFUND_FAIL_REFUND_NOT_SUCCESS = new ErrorCode(100790008, "ๅ่ตท้ๆฌพๅคฑ่ดฅ๏ผ้ๆฌพ่ฎขๅๆช้ๆฌพๆๅ"); | ||
| 70 | + ErrorCode PAY_DEMO_ORDER_REFUND_FAIL_REFUND_ORDER_ID_ERROR = new ErrorCode(100790008, "ๅ่ตท้ๆฌพๅคฑ่ดฅ๏ผ้ๆฌพๅ็ผๅทไธๅน้ "); | ||
| 71 | + ErrorCode PAY_DEMO_ORDER_REFUND_FAIL_REFUND_PRICE_NOT_MATCH = new ErrorCode(100790004, "ๅ่ตท้ๆฌพๅคฑ่ดฅ๏ผ้ๆฌพๅ้้ขไธๅน้ "); | ||
| 72 | + | ||
| 60 | } | 73 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/refund/PayRefundApiImpl.java
| @@ -2,9 +2,12 @@ package cn.iocoder.yudao.module.pay.api.refund; | @@ -2,9 +2,12 @@ package cn.iocoder.yudao.module.pay.api.refund; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; | 3 | import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; |
| 4 | import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundRespDTO; | 4 | import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundRespDTO; |
| 5 | +import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; | ||
| 5 | import org.springframework.stereotype.Service; | 6 | import org.springframework.stereotype.Service; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
| 7 | 8 | ||
| 9 | +import javax.annotation.Resource; | ||
| 10 | + | ||
| 8 | /** | 11 | /** |
| 9 | * ้ๆฌพๅ API ๅฎ็ฐ็ฑป | 12 | * ้ๆฌพๅ API ๅฎ็ฐ็ฑป |
| 10 | * | 13 | * |
| @@ -14,10 +17,12 @@ import org.springframework.validation.annotation.Validated; | @@ -14,10 +17,12 @@ import org.springframework.validation.annotation.Validated; | ||
| 14 | @Validated | 17 | @Validated |
| 15 | public class PayRefundApiImpl implements PayRefundApi { | 18 | public class PayRefundApiImpl implements PayRefundApi { |
| 16 | 19 | ||
| 20 | + @Resource | ||
| 21 | + private PayRefundService payRefundService; | ||
| 22 | + | ||
| 17 | @Override | 23 | @Override |
| 18 | public Long createPayRefund(PayRefundCreateReqDTO reqDTO) { | 24 | public Long createPayRefund(PayRefundCreateReqDTO reqDTO) { |
| 19 | - // TODO ่่ฟ๏ผๆๆชๅฎ็ฐ | ||
| 20 | - return null; | 25 | + return payRefundService.createPayRefund(reqDTO); |
| 21 | } | 26 | } |
| 22 | 27 | ||
| 23 | @Override | 28 | @Override |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java
| @@ -3,20 +3,26 @@ package cn.iocoder.yudao.module.pay.controller.admin.demo; | @@ -3,20 +3,26 @@ package cn.iocoder.yudao.module.pay.controller.admin.demo; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 4 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | ||
| 7 | +import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; | ||
| 8 | +import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; | ||
| 6 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.PayDemoOrderCreateReqVO; | 9 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.PayDemoOrderCreateReqVO; |
| 7 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.PayDemoOrderRespVO; | 10 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.PayDemoOrderRespVO; |
| 8 | import cn.iocoder.yudao.module.pay.convert.demo.PayDemoOrderConvert; | 11 | import cn.iocoder.yudao.module.pay.convert.demo.PayDemoOrderConvert; |
| 9 | import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO; | 12 | import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO; |
| 10 | import cn.iocoder.yudao.module.pay.service.demo.PayDemoOrderService; | 13 | import cn.iocoder.yudao.module.pay.service.demo.PayDemoOrderService; |
| 11 | import io.swagger.v3.oas.annotations.Operation; | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 12 | import io.swagger.v3.oas.annotations.tags.Tag; | 16 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 13 | import org.springframework.validation.annotation.Validated; | 17 | import org.springframework.validation.annotation.Validated; |
| 14 | import org.springframework.web.bind.annotation.*; | 18 | import org.springframework.web.bind.annotation.*; |
| 15 | 19 | ||
| 16 | import javax.annotation.Resource; | 20 | import javax.annotation.Resource; |
| 21 | +import javax.annotation.security.PermitAll; | ||
| 17 | import javax.validation.Valid; | 22 | import javax.validation.Valid; |
| 18 | 23 | ||
| 19 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 24 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 25 | +import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; | ||
| 20 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | 26 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 21 | 27 | ||
| 22 | @Tag(name = "็ฎก็ๅๅฐ - ็คบไพ่ฎขๅ") | 28 | @Tag(name = "็ฎก็ๅๅฐ - ็คบไพ่ฎขๅ") |
| @@ -41,4 +47,32 @@ public class PayDemoOrderController { | @@ -41,4 +47,32 @@ public class PayDemoOrderController { | ||
| 41 | return success(PayDemoOrderConvert.INSTANCE.convertPage(pageResult)); | 47 | return success(PayDemoOrderConvert.INSTANCE.convertPage(pageResult)); |
| 42 | } | 48 | } |
| 43 | 49 | ||
| 50 | + @PostMapping("/update-paid") | ||
| 51 | + @Operation(summary = "ๆดๆฐ็คบไพ่ฎขๅไธบๅทฒๆฏไป") // ็ฑ pay-module ๆฏไปๆๅก๏ผ่ฟ่กๅ่ฐ๏ผๅฏ่ง PayNotifyJob | ||
| 52 | + @PermitAll // ๆ ้็ปๅฝ๏ผๅฎๅ จ็ฑ PayDemoOrderService ๅ ้จๆ ก้ชๅฎ็ฐ | ||
| 53 | + @OperateLog(enable = false) // ็ฆ็จๆไฝๆฅๅฟ๏ผๅ ไธบๆฒกๆๆไฝไบบ | ||
| 54 | + public CommonResult<Boolean> updateDemoOrderPaid(@RequestBody PayOrderNotifyReqDTO notifyReqDTO) { | ||
| 55 | + payDemoOrderService.updateDemoOrderPaid(Long.valueOf(notifyReqDTO.getMerchantOrderId()), | ||
| 56 | + notifyReqDTO.getPayOrderId()); | ||
| 57 | + return success(true); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + @PutMapping("/refund") | ||
| 61 | + @Operation(summary = "ๅ่ตท็คบไพ่ฎขๅ็้ๆฌพ") | ||
| 62 | + @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | ||
| 63 | + public CommonResult<Boolean> refundDemoOrder(@RequestParam("id") Long id) { | ||
| 64 | + payDemoOrderService.refundDemoOrder(id, getClientIP()); | ||
| 65 | + return success(true); | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + @PostMapping("/update-refunded") | ||
| 69 | + @Operation(summary = "ๆดๆฐ็คบไพ่ฎขๅไธบๅทฒ้ๆฌพ") // ็ฑ pay-module ๆฏไปๆๅก๏ผ่ฟ่กๅ่ฐ๏ผๅฏ่ง PayNotifyJob | ||
| 70 | + @PermitAll // ๆ ้็ปๅฝ๏ผๅฎๅ จ็ฑ PayDemoOrderService ๅ ้จๆ ก้ชๅฎ็ฐ | ||
| 71 | + @OperateLog(enable = false) // ็ฆ็จๆไฝๆฅๅฟ๏ผๅ ไธบๆฒกๆๆไฝไบบ | ||
| 72 | + public CommonResult<Boolean> updateDemoOrderRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { | ||
| 73 | + payDemoOrderService.updateDemoOrderRefunded(Long.valueOf(notifyReqDTO.getMerchantOrderId()), | ||
| 74 | + notifyReqDTO.getPayRefundId()); | ||
| 75 | + return success(true); | ||
| 76 | + } | ||
| 77 | + | ||
| 44 | } | 78 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/PayDemoOrderRespVO.java
| @@ -12,6 +12,9 @@ import java.time.LocalDateTime; | @@ -12,6 +12,9 @@ import java.time.LocalDateTime; | ||
| 12 | @Data | 12 | @Data |
| 13 | public class PayDemoOrderRespVO { | 13 | public class PayDemoOrderRespVO { |
| 14 | 14 | ||
| 15 | + @Schema(description = "่ฎขๅ็ผๅท", required = true, example = "1024") | ||
| 16 | + private Long id; | ||
| 17 | + | ||
| 15 | @Schema(description = "็จๆท็ผๅท", required = true, example = "23199") | 18 | @Schema(description = "็จๆท็ผๅท", required = true, example = "23199") |
| 16 | private Long userId; | 19 | private Long userId; |
| 17 | 20 | ||
| @@ -33,10 +36,19 @@ public class PayDemoOrderRespVO { | @@ -33,10 +36,19 @@ public class PayDemoOrderRespVO { | ||
| 33 | @Schema(description = "่ฎขๅๆฏไปๆถ้ด") | 36 | @Schema(description = "่ฎขๅๆฏไปๆถ้ด") |
| 34 | private LocalDateTime payTime; | 37 | private LocalDateTime payTime; |
| 35 | 38 | ||
| 39 | + @Schema(description = "ๆฏไปๆธ ้", example = "alipay_qr") | ||
| 40 | + private String payChannelCode; | ||
| 41 | + | ||
| 42 | + @Schema(description = "ๆฏไป้ๆฌพ็ผๅท", example = "23366") | ||
| 43 | + private Long payRefundId; | ||
| 44 | + | ||
| 36 | @Schema(description = "้ๆฌพ้้ข๏ผๅไฝ๏ผๅ", required = true, example = "14039") | 45 | @Schema(description = "้ๆฌพ้้ข๏ผๅไฝ๏ผๅ", required = true, example = "14039") |
| 37 | private Integer refundPrice; | 46 | private Integer refundPrice; |
| 38 | 47 | ||
| 39 | @Schema(description = "้ๆฌพๆถ้ด") | 48 | @Schema(description = "้ๆฌพๆถ้ด") |
| 40 | private LocalDateTime refundTime; | 49 | private LocalDateTime refundTime; |
| 41 | 50 | ||
| 51 | + @Schema(description = "ๅๅปบๆถ้ด", required = true) | ||
| 52 | + private LocalDateTime createTime; | ||
| 53 | + | ||
| 42 | } | 54 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java
| @@ -3,7 +3,11 @@ package cn.iocoder.yudao.module.pay.controller.admin.notify; | @@ -3,7 +3,11 @@ package cn.iocoder.yudao.module.pay.controller.admin.notify; | ||
| 3 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | 3 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 4 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; | 4 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; |
| 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; | 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; |
| 6 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; | 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 7 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 8 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayRefundNotifyRespDTO; | ||
| 9 | +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; | ||
| 10 | +import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; | ||
| 7 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; | 11 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; |
| 8 | import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; | 12 | import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; |
| 9 | import io.swagger.v3.oas.annotations.Operation; | 13 | import io.swagger.v3.oas.annotations.Operation; |
| @@ -17,6 +21,7 @@ import javax.annotation.security.PermitAll; | @@ -17,6 +21,7 @@ import javax.annotation.security.PermitAll; | ||
| 17 | import java.util.Map; | 21 | import java.util.Map; |
| 18 | 22 | ||
| 19 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | 23 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 24 | +import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | ||
| 20 | import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND; | 25 | import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND; |
| 21 | 26 | ||
| 22 | @Tag(name = "็ฎก็ๅๅฐ - ๆฏไป้็ฅ") | 27 | @Tag(name = "็ฎก็ๅๅฐ - ๆฏไป้็ฅ") |
| @@ -64,28 +69,32 @@ public class PayNotifyController { | @@ -64,28 +69,32 @@ public class PayNotifyController { | ||
| 64 | @PermitAll | 69 | @PermitAll |
| 65 | @OperateLog(enable = false) // ๅ่ฐๅฐๅ๏ผๆ ้่ฎฐๅฝๆไฝๆฅๅฟ | 70 | @OperateLog(enable = false) // ๅ่ฐๅฐๅ๏ผๆ ้่ฎฐๅฝๆไฝๆฅๅฟ |
| 66 | public String notifyCallback(@PathVariable("channelId") Long channelId, | 71 | public String notifyCallback(@PathVariable("channelId") Long channelId, |
| 67 | - @RequestParam Map<String, String> params, | ||
| 68 | - @RequestBody String body) throws Exception { | ||
| 69 | - // ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๅญๅจ | 72 | + @RequestParam(required = false) Map<String, String> params, |
| 73 | + @RequestBody(required = false) String body) { | ||
| 74 | + log.info("[notifyCallback][channelId({}) ๅ่ฐๆฐๆฎ({}/{})]", channelId, params, body); | ||
| 75 | + // 1. ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๅญๅจ | ||
| 70 | PayClient payClient = payClientFactory.getPayClient(channelId); | 76 | PayClient payClient = payClientFactory.getPayClient(channelId); |
| 71 | if (payClient == null) { | 77 | if (payClient == null) { |
| 72 | log.error("[notifyCallback][ๆธ ้็ผๅท({}) ๆพไธๅฐๅฏนๅบ็ๆฏไปๅฎขๆท็ซฏ]", channelId); | 78 | log.error("[notifyCallback][ๆธ ้็ผๅท({}) ๆพไธๅฐๅฏนๅบ็ๆฏไปๅฎขๆท็ซฏ]", channelId); |
| 73 | throw exception(PAY_CHANNEL_CLIENT_NOT_FOUND); | 79 | throw exception(PAY_CHANNEL_CLIENT_NOT_FOUND); |
| 74 | } | 80 | } |
| 75 | - // ๆ ก้ช้็ฅๆฐๆฎๆฏๅฆๅๆณ | ||
| 76 | - PayNotifyDataDTO notifyData = PayNotifyDataDTO.builder().params(params).body(body).build(); | ||
| 77 | - payClient.verifyNotifyData(notifyData); | ||
| 78 | 81 | ||
| 79 | - // ๆ ๅตไธ๏ผๅฆๆๆฏ้ๆฌพ๏ผๅๅ่ตท้ๆฌพ้็ฅ | ||
| 80 | - if (payClient.isRefundNotify(notifyData)) { | ||
| 81 | - refundService.notifyPayRefund(channelId, PayNotifyDataDTO.builder().params(params).body(body).build()); | 82 | + // 2. ่งฃๆ้็ฅๆฐๆฎ |
| 83 | + PayNotifyReqDTO rawNotify = PayNotifyReqDTO.builder().params(params).body(body).build(); | ||
| 84 | + Object notify = payClient.parseNotify(rawNotify); | ||
| 85 | + | ||
| 86 | + // 3. ๅค็้็ฅ | ||
| 87 | + // 3.1๏ผ้ๆฌพ้็ฅ | ||
| 88 | + if (notify instanceof PayRefundNotifyRespDTO) { | ||
| 89 | + refundService.notifyPayRefund(channelId, (PayRefundNotifyRespDTO) notify, rawNotify); | ||
| 82 | return "success"; | 90 | return "success"; |
| 83 | } | 91 | } |
| 84 | - | ||
| 85 | - // ๆ ๅตไบ๏ผๅฆๆ้้ๆฌพ๏ผๅๅ่ตทๆฏไป้็ฅ | ||
| 86 | - orderService.notifyPayOrder(channelId, PayNotifyDataDTO.builder().params(params).body(body).build()); | ||
| 87 | - return "success"; | 92 | + // 3.2๏ผๆฏไป้็ฅ |
| 93 | + if (notify instanceof PayOrderNotifyRespDTO) { | ||
| 94 | + orderService.notifyPayOrder(channelId, (PayOrderNotifyRespDTO) notify, rawNotify); | ||
| 95 | + return "success"; | ||
| 96 | + } | ||
| 97 | + throw new UnsupportedOperationException("ๆช็ฅ้็ฅ๏ผ" + toJsonString(notify)); | ||
| 88 | } | 98 | } |
| 89 | 99 | ||
| 90 | - | ||
| 91 | } | 100 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java
| @@ -2,6 +2,12 @@ package cn.iocoder.yudao.module.pay.controller.admin.order; | @@ -2,6 +2,12 @@ package cn.iocoder.yudao.module.pay.controller.admin.order; | ||
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollectionUtil; | 3 | import cn.hutool.core.collection.CollectionUtil; |
| 4 | import cn.hutool.core.util.ObjectUtil; | 4 | import cn.hutool.core.util.ObjectUtil; |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 6 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 7 | +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 8 | +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | ||
| 9 | +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | ||
| 10 | +import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | ||
| 5 | import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; | 11 | import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; |
| 6 | import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; | 12 | import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; |
| 7 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; | 13 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; |
| @@ -12,21 +18,12 @@ import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; | @@ -12,21 +18,12 @@ import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; | ||
| 12 | import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; | 18 | import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; |
| 13 | import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; | 19 | import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; |
| 14 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; | 20 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; |
| 15 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 16 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 17 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 18 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | ||
| 19 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | ||
| 20 | -import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | ||
| 21 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 22 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 23 | import io.swagger.v3.oas.annotations.Operation; | 21 | import io.swagger.v3.oas.annotations.Operation; |
| 22 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 23 | +import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 24 | import org.springframework.security.access.prepost.PreAuthorize; | 24 | import org.springframework.security.access.prepost.PreAuthorize; |
| 25 | import org.springframework.validation.annotation.Validated; | 25 | import org.springframework.validation.annotation.Validated; |
| 26 | -import org.springframework.web.bind.annotation.GetMapping; | ||
| 27 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 28 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 29 | -import org.springframework.web.bind.annotation.RestController; | 26 | +import org.springframework.web.bind.annotation.*; |
| 30 | 27 | ||
| 31 | import javax.annotation.Resource; | 28 | import javax.annotation.Resource; |
| 32 | import javax.servlet.http.HttpServletResponse; | 29 | import javax.servlet.http.HttpServletResponse; |
| @@ -37,6 +34,7 @@ import java.util.List; | @@ -37,6 +34,7 @@ import java.util.List; | ||
| 37 | import java.util.Map; | 34 | import java.util.Map; |
| 38 | 35 | ||
| 39 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 36 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 37 | +import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; | ||
| 40 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | 38 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
| 41 | 39 | ||
| 42 | @Tag(name = "็ฎก็ๅๅฐ - ๆฏไป่ฎขๅ") | 40 | @Tag(name = "็ฎก็ๅๅฐ - ๆฏไป่ฎขๅ") |
| @@ -46,7 +44,7 @@ import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.E | @@ -46,7 +44,7 @@ import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.E | ||
| 46 | public class PayOrderController { | 44 | public class PayOrderController { |
| 47 | 45 | ||
| 48 | @Resource | 46 | @Resource |
| 49 | - private PayOrderService orderService; | 47 | + private PayOrderService payOrderService; |
| 50 | @Resource | 48 | @Resource |
| 51 | private PayOrderExtensionService orderExtensionService; | 49 | private PayOrderExtensionService orderExtensionService; |
| 52 | @Resource | 50 | @Resource |
| @@ -58,8 +56,17 @@ public class PayOrderController { | @@ -58,8 +56,17 @@ public class PayOrderController { | ||
| 58 | @Operation(summary = "่ทๅพๆฏไป่ฎขๅ") | 56 | @Operation(summary = "่ทๅพๆฏไป่ฎขๅ") |
| 59 | @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | 57 | @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") |
| 60 | @PreAuthorize("@ss.hasPermission('pay:order:query')") | 58 | @PreAuthorize("@ss.hasPermission('pay:order:query')") |
| 61 | - public CommonResult<PayOrderDetailsRespVO> getOrder(@RequestParam("id") Long id) { | ||
| 62 | - PayOrderDO order = orderService.getOrder(id); | 59 | + public CommonResult<PayOrderRespVO> getOrder(@RequestParam("id") Long id) { |
| 60 | + return success(PayOrderConvert.INSTANCE.convert(payOrderService.getOrder(id))); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + // TODO ่่ฟ๏ผ็็ๆไนไผๅไธ๏ผ | ||
| 64 | + @GetMapping("/get-detail") | ||
| 65 | + @Operation(summary = "่ทๅพๆฏไป่ฎขๅ่ฏฆๆ ") | ||
| 66 | + @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | ||
| 67 | + @PreAuthorize("@ss.hasPermission('pay:order:query')") | ||
| 68 | + public CommonResult<PayOrderDetailsRespVO> getOrderDetail(@RequestParam("id") Long id) { | ||
| 69 | + PayOrderDO order = payOrderService.getOrder(id); | ||
| 63 | if (ObjectUtil.isNull(order)) { | 70 | if (ObjectUtil.isNull(order)) { |
| 64 | return success(new PayOrderDetailsRespVO()); | 71 | return success(new PayOrderDetailsRespVO()); |
| 65 | } | 72 | } |
| @@ -82,11 +89,18 @@ public class PayOrderController { | @@ -82,11 +89,18 @@ public class PayOrderController { | ||
| 82 | return success(respVO); | 89 | return success(respVO); |
| 83 | } | 90 | } |
| 84 | 91 | ||
| 92 | + @PostMapping("/submit") | ||
| 93 | + @Operation(summary = "ๆไบคๆฏไป่ฎขๅ") | ||
| 94 | + public CommonResult<PayOrderSubmitRespVO> submitPayOrder(@RequestBody PayOrderSubmitReqVO reqVO) { | ||
| 95 | + PayOrderSubmitRespVO respVO = payOrderService.submitPayOrder(reqVO, getClientIP()); | ||
| 96 | + return success(respVO); | ||
| 97 | + } | ||
| 98 | + | ||
| 85 | @GetMapping("/page") | 99 | @GetMapping("/page") |
| 86 | @Operation(summary = "่ทๅพๆฏไป่ฎขๅๅ้กต") | 100 | @Operation(summary = "่ทๅพๆฏไป่ฎขๅๅ้กต") |
| 87 | @PreAuthorize("@ss.hasPermission('pay:order:query')") | 101 | @PreAuthorize("@ss.hasPermission('pay:order:query')") |
| 88 | public CommonResult<PageResult<PayOrderPageItemRespVO>> getOrderPage(@Valid PayOrderPageReqVO pageVO) { | 102 | public CommonResult<PageResult<PayOrderPageItemRespVO>> getOrderPage(@Valid PayOrderPageReqVO pageVO) { |
| 89 | - PageResult<PayOrderDO> pageResult = orderService.getOrderPage(pageVO); | 103 | + PageResult<PayOrderDO> pageResult = payOrderService.getOrderPage(pageVO); |
| 90 | if (CollectionUtil.isEmpty(pageResult.getList())) { | 104 | if (CollectionUtil.isEmpty(pageResult.getList())) { |
| 91 | return success(new PageResult<>(pageResult.getTotal())); | 105 | return success(new PageResult<>(pageResult.getTotal())); |
| 92 | } | 106 | } |
| @@ -120,7 +134,7 @@ public class PayOrderController { | @@ -120,7 +134,7 @@ public class PayOrderController { | ||
| 120 | public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO, | 134 | public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO, |
| 121 | HttpServletResponse response) throws IOException { | 135 | HttpServletResponse response) throws IOException { |
| 122 | 136 | ||
| 123 | - List<PayOrderDO> list = orderService.getOrderList(exportReqVO); | 137 | + List<PayOrderDO> list = payOrderService.getOrderList(exportReqVO); |
| 124 | if (CollectionUtil.isEmpty(list)) { | 138 | if (CollectionUtil.isEmpty(list)) { |
| 125 | ExcelUtils.write(response, "ๆฏไป่ฎขๅ.xls", "ๆฐๆฎ", | 139 | ExcelUtils.write(response, "ๆฏไป่ฎขๅ.xls", "ๆฐๆฎ", |
| 126 | PayOrderExcelVO.class, new ArrayList<>()); | 140 | PayOrderExcelVO.class, new ArrayList<>()); |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderSubmitReqVO.java
0 โ 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | +import lombok.Data; | ||
| 5 | +import lombok.experimental.Accessors; | ||
| 6 | + | ||
| 7 | +import javax.validation.constraints.NotEmpty; | ||
| 8 | +import javax.validation.constraints.NotNull; | ||
| 9 | +import java.awt.*; | ||
| 10 | +import java.util.Map; | ||
| 11 | + | ||
| 12 | +@Schema(description = "็ฎก็ๅๅฐ - ๆฏไป่ฎขๅๆไบค Request VO") | ||
| 13 | +@Data | ||
| 14 | +public class PayOrderSubmitReqVO { | ||
| 15 | + | ||
| 16 | + @Schema(description = "ๆฏไปๅ็ผๅท", required = true, example = "1024") | ||
| 17 | + @NotNull(message = "ๆฏไปๅ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 18 | + private Long id; | ||
| 19 | + | ||
| 20 | + @Schema(description = "ๆฏไปๆธ ้", required = true, example = "wx_pub") | ||
| 21 | + @NotEmpty(message = "ๆฏไปๆธ ้ไธ่ฝไธบ็ฉบ") | ||
| 22 | + private String channelCode; | ||
| 23 | + | ||
| 24 | + @Schema(description = "ๆฏไปๆธ ้็้ขๅคๅๆฐ๏ผไพๅฆ่ฏด๏ผๅพฎไฟกๅ ฌไผๅท้่ฆไผ ้ openid ๅๆฐ") | ||
| 25 | + private Map<String, String> channelExtras; | ||
| 26 | + | ||
| 27 | + @Schema(description = "ๅฑ็คบๆจกๅผ", example = "url") // ๅ่ง {@link PayDisplayModeEnum} ๆไธพใๅฆๆไธไผ ้๏ผๅๆฏไธชๆฏไปๆธ ้ไฝฟ็จ้ป่ฎค็ๆนๅผ | ||
| 28 | + private String displayMode; | ||
| 29 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderSubmitRespVO.java
0 โ 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | +import lombok.AllArgsConstructor; | ||
| 5 | +import lombok.Builder; | ||
| 6 | +import lombok.Data; | ||
| 7 | +import lombok.NoArgsConstructor; | ||
| 8 | +import lombok.experimental.Accessors; | ||
| 9 | + | ||
| 10 | +@Schema(description = "็ฎก็ๅๅฐ - ๆฏไป่ฎขๅๆไบค Response VO") | ||
| 11 | +@Data | ||
| 12 | +public class PayOrderSubmitRespVO { | ||
| 13 | + | ||
| 14 | + @Schema(description = "ๅฑ็คบๆจกๅผ", required = true, example = "url") // ๅ่ง PayDisplayModeEnum ๆไธพ | ||
| 15 | + private String displayMode; | ||
| 16 | + | ||
| 17 | + @Schema(description = "ๅฑ็คบๅ ๅฎน", required = true) | ||
| 18 | + private String displayContent; | ||
| 19 | + | ||
| 20 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java
| 1 | package cn.iocoder.yudao.module.pay.controller.app.order; | 1 | package cn.iocoder.yudao.module.pay.controller.app.order; |
| 2 | 2 | ||
| 3 | -import cn.hutool.core.bean.BeanUtil; | ||
| 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO; | ||
| 5 | import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitReqVO; | 5 | import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitReqVO; |
| 6 | import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitRespVO; | 6 | import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitRespVO; |
| 7 | -import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; | 7 | +import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; |
| 8 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; | 8 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; |
| 9 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; | ||
| 10 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitRespDTO; | ||
| 11 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 12 | import io.swagger.v3.oas.annotations.Operation; | 9 | import io.swagger.v3.oas.annotations.Operation; |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 13 | import lombok.extern.slf4j.Slf4j; | 11 | import lombok.extern.slf4j.Slf4j; |
| 14 | import org.springframework.validation.annotation.Validated; | 12 | import org.springframework.validation.annotation.Validated; |
| 15 | import org.springframework.web.bind.annotation.PostMapping; | 13 | import org.springframework.web.bind.annotation.PostMapping; |
| @@ -34,20 +32,9 @@ public class AppPayOrderController { | @@ -34,20 +32,9 @@ public class AppPayOrderController { | ||
| 34 | 32 | ||
| 35 | @PostMapping("/submit") | 33 | @PostMapping("/submit") |
| 36 | @Operation(summary = "ๆไบคๆฏไป่ฎขๅ") | 34 | @Operation(summary = "ๆไบคๆฏไป่ฎขๅ") |
| 37 | -// @PreAuthenticated // TODO ๆๆถไธๅ ็ป้้ช่ฏ๏ผๅ็ซฏๆๆถๆฒกๅๅฅฝ | ||
| 38 | public CommonResult<AppPayOrderSubmitRespVO> submitPayOrder(@RequestBody AppPayOrderSubmitReqVO reqVO) { | 35 | public CommonResult<AppPayOrderSubmitRespVO> submitPayOrder(@RequestBody AppPayOrderSubmitReqVO reqVO) { |
| 39 | - // ่ทๅพ่ฎขๅ | ||
| 40 | - PayOrderDO payOrder = orderService.getOrder(reqVO.getId()); | ||
| 41 | - | ||
| 42 | - // ๆไบคๆฏไป | ||
| 43 | - PayOrderSubmitReqDTO reqDTO = new PayOrderSubmitReqDTO(); | ||
| 44 | - BeanUtil.copyProperties(reqVO, reqDTO, false); | ||
| 45 | - reqDTO.setUserIp(getClientIP()); | ||
| 46 | - reqDTO.setAppId(payOrder.getAppId()); | ||
| 47 | - PayOrderSubmitRespDTO respDTO = orderService.submitPayOrder(reqDTO); | ||
| 48 | - | ||
| 49 | - // ๆผๆฅ่ฟๅ | ||
| 50 | - return success(AppPayOrderSubmitRespVO.builder().invokeResponse(respDTO.getInvokeResponse()).build()); | 36 | + PayOrderSubmitRespVO respVO = orderService.submitPayOrder(reqVO, getClientIP()); |
| 37 | + return success(PayOrderConvert.INSTANCE.convert3(respVO)); | ||
| 51 | } | 38 | } |
| 52 | 39 | ||
| 53 | } | 40 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java
| 1 | package cn.iocoder.yudao.module.pay.controller.app.order.vo; | 1 | package cn.iocoder.yudao.module.pay.controller.app.order.vo; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitReqVO; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 5 | import lombok.Data; |
| 5 | import lombok.experimental.Accessors; | 6 | import lombok.experimental.Accessors; |
| @@ -10,18 +11,5 @@ import java.util.Map; | @@ -10,18 +11,5 @@ import java.util.Map; | ||
| 10 | 11 | ||
| 11 | @Schema(description = "็จๆท APP - ๆฏไป่ฎขๅๆไบค Request VO") | 12 | @Schema(description = "็จๆท APP - ๆฏไป่ฎขๅๆไบค Request VO") |
| 12 | @Data | 13 | @Data |
| 13 | -@Accessors(chain = true) | ||
| 14 | -public class AppPayOrderSubmitReqVO { | ||
| 15 | - | ||
| 16 | - @Schema(description = "ๆฏไปๅ็ผๅท", required = true, example = "1024") | ||
| 17 | - @NotNull(message = "ๆฏไปๅ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 18 | - private Long id; | ||
| 19 | - | ||
| 20 | - @Schema(description = "ๆฏไปๆธ ้", required = true, example = "wx_pub") | ||
| 21 | - @NotEmpty(message = "ๆฏไปๆธ ้ไธ่ฝไธบ็ฉบ") | ||
| 22 | - private String channelCode; | ||
| 23 | - | ||
| 24 | - @Schema(description = "ๆฏไปๆธ ้็้ขๅคๅๆฐ๏ผไพๅฆ่ฏด๏ผๅพฎไฟกๅ ฌไผๅท้่ฆไผ ้ openid ๅๆฐ") | ||
| 25 | - private Map<String, String> channelExtras; | ||
| 26 | - | 14 | +public class AppPayOrderSubmitReqVO extends PayOrderSubmitReqVO { |
| 27 | } | 15 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java
| 1 | package cn.iocoder.yudao.module.pay.controller.app.order.vo; | 1 | package cn.iocoder.yudao.module.pay.controller.app.order.vo; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.AllArgsConstructor; | 5 | import lombok.AllArgsConstructor; |
| 5 | import lombok.Builder; | 6 | import lombok.Builder; |
| @@ -9,15 +10,6 @@ import lombok.experimental.Accessors; | @@ -9,15 +10,6 @@ import lombok.experimental.Accessors; | ||
| 9 | 10 | ||
| 10 | @Schema(description = "็จๆท APP - ๆฏไป่ฎขๅๆไบค Response VO") | 11 | @Schema(description = "็จๆท APP - ๆฏไป่ฎขๅๆไบค Response VO") |
| 11 | @Data | 12 | @Data |
| 12 | -@Accessors(chain = true) | ||
| 13 | -@Builder | ||
| 14 | -@NoArgsConstructor | ||
| 15 | -@AllArgsConstructor | ||
| 16 | -public class AppPayOrderSubmitRespVO { | ||
| 17 | - | ||
| 18 | - /** | ||
| 19 | - * ่ฐ็จๆฏไปๆธ ้็ๅๅบ็ปๆ | ||
| 20 | - */ | ||
| 21 | - private Object invokeResponse; | 13 | +public class AppPayOrderSubmitRespVO extends PayOrderSubmitRespVO { |
| 22 | 14 | ||
| 23 | } | 15 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.controller.app.refund; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.util.StrUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 5 | -import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundRespVO; | ||
| 7 | -import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; | ||
| 8 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; | ||
| 9 | -import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; | ||
| 10 | -import cn.iocoder.yudao.module.pay.util.PaySeqUtils; | ||
| 11 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 12 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 13 | -import lombok.extern.slf4j.Slf4j; | ||
| 14 | -import org.springframework.validation.annotation.Validated; | ||
| 15 | -import org.springframework.web.bind.annotation.PostMapping; | ||
| 16 | -import org.springframework.web.bind.annotation.RequestBody; | ||
| 17 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | -import org.springframework.web.bind.annotation.RestController; | ||
| 19 | - | ||
| 20 | -import javax.annotation.Resource; | ||
| 21 | - | ||
| 22 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 23 | -import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; | ||
| 24 | - | ||
| 25 | -@Tag(name = "็จๆท APP - ้ๆฌพ่ฎขๅ") | ||
| 26 | -@RestController | ||
| 27 | -@RequestMapping("/pay/refund") | ||
| 28 | -@Validated | ||
| 29 | -@Slf4j | ||
| 30 | -public class AppPayRefundController { | ||
| 31 | - | ||
| 32 | - @Resource | ||
| 33 | - private PayRefundService refundService; | ||
| 34 | - | ||
| 35 | - @PostMapping("/refund") | ||
| 36 | - @Operation(summary = "ๆไบค้ๆฌพ่ฎขๅ") | ||
| 37 | - public CommonResult<AppPayRefundRespVO> submitRefundOrder(@RequestBody AppPayRefundReqVO reqVO){ | ||
| 38 | - PayRefundReqDTO req = PayRefundConvert.INSTANCE.convert(reqVO); | ||
| 39 | - req.setUserIp(getClientIP()); | ||
| 40 | - // TODO ๆต่ฏๆๆถๆจกๆ็ๆๅๆท้ๆฌพ่ฎขๅ | ||
| 41 | - if(StrUtil.isEmpty(reqVO.getMerchantRefundId())) { | ||
| 42 | - req.setMerchantRefundId(PaySeqUtils.genMerchantRefundNo()); | ||
| 43 | - } | ||
| 44 | - return success(PayRefundConvert.INSTANCE.convert(refundService.submitRefundOrder(req))); | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | -} |
yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/package-info.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.controller.app.refund.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.NoArgsConstructor; | ||
| 7 | - | ||
| 8 | -import javax.validation.constraints.NotEmpty; | ||
| 9 | -import javax.validation.constraints.NotNull; | ||
| 10 | - | ||
| 11 | -@Schema(description = "็จๆท APP - ้ๆฌพ่ฎขๅ Req VO") | ||
| 12 | -@Data | ||
| 13 | -@NoArgsConstructor | ||
| 14 | -@AllArgsConstructor | ||
| 15 | -public class AppPayRefundReqVO { | ||
| 16 | - | ||
| 17 | - @Schema(description = "ๆฏไป่ฎขๅ็ผๅท่ชๅข", required = true, example = "10") | ||
| 18 | - @NotNull(message = "ๆฏไป่ฎขๅ็ผๅท่ชๅข") | ||
| 19 | - private Long payOrderId; | ||
| 20 | - | ||
| 21 | - @Schema(description = "้ๆฌพ้้ข", required = true, example = "1") | ||
| 22 | - @NotNull(message = "้ๆฌพ้้ข") | ||
| 23 | - private Long amount; | ||
| 24 | - | ||
| 25 | - @Schema(description = "้ๆฌพๅๅ ", required = true, example = "ไธๅๆฌข") | ||
| 26 | - @NotEmpty(message = "้ๆฌพๅๅ ") | ||
| 27 | - private String reason; | ||
| 28 | - | ||
| 29 | - @Schema(description = "ๅๆท้ๆฌพ่ฎขๅๅท", required = true, example = "MR202111180000000001") | ||
| 30 | - //TODO ๆต่ฏๆๆถๆจกๆ็ๆ | ||
| 31 | - //@NotEmpty(message = "ๅๆท้ๆฌพ่ฎขๅๅท") | ||
| 32 | - private String merchantRefundId; | ||
| 33 | - | ||
| 34 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.controller.app.refund.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Builder; | ||
| 6 | -import lombok.Data; | ||
| 7 | -import lombok.NoArgsConstructor; | ||
| 8 | -import lombok.experimental.Accessors; | ||
| 9 | - | ||
| 10 | -@Schema(description = "็จๆท APP - ๆไบค้ๆฌพ่ฎขๅ Response VO") | ||
| 11 | -@Data | ||
| 12 | -@Accessors(chain = true) | ||
| 13 | -@Builder | ||
| 14 | -@NoArgsConstructor | ||
| 15 | -@AllArgsConstructor | ||
| 16 | -public class AppPayRefundRespVO { | ||
| 17 | - | ||
| 18 | - @Schema(description = "้ๆฌพ่ฎขๅ็ผๅท", required = true, example = "10") | ||
| 19 | - private Long refundId; | ||
| 20 | - | ||
| 21 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/order/PayOrderConvert.java
| 1 | package cn.iocoder.yudao.module.pay.convert.order; | 1 | package cn.iocoder.yudao.module.pay.convert.order; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | 4 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; |
| 5 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 5 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; | 6 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; |
| 6 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO; | 7 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO; |
| 7 | -import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderDetailsRespVO; | ||
| 8 | -import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExcelVO; | ||
| 9 | -import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageItemRespVO; | ||
| 10 | -import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderRespVO; | 8 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; |
| 9 | +import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitReqVO; | ||
| 10 | +import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitRespVO; | ||
| 11 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; | 11 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; |
| 12 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; | 12 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; |
| 13 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; | ||
| 14 | import org.mapstruct.Mapper; | 13 | import org.mapstruct.Mapper; |
| 15 | import org.mapstruct.Mapping; | 14 | import org.mapstruct.Mapping; |
| 16 | import org.mapstruct.factory.Mappers; | 15 | import org.mapstruct.factory.Mappers; |
| @@ -31,6 +30,8 @@ public interface PayOrderConvert { | @@ -31,6 +30,8 @@ public interface PayOrderConvert { | ||
| 31 | 30 | ||
| 32 | PayOrderRespVO convert(PayOrderDO bean); | 31 | PayOrderRespVO convert(PayOrderDO bean); |
| 33 | 32 | ||
| 33 | + PayOrderRespDTO convert2(PayOrderDO order); | ||
| 34 | + | ||
| 34 | PayOrderDetailsRespVO orderDetailConvert(PayOrderDO bean); | 35 | PayOrderDetailsRespVO orderDetailConvert(PayOrderDO bean); |
| 35 | 36 | ||
| 36 | PayOrderDetailsRespVO.PayOrderExtension orderDetailExtensionConvert(PayOrderExtensionDO bean); | 37 | PayOrderDetailsRespVO.PayOrderExtension orderDetailExtensionConvert(PayOrderExtensionDO bean); |
| @@ -88,14 +89,15 @@ public interface PayOrderConvert { | @@ -88,14 +89,15 @@ public interface PayOrderConvert { | ||
| 88 | return payOrderExcelVO; | 89 | return payOrderExcelVO; |
| 89 | } | 90 | } |
| 90 | 91 | ||
| 91 | - | ||
| 92 | PayOrderDO convert(PayOrderCreateReqDTO bean); | 92 | PayOrderDO convert(PayOrderCreateReqDTO bean); |
| 93 | 93 | ||
| 94 | @Mapping(target = "id", ignore = true) | 94 | @Mapping(target = "id", ignore = true) |
| 95 | - PayOrderExtensionDO convert(PayOrderSubmitReqDTO bean); | 95 | + PayOrderExtensionDO convert(PayOrderSubmitReqVO bean, String userIp); |
| 96 | + | ||
| 97 | + PayOrderUnifiedReqDTO convert2(PayOrderSubmitReqVO reqVO); | ||
| 96 | 98 | ||
| 97 | - PayOrderUnifiedReqDTO convert2(PayOrderSubmitReqDTO bean); | 99 | + PayOrderSubmitRespVO convert(PayOrderUnifiedRespDTO bean); |
| 98 | 100 | ||
| 99 | - PayOrderRespDTO convert2(PayOrderDO bean); | 101 | + AppPayOrderSubmitRespVO convert3(PayOrderSubmitRespVO bean); |
| 100 | 102 | ||
| 101 | } | 103 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/refund/PayRefundConvert.java
| @@ -2,12 +2,8 @@ package cn.iocoder.yudao.module.pay.convert.refund; | @@ -2,12 +2,8 @@ package cn.iocoder.yudao.module.pay.convert.refund; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; | 4 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; |
| 5 | -import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundRespVO; | ||
| 7 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; | 5 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; |
| 8 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; | 6 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; |
| 9 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; | ||
| 10 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundRespDTO; | ||
| 11 | import org.mapstruct.Mapper; | 7 | import org.mapstruct.Mapper; |
| 12 | import org.mapstruct.Mapping; | 8 | import org.mapstruct.Mapping; |
| 13 | import org.mapstruct.Mappings; | 9 | import org.mapstruct.Mappings; |
| @@ -17,11 +13,6 @@ import java.math.BigDecimal; | @@ -17,11 +13,6 @@ import java.math.BigDecimal; | ||
| 17 | import java.math.RoundingMode; | 13 | import java.math.RoundingMode; |
| 18 | import java.util.List; | 14 | import java.util.List; |
| 19 | 15 | ||
| 20 | -/** | ||
| 21 | - * ้ๆฌพ่ฎขๅ Convert | ||
| 22 | - * | ||
| 23 | - * @author aquan | ||
| 24 | - */ | ||
| 25 | @Mapper | 16 | @Mapper |
| 26 | public interface PayRefundConvert { | 17 | public interface PayRefundConvert { |
| 27 | 18 | ||
| @@ -102,8 +93,4 @@ public interface PayRefundConvert { | @@ -102,8 +93,4 @@ public interface PayRefundConvert { | ||
| 102 | }) | 93 | }) |
| 103 | PayRefundDO convert(PayOrderDO orderDO); | 94 | PayRefundDO convert(PayOrderDO orderDO); |
| 104 | 95 | ||
| 105 | - PayRefundReqDTO convert(AppPayRefundReqVO bean); | ||
| 106 | - | ||
| 107 | - AppPayRefundRespVO convert(PayRefundRespDTO bean); | ||
| 108 | - | ||
| 109 | } | 96 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/demo/PayDemoOrderDO.java
| @@ -73,14 +73,16 @@ public class PayDemoOrderDO extends BaseDO { | @@ -73,14 +73,16 @@ public class PayDemoOrderDO extends BaseDO { | ||
| 73 | 73 | ||
| 74 | // ========== ้ๆฌพ็ธๅ ณๅญๆฎต ========== | 74 | // ========== ้ๆฌพ็ธๅ ณๅญๆฎต ========== |
| 75 | /** | 75 | /** |
| 76 | - * ้ๆฌพ้้ข | 76 | + * ๆฏไป้ๆฌพๅๅท |
| 77 | + */ | ||
| 78 | + private Long payRefundId; | ||
| 79 | + /** | ||
| 80 | + * ้ๆฌพ้้ข๏ผๅไฝ๏ผๅ | ||
| 77 | */ | 81 | */ |
| 78 | private Integer refundPrice; | 82 | private Integer refundPrice; |
| 79 | /** | 83 | /** |
| 80 | - * ้ๆฌพๆถ้ด | ||
| 81 | - * | ||
| 82 | - * ็ฑไบๅฏไปฅๅคๆฌก้ๆฌพ๏ผ่ฎฐๅฝๆๅไธๆฌก้ๆฌพ็ๆถ้ด | 84 | + * ้ๆฌพๅฎๆๆถ้ด |
| 83 | */ | 85 | */ |
| 84 | - private Date refundTime; | 86 | + private LocalDateTime refundTime; |
| 85 | 87 | ||
| 86 | } | 88 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java
| @@ -80,7 +80,6 @@ public class PayRefundDO extends BaseDO { | @@ -80,7 +80,6 @@ public class PayRefundDO extends BaseDO { | ||
| 80 | */ | 80 | */ |
| 81 | private String tradeNo; | 81 | private String tradeNo; |
| 82 | 82 | ||
| 83 | - | ||
| 84 | // ========== ๅๆท็ธๅ ณๅญๆฎต ========== | 83 | // ========== ๅๆท็ธๅ ณๅญๆฎต ========== |
| 85 | /** | 84 | /** |
| 86 | * ๅๆท่ฎขๅ็ผๅท | 85 | * ๅๆท่ฎขๅ็ผๅท |
| @@ -171,14 +170,12 @@ public class PayRefundDO extends BaseDO { | @@ -171,14 +170,12 @@ public class PayRefundDO extends BaseDO { | ||
| 171 | */ | 170 | */ |
| 172 | private String channelErrorMsg; | 171 | private String channelErrorMsg; |
| 173 | 172 | ||
| 174 | - | ||
| 175 | /** | 173 | /** |
| 176 | * ๆฏไปๆธ ้็้ขๅคๅๆฐ | 174 | * ๆฏไปๆธ ้็้ขๅคๅๆฐ |
| 177 | * ๅ่ง https://www.pingxx.com/api/Refunds%20้ๆฌพๆฆ่ฟฐ.html | 175 | * ๅ่ง https://www.pingxx.com/api/Refunds%20้ๆฌพๆฆ่ฟฐ.html |
| 178 | */ | 176 | */ |
| 179 | private String channelExtras; | 177 | private String channelExtras; |
| 180 | 178 | ||
| 181 | - | ||
| 182 | /** | 179 | /** |
| 183 | * TODO | 180 | * TODO |
| 184 | * ้ๆฌพๅคฑๆๆถ้ด | 181 | * ้ๆฌพๅคฑๆๆถ้ด |
| @@ -193,5 +190,4 @@ public class PayRefundDO extends BaseDO { | @@ -193,5 +190,4 @@ public class PayRefundDO extends BaseDO { | ||
| 193 | */ | 190 | */ |
| 194 | private LocalDateTime notifyTime; | 191 | private LocalDateTime notifyTime; |
| 195 | 192 | ||
| 196 | - | ||
| 197 | } | 193 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/demo/PayDemoOrderMapper.java
| @@ -20,4 +20,9 @@ public interface PayDemoOrderMapper extends BaseMapperX<PayDemoOrderDO> { | @@ -20,4 +20,9 @@ public interface PayDemoOrderMapper extends BaseMapperX<PayDemoOrderDO> { | ||
| 20 | .orderByDesc(PayDemoOrderDO::getId)); | 20 | .orderByDesc(PayDemoOrderDO::getId)); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | + default int updateByIdAndPayed(Long id, boolean wherePayed, PayDemoOrderDO updateObj) { | ||
| 24 | + return update(updateObj, new LambdaQueryWrapperX<PayDemoOrderDO>() | ||
| 25 | + .eq(PayDemoOrderDO::getId, id).eq(PayDemoOrderDO::getPayed, wherePayed)); | ||
| 26 | + } | ||
| 27 | + | ||
| 23 | } | 28 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyLogMapper.java
| @@ -5,5 +5,5 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | @@ -5,5 +5,5 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | import org.apache.ibatis.annotations.Mapper; | 5 | import org.apache.ibatis.annotations.Mapper; |
| 6 | 6 | ||
| 7 | @Mapper | 7 | @Mapper |
| 8 | -public interface PayNotifyLogCoreMapper extends BaseMapperX<PayNotifyLogDO> { | 8 | +public interface PayNotifyLogMapper extends BaseMapperX<PayNotifyLogDO> { |
| 9 | } | 9 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyTaskMapper.java
| @@ -10,7 +10,7 @@ import java.time.LocalDateTime; | @@ -10,7 +10,7 @@ import java.time.LocalDateTime; | ||
| 10 | import java.util.List; | 10 | import java.util.List; |
| 11 | 11 | ||
| 12 | @Mapper | 12 | @Mapper |
| 13 | -public interface PayNotifyTaskCoreMapper extends BaseMapperX<PayNotifyTaskDO> { | 13 | +public interface PayNotifyTaskMapper extends BaseMapperX<PayNotifyTaskDO> { |
| 14 | 14 | ||
| 15 | /** | 15 | /** |
| 16 | * ่ทๅพ้่ฆ้็ฅ็ PayNotifyTaskDO ่ฎฐๅฝใ้่ฆๆปก่ถณๅฆไธๆกไปถ๏ผ | 16 | * ่ทๅพ้่ฆ้็ฅ็ PayNotifyTaskDO ่ฎฐๅฝใ้่ฆๆปก่ถณๅฆไธๆกไปถ๏ผ |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoOrderService.java
| @@ -39,4 +39,28 @@ public interface PayDemoOrderService { | @@ -39,4 +39,28 @@ public interface PayDemoOrderService { | ||
| 39 | */ | 39 | */ |
| 40 | PageResult<PayDemoOrderDO> getDemoOrderPage(PageParam pageReqVO); | 40 | PageResult<PayDemoOrderDO> getDemoOrderPage(PageParam pageReqVO); |
| 41 | 41 | ||
| 42 | + /** | ||
| 43 | + * ๆดๆฐ็คบไพ่ฎขๅไธบๅทฒๆฏไป | ||
| 44 | + * | ||
| 45 | + * @param id ็ผๅท | ||
| 46 | + * @param payOrderId ๆฏไป่ฎขๅๅท | ||
| 47 | + */ | ||
| 48 | + void updateDemoOrderPaid(Long id, Long payOrderId); | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * ๅ่ตท็คบไพ่ฎขๅ็้ๆฌพ | ||
| 52 | + * | ||
| 53 | + * @param id ็ผๅท | ||
| 54 | + * @param userIp ็จๆท็ผๅท | ||
| 55 | + */ | ||
| 56 | + void refundDemoOrder(Long id, String userIp); | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * ๆดๆฐ็คบไพ่ฎขๅไธบๅทฒ้ๆฌพ | ||
| 60 | + * | ||
| 61 | + * @param id ็ผๅท | ||
| 62 | + * @param payRefundId ้ๆฌพ่ฎขๅๅท | ||
| 63 | + */ | ||
| 64 | + void updateDemoOrderRefunded(Long id, Long payRefundId); | ||
| 65 | + | ||
| 42 | } | 66 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoOrderServiceImpl.java
| 1 | package cn.iocoder.yudao.module.pay.service.demo; | 1 | package cn.iocoder.yudao.module.pay.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.lang.Assert; | 3 | import cn.hutool.core.lang.Assert; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | ||
| 6 | import cn.iocoder.yudao.module.pay.api.order.PayOrderApi; | 8 | import cn.iocoder.yudao.module.pay.api.order.PayOrderApi; |
| 7 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; | 9 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; |
| 10 | +import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO; | ||
| 11 | +import cn.iocoder.yudao.module.pay.api.refund.PayRefundApi; | ||
| 12 | +import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; | ||
| 13 | +import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundRespDTO; | ||
| 8 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.PayDemoOrderCreateReqVO; | 14 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.PayDemoOrderCreateReqVO; |
| 9 | import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO; | 15 | import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO; |
| 10 | import cn.iocoder.yudao.module.pay.dal.mysql.demo.PayDemoOrderMapper; | 16 | import cn.iocoder.yudao.module.pay.dal.mysql.demo.PayDemoOrderMapper; |
| 17 | +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; | ||
| 18 | +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; | ||
| 19 | +import lombok.extern.slf4j.Slf4j; | ||
| 11 | import org.springframework.stereotype.Service; | 20 | import org.springframework.stereotype.Service; |
| 12 | import org.springframework.validation.annotation.Validated; | 21 | import org.springframework.validation.annotation.Validated; |
| 13 | 22 | ||
| 14 | import javax.annotation.Resource; | 23 | import javax.annotation.Resource; |
| 15 | import java.time.Duration; | 24 | import java.time.Duration; |
| 25 | +import java.time.LocalDateTime; | ||
| 16 | import java.util.HashMap; | 26 | import java.util.HashMap; |
| 17 | import java.util.Map; | 27 | import java.util.Map; |
| 28 | +import java.util.Objects; | ||
| 18 | 29 | ||
| 30 | +import static cn.hutool.core.util.ObjectUtil.*; | ||
| 31 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 19 | import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.addTime; | 32 | import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.addTime; |
| 33 | +import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; | ||
| 20 | import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; | 34 | import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; |
| 35 | +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; | ||
| 21 | 36 | ||
| 22 | /** | 37 | /** |
| 23 | * ็คบไพ่ฎขๅ Service ๅฎ็ฐ็ฑป | 38 | * ็คบไพ่ฎขๅ Service ๅฎ็ฐ็ฑป |
| @@ -26,6 +41,7 @@ import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getCli | @@ -26,6 +41,7 @@ import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getCli | ||
| 26 | */ | 41 | */ |
| 27 | @Service | 42 | @Service |
| 28 | @Validated | 43 | @Validated |
| 44 | +@Slf4j | ||
| 29 | public class PayDemoOrderServiceImpl implements PayDemoOrderService { | 45 | public class PayDemoOrderServiceImpl implements PayDemoOrderService { |
| 30 | 46 | ||
| 31 | /** | 47 | /** |
| @@ -45,6 +61,8 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | @@ -45,6 +61,8 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | ||
| 45 | 61 | ||
| 46 | @Resource | 62 | @Resource |
| 47 | private PayOrderApi payOrderApi; | 63 | private PayOrderApi payOrderApi; |
| 64 | + @Resource | ||
| 65 | + private PayRefundApi payRefundApi; | ||
| 48 | 66 | ||
| 49 | @Resource | 67 | @Resource |
| 50 | private PayDemoOrderMapper payDemoOrderMapper; | 68 | private PayDemoOrderMapper payDemoOrderMapper; |
| @@ -53,8 +71,8 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | @@ -53,8 +71,8 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | ||
| 53 | spuNames.put(1L, new Object[]{"ๅไธบๆๆบ", 1}); | 71 | spuNames.put(1L, new Object[]{"ๅไธบๆๆบ", 1}); |
| 54 | spuNames.put(2L, new Object[]{"ๅฐ็ฑณ็ต่ง", 10}); | 72 | spuNames.put(2L, new Object[]{"ๅฐ็ฑณ็ต่ง", 10}); |
| 55 | spuNames.put(3L, new Object[]{"่นๆๆ่กจ", 100}); | 73 | spuNames.put(3L, new Object[]{"่นๆๆ่กจ", 100}); |
| 56 | - spuNames.put(4L, new Object[]{"ๅ็ก็ฌ่ฎฐๆฌ", 200}); | ||
| 57 | - spuNames.put(5L, new Object[]{"่ๆฅๆฑฝ่ฝฆ", 300}); | 74 | + spuNames.put(4L, new Object[]{"ๅ็ก็ฌ่ฎฐๆฌ", 1000}); |
| 75 | + spuNames.put(5L, new Object[]{"่ๆฅๆฑฝ่ฝฆ", 200000}); | ||
| 58 | } | 76 | } |
| 59 | 77 | ||
| 60 | @Override | 78 | @Override |
| @@ -67,7 +85,7 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | @@ -67,7 +85,7 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | ||
| 67 | // 1.2 ๆๅ ฅ demo ่ฎขๅ | 85 | // 1.2 ๆๅ ฅ demo ่ฎขๅ |
| 68 | PayDemoOrderDO demoOrder = new PayDemoOrderDO().setUserId(userId) | 86 | PayDemoOrderDO demoOrder = new PayDemoOrderDO().setUserId(userId) |
| 69 | .setSpuId(createReqVO.getSpuId()).setSpuName(spuName) | 87 | .setSpuId(createReqVO.getSpuId()).setSpuName(spuName) |
| 70 | - .setPayed(false).setRefundPrice(0); | 88 | + .setPrice(price).setPayed(false).setRefundPrice(0); |
| 71 | payDemoOrderMapper.insert(demoOrder); | 89 | payDemoOrderMapper.insert(demoOrder); |
| 72 | 90 | ||
| 73 | // 2.1 ๅๅปบๆฏไปๅ | 91 | // 2.1 ๅๅปบๆฏไปๅ |
| @@ -99,4 +117,152 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | @@ -99,4 +117,152 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { | ||
| 99 | return payDemoOrderMapper.selectPage(pageReqVO); | 117 | return payDemoOrderMapper.selectPage(pageReqVO); |
| 100 | } | 118 | } |
| 101 | 119 | ||
| 120 | + @Override | ||
| 121 | + public void updateDemoOrderPaid(Long id, Long payOrderId) { | ||
| 122 | + // ๆ ก้ชๅนถ่ทๅพๆฏไป่ฎขๅ๏ผๅฏๆฏไป๏ผ | ||
| 123 | + PayOrderRespDTO payOrder = validateDemoOrderCanPaid(id, payOrderId); | ||
| 124 | + | ||
| 125 | + // ๆดๆฐ PayDemoOrderDO ็ถๆไธบๅทฒๆฏไป | ||
| 126 | + int updateCount = payDemoOrderMapper.updateByIdAndPayed(id, false, | ||
| 127 | + new PayDemoOrderDO().setPayed(true).setPayTime(LocalDateTime.now()) | ||
| 128 | + .setPayChannelCode(payOrder.getChannelCode())); | ||
| 129 | + if (updateCount == 0) { | ||
| 130 | + throw exception(PAY_DEMO_ORDER_UPDATE_PAID_STATUS_NOT_UNPAID); | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * ๆ ก้ชไบคๆ่ฎขๅๆปก่ถณ่ขซๆฏไป็ๆกไปถ | ||
| 136 | + * | ||
| 137 | + * 1. ไบคๆ่ฎขๅๆชๆฏไป | ||
| 138 | + * 2. ๆฏไปๅๅทฒๆฏไป | ||
| 139 | + * | ||
| 140 | + * @param id ไบคๆ่ฎขๅ็ผๅท | ||
| 141 | + * @param payOrderId ๆฏไป่ฎขๅ็ผๅท | ||
| 142 | + * @return ไบคๆ่ฎขๅ | ||
| 143 | + */ | ||
| 144 | + private PayOrderRespDTO validateDemoOrderCanPaid(Long id, Long payOrderId) { | ||
| 145 | + // 1.1 ๆ ก้ช่ฎขๅๆฏๅฆๅญๅจ | ||
| 146 | + PayDemoOrderDO order = payDemoOrderMapper.selectById(id); | ||
| 147 | + if (order == null) { | ||
| 148 | + throw exception(PAY_DEMO_ORDER_NOT_FOUND); | ||
| 149 | + } | ||
| 150 | + // 1.2 ๆ ก้ช่ฎขๅๆชๆฏไป | ||
| 151 | + if (order.getPayed()) { | ||
| 152 | + log.error("[validateDemoOrderCanPaid][order({}) ไธๅคไบๅพ ๆฏไป็ถๆ๏ผ่ฏท่ฟ่กๅค็๏ผorder ๆฐๆฎๆฏ๏ผ{}]", | ||
| 153 | + id, toJsonString(order)); | ||
| 154 | + throw exception(PAY_DEMO_ORDER_UPDATE_PAID_STATUS_NOT_UNPAID); | ||
| 155 | + } | ||
| 156 | + // 1.3 ๆ ก้ชๆฏไป่ฎขๅๅน้ | ||
| 157 | + if (notEqual(order.getPayOrderId(), payOrderId)) { // ๆฏไปๅๅท | ||
| 158 | + log.error("[validateDemoOrderCanPaid][order({}) ๆฏไปๅไธๅน้ ({})๏ผ่ฏท่ฟ่กๅค็๏ผorder ๆฐๆฎๆฏ๏ผ{}]", | ||
| 159 | + id, payOrderId, toJsonString(order)); | ||
| 160 | + throw exception(PAY_DEMO_ORDER_UPDATE_PAID_FAIL_PAY_ORDER_ID_ERROR); | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + // 2.1 ๆ ก้ชๆฏไปๅๆฏๅฆๅญๅจ | ||
| 164 | + PayOrderRespDTO payOrder = payOrderApi.getOrder(payOrderId); | ||
| 165 | + if (payOrder == null) { | ||
| 166 | + log.error("[validateDemoOrderCanPaid][order({}) payOrder({}) ไธๅญๅจ๏ผ่ฏท่ฟ่กๅค็๏ผ]", id, payOrderId); | ||
| 167 | + throw exception(PAY_ORDER_NOT_FOUND); | ||
| 168 | + } | ||
| 169 | + // 2.2 ๆ ก้ชๆฏไปๅๅทฒๆฏไป | ||
| 170 | + if (!PayOrderStatusEnum.isSuccess(payOrder.getStatus())) { | ||
| 171 | + log.error("[validateDemoOrderCanPaid][order({}) payOrder({}) ๆชๆฏไป๏ผ่ฏท่ฟ่กๅค็๏ผpayOrder ๆฐๆฎๆฏ๏ผ{}]", | ||
| 172 | + id, payOrderId, toJsonString(payOrder)); | ||
| 173 | + throw exception(PAY_DEMO_ORDER_UPDATE_PAID_FAIL_PAY_ORDER_STATUS_NOT_SUCCESS); | ||
| 174 | + } | ||
| 175 | + // 2.3 ๆ ก้ชๆฏไป้้ขไธ่ด | ||
| 176 | + if (notEqual(payOrder.getAmount(), order.getPrice())) { | ||
| 177 | + log.error("[validateDemoOrderCanPaid][order({}) payOrder({}) ๆฏไป้้ขไธๅน้ ๏ผ่ฏท่ฟ่กๅค็๏ผorder ๆฐๆฎๆฏ๏ผ{}๏ผpayOrder ๆฐๆฎๆฏ๏ผ{}]", | ||
| 178 | + id, payOrderId, toJsonString(order), toJsonString(payOrder)); | ||
| 179 | + throw exception(PAY_DEMO_ORDER_UPDATE_PAID_FAIL_PAY_PRICE_NOT_MATCH); | ||
| 180 | + } | ||
| 181 | + // 2.4 ๆ ก้ชๆฏไป่ฎขๅๅน้ ๏ผไบๆฌก๏ผ | ||
| 182 | + if (notEqual(payOrder.getMerchantOrderId(), id.toString())) { | ||
| 183 | + log.error("[validateDemoOrderCanPaid][order({}) ๆฏไปๅไธๅน้ ({})๏ผ่ฏท่ฟ่กๅค็๏ผpayOrder ๆฐๆฎๆฏ๏ผ{}]", | ||
| 184 | + id, payOrderId, toJsonString(payOrder)); | ||
| 185 | + throw exception(PAY_DEMO_ORDER_UPDATE_PAID_FAIL_PAY_ORDER_ID_ERROR); | ||
| 186 | + } | ||
| 187 | + return payOrder; | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + @Override | ||
| 191 | + public void refundDemoOrder(Long id, String userIp) { | ||
| 192 | + // 1. ๆ ก้ช่ฎขๅๆฏๅฆๅฏไปฅ้ๆฌพ | ||
| 193 | + PayDemoOrderDO order = validateDemoOrderCanRefund(id); | ||
| 194 | + | ||
| 195 | + // 2.1 ๅๅปบ้ๆฌพๅ | ||
| 196 | + Long payRefundId = payRefundApi.createPayRefund(new PayRefundCreateReqDTO() | ||
| 197 | + .setAppId(PAY_APP_ID).setUserIp(getClientIP()) // ๆฏไปๅบ็จ | ||
| 198 | + .setPayOrderId(order.getPayOrderId()) // ๆฏไปๅๅท | ||
| 199 | + .setReason("ๆณ้้ฑ").setAmount(order.getPrice()));// ไปทๆ ผไฟกๆฏ | ||
| 200 | + // 2.2 ๆดๆฐ้ๆฌพๅๅฐ demo ่ฎขๅ | ||
| 201 | + payDemoOrderMapper.updateById(new PayDemoOrderDO().setId(id) | ||
| 202 | + .setPayRefundId(payRefundId).setRefundPrice(order.getPrice())); | ||
| 203 | + } | ||
| 204 | + | ||
| 205 | + private PayDemoOrderDO validateDemoOrderCanRefund(Long id) { | ||
| 206 | + // ๆ ก้ช่ฎขๅๆฏๅฆๅญๅจ | ||
| 207 | + PayDemoOrderDO order = payDemoOrderMapper.selectById(id); | ||
| 208 | + if (order == null) { | ||
| 209 | + throw exception(PAY_DEMO_ORDER_NOT_FOUND); | ||
| 210 | + } | ||
| 211 | + // ๆ ก้ช่ฎขๅๆฏๅฆๆฏไป | ||
| 212 | + if (!order.getPayed()) { | ||
| 213 | + throw exception(PAY_DEMO_ORDER_REFUND_FAIL_NOT_PAID); | ||
| 214 | + } | ||
| 215 | + // ๆ ก้ช่ฎขๅๆฏๅฆๅทฒ้ๆฌพ | ||
| 216 | + if (order.getPayRefundId() != null) { | ||
| 217 | + throw exception(PAY_DEMO_ORDER_REFUND_FAIL_REFUNDED); | ||
| 218 | + } | ||
| 219 | + return order; | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + @Override | ||
| 223 | + public void updateDemoOrderRefunded(Long id, Long payRefundId) { | ||
| 224 | + // 1. ๆ ก้ชๅนถ่ทๅพ้ๆฌพ่ฎขๅ๏ผๅฏ้ๆฌพ๏ผ | ||
| 225 | + PayRefundRespDTO payRefund = validateDemoOrderCanRefunded(id, payRefundId); | ||
| 226 | + // 2.2 ๆดๆฐ้ๆฌพๅๅฐ demo ่ฎขๅ | ||
| 227 | + payDemoOrderMapper.updateById(new PayDemoOrderDO().setId(id) | ||
| 228 | + .setRefundTime(payRefund.getSuccessTime())); | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + private PayRefundRespDTO validateDemoOrderCanRefunded(Long id, Long payRefundId) { | ||
| 232 | + // 1.1 ๆ ก้ช็คบไพ่ฎขๅ | ||
| 233 | + PayDemoOrderDO order = payDemoOrderMapper.selectById(id); | ||
| 234 | + if (order == null) { | ||
| 235 | + throw exception(PAY_DEMO_ORDER_NOT_FOUND); | ||
| 236 | + } | ||
| 237 | + // 1.2 ๆ ก้ช้ๆฌพ่ฎขๅๅน้ | ||
| 238 | + if (Objects.equals(order.getPayOrderId(), payRefundId)) { | ||
| 239 | + log.error("[validateDemoOrderCanRefunded][order({}) ้ๆฌพๅไธๅน้ ({})๏ผ่ฏท่ฟ่กๅค็๏ผorder ๆฐๆฎๆฏ๏ผ{}]", | ||
| 240 | + id, payRefundId, toJsonString(order)); | ||
| 241 | + throw exception(PAY_DEMO_ORDER_REFUND_FAIL_REFUND_ORDER_ID_ERROR); | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + // 2.1 ๆ ก้ช้ๆฌพ่ฎขๅ | ||
| 245 | + PayRefundRespDTO payRefund = payRefundApi.getPayRefund(payRefundId); | ||
| 246 | + if (payRefund == null) { | ||
| 247 | + throw exception(PAY_DEMO_ORDER_REFUND_FAIL_REFUND_NOT_FOUND); | ||
| 248 | + } | ||
| 249 | + // 2.2 | ||
| 250 | + if (!PayRefundStatusEnum.isSuccess(payRefund.getStatus())) { | ||
| 251 | + throw exception(PAY_DEMO_ORDER_REFUND_FAIL_REFUND_NOT_SUCCESS); | ||
| 252 | + } | ||
| 253 | + // 2.3 ๆ ก้ช้ๆฌพ้้ขไธ่ด | ||
| 254 | + if (notEqual(payRefund.getRefundAmount(), order.getPrice())) { | ||
| 255 | + log.error("[validateDemoOrderCanRefunded][order({}) payRefund({}) ้ๆฌพ้้ขไธๅน้ ๏ผ่ฏท่ฟ่กๅค็๏ผorder ๆฐๆฎๆฏ๏ผ{}๏ผpayRefund ๆฐๆฎๆฏ๏ผ{}]", | ||
| 256 | + id, payRefundId, toJsonString(order), toJsonString(payRefund)); | ||
| 257 | + throw exception(PAY_DEMO_ORDER_REFUND_FAIL_REFUND_PRICE_NOT_MATCH); | ||
| 258 | + } | ||
| 259 | + // 2.4 ๆ ก้ช้ๆฌพ่ฎขๅๅน้ ๏ผไบๆฌก๏ผ | ||
| 260 | + if (notEqual(payRefund.getMerchantOrderId(), id.toString())) { | ||
| 261 | + log.error("[validateDemoOrderCanRefunded][order({}) ้ๆฌพๅไธๅน้ ({})๏ผ่ฏท่ฟ่กๅค็๏ผpayRefund ๆฐๆฎๆฏ๏ผ{}]", | ||
| 262 | + id, payRefundId, toJsonString(payRefund)); | ||
| 263 | + throw exception(PAY_DEMO_ORDER_REFUND_FAIL_REFUND_ORDER_ID_ERROR); | ||
| 264 | + } | ||
| 265 | + return payRefund; | ||
| 266 | + } | ||
| 267 | + | ||
| 102 | } | 268 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java
| @@ -13,8 +13,8 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyLogDO; | @@ -13,8 +13,8 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyLogDO; | ||
| 13 | import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyTaskDO; | 13 | import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyTaskDO; |
| 14 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; | 14 | import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; |
| 15 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; | 15 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; |
| 16 | -import cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyLogCoreMapper; | ||
| 17 | -import cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyTaskCoreMapper; | 16 | +import cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyLogMapper; |
| 17 | +import cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyTaskMapper; | ||
| 18 | import cn.iocoder.yudao.module.pay.dal.redis.notify.PayNotifyLockRedisDAO; | 18 | import cn.iocoder.yudao.module.pay.dal.redis.notify.PayNotifyLockRedisDAO; |
| 19 | import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; | 19 | import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; |
| 20 | import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; | 20 | import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; |
| @@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional; | @@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional; | ||
| 32 | 32 | ||
| 33 | import javax.annotation.Resource; | 33 | import javax.annotation.Resource; |
| 34 | import javax.validation.Valid; | 34 | import javax.validation.Valid; |
| 35 | +import java.time.Duration; | ||
| 35 | import java.time.LocalDateTime; | 36 | import java.time.LocalDateTime; |
| 36 | import java.util.HashMap; | 37 | import java.util.HashMap; |
| 37 | import java.util.List; | 38 | import java.util.List; |
| @@ -40,6 +41,7 @@ import java.util.Objects; | @@ -40,6 +41,7 @@ import java.util.Objects; | ||
| 40 | import java.util.concurrent.CountDownLatch; | 41 | import java.util.concurrent.CountDownLatch; |
| 41 | import java.util.concurrent.TimeUnit; | 42 | import java.util.concurrent.TimeUnit; |
| 42 | 43 | ||
| 44 | +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.*; | ||
| 43 | import static cn.iocoder.yudao.module.pay.framework.job.config.PayJobConfiguration.NOTIFY_THREAD_POOL_TASK_EXECUTOR; | 45 | import static cn.iocoder.yudao.module.pay.framework.job.config.PayJobConfiguration.NOTIFY_THREAD_POOL_TASK_EXECUTOR; |
| 44 | 46 | ||
| 45 | /** | 47 | /** |
| @@ -69,9 +71,9 @@ public class PayNotifyServiceImpl implements PayNotifyService { | @@ -69,9 +71,9 @@ public class PayNotifyServiceImpl implements PayNotifyService { | ||
| 69 | private PayRefundService refundService; | 71 | private PayRefundService refundService; |
| 70 | 72 | ||
| 71 | @Resource | 73 | @Resource |
| 72 | - private PayNotifyTaskCoreMapper payNotifyTaskCoreMapper; | 74 | + private PayNotifyTaskMapper payNotifyTaskMapper; |
| 73 | @Resource | 75 | @Resource |
| 74 | - private PayNotifyLogCoreMapper payNotifyLogCoreMapper; | 76 | + private PayNotifyLogMapper payNotifyLogMapper; |
| 75 | 77 | ||
| 76 | @Resource(name = NOTIFY_THREAD_POOL_TASK_EXECUTOR) | 78 | @Resource(name = NOTIFY_THREAD_POOL_TASK_EXECUTOR) |
| 77 | private ThreadPoolTaskExecutor threadPoolTaskExecutor; | 79 | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| @@ -101,7 +103,7 @@ public class PayNotifyServiceImpl implements PayNotifyService { | @@ -101,7 +103,7 @@ public class PayNotifyServiceImpl implements PayNotifyService { | ||
| 101 | } | 103 | } |
| 102 | 104 | ||
| 103 | // ๆง่กๆๅ ฅ | 105 | // ๆง่กๆๅ ฅ |
| 104 | - payNotifyTaskCoreMapper.insert(task); | 106 | + payNotifyTaskMapper.insert(task); |
| 105 | 107 | ||
| 106 | // ๅผๆญฅ็ดๆฅๅ่ตทไปปๅกใ่ฝ็ถไผๆๅฎๆถไปปๅกๆซๆ๏ผไฝๆฏไผๅฏผ่ดๅปถ่ฟ | 108 | // ๅผๆญฅ็ดๆฅๅ่ตทไปปๅกใ่ฝ็ถไผๆๅฎๆถไปปๅกๆซๆ๏ผไฝๆฏไผๅฏผ่ดๅปถ่ฟ |
| 107 | self.executeNotifyAsync(task); | 109 | self.executeNotifyAsync(task); |
| @@ -110,7 +112,7 @@ public class PayNotifyServiceImpl implements PayNotifyService { | @@ -110,7 +112,7 @@ public class PayNotifyServiceImpl implements PayNotifyService { | ||
| 110 | @Override | 112 | @Override |
| 111 | public int executeNotify() throws InterruptedException { | 113 | public int executeNotify() throws InterruptedException { |
| 112 | // ่ทๅพ้่ฆ้็ฅ็ไปปๅก | 114 | // ่ทๅพ้่ฆ้็ฅ็ไปปๅก |
| 113 | - List<PayNotifyTaskDO> tasks = payNotifyTaskCoreMapper.selectListByNotify(); | 115 | + List<PayNotifyTaskDO> tasks = payNotifyTaskMapper.selectListByNotify(); |
| 114 | if (CollUtil.isEmpty(tasks)) { | 116 | if (CollUtil.isEmpty(tasks)) { |
| 115 | return 0; | 117 | return 0; |
| 116 | } | 118 | } |
| @@ -168,8 +170,8 @@ public class PayNotifyServiceImpl implements PayNotifyService { | @@ -168,8 +170,8 @@ public class PayNotifyServiceImpl implements PayNotifyService { | ||
| 168 | payNotifyLockCoreRedisDAO.lock(task.getId(), NOTIFY_TIMEOUT_MILLIS, () -> { | 170 | payNotifyLockCoreRedisDAO.lock(task.getId(), NOTIFY_TIMEOUT_MILLIS, () -> { |
| 169 | // ๆ ก้ช๏ผๅฝๅไปปๅกๆฏๅฆๅทฒ็ป่ขซ้็ฅ่ฟ | 171 | // ๆ ก้ช๏ผๅฝๅไปปๅกๆฏๅฆๅทฒ็ป่ขซ้็ฅ่ฟ |
| 170 | // ่ฝ็ถๅทฒ็ป้่ฟๅๅธๅผๅ ้๏ผไฝๆฏๅฏ่ฝๅๆถๆปก่ถณ้็ฅ็ๆกไปถ๏ผ็ถๅ้ฝๅป่ทๅพ้ใๆญคๆถ๏ผ็ฌฌไธไธชๆง่กๅฎๅ๏ผ็ฌฌไบไธช่ฟๆฏ่ฝๆฟๅฐ้๏ผ็ถๅไผๅๆง่กไธๆฌกใ | 172 | // ่ฝ็ถๅทฒ็ป้่ฟๅๅธๅผๅ ้๏ผไฝๆฏๅฏ่ฝๅๆถๆปก่ถณ้็ฅ็ๆกไปถ๏ผ็ถๅ้ฝๅป่ทๅพ้ใๆญคๆถ๏ผ็ฌฌไธไธชๆง่กๅฎๅ๏ผ็ฌฌไบไธช่ฟๆฏ่ฝๆฟๅฐ้๏ผ็ถๅไผๅๆง่กไธๆฌกใ |
| 171 | - PayNotifyTaskDO dbTask = payNotifyTaskCoreMapper.selectById(task.getId()); | ||
| 172 | - if (LocalDateTimeUtils.afterNow(dbTask.getNextNotifyTime())) { | 173 | + PayNotifyTaskDO dbTask = payNotifyTaskMapper.selectById(task.getId()); |
| 174 | + if (afterNow(dbTask.getNextNotifyTime())) { | ||
| 173 | log.info("[executeNotifySync][dbTask({}) ไปปๅก่ขซๅฟฝ็ฅ๏ผๅๅ ๆฏๆชๅฐ่พพไธๆฌก้็ฅๆถ้ด๏ผๅฏ่ฝๆฏๅ ไธบๅนถๅๆง่กไบ]", | 175 | log.info("[executeNotifySync][dbTask({}) ไปปๅก่ขซๅฟฝ็ฅ๏ผๅๅ ๆฏๆชๅฐ่พพไธๆฌก้็ฅๆถ้ด๏ผๅฏ่ฝๆฏๅ ไธบๅนถๅๆง่กไบ]", |
| 174 | JsonUtils.toJsonString(dbTask)); | 176 | JsonUtils.toJsonString(dbTask)); |
| 175 | return; | 177 | return; |
| @@ -197,7 +199,7 @@ public class PayNotifyServiceImpl implements PayNotifyService { | @@ -197,7 +199,7 @@ public class PayNotifyServiceImpl implements PayNotifyService { | ||
| 197 | // ่ฎฐๅฝ PayNotifyLog ๆฅๅฟ | 199 | // ่ฎฐๅฝ PayNotifyLog ๆฅๅฟ |
| 198 | String response = invokeException != null ? ExceptionUtil.getRootCauseMessage(invokeException) : | 200 | String response = invokeException != null ? ExceptionUtil.getRootCauseMessage(invokeException) : |
| 199 | JsonUtils.toJsonString(invokeResult); | 201 | JsonUtils.toJsonString(invokeResult); |
| 200 | - payNotifyLogCoreMapper.insert(PayNotifyLogDO.builder().taskId(task.getId()) | 202 | + payNotifyLogMapper.insert(PayNotifyLogDO.builder().taskId(task.getId()) |
| 201 | .notifyTimes(task.getNotifyTimes() + 1).status(newStatus).response(response).build()); | 203 | .notifyTimes(task.getNotifyTimes() + 1).status(newStatus).response(response).build()); |
| 202 | } | 204 | } |
| 203 | 205 | ||
| @@ -250,23 +252,22 @@ public class PayNotifyServiceImpl implements PayNotifyService { | @@ -250,23 +252,22 @@ public class PayNotifyServiceImpl implements PayNotifyService { | ||
| 250 | // ๆ ๅตไธ๏ผ่ฐ็จๆๅ | 252 | // ๆ ๅตไธ๏ผ่ฐ็จๆๅ |
| 251 | if (invokeResult != null && invokeResult.isSuccess()) { | 253 | if (invokeResult != null && invokeResult.isSuccess()) { |
| 252 | updateTask.setStatus(PayNotifyStatusEnum.SUCCESS.getStatus()); | 254 | updateTask.setStatus(PayNotifyStatusEnum.SUCCESS.getStatus()); |
| 255 | + payNotifyTaskMapper.updateById(updateTask); | ||
| 253 | return updateTask.getStatus(); | 256 | return updateTask.getStatus(); |
| 254 | } | 257 | } |
| 255 | // ๆ ๅตไบ๏ผ่ฐ็จๅคฑ่ดฅใ่ฐ็จๅผๅธธ | 258 | // ๆ ๅตไบ๏ผ่ฐ็จๅคฑ่ดฅใ่ฐ็จๅผๅธธ |
| 256 | // 2.1 ่ถ ่ฟๆๅคงๅ่ฐๆฌกๆฐ | 259 | // 2.1 ่ถ ่ฟๆๅคงๅ่ฐๆฌกๆฐ |
| 257 | if (updateTask.getNotifyTimes() >= PayNotifyTaskDO.NOTIFY_FREQUENCY.length) { | 260 | if (updateTask.getNotifyTimes() >= PayNotifyTaskDO.NOTIFY_FREQUENCY.length) { |
| 258 | updateTask.setStatus(PayNotifyStatusEnum.FAILURE.getStatus()); | 261 | updateTask.setStatus(PayNotifyStatusEnum.FAILURE.getStatus()); |
| 262 | + payNotifyTaskMapper.updateById(updateTask); | ||
| 259 | return updateTask.getStatus(); | 263 | return updateTask.getStatus(); |
| 260 | } | 264 | } |
| 261 | // 2.2 ๆช่ถ ่ฟๆๅคงๅ่ฐๆฌกๆฐ | 265 | // 2.2 ๆช่ถ ่ฟๆๅคงๅ่ฐๆฌกๆฐ |
| 262 | - updateTask.setNextNotifyTime(LocalDateTime.now().plusSeconds(PayNotifyTaskDO.NOTIFY_FREQUENCY[updateTask.getNotifyTimes()])); | 266 | + updateTask.setNextNotifyTime(addTime(Duration.ofSeconds(PayNotifyTaskDO.NOTIFY_FREQUENCY[updateTask.getNotifyTimes()]))); |
| 263 | updateTask.setStatus(invokeException != null ? PayNotifyStatusEnum.REQUEST_FAILURE.getStatus() | 267 | updateTask.setStatus(invokeException != null ? PayNotifyStatusEnum.REQUEST_FAILURE.getStatus() |
| 264 | : PayNotifyStatusEnum.REQUEST_SUCCESS.getStatus()); | 268 | : PayNotifyStatusEnum.REQUEST_SUCCESS.getStatus()); |
| 269 | + payNotifyTaskMapper.updateById(updateTask); | ||
| 265 | return updateTask.getStatus(); | 270 | return updateTask.getStatus(); |
| 266 | } | 271 | } |
| 267 | 272 | ||
| 268 | - private void processNotifySuccess(PayNotifyTaskDO task, PayNotifyTaskDO updateTask) { | ||
| 269 | - payNotifyTaskCoreMapper.updateById(updateTask); | ||
| 270 | - } | ||
| 271 | - | ||
| 272 | } | 273 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderService.java
| 1 | package cn.iocoder.yudao.module.pay.service.order; | 1 | package cn.iocoder.yudao.module.pay.service.order; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; | ||
| 4 | -import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; | ||
| 5 | -import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; | ||
| 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | 4 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| 8 | -import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; | 5 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 6 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 9 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; | 7 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; |
| 10 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; | ||
| 11 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitRespDTO; | 8 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; |
| 9 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; | ||
| 10 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitReqVO; | ||
| 11 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO; | ||
| 12 | +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; | ||
| 12 | 13 | ||
| 13 | import javax.validation.Valid; | 14 | import javax.validation.Valid; |
| 15 | +import javax.validation.constraints.NotEmpty; | ||
| 14 | import java.util.Collection; | 16 | import java.util.Collection; |
| 15 | import java.util.List; | 17 | import java.util.List; |
| 16 | import java.util.Map; | 18 | import java.util.Map; |
| @@ -81,17 +83,20 @@ public interface PayOrderService { | @@ -81,17 +83,20 @@ public interface PayOrderService { | ||
| 81 | * ๆไบคๆฏไป | 83 | * ๆไบคๆฏไป |
| 82 | * ๆญคๆถ๏ผไผๅ่ตทๆฏไปๆธ ้็่ฐ็จ | 84 | * ๆญคๆถ๏ผไผๅ่ตทๆฏไปๆธ ้็่ฐ็จ |
| 83 | * | 85 | * |
| 84 | - * @param reqDTO ๆไบค่ฏทๆฑ | 86 | + * @param reqVO ๆไบค่ฏทๆฑ |
| 87 | + * @param userIp ๆไบค IP | ||
| 85 | * @return ๆไบค็ปๆ | 88 | * @return ๆไบค็ปๆ |
| 86 | */ | 89 | */ |
| 87 | - PayOrderSubmitRespDTO submitPayOrder(@Valid PayOrderSubmitReqDTO reqDTO); | 90 | + PayOrderSubmitRespVO submitPayOrder(@Valid PayOrderSubmitReqVO reqVO, |
| 91 | + @NotEmpty(message = "ๆไบค IP ไธ่ฝไธบ็ฉบ") String userIp); | ||
| 88 | 92 | ||
| 89 | /** | 93 | /** |
| 90 | * ้็ฅๆฏไปๅๆๅ | 94 | * ้็ฅๆฏไปๅๆๅ |
| 91 | * | 95 | * |
| 92 | * @param channelId ๆธ ้็ผๅท | 96 | * @param channelId ๆธ ้็ผๅท |
| 93 | - * @param notifyData ้็ฅๆฐๆฎ | 97 | + * @param notify ้็ฅ |
| 98 | + * @param rawNotify ้็ฅๆฐๆฎ | ||
| 94 | */ | 99 | */ |
| 95 | - void notifyPayOrder(Long channelId, PayNotifyDataDTO notifyData) throws Exception; | 100 | + void notifyPayOrder(Long channelId, PayOrderNotifyRespDTO notify, PayNotifyReqDTO rawNotify); |
| 96 | 101 | ||
| 97 | } | 102 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java
| @@ -3,19 +3,21 @@ package cn.iocoder.yudao.module.pay.service.order; | @@ -3,19 +3,21 @@ package cn.iocoder.yudao.module.pay.service.order; | ||
| 3 | import cn.hutool.core.date.DateUtil; | 3 | import cn.hutool.core.date.DateUtil; |
| 4 | import cn.hutool.core.util.ObjectUtil; | 4 | import cn.hutool.core.util.ObjectUtil; |
| 5 | import cn.hutool.core.util.RandomUtil; | 5 | import cn.hutool.core.util.RandomUtil; |
| 6 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 8 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | 7 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 9 | import cn.iocoder.yudao.framework.pay.config.PayProperties; | 8 | import cn.iocoder.yudao.framework.pay.config.PayProperties; |
| 10 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; | 9 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; |
| 11 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; | 10 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; |
| 12 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; | ||
| 13 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderNotifyRespDTO; | ||
| 14 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; | 11 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 12 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayOrderNotifyRespDTO; | ||
| 13 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | ||
| 14 | +import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderUnifiedRespDTO; | ||
| 15 | import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; | 15 | import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; |
| 16 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; | 16 | import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; |
| 17 | import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; | 17 | import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; |
| 18 | import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; | 18 | import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; |
| 19 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitReqVO; | ||
| 20 | +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO; | ||
| 19 | import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; | 21 | import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; |
| 20 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; | 22 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; |
| 21 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; | 23 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; |
| @@ -31,8 +33,6 @@ import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; | @@ -31,8 +33,6 @@ import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; | ||
| 31 | import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; | 33 | import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; |
| 32 | import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; | 34 | import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; |
| 33 | import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; | 35 | import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; |
| 34 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; | ||
| 35 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitRespDTO; | ||
| 36 | import lombok.extern.slf4j.Slf4j; | 36 | import lombok.extern.slf4j.Slf4j; |
| 37 | import org.springframework.stereotype.Service; | 37 | import org.springframework.stereotype.Service; |
| 38 | import org.springframework.transaction.annotation.Transactional; | 38 | import org.springframework.transaction.annotation.Transactional; |
| @@ -42,9 +42,9 @@ import javax.annotation.Resource; | @@ -42,9 +42,9 @@ import javax.annotation.Resource; | ||
| 42 | import java.time.LocalDateTime; | 42 | import java.time.LocalDateTime; |
| 43 | import java.util.Collection; | 43 | import java.util.Collection; |
| 44 | import java.util.List; | 44 | import java.util.List; |
| 45 | -import java.util.Objects; | ||
| 46 | 45 | ||
| 47 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | 46 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 47 | +import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.*; | ||
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| 50 | * ๆฏไป่ฎขๅ Service ๅฎ็ฐ็ฑป | 50 | * ๆฏไป่ฎขๅ Service ๅฎ็ฐ็ฑป |
| @@ -105,7 +105,7 @@ public class PayOrderServiceImpl implements PayOrderService { | @@ -105,7 +105,7 @@ public class PayOrderServiceImpl implements PayOrderService { | ||
| 105 | reqDTO.getAppId(), reqDTO.getMerchantOrderId()); | 105 | reqDTO.getAppId(), reqDTO.getMerchantOrderId()); |
| 106 | if (order != null) { | 106 | if (order != null) { |
| 107 | log.warn("[createPayOrder][appId({}) merchantOrderId({}) ๅทฒ็ปๅญๅจๅฏนๅบ็ๆฏไปๅ({})]", order.getAppId(), | 107 | log.warn("[createPayOrder][appId({}) merchantOrderId({}) ๅทฒ็ปๅญๅจๅฏนๅบ็ๆฏไปๅ({})]", order.getAppId(), |
| 108 | - order.getMerchantOrderId(), JsonUtils.toJsonString(order)); // ็่ฎบๆฅ่ฏด๏ผไธไผๅบ็ฐ่ฟไธชๆ ๅต | 108 | + order.getMerchantOrderId(), toJsonString(order)); // ็่ฎบๆฅ่ฏด๏ผไธไผๅบ็ฐ่ฟไธชๆ ๅต |
| 109 | return order.getId(); | 109 | return order.getId(); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| @@ -127,51 +127,60 @@ public class PayOrderServiceImpl implements PayOrderService { | @@ -127,51 +127,60 @@ public class PayOrderServiceImpl implements PayOrderService { | ||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | @Override | 129 | @Override |
| 130 | - public PayOrderSubmitRespDTO submitPayOrder(PayOrderSubmitReqDTO reqDTO) { | ||
| 131 | - // ๆ ก้ช App | ||
| 132 | - appService.validPayApp(reqDTO.getAppId()); | ||
| 133 | - // ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๆๆ | ||
| 134 | - PayChannelDO channel = channelService.validPayChannel(reqDTO.getAppId(), reqDTO.getChannelCode()); | ||
| 135 | - // ๆ ก้ชๆฏไปๅฎขๆท็ซฏๆฏๅฆๆญฃ็กฎๅๅงๅ | 130 | + public PayOrderSubmitRespVO submitPayOrder(PayOrderSubmitReqVO reqVO, String userIp) { |
| 131 | + // 1. ่ทๅพ PayOrderDO ๏ผๅนถๆ ก้ชๅ ถๆฏๅฆๅญๅจ | ||
| 132 | + PayOrderDO order = validatePayOrderCanSubmit(reqVO.getId()); | ||
| 133 | + // 1.2 ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๆๆ | ||
| 134 | + PayChannelDO channel = validatePayChannelCanSubmit(order.getAppId(), reqVO.getChannelCode()); | ||
| 136 | PayClient client = payClientFactory.getPayClient(channel.getId()); | 135 | PayClient client = payClientFactory.getPayClient(channel.getId()); |
| 137 | - if (client == null) { | ||
| 138 | - log.error("[submitPayOrder][ๆธ ้็ผๅท({}) ๆพไธๅฐๅฏนๅบ็ๆฏไปๅฎขๆท็ซฏ]", channel.getId()); | ||
| 139 | - throw exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - // ่ทๅพ PayOrderDO ๏ผๅนถๆ ก้ชๅ ถๆฏๅฆๅญๅจ | ||
| 143 | - PayOrderDO order = orderMapper.selectById(reqDTO.getId()); | ||
| 144 | - if (order == null || !Objects.equals(order.getAppId(), reqDTO.getAppId())) { // ๆฏๅฆๅญๅจ | ||
| 145 | - throw exception(ErrorCodeConstants.PAY_ORDER_NOT_FOUND); | ||
| 146 | - } | ||
| 147 | - if (!PayOrderStatusEnum.WAITING.getStatus().equals(order.getStatus())) { // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๅพ ๆฏไป | ||
| 148 | - throw exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_WAITING); | ||
| 149 | - } | ||
| 150 | 136 | ||
| 151 | - // ๆๅ ฅ PayOrderExtensionDO | ||
| 152 | - PayOrderExtensionDO orderExtension = PayOrderConvert.INSTANCE.convert(reqDTO) | 137 | + // 2. ๆๅ ฅ PayOrderExtensionDO |
| 138 | + PayOrderExtensionDO orderExtension = PayOrderConvert.INSTANCE.convert(reqVO, userIp) | ||
| 153 | .setOrderId(order.getId()).setNo(generateOrderExtensionNo()) | 139 | .setOrderId(order.getId()).setNo(generateOrderExtensionNo()) |
| 154 | .setChannelId(channel.getId()).setChannelCode(channel.getCode()) | 140 | .setChannelId(channel.getId()).setChannelCode(channel.getCode()) |
| 155 | .setStatus(PayOrderStatusEnum.WAITING.getStatus()); | 141 | .setStatus(PayOrderStatusEnum.WAITING.getStatus()); |
| 156 | orderExtensionMapper.insert(orderExtension); | 142 | orderExtensionMapper.insert(orderExtension); |
| 157 | 143 | ||
| 158 | - // ่ฐ็จไธๆนๆฅๅฃ | ||
| 159 | - PayOrderUnifiedReqDTO unifiedOrderReqDTO = PayOrderConvert.INSTANCE.convert2(reqDTO); | ||
| 160 | - // ๅๆท็ธๅ ณๅญๆฎต | ||
| 161 | - //TODO jason @่่ฟ ๆฏๅฆๅ ไธไธชๅฑๆง ๅฆtradeNo ๆฏไป่ฎขๅๅท๏ผ ็จ่ฟไธชmerchantOrderId่ฎฉไบบ่ฟท็ณ | ||
| 162 | - unifiedOrderReqDTO.setMerchantOrderId(orderExtension.getNo()) // ๆณจๆ๏ผๆญคๅคไฝฟ็จ็ๆฏ PayOrderExtensionDO.no ๅฑๆง๏ผ | 144 | + // 3. ่ฐ็จไธๆนๆฅๅฃ |
| 145 | + PayOrderUnifiedReqDTO unifiedOrderReqDTO = PayOrderConvert.INSTANCE.convert2(reqVO) | ||
| 146 | + // ๅๆท็ธๅ ณ็ๅญๆฎต | ||
| 147 | + .setMerchantOrderId(orderExtension.getNo()) // ๆณจๆ๏ผๆญคๅคไฝฟ็จ็ๆฏ PayOrderExtensionDO.no ๅฑๆง๏ผ | ||
| 163 | .setSubject(order.getSubject()).setBody(order.getBody()) | 148 | .setSubject(order.getSubject()).setBody(order.getBody()) |
| 164 | .setNotifyUrl(genChannelPayNotifyUrl(channel)) | 149 | .setNotifyUrl(genChannelPayNotifyUrl(channel)) |
| 165 | - .setReturnUrl(genChannelReturnUrl(channel)); | ||
| 166 | - // ่ฎขๅ็ธๅ ณๅญๆฎต | ||
| 167 | - unifiedOrderReqDTO.setAmount(order.getAmount()).setExpireTime(order.getExpireTime()); | ||
| 168 | - CommonResult<?> unifiedOrderResult = client.unifiedOrder(unifiedOrderReqDTO); | ||
| 169 | - unifiedOrderResult.checkError(); | 150 | + .setReturnUrl(genChannelReturnUrl(channel)) |
| 151 | + // ่ฎขๅ็ธๅ ณๅญๆฎต | ||
| 152 | + .setAmount(order.getAmount()).setExpireTime(order.getExpireTime()); | ||
| 153 | + PayOrderUnifiedRespDTO unifiedOrderRespDTO = client.unifiedOrder(unifiedOrderReqDTO); | ||
| 170 | 154 | ||
| 171 | // TODO ่ฝฎ่ฏขไธๆนๆฅๅฃ๏ผๆฏๅฆๅทฒ็ปๆฏไป็ไปปๅก | 155 | // TODO ่ฝฎ่ฏขไธๆนๆฅๅฃ๏ผๆฏๅฆๅทฒ็ปๆฏไป็ไปปๅก |
| 172 | // ่ฟๅๆๅ | 156 | // ่ฟๅๆๅ |
| 173 | - return new PayOrderSubmitRespDTO().setExtensionId(orderExtension.getId()) | ||
| 174 | - .setInvokeResponse(unifiedOrderResult.getData()); | 157 | + return PayOrderConvert.INSTANCE.convert(unifiedOrderRespDTO); |
| 158 | + } | ||
| 159 | + | ||
| 160 | + private PayOrderDO validatePayOrderCanSubmit(Long id) { | ||
| 161 | + PayOrderDO order = orderMapper.selectById(id); | ||
| 162 | + if (order == null) { // ๆฏๅฆๅญๅจ | ||
| 163 | + throw exception(ErrorCodeConstants.PAY_ORDER_NOT_FOUND); | ||
| 164 | + } | ||
| 165 | + if (!PayOrderStatusEnum.WAITING.getStatus().equals(order.getStatus())) { // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๅพ ๆฏไป | ||
| 166 | + throw exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_WAITING); | ||
| 167 | + } | ||
| 168 | + return order; | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + private PayChannelDO validatePayChannelCanSubmit(Long appId, String channelCode) { | ||
| 172 | + // ๆ ก้ช App | ||
| 173 | + appService.validPayApp(appId); | ||
| 174 | + | ||
| 175 | + // ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๆๆ | ||
| 176 | + PayChannelDO channel = channelService.validPayChannel(appId, channelCode); | ||
| 177 | + // ๆ ก้ชๆฏไปๅฎขๆท็ซฏๆฏๅฆๆญฃ็กฎๅๅงๅ | ||
| 178 | + PayClient client = payClientFactory.getPayClient(channel.getId()); | ||
| 179 | + if (client == null) { | ||
| 180 | + log.error("[validatePayChannelCanSubmit][ๆธ ้็ผๅท({}) ๆพไธๅฐๅฏนๅบ็ๆฏไปๅฎขๆท็ซฏ]", channel.getId()); | ||
| 181 | + throw exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); | ||
| 182 | + } | ||
| 183 | + return channel; | ||
| 175 | } | 184 | } |
| 176 | 185 | ||
| 177 | /** | 186 | /** |
| @@ -213,49 +222,30 @@ public class PayOrderServiceImpl implements PayOrderService { | @@ -213,49 +222,30 @@ public class PayOrderServiceImpl implements PayOrderService { | ||
| 213 | 222 | ||
| 214 | @Override | 223 | @Override |
| 215 | @Transactional(rollbackFor = Exception.class) | 224 | @Transactional(rollbackFor = Exception.class) |
| 216 | - public void notifyPayOrder(Long channelId, PayNotifyDataDTO notifyData) { | ||
| 217 | - // TODO ่่ฟ๏ผ่ฎฐๅฝๅ่ฐๆฅๅฟ | ||
| 218 | - log.info("[notifyPayOrder][channelId({}) ๅ่ฐๆฐๆฎ({})]", channelId, notifyData.getBody()); | ||
| 219 | - | 225 | + public void notifyPayOrder(Long channelId, PayOrderNotifyRespDTO notify, PayNotifyReqDTO rawNotify) { |
| 220 | // ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๆๆ | 226 | // ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๆๆ |
| 221 | PayChannelDO channel = channelService.validPayChannel(channelId); | 227 | PayChannelDO channel = channelService.validPayChannel(channelId); |
| 222 | TenantUtils.execute(channel.getTenantId(), () -> { | 228 | TenantUtils.execute(channel.getTenantId(), () -> { |
| 223 | - try { | ||
| 224 | - notifyPayOrder(channel, notifyData); | ||
| 225 | - } catch (Exception e) { | ||
| 226 | - throw new RuntimeException(e); | ||
| 227 | - } | ||
| 228 | - }); | ||
| 229 | - } | ||
| 230 | - | ||
| 231 | - private void notifyPayOrder(PayChannelDO channel, PayNotifyDataDTO notifyData) throws Exception { | ||
| 232 | - // ๆ ก้ชๆฏไปๅฎขๆท็ซฏๆฏๅฆๆญฃ็กฎๅๅงๅ | ||
| 233 | - PayClient client = payClientFactory.getPayClient(channel.getId()); | ||
| 234 | - if (client == null) { | ||
| 235 | - log.error("[notifyPayOrder][ๆธ ้็ผๅท({}) ๆพไธๅฐๅฏนๅบ็ๆฏไปๅฎขๆท็ซฏ]", channel.getId()); | ||
| 236 | - throw exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); | ||
| 237 | - } | 229 | + // 1. ๆดๆฐ PayOrderExtensionDO ๆฏไปๆๅ |
| 230 | + PayOrderExtensionDO orderExtension = updatePayOrderExtensionSuccess(notify.getOrderExtensionNo(), | ||
| 231 | + rawNotify); | ||
| 232 | + // 2. ๆดๆฐ PayOrderDO ๆฏไปๆๅ | ||
| 233 | + PayOrderDO order = updatePayOrderSuccess(channel, orderExtension, notify); | ||
| 238 | 234 | ||
| 239 | - // 0. ่งฃๆๆฏไป็ปๆ | ||
| 240 | - PayOrderNotifyRespDTO notifyRespDTO = client.parseOrderNotify(notifyData); | ||
| 241 | - // 1. ๆดๆฐ PayOrderExtensionDO ๆฏไปๆๅ | ||
| 242 | - PayOrderExtensionDO orderExtension = updatePayOrderExtensionSuccess(notifyRespDTO.getOrderExtensionNo(), notifyData.getBody()); | ||
| 243 | - // 2. ๆดๆฐ PayOrderDO ๆฏไปๆๅ | ||
| 244 | - PayOrderDO order = updatePayOrderSuccess(channel, orderExtension, notifyRespDTO); | ||
| 245 | - | ||
| 246 | - // 3. ๆๅ ฅๆฏไป้็ฅ่ฎฐๅฝ | ||
| 247 | - notifyService.createPayNotifyTask(PayNotifyTaskCreateReqDTO.builder() | ||
| 248 | - .type(PayNotifyTypeEnum.ORDER.getType()).dataId(order.getId()).build()); | 235 | + // 3. ๆๅ ฅๆฏไป้็ฅ่ฎฐๅฝ |
| 236 | + notifyService.createPayNotifyTask(PayNotifyTaskCreateReqDTO.builder() | ||
| 237 | + .type(PayNotifyTypeEnum.ORDER.getType()).dataId(order.getId()).build()); | ||
| 238 | + }); | ||
| 249 | } | 239 | } |
| 250 | 240 | ||
| 251 | /** | 241 | /** |
| 252 | * ๆดๆฐ PayOrderExtensionDO ๆฏไปๆๅ | 242 | * ๆดๆฐ PayOrderExtensionDO ๆฏไปๆๅ |
| 253 | * | 243 | * |
| 254 | * @param no ๆฏไป่ฎขๅๅท๏ผๆฏไปๆจกๅ๏ผ | 244 | * @param no ๆฏไป่ฎขๅๅท๏ผๆฏไปๆจกๅ๏ผ |
| 255 | - * @param body ๅ่ฐๅ ๅฎน | 245 | + * @param rawNotify ้็ฅๆฐๆฎ |
| 256 | * @return PayOrderExtensionDO ๅฏน่ฑก | 246 | * @return PayOrderExtensionDO ๅฏน่ฑก |
| 257 | */ | 247 | */ |
| 258 | - private PayOrderExtensionDO updatePayOrderExtensionSuccess(String no, String body) { | 248 | + private PayOrderExtensionDO updatePayOrderExtensionSuccess(String no, PayNotifyReqDTO rawNotify) { |
| 259 | // 1.1 ๆฅ่ฏข PayOrderExtensionDO | 249 | // 1.1 ๆฅ่ฏข PayOrderExtensionDO |
| 260 | PayOrderExtensionDO orderExtension = orderExtensionMapper.selectByNo(no); | 250 | PayOrderExtensionDO orderExtension = orderExtensionMapper.selectByNo(no); |
| 261 | if (orderExtension == null) { | 251 | if (orderExtension == null) { |
| @@ -267,7 +257,8 @@ public class PayOrderServiceImpl implements PayOrderService { | @@ -267,7 +257,8 @@ public class PayOrderServiceImpl implements PayOrderService { | ||
| 267 | // 1.2 ๆดๆฐ PayOrderExtensionDO | 257 | // 1.2 ๆดๆฐ PayOrderExtensionDO |
| 268 | int updateCounts = orderExtensionMapper.updateByIdAndStatus(orderExtension.getId(), | 258 | int updateCounts = orderExtensionMapper.updateByIdAndStatus(orderExtension.getId(), |
| 269 | PayOrderStatusEnum.WAITING.getStatus(), PayOrderExtensionDO.builder().id(orderExtension.getId()) | 259 | PayOrderStatusEnum.WAITING.getStatus(), PayOrderExtensionDO.builder().id(orderExtension.getId()) |
| 270 | - .status(PayOrderStatusEnum.SUCCESS.getStatus()).channelNotifyData(body).build()); | 260 | + .status(PayOrderStatusEnum.SUCCESS.getStatus()) |
| 261 | + .channelNotifyData(toJsonString(rawNotify)).build()); | ||
| 271 | if (updateCounts == 0) { // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๅพ ๆฏไป | 262 | if (updateCounts == 0) { // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๅพ ๆฏไป |
| 272 | throw exception(ErrorCodeConstants.PAY_ORDER_EXTENSION_STATUS_IS_NOT_WAITING); | 263 | throw exception(ErrorCodeConstants.PAY_ORDER_EXTENSION_STATUS_IS_NOT_WAITING); |
| 273 | } | 264 | } |
| @@ -280,11 +271,11 @@ public class PayOrderServiceImpl implements PayOrderService { | @@ -280,11 +271,11 @@ public class PayOrderServiceImpl implements PayOrderService { | ||
| 280 | * | 271 | * |
| 281 | * @param channel ๆฏไปๆธ ้ | 272 | * @param channel ๆฏไปๆธ ้ |
| 282 | * @param orderExtension ๆฏไปๆๅฑๅ | 273 | * @param orderExtension ๆฏไปๆๅฑๅ |
| 283 | - * @param notifyRespDTO ้็ฅๅ่ฐ | 274 | + * @param notify ้็ฅๅ่ฐ |
| 284 | * @return PayOrderDO ๅฏน่ฑก | 275 | * @return PayOrderDO ๅฏน่ฑก |
| 285 | */ | 276 | */ |
| 286 | private PayOrderDO updatePayOrderSuccess(PayChannelDO channel, PayOrderExtensionDO orderExtension, | 277 | private PayOrderDO updatePayOrderSuccess(PayChannelDO channel, PayOrderExtensionDO orderExtension, |
| 287 | - PayOrderNotifyRespDTO notifyRespDTO) { | 278 | + PayOrderNotifyRespDTO notify) { |
| 288 | // 2.1 ๅคๆญ PayOrderDO ๆฏๅฆๅคไบๅพ ๆฏไป | 279 | // 2.1 ๅคๆญ PayOrderDO ๆฏๅฆๅคไบๅพ ๆฏไป |
| 289 | PayOrderDO order = orderMapper.selectById(orderExtension.getOrderId()); | 280 | PayOrderDO order = orderMapper.selectById(orderExtension.getOrderId()); |
| 290 | if (order == null) { | 281 | if (order == null) { |
| @@ -297,8 +288,8 @@ public class PayOrderServiceImpl implements PayOrderService { | @@ -297,8 +288,8 @@ public class PayOrderServiceImpl implements PayOrderService { | ||
| 297 | int updateCounts = orderMapper.updateByIdAndStatus(order.getId(), PayOrderStatusEnum.WAITING.getStatus(), | 288 | int updateCounts = orderMapper.updateByIdAndStatus(order.getId(), PayOrderStatusEnum.WAITING.getStatus(), |
| 298 | PayOrderDO.builder().status(PayOrderStatusEnum.SUCCESS.getStatus()) | 289 | PayOrderDO.builder().status(PayOrderStatusEnum.SUCCESS.getStatus()) |
| 299 | .channelId(channel.getId()).channelCode(channel.getCode()) | 290 | .channelId(channel.getId()).channelCode(channel.getCode()) |
| 300 | - .successTime(notifyRespDTO.getSuccessTime()).successExtensionId(orderExtension.getId()) | ||
| 301 | - .channelOrderNo(notifyRespDTO.getChannelOrderNo()).channelUserId(notifyRespDTO.getChannelUserId()) | 291 | + .successTime(notify.getSuccessTime()).successExtensionId(orderExtension.getId()) |
| 292 | + .channelOrderNo(notify.getChannelOrderNo()).channelUserId(notify.getChannelUserId()) | ||
| 302 | .notifyTime(LocalDateTime.now()).build()); | 293 | .notifyTime(LocalDateTime.now()).build()); |
| 303 | if (updateCounts == 0) { // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๅพ ๆฏไป | 294 | if (updateCounts == 0) { // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๅพ ๆฏไป |
| 304 | throw exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_WAITING); | 295 | throw exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_WAITING); |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitReqDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.order.dto; | ||
| 2 | - | ||
| 3 | -import lombok.Data; | ||
| 4 | -import lombok.experimental.Accessors; | ||
| 5 | - | ||
| 6 | -import javax.validation.constraints.NotEmpty; | ||
| 7 | -import javax.validation.constraints.NotNull; | ||
| 8 | -import java.io.Serializable; | ||
| 9 | -import java.util.Map; | ||
| 10 | - | ||
| 11 | -/** | ||
| 12 | - * ๆฏไปๅๆไบค Request DTO | ||
| 13 | - */ | ||
| 14 | -@Data | ||
| 15 | -@Accessors(chain = true) | ||
| 16 | -public class PayOrderSubmitReqDTO implements Serializable { | ||
| 17 | - | ||
| 18 | - /** | ||
| 19 | - * ๅบ็จ็ผๅท | ||
| 20 | - */ | ||
| 21 | - @NotNull(message = "ๅบ็จ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 22 | - private Long appId; | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ๆฏไปๅ็ผๅท | ||
| 26 | - */ | ||
| 27 | - @NotNull(message = "ๆฏไปๅ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 28 | - private Long id; | ||
| 29 | - | ||
| 30 | - /** | ||
| 31 | - * ๆฏไปๆธ ้ | ||
| 32 | - */ | ||
| 33 | - @NotEmpty(message = "ๆฏไปๆธ ้ไธ่ฝไธบ็ฉบ") | ||
| 34 | - private String channelCode; | ||
| 35 | - | ||
| 36 | - /** | ||
| 37 | - * ็จๆท IP | ||
| 38 | - */ | ||
| 39 | - @NotEmpty(message = "็จๆท IP ไธ่ฝไธบ็ฉบ") | ||
| 40 | - private String userIp; | ||
| 41 | - | ||
| 42 | - /** | ||
| 43 | - * ๆฏไปๆธ ้็้ขๅคๅๆฐ | ||
| 44 | - */ | ||
| 45 | - private Map<String, String> channelExtras; | ||
| 46 | - | ||
| 47 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundReqDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.order.dto; | ||
| 2 | - | ||
| 3 | -import lombok.AllArgsConstructor; | ||
| 4 | -import lombok.Builder; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.NoArgsConstructor; | ||
| 7 | -import lombok.experimental.Accessors; | ||
| 8 | - | ||
| 9 | -import javax.validation.constraints.DecimalMin; | ||
| 10 | -import javax.validation.constraints.NotEmpty; | ||
| 11 | -import javax.validation.constraints.NotNull; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * ้ๆฌพ็ณ่ฏทๅ Request DTO | ||
| 15 | - */ | ||
| 16 | -@Data | ||
| 17 | -@Accessors(chain = true) | ||
| 18 | -@Builder | ||
| 19 | -@NoArgsConstructor | ||
| 20 | -@AllArgsConstructor | ||
| 21 | -public class PayRefundReqDTO { | ||
| 22 | - | ||
| 23 | - /** | ||
| 24 | - * ๆฏไป่ฎขๅ็ผๅท | ||
| 25 | - */ | ||
| 26 | - @NotNull(message = "ๆฏไป่ฎขๅ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 27 | - private Long payOrderId; | ||
| 28 | - | ||
| 29 | - /** | ||
| 30 | - * ้ๆฌพ้้ข | ||
| 31 | - */ | ||
| 32 | - @NotNull(message = "้ๆฌพ้้ขไธ่ฝไธบ็ฉบ") | ||
| 33 | - @DecimalMin(value = "0", inclusive = false, message = "้ๆฌพ้้ขๅฟ ้กปๅคงไบ้ถ") | ||
| 34 | - private Integer amount; | ||
| 35 | - | ||
| 36 | - /** | ||
| 37 | - * ้ๆฌพๅๅ | ||
| 38 | - */ | ||
| 39 | - private String reason; | ||
| 40 | - | ||
| 41 | - /** | ||
| 42 | - * ๅๆท้ๆฌพ่ฎขๅๅท | ||
| 43 | - */ | ||
| 44 | - @NotEmpty(message = "ๅๆท้ๆฌพ่ฎขๅๅทไธ่ฝไธบ็ฉบ") | ||
| 45 | - private String merchantRefundId; | ||
| 46 | - | ||
| 47 | - /** | ||
| 48 | - * ็จๆท IP | ||
| 49 | - */ | ||
| 50 | - private String userIp; | ||
| 51 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundRespDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.order.dto; | ||
| 2 | - | ||
| 3 | -import lombok.AllArgsConstructor; | ||
| 4 | -import lombok.Builder; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.NoArgsConstructor; | ||
| 7 | -import lombok.experimental.Accessors; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ้ๆฌพ็ณ่ฏทๅ Response DTO | ||
| 11 | - */ | ||
| 12 | -@Data | ||
| 13 | -@Accessors(chain = true) | ||
| 14 | -@Builder | ||
| 15 | -@NoArgsConstructor | ||
| 16 | -@AllArgsConstructor | ||
| 17 | -public class PayRefundRespDTO { | ||
| 18 | - | ||
| 19 | - /** | ||
| 20 | - * ๆฏไป้ๆฌพๅ็ผๅท๏ผ่ชๅข | ||
| 21 | - */ | ||
| 22 | - private Long refundId; | ||
| 23 | - | ||
| 24 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundService.java
| 1 | package cn.iocoder.yudao.module.pay.service.refund; | 1 | package cn.iocoder.yudao.module.pay.service.refund; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; | 3 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 4 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayRefundNotifyRespDTO; | ||
| 5 | +import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; | ||
| 4 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; | 6 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; |
| 5 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; | 7 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; |
| 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; | 9 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; |
| 8 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; | ||
| 9 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundRespDTO; | ||
| 10 | 10 | ||
| 11 | import java.util.List; | 11 | import java.util.List; |
| 12 | 12 | ||
| @@ -42,20 +42,20 @@ public interface PayRefundService { | @@ -42,20 +42,20 @@ public interface PayRefundService { | ||
| 42 | List<PayRefundDO> getRefundList(PayRefundExportReqVO exportReqVO); | 42 | List<PayRefundDO> getRefundList(PayRefundExportReqVO exportReqVO); |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | - * ๆไบค้ๆฌพ็ณ่ฏท | 45 | + * ๅๅปบ้ๆฌพ็ณ่ฏท |
| 46 | * | 46 | * |
| 47 | * @param reqDTO ้ๆฌพ็ณ่ฏทไฟกๆฏ | 47 | * @param reqDTO ้ๆฌพ็ณ่ฏทไฟกๆฏ |
| 48 | - * @return ้ๆฌพ็ณ่ฏท่ฟๅไฟกๆฏ | 48 | + * @return ้ๆฌพๅๅท |
| 49 | */ | 49 | */ |
| 50 | - PayRefundRespDTO submitRefundOrder(PayRefundReqDTO reqDTO); | 50 | + Long createPayRefund(PayRefundCreateReqDTO reqDTO); |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * ๆธ ้็้ๆฌพ้็ฅ | 53 | * ๆธ ้็้ๆฌพ้็ฅ |
| 54 | * | 54 | * |
| 55 | * @param channelId ๆธ ้็ผๅท | 55 | * @param channelId ๆธ ้็ผๅท |
| 56 | - * @param notifyData ้็ฅๆฐๆฎ | ||
| 57 | - * @throws Exception ้ๆฌพ้็ฅๅผๅธธ | 56 | + * @param notify ้็ฅ |
| 57 | + * @param rawNotify ้็ฅๆฐๆฎ | ||
| 58 | */ | 58 | */ |
| 59 | - void notifyPayRefund(Long channelId, PayNotifyDataDTO notifyData) throws Exception; | 59 | + void notifyPayRefund(Long channelId, PayRefundNotifyRespDTO notify, PayNotifyReqDTO rawNotify); |
| 60 | 60 | ||
| 61 | } | 61 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java
| 1 | package cn.iocoder.yudao.module.pay.service.refund; | 1 | package cn.iocoder.yudao.module.pay.service.refund; |
| 2 | 2 | ||
| 3 | +import cn.hutool.core.util.RandomUtil; | ||
| 3 | import cn.hutool.core.util.StrUtil; | 4 | import cn.hutool.core.util.StrUtil; |
| 4 | import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; | 5 | import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; |
| 6 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 7 | +import cn.iocoder.yudao.framework.pay.config.PayProperties; | ||
| 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; | 8 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; |
| 6 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; | 9 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; |
| 7 | -import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; | ||
| 8 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; | ||
| 9 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundNotifyDTO; | ||
| 10 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundUnifiedReqDTO; | ||
| 11 | -import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundUnifiedRespDTO; | 10 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayNotifyReqDTO; |
| 11 | +import cn.iocoder.yudao.framework.pay.core.client.dto.notify.PayRefundNotifyRespDTO; | ||
| 12 | +import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundUnifiedReqDTO; | ||
| 12 | import cn.iocoder.yudao.framework.pay.core.enums.PayNotifyRefundStatusEnum; | 13 | import cn.iocoder.yudao.framework.pay.core.enums.PayNotifyRefundStatusEnum; |
| 14 | +import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; | ||
| 13 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; | 15 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; |
| 14 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; | 16 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; |
| 15 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; | 17 | import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; |
| @@ -19,7 +21,6 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; | @@ -19,7 +21,6 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; | ||
| 19 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; | 21 | import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; |
| 20 | import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; | 22 | import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; |
| 21 | import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; | 23 | import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; |
| 22 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 23 | import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; | 24 | import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; |
| 24 | import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; | 25 | import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; |
| 25 | import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; | 26 | import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; |
| @@ -32,8 +33,6 @@ import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; | @@ -32,8 +33,6 @@ import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; | ||
| 32 | import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; | 33 | import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; |
| 33 | import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; | 34 | import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; |
| 34 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; | 35 | import cn.iocoder.yudao.module.pay.service.order.PayOrderService; |
| 35 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; | ||
| 36 | -import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundRespDTO; | ||
| 37 | import lombok.extern.slf4j.Slf4j; | 36 | import lombok.extern.slf4j.Slf4j; |
| 38 | import org.springframework.stereotype.Service; | 37 | import org.springframework.stereotype.Service; |
| 39 | import org.springframework.transaction.annotation.Transactional; | 38 | import org.springframework.transaction.annotation.Transactional; |
| @@ -55,6 +54,9 @@ import java.util.Objects; | @@ -55,6 +54,9 @@ import java.util.Objects; | ||
| 55 | public class PayRefundServiceImpl implements PayRefundService { | 54 | public class PayRefundServiceImpl implements PayRefundService { |
| 56 | 55 | ||
| 57 | @Resource | 56 | @Resource |
| 57 | + private PayProperties payProperties; | ||
| 58 | + | ||
| 59 | + @Resource | ||
| 58 | private PayClientFactory payClientFactory; | 60 | private PayClientFactory payClientFactory; |
| 59 | 61 | ||
| 60 | @Resource | 62 | @Resource |
| @@ -90,9 +92,9 @@ public class PayRefundServiceImpl implements PayRefundService { | @@ -90,9 +92,9 @@ public class PayRefundServiceImpl implements PayRefundService { | ||
| 90 | 92 | ||
| 91 | @Override | 93 | @Override |
| 92 | @Transactional(rollbackFor = Exception.class) | 94 | @Transactional(rollbackFor = Exception.class) |
| 93 | - public PayRefundRespDTO submitRefundOrder(PayRefundReqDTO req) { | 95 | + public Long createPayRefund(PayRefundCreateReqDTO reqDTO) { |
| 94 | // ่ทๅพ PayOrderDO | 96 | // ่ทๅพ PayOrderDO |
| 95 | - PayOrderDO order = orderService.getOrder(req.getPayOrderId()); | 97 | + PayOrderDO order = orderService.getOrder(reqDTO.getPayOrderId()); |
| 96 | // ๆ ก้ช่ฎขๅๆฏๅฆๅญๅจ | 98 | // ๆ ก้ช่ฎขๅๆฏๅฆๅญๅจ |
| 97 | if (Objects.isNull(order) ) { | 99 | if (Objects.isNull(order) ) { |
| 98 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_NOT_FOUND); | 100 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_NOT_FOUND); |
| @@ -108,15 +110,19 @@ public class PayRefundServiceImpl implements PayRefundService { | @@ -108,15 +110,19 @@ public class PayRefundServiceImpl implements PayRefundService { | ||
| 108 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); | 110 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); |
| 109 | } | 111 | } |
| 110 | 112 | ||
| 113 | + // TODO ่่ฟ๏ผๅพ ๅฎ็ฐ | ||
| 114 | + String merchantRefundId = RandomUtil.randomNumbers(16); | ||
| 115 | + | ||
| 111 | // ๆ ก้ช้ๆฌพ็ๆกไปถ | 116 | // ๆ ก้ช้ๆฌพ็ๆกไปถ |
| 112 | - validatePayRefund(req, order); | 117 | + validatePayRefund(reqDTO, order); |
| 113 | // ้ๆฌพ็ฑปๅ | 118 | // ้ๆฌพ็ฑปๅ |
| 114 | PayRefundTypeEnum refundType = PayRefundTypeEnum.SOME; | 119 | PayRefundTypeEnum refundType = PayRefundTypeEnum.SOME; |
| 115 | - if (Objects.equals(req.getAmount(), order.getAmount())) { | 120 | + if (Objects.equals(reqDTO.getAmount(), order.getAmount())) { |
| 116 | refundType = PayRefundTypeEnum.ALL; | 121 | refundType = PayRefundTypeEnum.ALL; |
| 117 | } | 122 | } |
| 118 | PayOrderExtensionDO orderExtensionDO = orderExtensionService.getOrderExtension(order.getSuccessExtensionId()); | 123 | PayOrderExtensionDO orderExtensionDO = orderExtensionService.getOrderExtension(order.getSuccessExtensionId()); |
| 119 | - PayRefundDO payRefundDO = refundMapper.selectByTradeNoAndMerchantRefundNo(orderExtensionDO.getNo(), req.getMerchantRefundId()); | 124 | + PayRefundDO payRefundDO = refundMapper.selectByTradeNoAndMerchantRefundNo(orderExtensionDO.getNo(), |
| 125 | + merchantRefundId); // TODO ่่ฟ๏ผ้่ฆไผๅ | ||
| 120 | if(Objects.nonNull(payRefundDO)){ | 126 | if(Objects.nonNull(payRefundDO)){ |
| 121 | // ้ๆฌพ่ฎขๅๅทฒ็ปๆไบค่ฟใ | 127 | // ้ๆฌพ่ฎขๅๅทฒ็ปๆไบค่ฟใ |
| 122 | //TODO ๆ ก้ช็ธๅ้ๆฌพๅ็้้ข | 128 | //TODO ๆ ก้ช็ธๅ้ๆฌพๅ็้้ข |
| @@ -137,15 +143,15 @@ public class PayRefundServiceImpl implements PayRefundService { | @@ -137,15 +143,15 @@ public class PayRefundServiceImpl implements PayRefundService { | ||
| 137 | .channelId(order.getChannelId()) | 143 | .channelId(order.getChannelId()) |
| 138 | .merchantId(order.getMerchantId()) | 144 | .merchantId(order.getMerchantId()) |
| 139 | .orderId(order.getId()) | 145 | .orderId(order.getId()) |
| 140 | - .merchantRefundNo(req.getMerchantRefundId()) | 146 | + .merchantRefundNo(merchantRefundId) // TODO ่่ฟ๏ผ้่ฆไผๅ |
| 141 | .notifyUrl(app.getRefundNotifyUrl()) | 147 | .notifyUrl(app.getRefundNotifyUrl()) |
| 142 | .payAmount(order.getAmount()) | 148 | .payAmount(order.getAmount()) |
| 143 | - .refundAmount(req.getAmount()) | ||
| 144 | - .userIp(req.getUserIp()) | 149 | + .refundAmount(reqDTO.getAmount()) |
| 150 | + .userIp(reqDTO.getUserIp()) | ||
| 145 | .merchantOrderId(order.getMerchantOrderId()) | 151 | .merchantOrderId(order.getMerchantOrderId()) |
| 146 | .tradeNo(orderExtensionDO.getNo()) | 152 | .tradeNo(orderExtensionDO.getNo()) |
| 147 | .status(PayRefundStatusEnum.CREATE.getStatus()) | 153 | .status(PayRefundStatusEnum.CREATE.getStatus()) |
| 148 | - .reason(req.getReason()) | 154 | + .reason(reqDTO.getReason()) |
| 149 | .notifyStatus(PayOrderNotifyStatusEnum.NO.getStatus()) | 155 | .notifyStatus(PayOrderNotifyStatusEnum.NO.getStatus()) |
| 150 | .type(refundType.getStatus()) | 156 | .type(refundType.getStatus()) |
| 151 | .build(); | 157 | .build(); |
| @@ -153,47 +159,50 @@ public class PayRefundServiceImpl implements PayRefundService { | @@ -153,47 +159,50 @@ public class PayRefundServiceImpl implements PayRefundService { | ||
| 153 | } | 159 | } |
| 154 | // TODO @jason๏ผๆๅฐ convert ้ใไธไบ้ขๅค็่ชๅจ๏ผๆๅจ set ไธ๏ผ | 160 | // TODO @jason๏ผๆๅฐ convert ้ใไธไบ้ขๅค็่ชๅจ๏ผๆๅจ set ไธ๏ผ |
| 155 | PayRefundUnifiedReqDTO unifiedReqDTO = new PayRefundUnifiedReqDTO(); | 161 | PayRefundUnifiedReqDTO unifiedReqDTO = new PayRefundUnifiedReqDTO(); |
| 156 | - unifiedReqDTO.setUserIp(req.getUserIp()) | ||
| 157 | - .setAmount(req.getAmount()) | 162 | + unifiedReqDTO.setUserIp(reqDTO.getUserIp()) |
| 163 | + .setAmount(reqDTO.getAmount()) | ||
| 158 | .setChannelOrderNo(order.getChannelOrderNo()) | 164 | .setChannelOrderNo(order.getChannelOrderNo()) |
| 159 | .setPayTradeNo(orderExtensionDO.getNo()) | 165 | .setPayTradeNo(orderExtensionDO.getNo()) |
| 160 | - .setMerchantRefundId(req.getMerchantRefundId()) | ||
| 161 | - .setReason(req.getReason()); | 166 | + .setMerchantRefundId(merchantRefundId) // TODO ่่ฟ๏ผ้่ฆไผๅ |
| 167 | + .setNotifyUrl(genChannelPayNotifyUrl(channel)) // TODO ่่ฟ๏ผไผๅไธ notifyUrl | ||
| 168 | + .setReason(reqDTO.getReason()); | ||
| 162 | // ๅๆธ ้ๅ่ตท้ๆฌพ็ณ่ฏท | 169 | // ๅๆธ ้ๅ่ตท้ๆฌพ็ณ่ฏท |
| 163 | - PayCommonResult<PayRefundUnifiedRespDTO> refundUnifiedResult = client.unifiedRefund(unifiedReqDTO); | 170 | + client.unifiedRefund(unifiedReqDTO); |
| 164 | // ๆฃๆฅๆฏๅฆๅคฑ่ดฅ๏ผๅคฑ่ดฅๆๅบไธๅกๅผๅธธใ | 171 | // ๆฃๆฅๆฏๅฆๅคฑ่ดฅ๏ผๅคฑ่ดฅๆๅบไธๅกๅผๅธธใ |
| 165 | // TODO ๆธ ้็ๅผๅธธ่ฎฐๅฝใ | 172 | // TODO ๆธ ้็ๅผๅธธ่ฎฐๅฝใ |
| 166 | // TODO @jason๏ผๅฏไปฅๅ ๆไธช warn log ๅ๏ผ | 173 | // TODO @jason๏ผๅฏไปฅๅ ๆไธช warn log ๅ๏ผ |
| 167 | - refundUnifiedResult.checkError(); | ||
| 168 | // ๆๅๅจ ้ๆฌพๅ่ฐไธญๅค็ | 174 | // ๆๅๅจ ้ๆฌพๅ่ฐไธญๅค็ |
| 169 | - return PayRefundRespDTO.builder().refundId(payRefundDO.getId()).build(); | 175 | + return payRefundDO.getId(); |
| 176 | + } | ||
| 177 | + | ||
| 178 | + /** | ||
| 179 | + * ๆ นๆฎๆฏไปๆธ ้็็ผ็ ๏ผ็ๆๆฏไปๆธ ้็ๅ่ฐๅฐๅ | ||
| 180 | + * | ||
| 181 | + * @param channel ๆฏไปๆธ ้ | ||
| 182 | + * @return ๆฏไปๆธ ้็ๅ่ฐๅฐๅ ้ ็ฝฎๅฐๅ + "/" + channel id | ||
| 183 | + */ | ||
| 184 | + private String genChannelPayNotifyUrl(PayChannelDO channel) { | ||
| 185 | + return payProperties.getCallbackUrl() + "/" + channel.getId(); | ||
| 170 | } | 186 | } |
| 171 | 187 | ||
| 172 | @Override | 188 | @Override |
| 173 | @Transactional(rollbackFor = Exception.class) | 189 | @Transactional(rollbackFor = Exception.class) |
| 174 | - public void notifyPayRefund(Long channelId, PayNotifyDataDTO notifyData) { | ||
| 175 | - log.info("[notifyPayRefund][channelId({}) ๅ่ฐๆฐๆฎ({})]", channelId, notifyData.getBody()); | 190 | + public void notifyPayRefund(Long channelId, PayRefundNotifyRespDTO notify, PayNotifyReqDTO rawNotify) { |
| 176 | // ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๆๆ | 191 | // ๆ ก้ชๆฏไปๆธ ้ๆฏๅฆๆๆ |
| 192 | + // TODO ่่ฟ๏ผ้่ฆ้ๆไธ่ฟๅ็้ป่พ | ||
| 177 | PayChannelDO channel = channelService.validPayChannel(channelId); | 193 | PayChannelDO channel = channelService.validPayChannel(channelId); |
| 178 | - // ๆ ก้ชๆฏไปๅฎขๆท็ซฏๆฏๅฆๆญฃ็กฎๅๅงๅ | ||
| 179 | - PayClient client = payClientFactory.getPayClient(channel.getId()); | ||
| 180 | - if (client == null) { | ||
| 181 | - log.error("[notifyPayOrder][ๆธ ้็ผๅท({}) ๆพไธๅฐๅฏนๅบ็ๆฏไปๅฎขๆท็ซฏ]", channel.getId()); | ||
| 182 | - throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); | ||
| 183 | - } | ||
| 184 | - // ่งฃๆๆธ ้้ๆฌพ้็ฅๆฐๆฎ๏ผ ็ปไธๅค็ | ||
| 185 | - PayRefundNotifyDTO refundNotify = client.parseRefundNotify(notifyData); | ||
| 186 | - if (Objects.equals(PayNotifyRefundStatusEnum.SUCCESS,refundNotify.getStatus())){ | ||
| 187 | - payRefundSuccess(refundNotify); | 194 | + if (Objects.equals(PayNotifyRefundStatusEnum.SUCCESS, notify.getStatus())){ |
| 195 | + payRefundSuccess(notify); | ||
| 188 | } else { | 196 | } else { |
| 189 | //TODO ๆฏไปๅผๅธธ๏ผ ๆฏไปๅฎไผผไนๆฒกๆๆฏไปๅผๅธธ็้็ฅใ | 197 | //TODO ๆฏไปๅผๅธธ๏ผ ๆฏไปๅฎไผผไนๆฒกๆๆฏไปๅผๅธธ็้็ฅใ |
| 190 | // TODO @jason๏ผ้ฃ่ฟ้ๅฏไปฅ่่ๆไธช error logger @่่ฟ ๅพฎไฟกๆฏๅฆๅญๅจๆฏไปๅผๅธธ้็ฅ | 198 | // TODO @jason๏ผ้ฃ่ฟ้ๅฏไปฅ่่ๆไธช error logger @่่ฟ ๅพฎไฟกๆฏๅฆๅญๅจๆฏไปๅผๅธธ้็ฅ |
| 191 | } | 199 | } |
| 192 | } | 200 | } |
| 193 | 201 | ||
| 194 | - private void payRefundSuccess(PayRefundNotifyDTO refundNotify) { | 202 | + private void payRefundSuccess(PayRefundNotifyRespDTO refundNotify) { |
| 195 | // ๆ ก้ช้ๆฌพๅๅญๅจ | 203 | // ๆ ก้ช้ๆฌพๅๅญๅจ |
| 196 | - PayRefundDO refundDO = refundMapper.selectByTradeNoAndMerchantRefundNo(refundNotify.getTradeNo(), refundNotify.getReqNo()); | 204 | + PayRefundDO refundDO = refundMapper.selectByTradeNoAndMerchantRefundNo(refundNotify.getTradeNo(), |
| 205 | + refundNotify.getReqNo()); | ||
| 197 | if (refundDO == null) { | 206 | if (refundDO == null) { |
| 198 | log.error("[payRefundSuccess][ไธๅญๅจ seqNo ไธบ{} ็ๆฏไป้ๆฌพๅ]", refundNotify.getReqNo()); | 207 | log.error("[payRefundSuccess][ไธๅญๅจ seqNo ไธบ{} ็ๆฏไป้ๆฌพๅ]", refundNotify.getReqNo()); |
| 199 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_NOT_FOUND); | 208 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_NOT_FOUND); |
| @@ -235,10 +244,11 @@ public class PayRefundServiceImpl implements PayRefundService { | @@ -235,10 +244,11 @@ public class PayRefundServiceImpl implements PayRefundService { | ||
| 235 | 244 | ||
| 236 | /** | 245 | /** |
| 237 | * ๆ ก้ชๆฏๅฆ่ฟ่ก้ๆฌพ | 246 | * ๆ ก้ชๆฏๅฆ่ฟ่ก้ๆฌพ |
| 238 | - * @param req ้ๆฌพ็ณ่ฏทไฟกๆฏ | 247 | + * |
| 248 | + * @param reqDTO ้ๆฌพ็ณ่ฏทไฟกๆฏ | ||
| 239 | * @param order ๅๅงๆฏไป่ฎขๅไฟกๆฏ | 249 | * @param order ๅๅงๆฏไป่ฎขๅไฟกๆฏ |
| 240 | */ | 250 | */ |
| 241 | - private void validatePayRefund(PayRefundReqDTO req, PayOrderDO order) { | 251 | + private void validatePayRefund(PayRefundCreateReqDTO reqDTO, PayOrderDO order) { |
| 242 | // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๆฏไป็ถๆ | 252 | // ๆ ก้ช็ถๆ๏ผๅฟ ้กปๆฏๆฏไป็ถๆ |
| 243 | if (!PayOrderStatusEnum.SUCCESS.getStatus().equals(order.getStatus())) { | 253 | if (!PayOrderStatusEnum.SUCCESS.getStatus().equals(order.getStatus())) { |
| 244 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_SUCCESS); | 254 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_SUCCESS); |
| @@ -248,7 +258,7 @@ public class PayRefundServiceImpl implements PayRefundService { | @@ -248,7 +258,7 @@ public class PayRefundServiceImpl implements PayRefundService { | ||
| 248 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_ALL_REFUNDED); | 258 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_ALL_REFUNDED); |
| 249 | } | 259 | } |
| 250 | // ๆ ก้ช้้ข ้ๆฌพ้้ขไธ่ฝๅคงไบ ๅๅฎ็้้ข | 260 | // ๆ ก้ช้้ข ้ๆฌพ้้ขไธ่ฝๅคงไบ ๅๅฎ็้้ข |
| 251 | - if (req.getAmount() + order.getRefundAmount() > order.getAmount()){ | 261 | + if (reqDTO.getAmount() + order.getRefundAmount() > order.getAmount()){ |
| 252 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_AMOUNT_EXCEED); | 262 | throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_AMOUNT_EXCEED); |
| 253 | } | 263 | } |
| 254 | // ๆ ก้ชๆธ ้่ฎขๅๅท | 264 | // ๆ ก้ชๆธ ้่ฎขๅๅท |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/util/PaySeqUtils.java
| @@ -18,6 +18,7 @@ public class PaySeqUtils { | @@ -18,6 +18,7 @@ public class PaySeqUtils { | ||
| 18 | 18 | ||
| 19 | private static final AtomicLong MER_ORDER_NO_SEQ = new AtomicLong(0L); | 19 | private static final AtomicLong MER_ORDER_NO_SEQ = new AtomicLong(0L); |
| 20 | 20 | ||
| 21 | + // TODO ่่ฟ๏ผ้่ฆ็็ | ||
| 21 | /** | 22 | /** |
| 22 | * ็ๆๅๆท้ๆฌพๅๅท๏ผ็จไบๆต่ฏ๏ผๅบ่ฏฅ็ฑๅๆท็ณป็ป็ๆ | 23 | * ็ๆๅๆท้ๆฌพๅๅท๏ผ็จไบๆต่ฏ๏ผๅบ่ฏฅ็ฑๅๆท็ณป็ป็ๆ |
| 23 | * @return ๅๆท้ๆฌพๅ | 24 | * @return ๅๆท้ๆฌพๅ |
| @@ -28,6 +29,8 @@ public class PaySeqUtils { | @@ -28,6 +29,8 @@ public class PaySeqUtils { | ||
| 28 | (int) MER_REFUND_NO_SEQ.getAndIncrement() % 10000); | 29 | (int) MER_REFUND_NO_SEQ.getAndIncrement() % 10000); |
| 29 | } | 30 | } |
| 30 | 31 | ||
| 32 | + // TODO ่่ฟ๏ผ้่ฆ็็ | ||
| 33 | + | ||
| 31 | /** | 34 | /** |
| 32 | * ็ๆ้ๆฌพ่ฏทๆฑๅท | 35 | * ็ๆ้ๆฌพ่ฏทๆฑๅท |
| 33 | * @return ้ๆฌพ่ฏทๆฑๅท | 36 | * @return ้ๆฌพ่ฏทๆฑๅท |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java
| 1 | package cn.iocoder.yudao.module.pay.service.refund; | 1 | package cn.iocoder.yudao.module.pay.service.refund; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | +import cn.iocoder.yudao.framework.pay.config.PayProperties; | ||
| 4 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; | 5 | import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; |
| 5 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; | 6 | import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; |
| 6 | import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; | 7 | import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; |
| @@ -39,6 +40,8 @@ public class PayRefundServiceTest extends BaseDbUnitTest { | @@ -39,6 +40,8 @@ public class PayRefundServiceTest extends BaseDbUnitTest { | ||
| 39 | private PayRefundMapper refundMapper; | 40 | private PayRefundMapper refundMapper; |
| 40 | 41 | ||
| 41 | @MockBean | 42 | @MockBean |
| 43 | + private PayProperties payProperties; | ||
| 44 | + @MockBean | ||
| 42 | private PayClientFactory payClientFactory; | 45 | private PayClientFactory payClientFactory; |
| 43 | @MockBean | 46 | @MockBean |
| 44 | private PayOrderService orderService; | 47 | private PayOrderService orderService; |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java
| @@ -123,7 +123,10 @@ public class UserController { | @@ -123,7 +123,10 @@ public class UserController { | ||
| 123 | @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | 123 | @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") |
| 124 | @PreAuthorize("@ss.hasPermission('system:user:query')") | 124 | @PreAuthorize("@ss.hasPermission('system:user:query')") |
| 125 | public CommonResult<UserRespVO> getUser(@RequestParam("id") Long id) { | 125 | public CommonResult<UserRespVO> getUser(@RequestParam("id") Long id) { |
| 126 | - return success(UserConvert.INSTANCE.convert(userService.getUser(id))); | 126 | + AdminUserDO user = userService.getUser(id); |
| 127 | + // ่ทๅพ้จ้จๆฐๆฎ | ||
| 128 | + DeptDO dept = deptService.getDept(user.getDeptId()); | ||
| 129 | + return success(UserConvert.INSTANCE.convert(user).setDept(UserConvert.INSTANCE.convert(dept))); | ||
| 127 | } | 130 | } |
| 128 | 131 | ||
| 129 | @GetMapping("/export") | 132 | @GetMapping("/export") |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java
| @@ -76,9 +76,9 @@ public class DeptServiceImpl implements DeptService { | @@ -76,9 +76,9 @@ public class DeptServiceImpl implements DeptService { | ||
| 76 | // ็ฌฌไบๆญฅ๏ผๆๅปบ็ผๅญ | 76 | // ็ฌฌไบๆญฅ๏ผๆๅปบ็ผๅญ |
| 77 | ImmutableMap.Builder<Long, DeptDO> builder = ImmutableMap.builder(); | 77 | ImmutableMap.Builder<Long, DeptDO> builder = ImmutableMap.builder(); |
| 78 | ImmutableMultimap.Builder<Long, DeptDO> parentBuilder = ImmutableMultimap.builder(); | 78 | ImmutableMultimap.Builder<Long, DeptDO> parentBuilder = ImmutableMultimap.builder(); |
| 79 | - depts.forEach(sysRoleDO -> { | ||
| 80 | - builder.put(sysRoleDO.getId(), sysRoleDO); | ||
| 81 | - parentBuilder.put(sysRoleDO.getParentId(), sysRoleDO); | 79 | + depts.forEach(deptDO -> { |
| 80 | + builder.put(deptDO.getId(), deptDO); | ||
| 81 | + parentBuilder.put(deptDO.getParentId(), deptDO); | ||
| 82 | }); | 82 | }); |
| 83 | deptCache = builder.build(); | 83 | deptCache = builder.build(); |
| 84 | parentDeptCache = parentBuilder.build(); | 84 | parentDeptCache = parentBuilder.build(); |
yudao-server/pom.xml
| @@ -54,11 +54,11 @@ | @@ -54,11 +54,11 @@ | ||
| 54 | <!-- <version>${revision}</version>--> | 54 | <!-- <version>${revision}</version>--> |
| 55 | <!-- </dependency>--> | 55 | <!-- </dependency>--> |
| 56 | <!-- ๆฏไปๆๅก --> | 56 | <!-- ๆฏไปๆๅก --> |
| 57 | - <dependency> | ||
| 58 | - <groupId>cn.iocoder.boot</groupId> | ||
| 59 | - <artifactId>yudao-module-pay-biz</artifactId> | ||
| 60 | - <version>${revision}</version> | ||
| 61 | - </dependency> | 57 | +<!-- <dependency>--> |
| 58 | +<!-- <groupId>cn.iocoder.boot</groupId>--> | ||
| 59 | +<!-- <artifactId>yudao-module-pay-biz</artifactId>--> | ||
| 60 | +<!-- <version>${revision}</version>--> | ||
| 61 | +<!-- </dependency>--> | ||
| 62 | 62 | ||
| 63 | <!-- ๅพฎไฟกๅ ฌไผๅทๆจกๅใ้ป่ฎคๆณจ้๏ผไฟ่ฏ็ผ่ฏ้ๅบฆ --> | 63 | <!-- ๅพฎไฟกๅ ฌไผๅทๆจกๅใ้ป่ฎคๆณจ้๏ผไฟ่ฏ็ผ่ฏ้ๅบฆ --> |
| 64 | <!-- <dependency>--> | 64 | <!-- <dependency>--> |
yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/AppShopOrderController.java deleted
| 1 | -package cn.iocoder.yudao.module.shop.controller.app; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | -import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; | ||
| 5 | -import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; | ||
| 6 | -import cn.iocoder.yudao.module.pay.service.order.PayOrderService; | ||
| 7 | -import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; | ||
| 8 | -import cn.iocoder.yudao.module.pay.util.PaySeqUtils; | ||
| 9 | -import cn.iocoder.yudao.module.shop.controller.app.vo.AppShopOrderCreateRespVO; | ||
| 10 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 11 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 12 | -import lombok.extern.slf4j.Slf4j; | ||
| 13 | -import org.springframework.validation.annotation.Validated; | ||
| 14 | -import org.springframework.web.bind.annotation.PostMapping; | ||
| 15 | -import org.springframework.web.bind.annotation.RequestBody; | ||
| 16 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 17 | -import org.springframework.web.bind.annotation.RestController; | ||
| 18 | - | ||
| 19 | -import javax.annotation.Resource; | ||
| 20 | -import javax.validation.Valid; | ||
| 21 | -import java.time.LocalDateTime; | ||
| 22 | - | ||
| 23 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 24 | -import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; | ||
| 25 | - | ||
| 26 | -@Tag(name = "็จๆท APP - ๅๅ่ฎขๅ") | ||
| 27 | -@RestController | ||
| 28 | -@RequestMapping("/shop/order") | ||
| 29 | -@Validated | ||
| 30 | -@Slf4j | ||
| 31 | -public class AppShopOrderController { | ||
| 32 | - | ||
| 33 | - @Resource | ||
| 34 | - private PayOrderService payOrderService; | ||
| 35 | - | ||
| 36 | - @PostMapping("/create") | ||
| 37 | - @Operation(summary = "ๅๅปบๅๅ่ฎขๅ") | ||
| 38 | -// @PreAuthenticated // TODO ๆๆถไธๅ ็ป้้ช่ฏ๏ผๅ็ซฏๆๆถๆฒกๅๅฅฝ | ||
| 39 | - public CommonResult<AppShopOrderCreateRespVO> create() { | ||
| 40 | - // ๅ่ฃ ๅๅปบๅๅ่ฎขๅ | ||
| 41 | - Long shopOrderId = System.currentTimeMillis(); | ||
| 42 | - | ||
| 43 | - // ๅๅปบๅฏนๅบ็ๆฏไป่ฎขๅ | ||
| 44 | - PayOrderCreateReqDTO reqDTO = new PayOrderCreateReqDTO(); | ||
| 45 | - reqDTO.setAppId(6L); | ||
| 46 | - reqDTO.setUserIp(getClientIP()); | ||
| 47 | - reqDTO.setMerchantOrderId(PaySeqUtils.genMerchantOrderNo()); | ||
| 48 | - reqDTO.setSubject("ๆ ้ข๏ผ" + shopOrderId); | ||
| 49 | - reqDTO.setBody("ๅ ๅฎน๏ผ" + shopOrderId); | ||
| 50 | - reqDTO.setAmount(200); // ๅไฝ๏ผๅ | ||
| 51 | - reqDTO.setExpireTime(LocalDateTime.now().plusDays(1)); | ||
| 52 | - Long payOrderId = payOrderService.createPayOrder(reqDTO); | ||
| 53 | - | ||
| 54 | - // ๆผๆฅ่ฟๅ | ||
| 55 | - return success(AppShopOrderCreateRespVO.builder().id(shopOrderId) | ||
| 56 | - .payOrderId(payOrderId).build()); | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | - @PostMapping("/pay-notify") | ||
| 60 | - @Operation(summary = "ๆฏไปๅ่ฐ") | ||
| 61 | - public CommonResult<Boolean> payNotify(@RequestBody @Valid PayOrderNotifyReqDTO reqVO) { | ||
| 62 | - log.info("[payNotify][ๅ่ฐๆๅ]"); | ||
| 63 | - return success(true); | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - @PostMapping("/refund-notify") | ||
| 67 | - @Operation(summary = "้ๆฌพๅ่ฐ") | ||
| 68 | - public CommonResult<Boolean> refundNotify(@RequestBody @Valid PayRefundNotifyReqDTO reqVO) { | ||
| 69 | - log.info("[refundNotify][ๅ่ฐๆๅ]"); | ||
| 70 | - return success(true); | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | -} |
yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/vo/AppShopOrderCreateRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.shop.controller.app.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Builder; | ||
| 6 | -import lombok.Data; | ||
| 7 | - | ||
| 8 | -@Schema(description = "็จๆท APP - ๅๅ่ฎขๅๅๅปบ Response VO") | ||
| 9 | -@Data | ||
| 10 | -@Builder | ||
| 11 | -@AllArgsConstructor | ||
| 12 | -public class AppShopOrderCreateRespVO { | ||
| 13 | - | ||
| 14 | - @Schema(description = "ๅๅ่ฎขๅ็ผๅท", required = true, example = "1024") | ||
| 15 | - private Long id; | ||
| 16 | - | ||
| 17 | - @Schema(description = "ๆฏไป่ฎขๅ็ผๅท", required = true, example = "2048") | ||
| 18 | - private Long payOrderId; | ||
| 19 | - | ||
| 20 | -} |
yudao-server/src/main/java/cn/iocoder/yudao/module/shop/package-info.java deleted
| 1 | -/** | ||
| 2 | - * shop ๅ ไธ๏ผๆไปฌๆพๅๅไธๅก | ||
| 3 | - * ไพๅฆ่ฏด๏ผๅๅใ่ฎขๅ็ญ็ญ | ||
| 4 | - * ๆณจๆ๏ผ็ฎๅไป ไป ไฝไธบ demo ๆผ็คบ๏ผๅฏนๆฅ pay ๆฏไป็ณป็ป | ||
| 5 | - * | ||
| 6 | - * ็ผฉๅ๏ผshop | ||
| 7 | - */ | ||
| 8 | -// TODO ่่ฟ๏ผๅ็ปญไผ่ฟ็งปๅฐ yudao-module-mall-trade ไธ | ||
| 9 | -package cn.iocoder.yudao.module.shop; |
yudao-server/src/main/java/cn/iocoder/yudao/server/framework/package-info.java deleted
yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/config/AdminUiConfiguration.java deleted
| 1 | -package cn.iocoder.yudao.server.framework.ui.config; | ||
| 2 | - | ||
| 3 | -import org.springframework.context.annotation.Configuration; | ||
| 4 | -import org.springframework.core.io.ClassPathResource; | ||
| 5 | -import org.springframework.core.io.Resource; | ||
| 6 | -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | ||
| 7 | -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * yudao-admin-ui ็้ ็ฝฎ็ฑป | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@Configuration(proxyBeanMethods = false) | ||
| 15 | -public class AdminUiConfiguration implements WebMvcConfigurer { | ||
| 16 | - | ||
| 17 | - @Override | ||
| 18 | - public void addResourceHandlers(ResourceHandlerRegistry registry) { | ||
| 19 | - registry.addResourceHandler("/admin-ui/**", "/admin-ui/", "/admin-ui") | ||
| 20 | - .addResourceLocations("classpath:/admin-ui/") | ||
| 21 | - // ่ชๅฎไน ClassPathResource ๅฎ็ฐ็ฑป๏ผๅจๅ็ซฏ่ฏทๆฑ็ๅฐๅๅน้ ไธๅฐๅฏนๅบ็่ทฏๅพๆถ๏ผๅผบๅถไฝฟ็จ /admin-ui/index.html ่ตๆบ | ||
| 22 | - // ๆฌ่ดจไธ๏ผ็ญไปทไบ nginx ๅจๅค็ไธๅฐ Vue ็่ฏทๆฑๅฐๅๆถ๏ผtry_files ๅฐ index.html ๅฐๅ | ||
| 23 | - // ๆณ่ฆๅฝปๅบ็่งฃ๏ผๅฏไปฅ่ฐ่ฏ ResourceHttpRequestHandler ็ resolveResourceLocations ๆนๆณ๏ผๅ็ซฏ่ฏทๆฑ /admin-ui/system/tenant ๅฐๅ | ||
| 24 | - .addResourceLocations(new ClassPathResource("/admin-ui/index.html") { | ||
| 25 | - | ||
| 26 | - @Override | ||
| 27 | - public Resource createRelative(String relativePath) { | ||
| 28 | - return this; | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | - }) | ||
| 32 | - ; | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | -} |
yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/core/AdminUiController.java deleted
yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/package-info.java deleted
| 1 | -/** | ||
| 2 | - * ็ฎ็๏ผ่งฃๅณๅ็ซฏๅผๅ๏ผไธๅคชๆ ้ฟ node ็ฏๅข็้ ็ฝฎ๏ผๅฏผ่ดๅฏๅจ yudao-ui-admin ้กน็ฎไธ็ดๅคฑ่ดฅ | ||
| 3 | - * ๆไปฅ๏ผๆฌ้กน็ฎๅฐ yudao-ui-admin ้กน็ฎ้่ฟ npm run build:demo1024 ็ๆนๅผ๏ผๅฐๅฎๆๅปบๆ้ๆ่ตๆบ๏ผ | ||
| 4 | - * ็ถๅ๏ผไฝฟ็จ Spring Boot ไฝไธบ้ๆ่ตๆบๆๅกๅจ๏ผ่ฟ่กๅฏๅจ่ฎฟ้ฎใ | ||
| 5 | - * ๆณจๆ๏ผ่ฟไธช้กน็ฎไป ไป ไฝไธบๅ็ซฏๅผๅ็ๅฟซ้ไฝ้ช๏ผๅนถไธ่ฆ้จ็ฝฒๅฐ็ไบง็ฏๅข๏ผ๏ผ๏ผ | ||
| 6 | - */ | ||
| 7 | -package cn.iocoder.yudao.server.framework.ui; |
yudao-server/src/main/resources/admin-ui/favicon.ico deleted
No preview for this file type
yudao-server/src/main/resources/admin-ui/html/ie.html deleted
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="zh-CN"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8" /> | ||
| 5 | - <title>่ฏทๅ็บงๆจ็ๆต่งๅจ</title> | ||
| 6 | - <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" > | ||
| 7 | - <meta name="renderer" content="webkit"> | ||
| 8 | - <base target="_blank" /> | ||
| 9 | - <style type="text/css"> | ||
| 10 | - html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} | ||
| 11 | - a{text-decoration:none;color:#0072c6;}a:hover{text-decoration:none;color:#004d8c;} | ||
| 12 | - body{width:960px;margin:0 auto;padding:10px;font-size:14px;line-height:24px;color:#454545;font-family:'Microsoft YaHei UI','Microsoft YaHei',DengXian,SimSun,'Segoe UI',Tahoma,Helvetica,sans-serif;overflow-y:scroll} | ||
| 13 | - h1{font-size:40px;line-height:80px;font-weight:100;margin-bottom:10px;} | ||
| 14 | - h2{font-size:20px;line-height:25px;font-weight:100;margin:10px 0;} | ||
| 15 | - em{color:red} | ||
| 16 | - p{margin-bottom:10px;} | ||
| 17 | - hr{margin:20px 0;border:0;border-top:1px solid #dadada} | ||
| 18 | - span{display:block;font-size:12px;line-height:12px;} | ||
| 19 | - .clean{clear:both;} | ||
| 20 | - .browser{padding:10px 10px;} | ||
| 21 | - .browser li{width:auto;padding:0 80px;margin-top:30px;height:34px;line-height:22px;float:left;list-style:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAADMCAYAAAAWCXEwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAC7ESURBVHja5Lx5dFRV1rBfgHwYRQQVtB26ZWhtabtfeUGxGxFbUGZF8RMHGkVbRkekVYiKisicVhE0gEwBokgDAhEMMSSQkAECwcxkrlRSqVTqJqnxzs/vj5t7qUyAvr9e37fWV2vtleSm6p6n9t5nn733OVU2RaUaEP5PiqJSbeMXPBTA5/Xhzk9Vnd9vo3HFx21E2LYJX9IRgh6npvyCe9uaqS4K4C3IpXHFx9S99CTuJ8Z0KLVjRlA7ZgTuJ8ZgXxmJL+kIlwAkXBQk6HFq9pWRVA8fSvXwodYgdS892a6EA1UNvouqwXdR99KTeAtyfz2IL+kI1cOHYh9wqwVwKWJqpXbMCOv19gG3Imzb1JF2OgZxfr/NukH4jcNVfyEAE8IU+4BbKet1PfaVke3BtA/i/H6b8aIBt7a4mWmaC0nr55vmqRp8F5V33Mm5LhHtwbQF8SUdsSDCb1I1+K42g1xIWgOYYh9wK+e6RCBs29QxSIWus37aJM51iWjx4so77mwD1d5AHQ1eecedlN9yuyVlva6nrNf14Q7cEmRn4W7u3T2E9ME3UX7L7W1uZg5Weced1s3sA2613ql5LXzQjuRclwjcT4wxTXQeRHC7GLdnHPeensiCVwa3e0PznZk3EbZtwluQa0kofz8NcVNxr++Ce30XnNuv61Bcu7viXt8Fvyu7JYipjfGHxzD+8Bh2j+7fAiZcC+Y0zPDIbCyD6DyV6DyVeDcIQR2C39J4oieNJ3oSOnkVcnZ35Ozu6MVdDHF0N6S4C43OqJYg/0ydzb27hzDx0FjuPT2R+asfa6OVsl7X40s6QoWus/CQk6fWZPHChhxe3lbMCxtyrN9TyxSQSwidvMoC0XK6tRGybPjSRmOuNUKVo4Zxe8YxIu4+Jh4ay/jDY7j39MQWWjnXJYLGFR9Toes8tSaLiavTrIHDxfxfapkCwW8hy9YuhCmhk1fR1FRnaCS1NM4yy8RDYy2tjIkZRXq/HtYsCnqc2sJDTkYsTrU00J6YkEJQR7M/eEGY0MmrcOenqjZA2JmyzTJLuJiOe65LBHUvPUmGR2bE4lQmrk7jqTVZHcrE1WkMWpRIdJ4KnpUXBCHLRl3e16EWIOEaMU00/vAY9na/gsYVH/NdgYe+8w9bMBeSQYsSWXjICcFvL2ga+dhlFwcJ10rjio/ZklprgbSWiavTWvzdd/5hXt5W/OtATC201sq9u4eQ+PVijmSW0nf+YQYtSmTQosR2gUYsTmXQokT6zj9saeRCpmkJ0hxD2gOZeGgsI+Lu45+ps7FXlFmDmDDtSd/5h+k7/zCpZQpa9cwOQciyIR+77LyzFhXlMyZmFOP2jLP8orVWRsTdR2ppHFtSa+k6ZZM1WHvSdcomwyxySceayO4OWTY88TdirygzUkWf18eL2//RQiutYcwYE/Q4tagDOUQ8uo6uUzbRZ3qMJV2nbCLi0XU8tSbrolNXzu6OfOyylgEN4NOkaO5acw/j9ozr0ET37h5imehIZimPL91rAfSZHsOQBfuISS7E7vaTETeX0MmrOoQInbwK+dhlNKWsahni0zPSuGvNPW1M1BrI1NrOwt0WkCn2ijJSS+MYt2ccuQk3oxd36RCi8URPY+HLT1VbgGiSzPsx71laCddMe2Yygf6ZOtuScXvG0XfJn/n8YL+LQnjibyQ34WZ8Xl/bfKSoKL+FVi4EYwKZcu/uIQzaPoExMaPQcrq1ADFX33AI1+6u1OV9HVI6ShU/TYqm75I/dwjTHtDEQ2MZt2ccg7ZPaGGScIDWEBlxc42UoSMQ00StYdoDCgcbtH0Cbx+8p40ZTIBwiFM7RmB3+y+exZvT2YRpDdR6ZoVrw1xRWwN44m/Euf06A6Ki7NLrmnDNmH7TEdSg7RP4/GA/yLK1GdwEKNzSk1M7RlDlqPl1JefOlG2MXTGmXaAxMaMsB/XE34h4tH+7ANlrB7T2iV8OAlDlqOH9mPcsIBPKlF3R16Ad7GwlxoVberYAKCrKv1ghfmkg5sPldLIzZVsLqLErxpC9doAlp3aMICNurlGyVpRdSAu/HqS1Q58rd1JUlI87P1UtKsrHXlGG3e1HCOoov+x2wiX3RxT+o49L1IgutXxVUCfDIxNfLraQDI+M3e3/NdCXbhohqBNfLrIsVzZqmoT6dmXG0SBLTrmJLxd/CVRLECXcDGFaSC1TmHE0yKg4B0P2uxiy38WoOAePHaptAfHYoVqG7HcxcGc5o+IcfFfgsbQUPoYoSa213BbE78oGucTSwpJTbobFFjNgbQHdvi6g8/Z6Om+vZ8h+VxsQE7T/97UMWFvA+Og0UvIryfDIZBQ4CeXvt8a5IAhAY/RImlJWUaHrPHaolhuXFXHN+8e58qNcbomq5P6t3xG973WePLzPgnnsUG0LiP7f1zJwZzk3LisyctfSOFxOJ4lfLzYToQubxu/KpmpWBFWzInguOokrP8ql7/zDRMxLpFfUabasHwlZNnITbmbgznI6b6+3Bu7/fa2lrW5fF9Ar6jQD1hYwLLaYx5fupdi+EiGok748koa4qa010xKkKWUV2UM7kd6vB7tH9yfpnUFkLzQiZOGWnmgHO9N4oie9ok5bA4YPbkqvqNNc8/5xIuYl8tSaLOLLRXambENXF+PxNJD0ziAanVHhYaEliH1lJD/1iqD0qSsIzu2M/N550TZ3QjvYmS3rR1qDtwdhgpgwnabGMj46zRjQsxJdXYw7P1X1pY0GuaRjkMKxPah5qxuV8y6nct7l1LzVDfdyo6miHexM+ou9mblwKfdv/Y77t37HNe8fbwMQDhIxL5FOU2PZklqLJjUYdU7wWxBuN+ricBAF0KQG6pcNovZpw0fCQao/MEBcu7tSOLYHjnu7EZzbmeDczqyfNokrP8ptMXi4XDnzAJ0n72TIgn1oUoMB4VlpgIjj24I0payi9KkrqHj+Ssth2wM5c38f8p68D2nbHKRtc3h86d42A/eZHsOVMw9Y0nXKJmxDvyS1NA70z8Gz0qh5hNvbzpr6ZYMofzyiBUwLkOVdjfR/eVcao0dSl/d1aHx0GhHzEi0TXDnzAJ2mxtJpaixdp2yypM/0GLrcs5D3Y94ztNDsK7qjuxmzDBBz2rYGqZoVQc1b3dr4yfppk+g8eWeLd91aAxGPrqPbyKV0G7mUiEfXMWdz+nmQ0Jsgn1AbT/SkMXrkeZC6vK9DpU9d0S5I5bzLqf6gq6UV7WBn5q9+zDJBuEQ8us4SE6LLPQvpcs9CjmSW4ndlo1XPNBxWLiE34WbSX+wNapEBEsrfT/njERSO7WGBmDA1b3Wj9KkrSO/Xg1WjBjJl/CT+8sQ8a0BT/eGDhwN0uWchXe94ia07YkE+oSLc3gxyQt2yfiSrRg0E+YRqgRSO7UHh2B4UT7ragqmcdznFk67mp14ROO7txpTxk7AN/bLFgN1GLsU29EvrejiACdG59xQjKgu3GzVP9UwIvcmCVwYb102NmBHVBDFNVDUrgjP39yF98E0E5xox5Dcj5lsDhwOYQObg4dK59xR2RV8D4njEo/0NIEd3dkVfgy9t9HkfMTWSO6pXG63kjupF8aSrqXj+SoJzO1M573KmjJ/Eb0bM5y9PzGPBK4Mp3GKUEFvWj+Q3I+a3AOjcewp/eWKesUQ0T1mz2att7oSU9+F5EE2SqXvpSbKHdrIGNmHCoapmRVgh33LezZ3QNncyloGDnVnwyuA2IFvWj0Q+dplREzu6Wy0r9/KubVvg9pWRpPfrwZn7+1haMSHCxdSM/J4RWWufjiC9Xw/m9PgtN9w0uo1JbrhpNI0njAXTrAIbT/TEvb4LjdEj2641vqQjpPfrQfrgm1qYKHxKlz51BbmjerFj4G2WtAYwtWDKglcGG2ZoXrldu43AWDUrAmnbnLaRVZMayHvyPn7qZThoa38pfeoKap+OIDi3M6tGDeSGm0a3GTT82g03jeaGm0bj3H4d8rHLrN0I93LDpDsG3kb68si2a425hfZTrwjSB9/UBiZcM+YM6ghoyvhJpL/Ym+yFhknc67tYQVF+z3gjc3r8Fuf32zpOFTMeHXpRGDNfMYF2j+7PqlEDWTVqIOkv9rZ8SNvcCff6LlTOu9yK1Okv9mZOj9+S8ehQNKmBDhs17vxU9adeES1gwoHKH49oFyhcwhfKynmXWzOu4vkryR7aieyhnQjl7+84QzNNJGzbxN7uV1gw7WmntYZaLw2mmNdrn44ge2gnztzfx9od7zBnDa9t0pdHtgsTDhRustaaCndwEyLj0aG481PVS9r3FSUJj6eBrConMZHvnodpntrh2gkHCgcLl/TBN7G3+xXGLMlIo0LXjU7ixeoaUZIQ3C7OlTtJya8kJvJddgy8DctvWgGFaylcHPd2Y2/3K5jT47esGjWQrTtiyapy4nI6jUrvUmpfUytFRfmkZ6SxdUcs66dNYsfA2ywNtQBrJeb/dgy8jZjId/kx4YgF4fP6Ln1L3uyhhWvnSGYpOw6lEBP5LuunTWLDAw+x4YGHrAi74YGHWD9tEuunTSIm8l227ohtAyBK0i8/pNDagTVJxuf1YXf7OVfuJKvKMF16RhrpGWkcySwlJb+SrCqn1awRgjqaJP9nO0b/Zxo1v+ahS0ZqKJ9QCX5rJMyhN42aRj6h/udB5BKjiAp+i64uNrJ2M0Vs3rUiy4aU92G42X49iCYZDZjUMoX4ctFIcILfGgVU6E0LwEyCxKP98aWNxpc2GvFof+RjlyHlfdjxWnOxh93tJya5kIWHnDx2qJbnopP4NCmaYvtKC0LL6WYkQps70RA3laaUVbjzU1V7RRn2ijK8BbkWUJsM7VIAog7k8MyuPKtD1AJA/9zQQpYN9/oubFk/kpkLl7J4a0KbtrdZa/vSRrfMWS8GcSSzlGd25TH5VIjptTpR9T5SS+OMsrHZD3RHd7SDnTm1YwSzY2KsTtL46DSei07iSGZpm/tKeR8a5gnf0+vI8zfE5zAstpjptTrvifBJeeZ5LTQDkGXDtbsr0fte59mjDmaWaUyv1ZlZpvH3XJlRcQ6Grj5OTHJhy/t7VhrpwMVAog7kMCrOwcs+nZWaccak2L7S0oLpC6d2jGDJiUyWN8E6FVZqsLwJ5ruwYO5O9jFoUSIb4nPOT+/gtxf3kZjkQobFFreAaHRGGZoQbm+hhWd25fHsUQevHilgbo7bAmoNM2S/i6Grj3Mks9Tolcgn1Hb39MzHuXInw9edZrJd4z3xPISuLrYgCrf0ZOuOWKLzVFLLFDIKmlfr5EJmHMxhfoWvDczkUyELxl5RduFUUZNkIvdm8+BpkZd9eocQPyYc6XDnocpRQ+TebObmuFmptdTK5FMhBqwt4K1vMi4cWTMKnIyKczDZrvFJeWaHEBdrbVc5aphxMIflTR1rJaPA2TFI1IEc7k72tZwdYRCLtyZc6h4MMcmF7WrlwRSRAWsLiNyb3T6Iz+vjmV15jIpztIHwxN/I7JgY4svFS47CHk9DG62Y5hm4s5zx0Wntb0CnlikMiy3m06ToFpFSO9iZnSnbeGZXHkcyS8kocF6SHMksZc7m9AuaJyW/si3IltRaZsfEGNM09KZVs2bEzWV5EyzLlXn1SEG7MuNgTruy5JS73dlzd7IvPMi1BIlJLmRnyjbLJFawar7ZHi5NdrSS9jRyd7KPXlGnzQDXyjSlcYY2mk1SuKUnS05kslI7f9M9/HKgdaoh74nn/cR02NV7M9t2A9A/t/qf2uZOvB/zHvNdxk3Mm0bV+36VzK8wxHTWVutPmEbkE6q1hjQ3/yefCvGeeB7k1SPGlLsUeeubDOtnezJnczpvfZPBuXJnGEjzAqSri9FyulG4pSf3b/3OCvErNQNmxsEczpU70ST5kuWXJc9yiZXemQ3du5N9TK/VedmnW1qZm+M+v3r+gpTS42nA42nA5XRa4vE0hFd8zSDBb63cInvtAAYtSuTuZB+T7ZoFYy7tz+zK6+igQZtHRoGTyL3ZLab4M7vyGB+dxpAF+1i8NaEliLmWyNndsa+MZPi60/T/vpaJhTKT7ZqllZWaoZW3vsnA42m4IMS5cifPRScxN8fNeyK87NOZXqszsdDITa55/3i4dgVb0OPUTG2IR/vjzk9Vt6Qau5R3J/uYWCi3MJEJM2dzOkcyS80Q3WKrPia50IIIX2cmnwrxYIpIr6jTPBed1Mo0apFgpv0NcVMR3C5ESWLO5nS6fV3Ag6fFdmHmV/iYcTCHyL3ZRB3IsSRybzbP7MpjfoWvXYj+39cyZME+c7aEgTQ36smy0RA31dostrv9DF193IIJ9xcTxgSam+O2xAQwg9fMMo2JhTIPnjYgBi1KbC+RPq8REyR8iT9X7rRgWptpvssYLBwqHGB6rc7fc2ULYsh+F4MWJbLjUErH09c8ytcaxNTMCxtyGLC2oIUDT6/VO5TJdkMLJsTAneUMWpTYNotvE0eaj3rKxy6zun2t69mdKdt4fOley4lN35ls11pIOIC51D8XnWQu9xcGUQCteibyscuM5n31TKNqD5fm1H9DfA7PRScxdPVxhsUWMyy22Dq4MGS/i2GxxQxfd9oC2HEopb1WVcdtCU2Sqcv7OmTWpGbRLOV9SCh/P0GPUwvPvDIKnMQkFxK5N5s5m9N5LjqJ56KTeOubDFbvzSQlv7LN1P5FxzZ8Xp918v8SWk5WsWStLbr0a5oLHRdY/+GjPP8vtq7+0yCiJOHz+hDcLlxOJ2bzxeV0Irhdlk/9x0B8Xh9VjhoEt6s5rZTaFU1qQHC7qHLU/PpZ05EGqhw1uJxO0CVESSIlv5KoAznM2ZxufTJgzuZ0og7kkJJfaR1mcjmdVDlqflkc6ahSs1eUWdMzJrmQQYsSrYMJNy4raiHmYQWzD2IC2SvKLpa/dAzi8/qsc6cZBU6GLNjHlTMPcEtUJVMSdd45qRGdp7KxDOvDPu+c1JhxNMgtUZVcOfMAQxbss0K7vaLsQqbq+GCtCbEhPodOU2O58qNcZhwNsrMK4t0Xlp1VMONokCs/yqXT1FgrE7sATPvbJK0hblxWxDsnNWugvc7zcqFry3JlbomqbANzSdskpk9kFDjpOmWTpQnzne6sMgbbWWWYY8kpN0tOuYnOU1v8z9TcOyc1blxWRNcpmwwz6dLFjxr7vD5rY+eO13YSMS+Rh/co1iAby4wBluXKLDnl5rsCD1lVxk7FdwUelpxysyxXbvHcjWUwYb9CxLxE7nhtp7X10spELUHMMiHqQA6dJ+9k8KYaJh1u6ZRLTrnZklrb+hS3lURtSa1lySm39fyNZTAlUWfwpho6T95p1rqtS5LzICapJsmWNkbEBpiSqLMs1/gY3DsntfAuT4tDlkrYtci92bxzUmNjmaG9KYk6I2IDbbTStsBqjhma1EBKfiVdp2xiwNoCHt6jMOmwxjsnNev46KWUkaIksfCQk2W5Mu+c1Jh0WGPCfoUBawvoOmWT1d4Miy3nQczIuXpvJp2mxjJ4Uw0T9hsg09KM6fhcdBIxyYWXJM9FJzHjaJBpaTDpsAEzeFMNnabGGhVec+RtA1LlqAFd4vGley0Q8wZTEnWmpWGdWX3sUC3PHnW0K+b/n0qoZ1oaTEszfCQc5PGle0GXwv0k7PxI87S9EMjMMo35rvMdILPDbErrzlA4iOmw4SBh0/iXgUxLg8mnQvw9V2Zmmdau/D1XtpoxpiYe3qPw8B6FW6IqreOCvwpkWhqMinMwaFEi46PTfrFMXG38HLr6OHe8ttPykXZNYzrr4q0JdJoay4C1BS2cdfCmGuZsTrd6Hv/T5ozZJ7no9L1xWZE1fU0bD193unXx3GESFZNcyIb4nDazaUN8Dh6PkTy1O307CmgT9itM2K9YWnkuOumi26wTV6dZR43NXOXKj3LpPHknEY+us0DaDWiWnwCr92bSdcomBm+q4eE9ShsThTXh2jRn5mxOZ/CmmjYzZkRsgE5TY40Q33bhu/iiF66VcJjh604TuTfbUnnk3myGrzttQZgzZtJhzQrvfabHWGNccNELnz2tfSUcJjxADVhbwIC1BdYsMyOp+fyH9yhWGnAks/TS0gDTV4qK8q2NxU5TY7klqrIFTDhQ6+gZ/hwzdoSbpKgo/9LPj5hnR8yUwEwVw810MRkRG7BSRXPpLyrKv/RUsT2YI5mlLZLnEbEBK1q2lhGxASt5vuO1nZY5ioryL5TJX7icENwuioryjV1rr4+oAzkMWbDvouXEkAX7iDqQg8/rQ5MaLgZxaQWWJslWSWkWWBkFzl9UYP2PvgjFPNrj8/osM/2YcIQfE46QnpFmfL7K7SLocWpBj1Mz6+D0jLQWzzPb3b/6aI8SVnCbvXTTVOZxno6kqCjfKlPNUH4pIP9XPGz/N319UFnrf2iKLGi6LmggqCBoIOi6JuiqIqCrgqIrgqyrgoYu6JpiiK4LKgigCpquCCEdQdVVAU0VdP2iMGW29tplmtbcQNQ1QEXXNDQdQGsWHZBbvdQsKkTQfaiaBJrc/PyLPpQ2zqqbL9U10GV0TUbTZUCyQAoaJPaVinx5RmbVKZnVWRpf56r8WKlQFww2Q4bf8VdMXwsEtfkdGb97xSAb8yRG7df4zYYQ3deEsK2WsK1UsK1U6LIqxJWfKQzcEODVw0GS7KbG1F8Pout6C7WuL5Dpv1PBtlLEFgWXfyHTY61Ery91rvkiwLWfB7h6jcxV/5LoskLF9gl0+tjLI7FesuuxzKnrHeqneQdL143Bjacj6wqg4ZFUph8JYvusCdsXIldvhGvXi/T+SuS6dQrXrZO4fp3Ib76UuH5NiD6fi1z/mcgNnwa5epWMbbHG1StEvsoSjbeoq2i60h6MYNN1XTAhNF1vdlBoVFSG7/Nh+1Ti2o1Brl8v03uDyDVfN3DDVz5u+FKh15cKvdbp9FoHvT5X6PW5wjVr4LrPda6NkugTJdL1EwXbIpkVx5sdGaXZ8S9gGgNIJ6ipPHgghO3TED23h+ixTafXZpmb1ofos0ml+9dw1VcaV3wapMvKIF1WSVz+qULPzxV6faZw9Wc613yq0Xt1iN9Ehei+WMG2QObz03JHDtxsGk07P2XRmZ/hx7ZG5rqtMjdubqTHFonrNov8doPMZRvA9pmPqz8X+MNWhb/tkrg/VuGWaJXLPmmk85Imen6m0+sz6BMlcsNqP9etVujysU63jwIcrwy1N6UFm6Zrgma4KKBxrE7lyq999PnaT58dcMNWjV5bFa7d6sP2lcj/+szP6/FNHK2SqQtpSKqIKItUN2psyJH52yYXtkV+uq9UuP5fMj1XqVy9WuWGFSE6LQgxbHMQv6kVXW92B12wKZouSEjGNNMVJvwgYdugcGOsym+2q/TZqnD9dh3bVz5u3h4guVJtnpJa808zkJlBMMS7SQG6vB/gimUKvVdK9Fmu0nu5zLXLZGzvaWzLDhggmoysqwYIKoKqG+rKqVO5douP62JUfvutxg2xCn1iZTpv0rgpRuF0XQAIgRJElSUURUWWZWRZRpFlgrIKeIEg7yaC7X2FXkslei+XDVkmY1sQ4pFNDaA3hwcdNF0XbGjNZwNQWXZaxrZV5XexMjftFLnpW4ne34rYNvjZUywBQUJqEEkMoEk6oqIgySqipCCKEt6Qis8fRNEaAB+TtijYInV6Lwtx7VKRPstkIj5S6PGBRGFtwFCgApquCDYFTQANXZeZkiARsVPnlu9kfhcr0/cbiYivA4w94DM0oet4VQVJUQiJGiFRIiTKBEMSAX+QhoBIvU/C1SQCfpIKGrl8kZerFitcu0Tkuk9ErlsiYXtDYuMpYyobE0gVbIouC6DiDsgMiwtx406Z/rs0+u6WGPCNSI8tIZbnSoCCEvITkBRkWSMUkAgEJbz+EE2+IA3eAPUNjTR6fNTWSni9PuoFN/d8KtBpkcg1n3jp82GQ3h/6sc33seAHb/P6pYOmCTY0VQCNEkHhrgMhfrdL5k/fafT/XqT/boU+sRI/2r0AhESFYFDCF1TwBSWa/CE8TQHcjQFcDX6cdQGq63w43PWU1AoEmup4emMjtvl+enzop/d7Aa57N4Btvo/Z37jCHBzBpuqaAHDOHWDo/iD99in8+XuZO/er/H6fxsB/h0irDgGqoYGAhOAL0eALUd/oo87TRK2nCUddI3anQKXTTUl1DUVVNXga6nh2mwvb6066L3Bz3btOekU2YXtd5MVNDmuVVtEFm6brAmiUu4OMPODnjv0idx+UGHpQ4q6DEnf928+h0iCg0egN0OgXqW8MUCd4cXm81LgbqHIJlDs9lFd5KK90U1hWQ3GlgLOqlrs/rsQ2q45rFjq57q0yukc6sL3iYc62akBDR0fRNcGmq5oAQYSAyuQEibsPhnjgkMYD8T4ePOTnv/ZrfJrtBTWE4A3ibvRTJ3hx1jdRXddApbOeMoebEruL3Ao3p8vqOVVSR1JuDZkFtbywvgDb0zl0eqmanm+Wct2bFdhmlvP2Po/hH6qIrmiCTdNUAVVElTVeyfTz10My435UGHNE5JGfJIYf1ZiV4kFo8uILBKirD+LwBHC43Dhq6ymurqfAUU9ORS05RSU0NHmQVRW/JCMqOho6354U6DEri04z8+nxWim2fxSx8ZgLEAlJCqoiCzZZUwVZVECDjUVNDD8s8sRRlSmJOs8mwbPHZJ466iO2yI8aDNJU56a8tpGqaicOZx2FVfWcLa8lq7CMBn8IHfAGZQKSik/SQAoBOjEZtdiezqTTS/l0fzmPrFIBNB9CUCcoSYJN0TTBKymgS5TXBXn8pwCTj8lMT1WZmarx+nGR2Rk680+GOFleh9/bgMtZR3V1HYWVLvJKajiTV0pVjRsV8IVEgrLaLApeERSCAAx5/xS2+48zZvlZAmKIQFMTHq+PppAi2DRdFQIyyKIfRImoMz6ePO7lpUyJl08r/PN0iMjTEh9kS6zNEUgp92GvaaDAXstZh4DLG0JoChAMyviDMn5Jxi/K+EISIVnFr0h4JWPZ33a8mNteSCI6vhpZbMDhaqChyYfHHxRsmhYURBECoRDoMvkukVfTFN7IlHk7W+aDXIlVOSHW5ob4qhi2F4v8WNLIiSov5wLgkVVERSUYMqa2LyTjF1UCkkpQ1vGLImJAxCsai2SdKFJQ6aG0ooqK+gBuVxOCTxBsuq4IkqQSFCVCkgyqzg8lXt5J9/H+WViVJ7G+KMSOEoVdJSp77DJxdRrH3Rq5goLDJyMERRqCIt6QbPiHqBAQFSRJJSCrhGSZJklDUs/nIefsNRRXe3DWefE0NjUf21BURFEiGDRWVH9I5Nu8Rt7Pk/lXocbWIpFvKzT2VSr8YJdIcEqk1Svke2TsPhV3SMYTEmkISngDCr6QTFBSCUkqQUnFL2kEJUNLflFF1aGuyUepow6HuxG34DdyVkVRkCQFUVLxBWR0ScEfFPmuuIG1hTIxpSr/rpA46FBIqJHJdGmcqVPJa1Co9MrUBiTcQQlPQKYhoNAUUvCJCn5JJSApBCTZEr8oEVJU/IpKiaOOmnov9Q1+QyOqqiErGqKiIYk6/mAATQ4QalRItPvZU+EnvkrmxxqJRJdIVp1KTr1GQaNChVei2idTE9BwBRTqAzKeoEyjKNMkKvglhaCkNAMZogAeX4DS6npcDQE8jYHmM0aajqLqyLJOSNbwSTJev0woEKCxyU9OdZCEkgAJ1UGSBYWsBo3cRihq0qj0KVT5ZBwBjdqQRn1IRhBVGiWVRlklqOiIikZQ1hAV4ytjJE2n0ummqt6LU/AjNAYEm64jaBqoqo6iaEiKhiirBESVhkAQr9eH0ChSUu3nVGkdGY4mUmt8ZLoC5DWoFDUplHpVKnw6VT6ZWn+IuqCEJ6TQEFINzUgSflXFJ8nUe304XALVdQ3UNwaob/TT5A0ZILoO4TCyrBKSZHxBGcEfxNPgpdETwO32U+ZoIKesnrPlHrLtbn6urCfPXk+B3U2R3cO5qgbOVTVQUilwrkKgtEqguLKe4sp6yhwNlNg9VLkEhKYgjd4QTX6RYFA+X2Dpuo6maaiqiqqqKIqGKKn4QwrekERjIIC70YenMUBjk0S9EKK23our3ovb48Xj8SI0BfD4ROq9IdyNQeoa/Lg8AZxuPzV1PuobRASfguAN0egP4Q1KBEMykqwKNkAxMnpDNM1oSxhQGrKiI6oqTapIkyTiDYUIiDLBkEwoICOGjHghKxqKqqCoEooqEVJFgkqIkBIiKIsEpBB+MYA/FMAXkgiICiHRmK2KoilWo6bZRIKu61bjRdd1QdEQVBVBkzRBlVRBFhVBVTRBUXRBknVB1hAUECQQNF0XUHVB13RB0XRBVDRBUjRBUTVBUlRBlBRBlGQhJGuCJOuCouiCpuqCqqpl/7Eemqor5HnS2Ja/hPezpvCP1PuYlfo3vvo5EnfA0baH9qs+CKZpBIIh7DUuyuw1lNprqHDU4mnwoqoamq5xyn2YVTkv8cKJO3n+TH+eTB7Ao/H9eSr+TnbmrfyfgdiddZzKKaK0yklhuYN6oWVfvabay+6Tu3gzaSJPpPZm9E9XMmnvH1n60wKSanZypuEg35WuZlrCMLb9vPSXgzicdWTkFLX7vya5Dq/spk62s8v1AW+cu53ns29kSd6z/Fi9mZ/L8tpqVFfZeHYxBe7MSwdJy85v8Xd1oJwDFRtZlTeTD88+wcKsMSzMGsv8rL8wNbMnc7LuJN6xg6AcsF6TW1xBkzfQct9P8pDrSkfT1QuDKKrKz8UV1t+V3kKi89/m1YyhvHlyMPOz/ouFZ4fwYe59fJAzjLfO3s66wuep8p7jbF0iUTkzOe76/rzZ6jxUVteGtch06gL2C4PIikJFtcv6e3/ZeuamDOHNU//NivwxfFY8jnXlE/iyYiKflz/Eh4WD2Gv/CL/YQIJjI2+dvJvXTt7FtJS+LPt5OvVBY383KEoUlFaGzSz5wqb5ubC0WSsyG3PfZUbKnXzw8wOsKX6EdWUT+NI+nq8cY1nrGMnikjuJd0Xhld1sr3iTt37+IyuLHmZN0WMszxnPzLSBvJnxMMWNPxv7vUITLrdw8VlzMswnNud+xD+O3cGy3LF8ce5R1pZN4IuKsXzlGM0X1SP4uPJ2jgpraJAcfFb+CJHnbuOz8pF8UT6OL0om8nnRJFblPcrLaXfxxolROHzGd2idq7xIHBEavTQFQwAcLNvMP5Lu5JOcsawpmsRnJROIKnuYtVWjWVP9Vz6q7McRz0pUTSa2Zh6LSgeytOJPfGa/j3UVY1lTMoFPz01kdcEjLM95hNmp/8UHmU+j6MYnlrJyz3UMknHW0IbDW8rLyfexIGs4nxU8zqqi8Xx07gGiKkfyheN+ltnvJEFYGdYOFWlUqjniWcGK8iFElQ1jTek4Pi2awOqCR1iZ9wgfnx3Hs4l9+aHc+BqH2voGRFFqC+JpaEKSjOR2Y84iZqX8majcx1ieN57Xc+/hvXPD+aziAZaX30VGY0yH0/1s00E+KR7KquL7+ezceFbnT2BFzkSW5Uzg7VP38UbKQ3hCdc1aKWoLktHsG06/nbnJ9/H+6VGsyJnIC9l38kreMNaUPsKSkkHsdy26aABMcK3lw4L/5l9FY1mdP56lOeP55Ox4Psh+mOeT7+BAyUZj17O8qiWIKMkUlNoBOFQaw4zkQSw+M5bZp+7in7mPsKnkFVade4DPSsfTJNVeFCSk+lhbPIVl+Q+wMnccS8+OY/GZsXxwZjTTj9/OkqwXACi3O/H5A+dBKhy1lFQac33t2bf5R/KdvJnxFxadnkSyYzuf5j3BssIR/Kt4DBvLp/NF2dOsqXiSNRVPsKbyCeNnxZN8XjaFz4ufJrr4Bf5V8Agr8h5iWc5YPs4ey4enR/P+6YeYnfZn3kh9CAUfqgz2Gtd5kLOFpZTYjUMHH516jmlJA3jjxHCO2XexteBtFpwZyqqC0awo+huLCv7Eu4W38V7x73mvtD/vl/Xl/bJ+vFfye94tuo2F+X/g3dw/szT/b6zIHcMnZ0fz0ZmHWXT6ISKzRvJq5mBeSh5MSeNZyzyyrBggWTlFlNsNssiMKYz9oQe7i/9FmmM/r6bezZKfx7Is5yGW5f+NFYUjWHXuflaXDmN12V+JKhtGVNkwVpX9lZXFw1lRNILl+Q/ySc6DfHRmFIuyRhF5ciRvZ/6NNzPvZ3baIJ5N+AM/1xsfXcg9V47XH2wLMidpFE/9eAcVQg7Lsp7j9fShfHTmIT4+M4rIrKG8ljGAeSf78eaZfszP7sc/z/bln9n9mH+mH29m9eO1jP7MPfF7ZibfxvSE3zP1UD+eiruVxw/cxIT9fRj+764Mje3M6bqjAOQVl+MPhgyQvHPllFQapnkhfgRf5y7haNV3PJvwe945+QDvnnyAf2bcQ0zR22S7fySzbj+Z7n2cdO/jZP1eTtbvI9O9j8y6fWS49pHm3Edq9T6OV+0luXIPRyt2k1C+i/jybzhYupUfSrfjV40wX1zhQNN0A8RR66bEbjjr5p+Xc9IRz9snJvJ88h94O/N+3s64j1dS7mJLXuT/v0e/vT6qa93nnVXXdXLOlRtJi6qSWLmL8Yd682rGvcxLG8qbJ4byRuoQXj56L+UNuRcdoDHk5kDJNvaXbuZA2Rb2l21hX9nX7C3byNaCKJKr4pqnbw3+QLBlQDttxn4dPsh4hseP3sjcjP/m5dRBvJYymNdTBjMtvh8rT865KMja0wsZvqsr4/f3ZNyBnjx88CpGxV3BiAM2bt5iY8PPKwz/KKlsG1lDooTgCRJAYPKR/jyb2pcZaQOZdfyPzDn+J145/l/MSfojU364lW05yzuE2F30FU/80JcZSQN5+fifmH38Tmam3MGM1Dt4LOE6pv90DyHFCGLZ+SXtL3pn88rJCR5hbPy1TEq6jqnJv2XGsduZdfwPzD52By8n/5FZSX9g8sGbeDflGU7VHMUTqKMhVM/Z2hMsSZ/JY3G38I/E25l77I/MOv4HZhy/nRkptzE1+Rbu+beNhMrvjLEKSi+cj0T+8AaPZfTi2eQ/8Gj89fz96C3MSB7AjOTfMzPpNmYn3c7MowN4/IdrmXKoPy8l3MtLP/2Fpw7fxiMHr+HFxH7MTrqNmUm/56XkAbyY3I/pyb/jr/tsRJ542hqnOGydaRdkxv6J/DXBxvflX/Fd0Rru2W3jmYTrmZnUnxlJ/ZhxtB+zjg5g1tH+vJBwM1Pjr+fZ+Ot5PuFmZiX2Y9ZR43kvJfXlpeR+PJ90M3/da2Nm4gME5MZ2c5F2QV5OeYA/7rZxrOYgANE/f8S933ViTFxXZiX1ZfbRvsxK7MusxFuZnXgrs8JkZuKtzEi8lZlHf8espL48Gd+Lu3fbeDVpLA1BY+kvc7T7ZTktQUQlyLQjg/nzv20cyo+zrsdX7OKR/bcybLeNp368hpd+uok5ib9lbuKtzfI75ib+jtmJv2PGT7fwfMJveOj7zty/O4JPs+YjKsYUdTc04Wloav/YRusLz/04lAeTIsgsPENewfnc0is1EH32Qx47MICH913F+O//F+O/t/H4wW7877gIHtnfhXHfd2Hs91cyZl9v3k19lgLPaev15TV1NDR6Oz4/0vrC26ceYVhcL45X/GB4d2Eljf7Q+cJI9pHqiGPVqVeZd+wRZicOZ0bCvbyS9DAfpD3PnnNfUuO3ny9NVI2T+eVI8oVPGrUB2ZsfzX1HehJTtMK6FgyJZOYW0+gXf1EIz8wro9LhvKTn2lrugkMoFOS5n/7C0APXYK8tb3GepMrh5HB8Cmknz5JbXEpBSQVlFbVU2N0UlVWRW1RK1s95/JCQzMkzPyPLMpqm4ff7CQQChEIhJElCURQ0TcPsVOm6fn6tCT+oUOkq4bGE27n/qzv4KeMIwVCQQCBAbV0ttXW1VFRWkJ19lrS0DJKSj5F4NInk5OOcPHmK/Px8amtrcbvd1NTU4HQ6cbvdNDU1WTCyLKOqaguYDmvfgNzE4bIYdpWv4UT5EezuMkQl9B877PT/DQC7cLwx8LR3hQAAAABJRU5ErkJggg==) no-repeat;padding-left:40px} | ||
| 22 | - .browser .browser-firefox{background-position:0 -34px} | ||
| 23 | - .browser .browser-ie{background-position:0 -68px;margin-left:0px} | ||
| 24 | - .browser .browser-360{background-position:0 -170px;margin-left: -27px} | ||
| 25 | - </style> | ||
| 26 | -</head> | ||
| 27 | -<body style="margin-top:50px"> | ||
| 28 | -<h1>่ฏทๅ็บงๆจ็ๆต่งๅจ๏ผไปฅไพฟๆไปฌๆดๅฅฝ็ไธบๆจๆไพๆๅก๏ผ</h1> | ||
| 29 | -<p>ๆจๆญฃๅจไฝฟ็จ Internet Explorer ็ๆฉๆ็ๆฌ๏ผIE11ไปฅไธ็ๆฌๆไฝฟ็จ่ฏฅๅ ๆ ธ็ๆต่งๅจ๏ผใ่ฟๆๅณ็ๅจๅ็บงๆต่งๅจๅ๏ผๆจๅฐๆ ๆณ่ฎฟ้ฎๆญค็ฝ็ซใ</p> | ||
| 30 | -<hr> | ||
| 31 | -<h2>่ฏทๆณจๆ๏ผๅพฎ่ฝฏๅ ฌๅธๅฏนWindows XP ๅ Internet Explorer ๆฉๆ็ๆฌ็ๆฏๆๅทฒ็ป็ปๆ</h2> | ||
| 32 | -<p>่ช 2016 ๅนด 1 ๆ 12 ๆฅ่ตท๏ผMicrosoft ไธๅไธบ IE 11 ไปฅไธ็ๆฌๆไพ็ธๅบๆฏๆๅๆดๆฐใๆฒกๆๅ ณ้ฎ็ๆต่งๅจๅฎๅ จๆดๆฐ๏ผๆจ็็ต่ๅฏ่ฝๆๅๆๅฎณ็ ๆฏใ้ด่ฐ่ฝฏไปถๅๅ ถไปๆถๆ่ฝฏไปถ็ๆปๅป๏ผๅฎไปฌๅฏไปฅ็ชๅๆๆๅฎณๆจ็ไธๅกๆฐๆฎๅไฟกๆฏใ่ฏทๅ้ <a href="https://www.microsoft.com/zh-cn/WindowsForBusiness/End-of-IE-support">ๅพฎ่ฝฏๅฏน Internet Explorer ๆฉๆ็ๆฌ็ๆฏๆๅฐไบ 2016 ๅนด 1 ๆ 12 ๆฅ็ปๆ็่ฏดๆ</a> ใ</p> | ||
| 33 | -<hr> | ||
| 34 | -<h2>ๆจๅฏไปฅ้ๆฉๆดๅ ่ฟ็ๆต่งๅจ</h2> | ||
| 35 | -<p>ๆจ่ไฝฟ็จไปฅไธๆต่งๅจ็ๆๆฐ็ๆฌใๅฆๆๆจ็็ต่ๅทฒๆไปฅไธๆต่งๅจ็ๆๆฐ็ๆฌๅ็ดๆฅไฝฟ็จ่ฏฅๆต่งๅจ่ฎฟ้ฎๅณๅฏใ</p> | ||
| 36 | -<ul class="browser"> | ||
| 37 | - <li class="browser-chrome"><a href="https://www.google.cn/chrome/browser/desktop/index.html?hl=zh-CN&standalone=1"> ่ฐทๆญๆต่งๅจ<span>Google Chrome</span></a></li> | ||
| 38 | - <li class="browser-firefox"><a href="https://www.mozilla.org/zh-CN/firefox/new/"> ็ซ็ๆต่งๅจ<span>Mozilla Firefox</span></a></li> | ||
| 39 | - <li class="browser-ie"><a href="https://windows.microsoft.com/zh-cn/internet-explorer/download-ie"> IE 11 ๆต่งๅจ<span>Internet Explorer</span></a></li> | ||
| 40 | - <li class="browser-360"><a href="http://se.360.cn/"> 360ๅฎๅ จๆต่งๅจ<span>360 Chrome</span></a></li> | ||
| 41 | - <div class="clean"></div> | ||
| 42 | -</ul> | ||
| 43 | -<hr> | ||
| 44 | -</body> | ||
| 45 | -</html> |
yudao-server/src/main/resources/admin-ui/html/ie.html.gz deleted
No preview for this file type
yudao-server/src/main/resources/admin-ui/index.html deleted
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html> | ||
| 3 | - <head> | ||
| 4 | - <meta charset="utf-8"> | ||
| 5 | - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
| 6 | - <meta name="renderer" content="webkit"> | ||
| 7 | - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | ||
| 8 | - <link rel="icon" href="/admin-ui/favicon.ico"> | ||
| 9 | - <title>่้็ฎก็็ณป็ป</title> | ||
| 10 | - <!--[if lt IE 11]><script>window.location.href='html/ie.html';</script><![endif]--> | ||
| 11 | - <style> | ||
| 12 | - html, | ||
| 13 | - body, | ||
| 14 | - #app { | ||
| 15 | - height: 100%; | ||
| 16 | - margin: 0px; | ||
| 17 | - padding: 0px; | ||
| 18 | - } | ||
| 19 | - .chromeframe { | ||
| 20 | - margin: 0.2em 0; | ||
| 21 | - background: #ccc; | ||
| 22 | - color: #000; | ||
| 23 | - padding: 0.2em 0; | ||
| 24 | - } | ||
| 25 | - | ||
| 26 | - #loader-wrapper { | ||
| 27 | - position: fixed; | ||
| 28 | - top: 0; | ||
| 29 | - left: 0; | ||
| 30 | - width: 100%; | ||
| 31 | - height: 100%; | ||
| 32 | - z-index: 999999; | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | - #loader { | ||
| 36 | - display: block; | ||
| 37 | - position: relative; | ||
| 38 | - left: 50%; | ||
| 39 | - top: 50%; | ||
| 40 | - width: 150px; | ||
| 41 | - height: 150px; | ||
| 42 | - margin: -75px 0 0 -75px; | ||
| 43 | - border-radius: 50%; | ||
| 44 | - border: 3px solid transparent; | ||
| 45 | - border-top-color: #FFF; | ||
| 46 | - -webkit-animation: spin 2s linear infinite; | ||
| 47 | - -ms-animation: spin 2s linear infinite; | ||
| 48 | - -moz-animation: spin 2s linear infinite; | ||
| 49 | - -o-animation: spin 2s linear infinite; | ||
| 50 | - animation: spin 2s linear infinite; | ||
| 51 | - z-index: 1001; | ||
| 52 | - } | ||
| 53 | - | ||
| 54 | - #loader:before { | ||
| 55 | - content: ""; | ||
| 56 | - position: absolute; | ||
| 57 | - top: 5px; | ||
| 58 | - left: 5px; | ||
| 59 | - right: 5px; | ||
| 60 | - bottom: 5px; | ||
| 61 | - border-radius: 50%; | ||
| 62 | - border: 3px solid transparent; | ||
| 63 | - border-top-color: #FFF; | ||
| 64 | - -webkit-animation: spin 3s linear infinite; | ||
| 65 | - -moz-animation: spin 3s linear infinite; | ||
| 66 | - -o-animation: spin 3s linear infinite; | ||
| 67 | - -ms-animation: spin 3s linear infinite; | ||
| 68 | - animation: spin 3s linear infinite; | ||
| 69 | - } | ||
| 70 | - | ||
| 71 | - #loader:after { | ||
| 72 | - content: ""; | ||
| 73 | - position: absolute; | ||
| 74 | - top: 15px; | ||
| 75 | - left: 15px; | ||
| 76 | - right: 15px; | ||
| 77 | - bottom: 15px; | ||
| 78 | - border-radius: 50%; | ||
| 79 | - border: 3px solid transparent; | ||
| 80 | - border-top-color: #FFF; | ||
| 81 | - -moz-animation: spin 1.5s linear infinite; | ||
| 82 | - -o-animation: spin 1.5s linear infinite; | ||
| 83 | - -ms-animation: spin 1.5s linear infinite; | ||
| 84 | - -webkit-animation: spin 1.5s linear infinite; | ||
| 85 | - animation: spin 1.5s linear infinite; | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - | ||
| 89 | - @-webkit-keyframes spin { | ||
| 90 | - 0% { | ||
| 91 | - -webkit-transform: rotate(0deg); | ||
| 92 | - -ms-transform: rotate(0deg); | ||
| 93 | - transform: rotate(0deg); | ||
| 94 | - } | ||
| 95 | - 100% { | ||
| 96 | - -webkit-transform: rotate(360deg); | ||
| 97 | - -ms-transform: rotate(360deg); | ||
| 98 | - transform: rotate(360deg); | ||
| 99 | - } | ||
| 100 | - } | ||
| 101 | - | ||
| 102 | - @keyframes spin { | ||
| 103 | - 0% { | ||
| 104 | - -webkit-transform: rotate(0deg); | ||
| 105 | - -ms-transform: rotate(0deg); | ||
| 106 | - transform: rotate(0deg); | ||
| 107 | - } | ||
| 108 | - 100% { | ||
| 109 | - -webkit-transform: rotate(360deg); | ||
| 110 | - -ms-transform: rotate(360deg); | ||
| 111 | - transform: rotate(360deg); | ||
| 112 | - } | ||
| 113 | - } | ||
| 114 | - | ||
| 115 | - | ||
| 116 | - #loader-wrapper .loader-section { | ||
| 117 | - position: fixed; | ||
| 118 | - top: 0; | ||
| 119 | - width: 51%; | ||
| 120 | - height: 100%; | ||
| 121 | - background: #7171C6; | ||
| 122 | - z-index: 1000; | ||
| 123 | - -webkit-transform: translateX(0); | ||
| 124 | - -ms-transform: translateX(0); | ||
| 125 | - transform: translateX(0); | ||
| 126 | - } | ||
| 127 | - | ||
| 128 | - #loader-wrapper .loader-section.section-left { | ||
| 129 | - left: 0; | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | - #loader-wrapper .loader-section.section-right { | ||
| 133 | - right: 0; | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - | ||
| 137 | - .loaded #loader-wrapper .loader-section.section-left { | ||
| 138 | - -webkit-transform: translateX(-100%); | ||
| 139 | - -ms-transform: translateX(-100%); | ||
| 140 | - transform: translateX(-100%); | ||
| 141 | - -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); | ||
| 142 | - transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); | ||
| 143 | - } | ||
| 144 | - | ||
| 145 | - .loaded #loader-wrapper .loader-section.section-right { | ||
| 146 | - -webkit-transform: translateX(100%); | ||
| 147 | - -ms-transform: translateX(100%); | ||
| 148 | - transform: translateX(100%); | ||
| 149 | - -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); | ||
| 150 | - transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); | ||
| 151 | - } | ||
| 152 | - | ||
| 153 | - .loaded #loader { | ||
| 154 | - opacity: 0; | ||
| 155 | - -webkit-transition: all 0.3s ease-out; | ||
| 156 | - transition: all 0.3s ease-out; | ||
| 157 | - } | ||
| 158 | - | ||
| 159 | - .loaded #loader-wrapper { | ||
| 160 | - visibility: hidden; | ||
| 161 | - -webkit-transform: translateY(-100%); | ||
| 162 | - -ms-transform: translateY(-100%); | ||
| 163 | - transform: translateY(-100%); | ||
| 164 | - -webkit-transition: all 0.3s 1s ease-out; | ||
| 165 | - transition: all 0.3s 1s ease-out; | ||
| 166 | - } | ||
| 167 | - | ||
| 168 | - .no-js #loader-wrapper { | ||
| 169 | - display: none; | ||
| 170 | - } | ||
| 171 | - | ||
| 172 | - .no-js h1 { | ||
| 173 | - color: #222222; | ||
| 174 | - } | ||
| 175 | - | ||
| 176 | - #loader-wrapper .load_title { | ||
| 177 | - font-family: 'Open Sans'; | ||
| 178 | - color: #FFF; | ||
| 179 | - font-size: 19px; | ||
| 180 | - width: 100%; | ||
| 181 | - text-align: center; | ||
| 182 | - z-index: 9999999999999; | ||
| 183 | - position: absolute; | ||
| 184 | - top: 60%; | ||
| 185 | - opacity: 1; | ||
| 186 | - line-height: 30px; | ||
| 187 | - } | ||
| 188 | - | ||
| 189 | - #loader-wrapper .load_title span { | ||
| 190 | - font-weight: normal; | ||
| 191 | - font-style: italic; | ||
| 192 | - font-size: 13px; | ||
| 193 | - color: #FFF; | ||
| 194 | - opacity: 0.5; | ||
| 195 | - } | ||
| 196 | - </style> | ||
| 197 | - </head> | ||
| 198 | - <body> | ||
| 199 | - <div id="app"> | ||
| 200 | - <div id="loader-wrapper"> | ||
| 201 | - <div id="loader"></div> | ||
| 202 | - <div class="loader-section section-left"></div> | ||
| 203 | - <div class="loader-section section-right"></div> | ||
| 204 | - <div class="load_title">ๆญฃๅจๅ ่ฝฝ็ณป็ป่ตๆบ๏ผ่ฏท่ๅฟ็ญๅพ </div> | ||
| 205 | - </div> | ||
| 206 | - </div> | ||
| 207 | - <script type="text/javascript" src="/admin-ui/static/js/chunk-vendors.js"></script><script type="text/javascript" src="/admin-ui/static/js/app.js"></script></body> | ||
| 208 | -</html> |
yudao-server/src/main/resources/admin-ui/index.html.gz deleted
No preview for this file type
yudao-server/src/main/resources/admin-ui/libs/monaco-editor/vs/base/browser/ui/codicons/codicon/codicon.ttf deleted
No preview for this file type
yudao-server/src/main/resources/admin-ui/libs/monaco-editor/vs/base/worker/workerMain.js deleted
| 1 | -/*!----------------------------------------------------------- | ||
| 2 | - * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| 3 | - * Version: 0.23.0(82e8ea39fc101d639262435542c7d43bc20d8aa2) | ||
| 4 | - * Released under the MIT license | ||
| 5 | - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt | ||
| 6 | - *-----------------------------------------------------------*/(function(){var z=["require","exports","vs/base/common/platform","vs/editor/common/core/position","vs/base/common/errors","vs/base/common/strings","vs/editor/common/core/range","vs/base/common/lifecycle","vs/base/common/stopwatch","vs/base/common/event","vs/base/common/diff/diff","vs/base/common/types","vs/base/common/uint","vs/base/common/uri","vs/base/common/arrays","vs/base/common/diff/diffChange","vs/base/common/iterator","vs/base/common/keyCodes","vs/base/common/linkedList","vs/base/common/process","vs/base/common/path","vs/base/common/cancellation","vs/base/common/hash","vs/editor/common/core/characterClassifier","vs/editor/common/core/selection","vs/editor/common/core/token","vs/editor/common/diff/diffComputer","vs/editor/common/model/wordHelper","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/standalone/standaloneEnums","vs/editor/common/standalone/standaloneBase","vs/editor/common/viewModel/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker"],G=function(I){for(var t=[],p=0,P=I.length;p<P;p++)t[p]=z[I[p]];return t};"use strict";var ce=this,fe=typeof global=="object"?global:{},X;(function(I){I.global=ce;var t=function(){function p(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1}return Object.defineProperty(p.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!1,configurable:!0}),p.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=p._isWindows(),this._isNode=typeof module!="undefined"&&!!module.exports,this._isElectronRenderer=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.electron!="undefined"&&process.type==="renderer",this._isWebWorker=typeof I.global.importScripts=="function")},p._isWindows=function(){return typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process!="undefined"?process.platform==="win32":!1},p}();I.Environment=t})(X||(X={}));var X;(function(I){var t=function(){function E(u,d,l){this.type=u,this.detail=d,this.timestamp=l}return E}();I.LoaderEvent=t;var p=function(){function E(u){this._events=[new t(1,"",u)]}return E.prototype.record=function(u,d){this._events.push(new t(u,d,I.Utilities.getHighPerformanceTimestamp()))},E.prototype.getEvents=function(){return this._events},E}();I.LoaderEventRecorder=p;var P=function(){function E(){}return E.prototype.record=function(u,d){},E.prototype.getEvents=function(){return[]},E.INSTANCE=new E,E}();I.NullLoaderEventRecorder=P})(X||(X={}));var X;(function(I){var t=function(){function p(){}return p.fileUriToFilePath=function(P,E){if(E=decodeURI(E).replace(/%23/g,"#"),P){if(/^file:\/\/\//.test(E))return E.substr(8);if(/^file:\/\//.test(E))return E.substr(5)}else if(/^file:\/\//.test(E))return E.substr(7);return E},p.startsWith=function(P,E){return P.length>=E.length&&P.substr(0,E.length)===E},p.endsWith=function(P,E){return P.length>=E.length&&P.substr(P.length-E.length)===E},p.containsQueryString=function(P){return/^[^\#]*\?/gi.test(P)},p.isAbsolutePath=function(P){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(P)},p.forEachProperty=function(P,E){if(P){var u=void 0;for(u in P)P.hasOwnProperty(u)&&E(u,P[u])}},p.isEmpty=function(P){var E=!0;return p.forEachProperty(P,function(){E=!1}),E},p.recursiveClone=function(P){if(!P||typeof P!="object"||P instanceof RegExp||!Array.isArray(P)&&Object.getPrototypeOf(P)!==Object.prototype)return P;var E=Array.isArray(P)?[]:{};return p.forEachProperty(P,function(u,d){d&&typeof d=="object"?E[u]=p.recursiveClone(d):E[u]=d}),E},p.generateAnonymousModule=function(){return"===anonymous"+p.NEXT_ANONYMOUS_ID+++"==="},p.isAnonymousModule=function(P){return p.startsWith(P,"===anonymous")},p.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=I.global.performance&&typeof I.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?I.global.performance.now():Date.now()},p.NEXT_ANONYMOUS_ID=1,p.PERFORMANCE_NOW_PROBED=!1,p.HAS_PERFORMANCE_NOW=!1,p}();I.Utilities=t})(X||(X={}));var X;(function(I){function t(E){if(E instanceof Error)return E;var u=new Error(E.message||String(E)||"Unknown Error");return E.stack&&(u.stack=E.stack),u}I.ensureError=t;var p=function(){function E(){}return E.validateConfigurationOptions=function(u){function d(s){if(s.phase==="loading"){console.error('Loading "'+s.moduleId+'" failed'),console.error(s),console.error("Here are the modules that depend on it:"),console.error(s.neededBy);return}if(s.phase==="factory"){console.error('The factory method of "'+s.moduleId+'" has thrown an exception'),console.error(s);return}}if(u=u||{},typeof u.baseUrl!="string"&&(u.baseUrl=""),typeof u.isBuild!="boolean"&&(u.isBuild=!1),typeof u.paths!="object"&&(u.paths={}),typeof u.config!="object"&&(u.config={}),typeof u.catchError=="undefined"&&(u.catchError=!1),typeof u.recordStats=="undefined"&&(u.recordStats=!1),typeof u.urlArgs!="string"&&(u.urlArgs=""),typeof u.onError!="function"&&(u.onError=d),Array.isArray(u.ignoreDuplicateModules)||(u.ignoreDuplicateModules=[]),u.baseUrl.length>0&&(I.Utilities.endsWith(u.baseUrl,"/")||(u.baseUrl+="/")),typeof u.cspNonce!="string"&&(u.cspNonce=""),typeof u.preferScriptTags=="undefined"&&(u.preferScriptTags=!1),Array.isArray(u.nodeModules)||(u.nodeModules=[]),u.nodeCachedData&&typeof u.nodeCachedData=="object"&&(typeof u.nodeCachedData.seed!="string"&&(u.nodeCachedData.seed="seed"),(typeof u.nodeCachedData.writeDelay!="number"||u.nodeCachedData.writeDelay<0)&&(u.nodeCachedData.writeDelay=1e3*7),!u.nodeCachedData.path||typeof u.nodeCachedData.path!="string")){var l=t(new Error("INVALID cached data configuration, 'path' MUST be set"));l.phase="configuration",u.onError(l),u.nodeCachedData=void 0}return u},E.mergeConfigurationOptions=function(u,d){u===void 0&&(u=null),d===void 0&&(d=null);var l=I.Utilities.recursiveClone(d||{});return I.Utilities.forEachProperty(u,function(s,h){s==="ignoreDuplicateModules"&&typeof l.ignoreDuplicateModules!="undefined"?l.ignoreDuplicateModules=l.ignoreDuplicateModules.concat(h):s==="paths"&&typeof l.paths!="undefined"?I.Utilities.forEachProperty(h,function(w,a){return l.paths[w]=a}):s==="config"&&typeof l.config!="undefined"?I.Utilities.forEachProperty(h,function(w,a){return l.config[w]=a}):l[s]=I.Utilities.recursiveClone(h)}),E.validateConfigurationOptions(l)},E}();I.ConfigurationOptionsUtil=p;var P=function(){function E(u,d){if(this._env=u,this.options=p.mergeConfigurationOptions(d),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""){if(this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){var l=this.options.nodeRequire.main.filename,s=Math.max(l.lastIndexOf("/"),l.lastIndexOf("\\"));this.options.baseUrl=l.substring(0,s+1)}if(this.options.nodeMain&&this._env.isNode){var l=this.options.nodeMain,s=Math.max(l.lastIndexOf("/"),l.lastIndexOf("\\"));this.options.baseUrl=l.substring(0,s+1)}}}return E.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var u=0;u<this.options.ignoreDuplicateModules.length;u++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[u]]=!0},E.prototype._createNodeModulesMap=function(){this.nodeModulesMap=Object.create(null);for(var u=0,d=this.options.nodeModules;u<d.length;u++){var l=d[u];this.nodeModulesMap[l]=!0}},E.prototype._createSortedPathsRules=function(){var u=this;this.sortedPathsRules=[],I.Utilities.forEachProperty(this.options.paths,function(d,l){Array.isArray(l)?u.sortedPathsRules.push({from:d,to:l}):u.sortedPathsRules.push({from:d,to:[l]})}),this.sortedPathsRules.sort(function(d,l){return l.from.length-d.from.length})},E.prototype.cloneAndMerge=function(u){return new E(this._env,p.mergeConfigurationOptions(u,this.options))},E.prototype.getOptionsLiteral=function(){return this.options},E.prototype._applyPaths=function(u){for(var d,l=0,s=this.sortedPathsRules.length;l<s;l++)if(d=this.sortedPathsRules[l],I.Utilities.startsWith(u,d.from)){for(var h=[],w=0,a=d.to.length;w<a;w++)h.push(d.to[w]+u.substr(d.from.length));return h}return[u]},E.prototype._addUrlArgsToUrl=function(u){return I.Utilities.containsQueryString(u)?u+"&"+this.options.urlArgs:u+"?"+this.options.urlArgs},E.prototype._addUrlArgsIfNecessaryToUrl=function(u){return this.options.urlArgs?this._addUrlArgsToUrl(u):u},E.prototype._addUrlArgsIfNecessaryToUrls=function(u){if(this.options.urlArgs)for(var d=0,l=u.length;d<l;d++)u[d]=this._addUrlArgsToUrl(u[d]);return u},E.prototype.moduleIdToPaths=function(u){var d=this.nodeModulesMap[u]===!0||this.options.amdModulesPattern instanceof RegExp&&!this.options.amdModulesPattern.test(u);if(d)return this.isBuild()?["empty:"]:["node|"+u];var l=u,s;if(!I.Utilities.endsWith(l,".js")&&!I.Utilities.isAbsolutePath(l)){s=this._applyPaths(l);for(var h=0,w=s.length;h<w;h++)this.isBuild()&&s[h]==="empty:"||(I.Utilities.isAbsolutePath(s[h])||(s[h]=this.options.baseUrl+s[h]),!I.Utilities.endsWith(s[h],".js")&&!I.Utilities.containsQueryString(s[h])&&(s[h]=s[h]+".js"))}else!I.Utilities.endsWith(l,".js")&&!I.Utilities.containsQueryString(l)&&(l=l+".js"),s=[l];return this._addUrlArgsIfNecessaryToUrls(s)},E.prototype.requireToUrl=function(u){var d=u;return I.Utilities.isAbsolutePath(d)||(d=this._applyPaths(d)[0],I.Utilities.isAbsolutePath(d)||(d=this.options.baseUrl+d)),this._addUrlArgsIfNecessaryToUrl(d)},E.prototype.isBuild=function(){return this.options.isBuild},E.prototype.isDuplicateMessageIgnoredFor=function(u){return this.ignoreDuplicateModulesMap.hasOwnProperty(u)},E.prototype.getConfigForModule=function(u){if(this.options.config)return this.options.config[u]},E.prototype.shouldCatchError=function(){return this.options.catchError},E.prototype.shouldRecordStats=function(){return this.options.recordStats},E.prototype.onError=function(u){this.options.onError(u)},E}();I.Configuration=P})(X||(X={}));var X;(function(I){var t=function(){function l(s){this._env=s,this._scriptLoader=null,this._callbackMap={}}return l.prototype.load=function(s,h,w,a){var S=this;if(!this._scriptLoader)if(this._env.isWebWorker)this._scriptLoader=new P;else if(this._env.isElectronRenderer){var v=s.getConfig().getOptionsLiteral().preferScriptTags;v?this._scriptLoader=new p:this._scriptLoader=new E(this._env)}else this._env.isNode?this._scriptLoader=new E(this._env):this._scriptLoader=new p;var C={callback:w,errorback:a};if(this._callbackMap.hasOwnProperty(h)){this._callbackMap[h].push(C);return}this._callbackMap[h]=[C],this._scriptLoader.load(s,h,function(){return S.triggerCallback(h)},function(n){return S.triggerErrorback(h,n)})},l.prototype.triggerCallback=function(s){var h=this._callbackMap[s];delete this._callbackMap[s];for(var w=0;w<h.length;w++)h[w].callback()},l.prototype.triggerErrorback=function(s,h){var w=this._callbackMap[s];delete this._callbackMap[s];for(var a=0;a<w.length;a++)w[a].errorback(h)},l}(),p=function(){function l(){}return l.prototype.attachListeners=function(s,h,w){var a=function(){s.removeEventListener("load",S),s.removeEventListener("error",v)},S=function(C){a(),h()},v=function(C){a(),w(C)};s.addEventListener("load",S),s.addEventListener("error",v)},l.prototype.load=function(s,h,w,a){if(/^node\|/.test(h)){var S=s.getConfig().getOptionsLiteral(),v=u(s.getRecorder(),S.nodeRequire||I.global.nodeRequire),C=h.split("|"),n=null;try{n=v(C[1])}catch(o){a(o);return}s.enqueueDefineAnonymousModule([],function(){return n}),w()}else{var r=document.createElement("script");r.setAttribute("async","async"),r.setAttribute("type","text/javascript"),this.attachListeners(r,w,a);var m=s.getConfig().getOptionsLiteral().trustedTypesPolicy;m&&(h=m.createScriptURL(h)),r.setAttribute("src",h);var _=s.getConfig().getOptionsLiteral().cspNonce;_&&r.setAttribute("nonce",_),document.getElementsByTagName("head")[0].appendChild(r)}},l}(),P=function(){function l(){}return l.prototype.load=function(s,h,w,a){var S=s.getConfig().getOptionsLiteral().trustedTypesPolicy;S&&(h=S.createScriptURL(h));try{importScripts(h),w()}catch(v){a(v)}},l}(),E=function(){function l(s){this._env=s,this._didInitialize=!1,this._didPatchNodeRequire=!1}return l.prototype._init=function(s){this._didInitialize||(this._didInitialize=!0,this._fs=s("fs"),this._vm=s("vm"),this._path=s("path"),this._crypto=s("crypto"))},l.prototype._initNodeRequire=function(s,h){var w=h.getConfig().getOptionsLiteral().nodeCachedData;if(!!w&&!this._didPatchNodeRequire){this._didPatchNodeRequire=!0;var a=this,S=s("module");function v(C){var n=C.constructor,r=function(_){try{return C.require(_)}finally{}};return r.resolve=function(_,o){return n._resolveFilename(_,C,!1,o)},r.main=process.mainModule,r.extensions=n._extensions,r.cache=n._cache,r}S.prototype._compile=function(C,n){var r=S.wrap(C.replace(/^#!.*/,"")),m=h.getRecorder(),_=a._getCachedDataPath(w,n),o={filename:n},i;try{var f=a._fs.readFileSync(_);i=f.slice(0,16),o.cachedData=f.slice(16),m.record(60,_)}catch(M){m.record(61,_)}var b=new a._vm.Script(r,o),N=b.runInThisContext(o),c=a._path.dirname(n),g=v(this),L=[this.exports,g,this,n,c,process,fe,Buffer],A=N.apply(this.exports,L);return a._handleCachedData(b,r,_,!o.cachedData,h),a._verifyCachedData(b,r,_,i,h),A}}},l.prototype.load=function(s,h,w,a){var S=this,v=s.getConfig().getOptionsLiteral(),C=u(s.getRecorder(),v.nodeRequire||I.global.nodeRequire),n=v.nodeInstrumenter||function(N){return N};this._init(C),this._initNodeRequire(C,s);var r=s.getRecorder();if(/^node\|/.test(h)){var m=h.split("|"),_=null;try{_=C(m[1])}catch(N){a(N);return}s.enqueueDefineAnonymousModule([],function(){return _}),w()}else{h=I.Utilities.fileUriToFilePath(this._env.isWindows,h);var o=this._path.normalize(h),i=this._getElectronRendererScriptPathOrUri(o),f=Boolean(v.nodeCachedData),b=f?this._getCachedDataPath(v.nodeCachedData,h):void 0;this._readSourceAndCachedData(o,b,r,function(N,c,g,L){if(N){a(N);return}var A;c.charCodeAt(0)===l._BOM?A=l._PREFIX+c.substring(1)+l._SUFFIX:A=l._PREFIX+c+l._SUFFIX,A=n(A,o);var M={filename:i,cachedData:g},R=S._createAndEvalScript(s,A,M,w,a);S._handleCachedData(R,A,b,f&&!g,s),S._verifyCachedData(R,A,b,L,s)})}},l.prototype._createAndEvalScript=function(s,h,w,a,S){var v=s.getRecorder();v.record(31,w.filename);var C=new this._vm.Script(h,w),n=C.runInThisContext(w),r=s.getGlobalAMDDefineFunc(),m=!1,_=function(){return m=!0,r.apply(null,arguments)};return _.amd=r.amd,n.call(I.global,s.getGlobalAMDRequireFunc(),_,w.filename,this._path.dirname(w.filename)),v.record(32,w.filename),m?a():S(new Error("Didn't receive define call in "+w.filename+"!")),C},l.prototype._getElectronRendererScriptPathOrUri=function(s){if(!this._env.isElectronRenderer)return s;var h=s.match(/^([a-z])\:(.*)/i);return h?"file:///"+(h[1].toUpperCase()+":"+h[2]).replace(/\\/g,"/"):"file://"+s},l.prototype._getCachedDataPath=function(s,h){var w=this._crypto.createHash("md5").update(h,"utf8").update(s.seed,"utf8").update(process.arch,"").digest("hex"),a=this._path.basename(h).replace(/\.js$/,"");return this._path.join(s.path,a+"-"+w+".code")},l.prototype._handleCachedData=function(s,h,w,a,S){var v=this;s.cachedDataRejected?this._fs.unlink(w,function(C){S.getRecorder().record(62,w),v._createAndWriteCachedData(s,h,w,S),C&&S.getConfig().onError(C)}):a&&this._createAndWriteCachedData(s,h,w,S)},l.prototype._createAndWriteCachedData=function(s,h,w,a){var S=this,v=Math.ceil(a.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),C=-1,n=0,r=void 0,m=function(){setTimeout(function(){r||(r=S._crypto.createHash("md5").update(h,"utf8").digest());var _=s.createCachedData();if(!(_.length===0||_.length===C||n>=5)){if(_.length<C){m();return}C=_.length,S._fs.writeFile(w,Buffer.concat([r,_]),function(o){o&&a.getConfig().onError(o),a.getRecorder().record(63,w),m()})}},v*Math.pow(4,n++))};m()},l.prototype._readSourceAndCachedData=function(s,h,w,a){if(!h)this._fs.readFile(s,{encoding:"utf8"},a);else{var S=void 0,v=void 0,C=void 0,n=2,r=function(m){m?a(m):--n==0&&a(void 0,S,v,C)};this._fs.readFile(s,{encoding:"utf8"},function(m,_){S=_,r(m)}),this._fs.readFile(h,function(m,_){!m&&_&&_.length>0?(C=_.slice(0,16),v=_.slice(16),w.record(60,h)):w.record(61,h),r()})}},l.prototype._verifyCachedData=function(s,h,w,a,S){var v=this;!a||s.cachedDataRejected||setTimeout(function(){var C=v._crypto.createHash("md5").update(h,"utf8").digest();a.equals(C)||(S.getConfig().onError(new Error("FAILED TO VERIFY CACHED DATA, deleting stale '"+w+"' now, but a RESTART IS REQUIRED")),v._fs.unlink(w,function(n){n&&S.getConfig().onError(n)}))},Math.ceil(5e3*(1+Math.random())))},l._BOM=65279,l._PREFIX="(function (require, define, __filename, __dirname) { ",l._SUFFIX=` | ||
| 7 | -});`,l}();function u(l,s){if(s.__$__isRecorded)return s;var h=function(a){l.record(33,a);try{return s(a)}finally{l.record(34,a)}};return h.__$__isRecorded=!0,h}I.ensureRecordedNodeRequire=u;function d(l){return new t(l)}I.createScriptLoader=d})(X||(X={}));var X;(function(I){var t=function(){function l(s){var h=s.lastIndexOf("/");h!==-1?this.fromModulePath=s.substr(0,h+1):this.fromModulePath=""}return l._normalizeModuleId=function(s){var h=s,w;for(w=/\/\.\//;w.test(h);)h=h.replace(w,"/");for(h=h.replace(/^\.\//g,""),w=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;w.test(h);)h=h.replace(w,"/");return h=h.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),h},l.prototype.resolveModule=function(s){var h=s;return I.Utilities.isAbsolutePath(h)||(I.Utilities.startsWith(h,"./")||I.Utilities.startsWith(h,"../"))&&(h=l._normalizeModuleId(this.fromModulePath+h)),h},l.ROOT=new l(""),l}();I.ModuleIdResolver=t;var p=function(){function l(s,h,w,a,S,v){this.id=s,this.strId=h,this.dependencies=w,this._callback=a,this._errorback=S,this.moduleIdResolver=v,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return l._safeInvokeFunction=function(s,h){try{return{returnedValue:s.apply(I.global,h),producedError:null}}catch(w){return{returnedValue:null,producedError:w}}},l._invokeFactory=function(s,h,w,a){return s.isBuild()&&!I.Utilities.isAnonymousModule(h)?{returnedValue:null,producedError:null}:s.shouldCatchError()?this._safeInvokeFunction(w,a):{returnedValue:w.apply(I.global,a),producedError:null}},l.prototype.complete=function(s,h,w){this._isComplete=!0;var a=null;if(this._callback)if(typeof this._callback=="function"){s.record(21,this.strId);var S=l._invokeFactory(h,this.strId,this._callback,w);a=S.producedError,s.record(22,this.strId),!a&&typeof S.returnedValue!="undefined"&&(!this.exportsPassedIn||I.Utilities.isEmpty(this.exports))&&(this.exports=S.returnedValue)}else this.exports=this._callback;if(a){var v=I.ensureError(a);v.phase="factory",v.moduleId=this.strId,this.error=v,h.onError(v)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},l.prototype.onDependencyError=function(s){return this._isComplete=!0,this.error=s,this._errorback?(this._errorback(s),!0):!1},l.prototype.isComplete=function(){return this._isComplete},l}();I.Module=p;var P=function(){function l(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return l.prototype.getMaxModuleId=function(){return this._nextId},l.prototype.getModuleId=function(s){var h=this._strModuleIdToIntModuleId.get(s);return typeof h=="undefined"&&(h=this._nextId++,this._strModuleIdToIntModuleId.set(s,h),this._intModuleIdToStrModuleId[h]=s),h},l.prototype.getStrModuleId=function(s){return this._intModuleIdToStrModuleId[s]},l}(),E=function(){function l(s){this.id=s}return l.EXPORTS=new l(0),l.MODULE=new l(1),l.REQUIRE=new l(2),l}();I.RegularDependency=E;var u=function(){function l(s,h,w){this.id=s,this.pluginId=h,this.pluginParam=w}return l}();I.PluginDependency=u;var d=function(){function l(s,h,w,a,S){S===void 0&&(S=0),this._env=s,this._scriptLoader=h,this._loaderAvailableTimestamp=S,this._defineFunc=w,this._requireFunc=a,this._moduleIdProvider=new P,this._config=new I.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}return l.prototype.reset=function(){return new l(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},l.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},l.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},l._findRelevantLocationInStack=function(s,h){for(var w=function(i){return i.replace(/\\/g,"/")},a=w(s),S=h.split(/\n/),v=0;v<S.length;v++){var C=S[v].match(/(.*):(\d+):(\d+)\)?$/);if(C){var n=C[1],r=C[2],m=C[3],_=Math.max(n.lastIndexOf(" ")+1,n.lastIndexOf("(")+1);if(n=n.substr(_),n=w(n),n===a){var o={line:parseInt(r,10),col:parseInt(m,10)};return o.line===1&&(o.col-="(function (require, define, __filename, __dirname) { ".length),o}}}throw new Error("Could not correlate define call site for needle "+s)},l.prototype.getBuildInfo=function(){if(!this._config.isBuild())return null;for(var s=[],h=0,w=0,a=this._modules2.length;w<a;w++){var S=this._modules2[w];if(!!S){var v=this._buildInfoPath[S.id]||null,C=this._buildInfoDefineStack[S.id]||null,n=this._buildInfoDependencies[S.id];s[h++]={id:S.strId,path:v,defineLocation:v&&C?l._findRelevantLocationInStack(v,C):null,dependencies:n,shim:null,exports:S.exports}}}return s},l.prototype.getRecorder=function(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new I.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=I.NullLoaderEventRecorder.INSTANCE),this._recorder},l.prototype.getLoaderEvents=function(){return this.getRecorder().getEvents()},l.prototype.enqueueDefineAnonymousModule=function(s,h){if(this._currentAnnonymousDefineCall!==null)throw new Error("Can only have one anonymous define call per script file");var w=null;this._config.isBuild()&&(w=new Error("StackLocation").stack||null),this._currentAnnonymousDefineCall={stack:w,dependencies:s,callback:h}},l.prototype.defineModule=function(s,h,w,a,S,v){var C=this;v===void 0&&(v=new t(s));var n=this._moduleIdProvider.getModuleId(s);if(this._modules2[n]){this._config.isDuplicateMessageIgnoredFor(s)||console.warn("Duplicate definition of module '"+s+"'");return}var r=new p(n,s,this._normalizeDependencies(h,v),w,a,v);this._modules2[n]=r,this._config.isBuild()&&(this._buildInfoDefineStack[n]=S,this._buildInfoDependencies[n]=(r.dependencies||[]).map(function(m){return C._moduleIdProvider.getStrModuleId(m.id)})),this._resolve(r)},l.prototype._normalizeDependency=function(s,h){if(s==="exports")return E.EXPORTS;if(s==="module")return E.MODULE;if(s==="require")return E.REQUIRE;var w=s.indexOf("!");if(w>=0){var a=h.resolveModule(s.substr(0,w)),S=h.resolveModule(s.substr(w+1)),v=this._moduleIdProvider.getModuleId(a+"!"+S),C=this._moduleIdProvider.getModuleId(a);return new u(v,C,S)}return new E(this._moduleIdProvider.getModuleId(h.resolveModule(s)))},l.prototype._normalizeDependencies=function(s,h){for(var w=[],a=0,S=0,v=s.length;S<v;S++)w[a++]=this._normalizeDependency(s[S],h);return w},l.prototype._relativeRequire=function(s,h,w,a){if(typeof h=="string")return this.synchronousRequire(h,s);this.defineModule(I.Utilities.generateAnonymousModule(),h,w,a,null,s)},l.prototype.synchronousRequire=function(s,h){h===void 0&&(h=new t(s));var w=this._normalizeDependency(s,h),a=this._modules2[w.id];if(!a)throw new Error("Check dependency list! Synchronous require cannot resolve module '"+s+"'. This is the first mention of this module!");if(!a.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+s+"'. This module has not been resolved completely yet.");if(a.error)throw a.error;return a.exports},l.prototype.configure=function(s,h){var w=this._config.shouldRecordStats();h?this._config=new I.Configuration(this._env,s):this._config=this._config.cloneAndMerge(s),this._config.shouldRecordStats()&&!w&&(this._recorder=null)},l.prototype.getConfig=function(){return this._config},l.prototype._onLoad=function(s){if(this._currentAnnonymousDefineCall!==null){var h=this._currentAnnonymousDefineCall;this._currentAnnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(s),h.dependencies,h.callback,null,h.stack)}},l.prototype._createLoadError=function(s,h){var w=this,a=this._moduleIdProvider.getStrModuleId(s),S=(this._inverseDependencies2[s]||[]).map(function(C){return w._moduleIdProvider.getStrModuleId(C)}),v=I.ensureError(h);return v.phase="loading",v.moduleId=a,v.neededBy=S,v},l.prototype._onLoadError=function(s,h){var w=this._createLoadError(s,h);this._modules2[s]||(this._modules2[s]=new p(s,this._moduleIdProvider.getStrModuleId(s),[],function(){},function(){},null));for(var a=[],S=0,v=this._moduleIdProvider.getMaxModuleId();S<v;S++)a[S]=!1;var C=!1,n=[];for(n.push(s),a[s]=!0;n.length>0;){var r=n.shift(),m=this._modules2[r];m&&(C=m.onDependencyError(w)||C);var _=this._inverseDependencies2[r];if(_)for(var S=0,v=_.length;S<v;S++){var o=_[S];a[o]||(n.push(o),a[o]=!0)}}C||this._config.onError(w)},l.prototype._hasDependencyPath=function(s,h){var w=this._modules2[s];if(!w)return!1;for(var a=[],S=0,v=this._moduleIdProvider.getMaxModuleId();S<v;S++)a[S]=!1;var C=[];for(C.push(w),a[s]=!0;C.length>0;){var n=C.shift(),r=n.dependencies;if(r)for(var S=0,v=r.length;S<v;S++){var m=r[S];if(m.id===h)return!0;var _=this._modules2[m.id];_&&!a[m.id]&&(a[m.id]=!0,C.push(_))}}return!1},l.prototype._findCyclePath=function(s,h,w){if(s===h||w===50)return[s];var a=this._modules2[s];if(!a)return null;var S=a.dependencies;if(S)for(var v=0,C=S.length;v<C;v++){var n=this._findCyclePath(S[v].id,h,w+1);if(n!==null)return n.push(s),n}return null},l.prototype._createRequire=function(s){var h=this,w=function(a,S,v){return h._relativeRequire(s,a,S,v)};return w.toUrl=function(a){return h._config.requireToUrl(s.resolveModule(a))},w.getStats=function(){return h.getLoaderEvents()},w.hasDependencyCycle=function(){return h._hasDependencyCycle},w.config=function(a,S){S===void 0&&(S=!1),h.configure(a,S)},w.__$__nodeRequire=I.global.nodeRequire,w},l.prototype._loadModule=function(s){var h=this;if(!(this._modules2[s]||this._knownModules2[s])){this._knownModules2[s]=!0;var w=this._moduleIdProvider.getStrModuleId(s),a=this._config.moduleIdToPaths(w),S=/^@[^\/]+\/[^\/]+$/;this._env.isNode&&(w.indexOf("/")===-1||S.test(w))&&a.push("node|"+w);var v=-1,C=function(n){if(v++,v>=a.length)h._onLoadError(s,n);else{var r=a[v],m=h.getRecorder();if(h._config.isBuild()&&r==="empty:"){h._buildInfoPath[s]=r,h.defineModule(h._moduleIdProvider.getStrModuleId(s),[],null,null,null),h._onLoad(s);return}m.record(10,r),h._scriptLoader.load(h,r,function(){h._config.isBuild()&&(h._buildInfoPath[s]=r),m.record(11,r),h._onLoad(s)},function(_){m.record(12,r),C(_)})}};C(null)}},l.prototype._loadPluginDependency=function(s,h){var w=this;if(!(this._modules2[h.id]||this._knownModules2[h.id])){this._knownModules2[h.id]=!0;var a=function(S){w.defineModule(w._moduleIdProvider.getStrModuleId(h.id),[],S,null,null)};a.error=function(S){w._config.onError(w._createLoadError(h.id,S))},s.load(h.pluginParam,this._createRequire(t.ROOT),a,this._config.getOptionsLiteral())}},l.prototype._resolve=function(s){var h=this,w=s.dependencies;if(w)for(var a=0,S=w.length;a<S;a++){var v=w[a];if(v===E.EXPORTS){s.exportsPassedIn=!0,s.unresolvedDependenciesCount--;continue}if(v===E.MODULE){s.unresolvedDependenciesCount--;continue}if(v===E.REQUIRE){s.unresolvedDependenciesCount--;continue}var C=this._modules2[v.id];if(C&&C.isComplete()){if(C.error){s.onDependencyError(C.error);return}s.unresolvedDependenciesCount--;continue}if(this._hasDependencyPath(v.id,s.id)){this._hasDependencyCycle=!0,console.warn("There is a dependency cycle between '"+this._moduleIdProvider.getStrModuleId(v.id)+"' and '"+this._moduleIdProvider.getStrModuleId(s.id)+"'. The cyclic path follows:");var n=this._findCyclePath(v.id,s.id,0)||[];n.reverse(),n.push(v.id),console.warn(n.map(function(_){return h._moduleIdProvider.getStrModuleId(_)}).join(` => | ||
| 8 | -`)),s.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[v.id]=this._inverseDependencies2[v.id]||[],this._inverseDependencies2[v.id].push(s.id),v instanceof u){var r=this._modules2[v.pluginId];if(r&&r.isComplete()){this._loadPluginDependency(r.exports,v);continue}var m=this._inversePluginDependencies2.get(v.pluginId);m||(m=[],this._inversePluginDependencies2.set(v.pluginId,m)),m.push(v),this._loadModule(v.pluginId);continue}this._loadModule(v.id)}s.unresolvedDependenciesCount===0&&this._onModuleComplete(s)},l.prototype._onModuleComplete=function(s){var h=this,w=this.getRecorder();if(!s.isComplete()){var a=s.dependencies,S=[];if(a)for(var v=0,C=a.length;v<C;v++){var n=a[v];if(n===E.EXPORTS){S[v]=s.exports;continue}if(n===E.MODULE){S[v]={id:s.strId,config:function(){return h._config.getConfigForModule(s.strId)}};continue}if(n===E.REQUIRE){S[v]=this._createRequire(s.moduleIdResolver);continue}var r=this._modules2[n.id];if(r){S[v]=r.exports;continue}S[v]=null}s.complete(w,this._config,S);var m=this._inverseDependencies2[s.id];if(this._inverseDependencies2[s.id]=null,m)for(var v=0,C=m.length;v<C;v++){var _=m[v],o=this._modules2[_];o.unresolvedDependenciesCount--,o.unresolvedDependenciesCount===0&&this._onModuleComplete(o)}var i=this._inversePluginDependencies2.get(s.id);if(i){this._inversePluginDependencies2.delete(s.id);for(var v=0,C=i.length;v<C;v++)this._loadPluginDependency(s.exports,i[v])}}},l}();I.ModuleManager=d})(X||(X={}));var V,X;(function(I){var t=new I.Environment,p=null,P=function(l,s,h){typeof l!="string"&&(h=s,s=l,l=null),(typeof s!="object"||!Array.isArray(s))&&(h=s,s=null),s||(s=["require","exports","module"]),l?p.defineModule(l,s,h,null,null):p.enqueueDefineAnonymousModule(s,h)};P.amd={jQuery:!0};var E=function(l,s){s===void 0&&(s=!1),p.configure(l,s)},u=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){E(arguments[0]);return}if(typeof arguments[0]=="string")return p.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){p.defineModule(I.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};u.config=E,u.getConfig=function(){return p.getConfig().getOptionsLiteral()},u.reset=function(){p=p.reset()},u.getBuildInfo=function(){return p.getBuildInfo()},u.getStats=function(){return p.getLoaderEvents()},u.define=function(){return P.apply(null,arguments)};function d(){if(typeof I.global.require!="undefined"||typeof require!="undefined"){var l=I.global.require||require;if(typeof l=="function"&&typeof l.resolve=="function"){var s=I.ensureRecordedNodeRequire(p.getRecorder(),l);I.global.nodeRequire=s,u.nodeRequire=s,u.__$__nodeRequire=s}}t.isNode&&!t.isElectronRenderer?(module.exports=u,require=u):(t.isElectronRenderer||(I.global.define=P),I.global.require=u)}I.init=d,(typeof I.global.define!="function"||!I.global.define.amd)&&(p=new I.ModuleManager(t,I.createScriptLoader(t),P,u,I.Utilities.getHighPerformanceTimestamp()),typeof I.global.require!="undefined"&&typeof I.global.require!="function"&&u.config(I.global.require),V=function(){return P.apply(null,arguments)},V.amd=P.amd,typeof doNotInitLoader=="undefined"&&d())})(X||(X={})),V(z[14],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asArray=t.pushToEnd=t.pushToStart=t.arrayInsert=t.range=t.flatten=t.firstOrDefault=t.distinctES6=t.distinct=t.isNonEmptyArray=t.isFalsyOrEmpty=t.coalesce=t.groupBy=t.mergeSort=t.quickSelect=t.findFirstInSorted=t.binarySearch=t.equals=t.tail2=t.tail=void 0;function p(c,g=0){return c[c.length-(1+g)]}t.tail=p;function P(c){if(c.length===0)throw new Error("Invalid tail call");return[c.slice(0,c.length-1),c[c.length-1]]}t.tail2=P;function E(c,g,L=(A,M)=>A===M){if(c===g)return!0;if(!c||!g||c.length!==g.length)return!1;for(let A=0,M=c.length;A<M;A++)if(!L(c[A],g[A]))return!1;return!0}t.equals=E;function u(c,g,L){let A=0,M=c.length-1;for(;A<=M;){const R=(A+M)/2|0,D=L(c[R],g);if(D<0)A=R+1;else if(D>0)M=R-1;else return R}return-(A+1)}t.binarySearch=u;function d(c,g){let L=0,A=c.length;if(A===0)return 0;for(;L<A;){const M=Math.floor((L+A)/2);g(c[M])?A=M:L=M+1}return L}t.findFirstInSorted=d;function l(c,g,L){if(c=c|0,c>=g.length)throw new TypeError("invalid index");let A=g[Math.floor(g.length*Math.random())],M=[],R=[],D=[];for(let T of g){const $=L(T,A);$<0?M.push(T):$>0?R.push(T):D.push(T)}return c<M.length?l(c,M,L):c<M.length+D.length?D[0]:l(c-(M.length+D.length),R,L)}t.quickSelect=l;function s(c,g){return w(c,g,0,c.length-1,[]),c}t.mergeSort=s;function h(c,g,L,A,M,R){let D=L,T=A+1;for(let $=L;$<=M;$++)R[$]=c[$];for(let $=L;$<=M;$++)D>A?c[$]=R[T++]:T>M?c[$]=R[D++]:g(R[T],R[D])<0?c[$]=R[T++]:c[$]=R[D++]}function w(c,g,L,A,M){if(!(A<=L)){const R=L+(A-L)/2|0;w(c,g,L,R,M),w(c,g,R+1,A,M),!(g(c[R],c[R+1])<=0)&&h(c,g,L,R,A,M)}}function a(c,g){const L=[];let A;for(const M of s(c.slice(0),g))!A||g(A[0],M)!==0?(A=[M],L.push(A)):A.push(M);return L}t.groupBy=a;function S(c){return c.filter(g=>!!g)}t.coalesce=S;function v(c){return!Array.isArray(c)||c.length===0}t.isFalsyOrEmpty=v;function C(c){return Array.isArray(c)&&c.length>0}t.isNonEmptyArray=C;function n(c,g){if(!g)return c.filter((A,M)=>c.indexOf(A)===M);const L=Object.create(null);return c.filter(A=>{const M=g(A);return L[M]?!1:(L[M]=!0,!0)})}t.distinct=n;function r(c){const g=new Set;return c.filter(L=>g.has(L)?!1:(g.add(L),!0))}t.distinctES6=r;function m(c,g){return c.length>0?c[0]:g}t.firstOrDefault=m;function _(c){return[].concat(...c)}t.flatten=_;function o(c,g){let L=typeof g=="number"?c:0;typeof g=="number"?L=c:(L=0,g=c);const A=[];if(L<=g)for(let M=L;M<g;M++)A.push(M);else for(let M=L;M>g;M--)A.push(M);return A}t.range=o;function i(c,g,L){const A=c.slice(0,g),M=c.slice(g);return A.concat(L,M)}t.arrayInsert=i;function f(c,g){const L=c.indexOf(g);L>-1&&(c.splice(L,1),c.unshift(g))}t.pushToStart=f;function b(c,g){const L=c.indexOf(g);L>-1&&(c.splice(L,1),c.push(g))}t.pushToEnd=b;function N(c){return Array.isArray(c)?c:[c]}t.asArray=N}),V(z[15],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffChange=void 0;class p{constructor(E,u,d,l){this.originalStart=E,this.originalLength=u,this.modifiedStart=d,this.modifiedLength=l}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}t.DiffChange=p}),V(z[4],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.illegalState=t.illegalArgument=t.canceled=t.isPromiseCanceledError=t.transformErrorForSerialization=t.onUnexpectedExternalError=t.onUnexpectedError=t.errorHandler=t.ErrorHandler=void 0;class p{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(S){setTimeout(()=>{throw S.stack?new Error(S.message+` | ||
| 9 | - | ||
| 10 | -`+S.stack):S},0)}}emit(S){this.listeners.forEach(v=>{v(S)})}onUnexpectedError(S){this.unexpectedErrorHandler(S),this.emit(S)}onUnexpectedExternalError(S){this.unexpectedErrorHandler(S)}}t.ErrorHandler=p,t.errorHandler=new p;function P(a){l(a)||t.errorHandler.onUnexpectedError(a)}t.onUnexpectedError=P;function E(a){l(a)||t.errorHandler.onUnexpectedExternalError(a)}t.onUnexpectedExternalError=E;function u(a){if(a instanceof Error){let{name:S,message:v}=a;const C=a.stacktrace||a.stack;return{$isError:!0,name:S,message:v,stack:C}}return a}t.transformErrorForSerialization=u;const d="Canceled";function l(a){return a instanceof Error&&a.name===d&&a.message===d}t.isPromiseCanceledError=l;function s(){const a=new Error(d);return a.name=a.message,a}t.canceled=s;function h(a){return a?new Error(`Illegal argument: ${a}`):new Error("Illegal argument")}t.illegalArgument=h;function w(a){return a?new Error(`Illegal state: ${a}`):new Error("Illegal state")}t.illegalState=w}),V(z[16],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Iterable=void 0;var p;(function(P){function E(f){return f&&typeof f=="object"&&typeof f[Symbol.iterator]=="function"}P.is=E;const u=Object.freeze([]);function d(){return u}P.empty=d;function*l(f){yield f}P.single=l;function s(f){return f||u}P.from=s;function h(f){return!f||f[Symbol.iterator]().next().done===!0}P.isEmpty=h;function w(f){return f[Symbol.iterator]().next().value}P.first=w;function a(f,b){for(const N of f)if(b(N))return!0;return!1}P.some=a;function S(f,b){for(const N of f)if(b(N))return N}P.find=S;function*v(f,b){for(const N of f)b(N)&&(yield N)}P.filter=v;function*C(f,b){for(const N of f)yield b(N)}P.map=C;function*n(...f){for(const b of f)for(const N of b)yield N}P.concat=n;function*r(f){for(const b of f)for(const N of b)yield N}P.concatNested=r;function m(f,b,N){let c=N;for(const g of f)c=b(c,g);return c}P.reduce=m;function*_(f,b,N=f.length){for(b<0&&(b+=f.length),N<0?N+=f.length:N>f.length&&(N=f.length);b<N;b++)yield f[b]}P.slice=_;function o(f,b=Number.POSITIVE_INFINITY){const N=[];if(b===0)return[N,f];const c=f[Symbol.iterator]();for(let g=0;g<b;g++){const L=c.next();if(L.done)return[N,P.empty()];N.push(L.value)}return[N,{[Symbol.iterator](){return c}}]}P.consume=o;function i(f,b,N=(c,g)=>c===g){const c=f[Symbol.iterator](),g=b[Symbol.iterator]();for(;;){const L=c.next(),A=g.next();if(L.done!==A.done)return!1;if(L.done)return!0;if(!N(L.value,A.value))return!1}}P.equals=i})(p=t.Iterable||(t.Iterable={}))}),V(z[17],G([0,1,4]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolvedKeybinding=t.ResolvedKeybindingPart=t.ChordKeybinding=t.SimpleKeybinding=t.createSimpleKeybinding=t.createKeybinding=t.KeyChord=t.KeyCodeUtils=void 0;class P{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(r,m){this._keyCodeToStr[r]=m,this._strToKeyCode[m.toLowerCase()]=r}keyCodeToStr(r){return this._keyCodeToStr[r]}strToKeyCode(r){return this._strToKeyCode[r.toLowerCase()]||0}}const E=new P,u=new P,d=new P;(function(){function n(r,m,_=m,o=_){E.define(r,m),u.define(r,_),d.define(r,o)}n(0,"unknown"),n(1,"Backspace"),n(2,"Tab"),n(3,"Enter"),n(4,"Shift"),n(5,"Ctrl"),n(6,"Alt"),n(7,"PauseBreak"),n(8,"CapsLock"),n(9,"Escape"),n(10,"Space"),n(11,"PageUp"),n(12,"PageDown"),n(13,"End"),n(14,"Home"),n(15,"LeftArrow","Left"),n(16,"UpArrow","Up"),n(17,"RightArrow","Right"),n(18,"DownArrow","Down"),n(19,"Insert"),n(20,"Delete"),n(21,"0"),n(22,"1"),n(23,"2"),n(24,"3"),n(25,"4"),n(26,"5"),n(27,"6"),n(28,"7"),n(29,"8"),n(30,"9"),n(31,"A"),n(32,"B"),n(33,"C"),n(34,"D"),n(35,"E"),n(36,"F"),n(37,"G"),n(38,"H"),n(39,"I"),n(40,"J"),n(41,"K"),n(42,"L"),n(43,"M"),n(44,"N"),n(45,"O"),n(46,"P"),n(47,"Q"),n(48,"R"),n(49,"S"),n(50,"T"),n(51,"U"),n(52,"V"),n(53,"W"),n(54,"X"),n(55,"Y"),n(56,"Z"),n(57,"Meta"),n(58,"ContextMenu"),n(59,"F1"),n(60,"F2"),n(61,"F3"),n(62,"F4"),n(63,"F5"),n(64,"F6"),n(65,"F7"),n(66,"F8"),n(67,"F9"),n(68,"F10"),n(69,"F11"),n(70,"F12"),n(71,"F13"),n(72,"F14"),n(73,"F15"),n(74,"F16"),n(75,"F17"),n(76,"F18"),n(77,"F19"),n(78,"NumLock"),n(79,"ScrollLock"),n(80,";",";","OEM_1"),n(81,"=","=","OEM_PLUS"),n(82,",",",","OEM_COMMA"),n(83,"-","-","OEM_MINUS"),n(84,".",".","OEM_PERIOD"),n(85,"/","/","OEM_2"),n(86,"`","`","OEM_3"),n(110,"ABNT_C1"),n(111,"ABNT_C2"),n(87,"[","[","OEM_4"),n(88,"\\","\\","OEM_5"),n(89,"]","]","OEM_6"),n(90,"'","'","OEM_7"),n(91,"OEM_8"),n(92,"OEM_102"),n(93,"NumPad0"),n(94,"NumPad1"),n(95,"NumPad2"),n(96,"NumPad3"),n(97,"NumPad4"),n(98,"NumPad5"),n(99,"NumPad6"),n(100,"NumPad7"),n(101,"NumPad8"),n(102,"NumPad9"),n(103,"NumPad_Multiply"),n(104,"NumPad_Add"),n(105,"NumPad_Separator"),n(106,"NumPad_Subtract"),n(107,"NumPad_Decimal"),n(108,"NumPad_Divide")})();var l;(function(n){function r(f){return E.keyCodeToStr(f)}n.toString=r;function m(f){return E.strToKeyCode(f)}n.fromString=m;function _(f){return u.keyCodeToStr(f)}n.toUserSettingsUS=_;function o(f){return d.keyCodeToStr(f)}n.toUserSettingsGeneral=o;function i(f){return u.strToKeyCode(f)||d.strToKeyCode(f)}n.fromUserSettings=i})(l=t.KeyCodeUtils||(t.KeyCodeUtils={}));function s(n,r){const m=(r&65535)<<16>>>0;return(n|m)>>>0}t.KeyChord=s;function h(n,r){if(n===0)return null;const m=(n&65535)>>>0,_=(n&4294901760)>>>16;return _!==0?new S([w(m,r),w(_,r)]):new S([w(m,r)])}t.createKeybinding=h;function w(n,r){const m=!!(n&2048),_=!!(n&256),o=r===2?_:m,i=!!(n&1024),f=!!(n&512),b=r===2?m:_,N=n&255;return new a(o,i,f,b,N)}t.createSimpleKeybinding=w;class a{constructor(r,m,_,o,i){this.ctrlKey=r,this.shiftKey=m,this.altKey=_,this.metaKey=o,this.keyCode=i}equals(r){return this.ctrlKey===r.ctrlKey&&this.shiftKey===r.shiftKey&&this.altKey===r.altKey&&this.metaKey===r.metaKey&&this.keyCode===r.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new S([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}t.SimpleKeybinding=a;class S{constructor(r){if(r.length===0)throw p.illegalArgument("parts");this.parts=r}}t.ChordKeybinding=S;class v{constructor(r,m,_,o,i,f){this.ctrlKey=r,this.shiftKey=m,this.altKey=_,this.metaKey=o,this.keyLabel=i,this.keyAriaLabel=f}}t.ResolvedKeybindingPart=v;class C{}t.ResolvedKeybinding=C}),V(z[7],G([0,1,16]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImmortalReference=t.MutableDisposable=t.Disposable=t.DisposableStore=t.toDisposable=t.combinedDisposable=t.dispose=t.isDisposable=t.MultiDisposeError=t.trackDisposable=void 0;const P=!1;let E=null;if(P){const r="__is_disposable_tracked__";E=new class{trackDisposable(m){const _=new Error("Potentially leaked disposable").stack;setTimeout(()=>{m[r]||console.log(_)},3e3)}markTracked(m){if(m&&m!==v.None)try{m[r]=!0}catch(_){}}}}function u(r){!E||E.markTracked(r)}function d(r){return E&&E.trackDisposable(r),r}t.trackDisposable=d;class l extends Error{constructor(m){super(`Encountered errors while disposing of store. Errors: [${m.join(", ")}]`);this.errors=m}}t.MultiDisposeError=l;function s(r){return typeof r.dispose=="function"&&r.dispose.length===0}t.isDisposable=s;function h(r){if(p.Iterable.is(r)){let m=[];for(const _ of r)if(_){u(_);try{_.dispose()}catch(o){m.push(o)}}if(m.length===1)throw m[0];if(m.length>1)throw new l(m);return Array.isArray(r)?[]:r}else if(r)return u(r),r.dispose(),r}t.dispose=h;function w(...r){return r.forEach(u),a(()=>h(r))}t.combinedDisposable=w;function a(r){const m=d({dispose:()=>{u(m),r()}});return m}t.toDisposable=a;class S{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(u(this),this._isDisposed=!0,this.clear())}clear(){try{h(this._toDispose.values())}finally{this._toDispose.clear()}}add(m){if(!m)return m;if(m===this)throw new Error("Cannot register a disposable on itself!");return u(m),this._isDisposed?S.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(m),m}}t.DisposableStore=S,S.DISABLE_DISPOSED_WARNING=!1;class v{constructor(){this._store=new S,d(this)}dispose(){u(this),this._store.dispose()}_register(m){if(m===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(m)}}t.Disposable=v,v.None=Object.freeze({dispose(){}});class C{constructor(){this._isDisposed=!1,d(this)}get value(){return this._isDisposed?void 0:this._value}set value(m){var _;this._isDisposed||m===this._value||((_=this._value)===null||_===void 0||_.dispose(),m&&u(m),this._value=m)}clear(){this.value=void 0}dispose(){var m;this._isDisposed=!0,u(this),(m=this._value)===null||m===void 0||m.dispose(),this._value=void 0}}t.MutableDisposable=C;class n{constructor(m){this.object=m}dispose(){}}t.ImmortalReference=n}),V(z[18],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0;class p{constructor(u){this.element=u,this.next=p.Undefined,this.prev=p.Undefined}}p.Undefined=new p(void 0);class P{constructor(){this._first=p.Undefined,this._last=p.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===p.Undefined}clear(){this._first=p.Undefined,this._last=p.Undefined,this._size=0}unshift(u){return this._insert(u,!1)}push(u){return this._insert(u,!0)}_insert(u,d){const l=new p(u);if(this._first===p.Undefined)this._first=l,this._last=l;else if(d){const h=this._last;this._last=l,l.prev=h,h.next=l}else{const h=this._first;this._first=l,l.next=h,h.prev=l}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(l))}}shift(){if(this._first!==p.Undefined){const u=this._first.element;return this._remove(this._first),u}}pop(){if(this._last!==p.Undefined){const u=this._last.element;return this._remove(this._last),u}}_remove(u){if(u.prev!==p.Undefined&&u.next!==p.Undefined){const d=u.prev;d.next=u.next,u.next.prev=d}else u.prev===p.Undefined&&u.next===p.Undefined?(this._first=p.Undefined,this._last=p.Undefined):u.next===p.Undefined?(this._last=this._last.prev,this._last.next=p.Undefined):u.prev===p.Undefined&&(this._first=this._first.next,this._first.prev=p.Undefined);this._size-=1}*[Symbol.iterator](){let u=this._first;for(;u!==p.Undefined;)yield u.element,u=u.next}}t.LinkedList=P}),V(z[2],G([0,1]),function(I,t){"use strict";var p;Object.defineProperty(t,"__esModule",{value:!0}),t.isLittleEndian=t.OS=t.setImmediate=t.globals=t.userAgent=t.isIOS=t.isWeb=t.isNative=t.isLinux=t.isMacintosh=t.isWindows=t.isPreferringBrowserCodeLoad=t.browserCodeLoadingCacheStrategy=t.isElectronSandboxed=void 0;const P="en";let E=!1,u=!1,d=!1,l=!1,s=!1,h=!1,w=!1,a,S=P,v,C;const n=typeof self=="object"?self:typeof global=="object"?global:{};let r;typeof process!="undefined"?r=process:typeof n.vscode!="undefined"&&(r=n.vscode.process);const m=typeof((p=r==null?void 0:r.versions)===null||p===void 0?void 0:p.electron)=="string"&&r.type==="renderer";if(t.isElectronSandboxed=m&&(r==null?void 0:r.sandboxed),t.browserCodeLoadingCacheStrategy=(()=>{if(t.isElectronSandboxed)return"bypassHeatCheck";const b=r==null?void 0:r.env.ENABLE_VSCODE_BROWSER_CODE_LOADING;if(typeof b=="string")return b==="none"||b==="code"||b==="bypassHeatCheck"||b==="bypassHeatCheckAndEagerCompile"?b:"bypassHeatCheck"})(),t.isPreferringBrowserCodeLoad=typeof t.browserCodeLoadingCacheStrategy=="string",typeof navigator=="object"&&!m)C=navigator.userAgent,E=C.indexOf("Windows")>=0,u=C.indexOf("Macintosh")>=0,w=(C.indexOf("Macintosh")>=0||C.indexOf("iPad")>=0||C.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,d=C.indexOf("Linux")>=0,h=!0,a=navigator.language,S=a;else if(typeof r=="object"){E=r.platform==="win32",u=r.platform==="darwin",d=r.platform==="linux",l=d&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,a=P,S=P;const b=r.env.VSCODE_NLS_CONFIG;if(b)try{const N=JSON.parse(b),c=N.availableLanguages["*"];a=N.locale,S=c||P,v=N._translationsConfigFile}catch(N){}s=!0}else console.error("Unable to resolve platform.");let _=0;u?_=1:E?_=3:d&&(_=2),t.isWindows=E,t.isMacintosh=u,t.isLinux=d,t.isNative=s,t.isWeb=h,t.isIOS=w,t.userAgent=C,t.globals=n,t.setImmediate=function(){if(t.globals.setImmediate)return t.globals.setImmediate.bind(t.globals);if(typeof t.globals.postMessage=="function"&&!t.globals.importScripts){let c=[];t.globals.addEventListener("message",L=>{if(L.data&&L.data.vscodeSetImmediateId)for(let A=0,M=c.length;A<M;A++){const R=c[A];if(R.id===L.data.vscodeSetImmediateId){c.splice(A,1),R.callback();return}}});let g=0;return L=>{const A=++g;c.push({id:A,callback:L}),t.globals.postMessage({vscodeSetImmediateId:A},"*")}}if(r&&typeof r.nextTick=="function")return r.nextTick.bind(r);const N=Promise.resolve();return c=>N.then(c)}(),t.OS=u||w?2:E?1:3;let o=!0,i=!1;function f(){if(!i){i=!0;const b=new Uint8Array(2);b[0]=1,b[1]=2,o=new Uint16Array(b.buffer)[0]===(2<<8)+1}return o}t.isLittleEndian=f}),V(z[19],G([0,1,2]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.platform=t.env=t.cwd=void 0;let P;typeof process!="undefined"?P=process:typeof p.globals.vscode!="undefined"?P={get platform(){return p.globals.vscode.process.platform},get env(){return p.globals.vscode.process.env},nextTick(E){return p.setImmediate(E)},cwd(){return p.globals.vscode.process.env.VSCODE_CWD||p.globals.vscode.process.execPath.substr(0,p.globals.vscode.process.execPath.lastIndexOf(p.globals.vscode.process.platform==="win32"?"\\":"/"))}}:P={get platform(){return p.isWindows?"win32":p.isMacintosh?"darwin":"linux"},nextTick(E){return p.setImmediate(E)},get env(){return Object.create(null)},cwd(){return"/"}},t.cwd=P.cwd,t.env=P.env,t.platform=P.platform}),V(z[20],G([0,1,19]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sep=t.extname=t.basename=t.dirname=t.relative=t.resolve=t.normalize=t.posix=t.win32=void 0;const P=65,E=97,u=90,d=122,l=46,s=47,h=92,w=58,a=63;class S extends Error{constructor(i,f,b){let N;typeof f=="string"&&f.indexOf("not ")===0?(N="must not be",f=f.replace(/^not /,"")):N="must be";const c=i.indexOf(".")!==-1?"property":"argument";let g=`The "${i}" ${c} ${N} of type ${f}`;g+=`. Received type ${typeof b}`,super(g),this.code="ERR_INVALID_ARG_TYPE"}}function v(o,i){if(typeof o!="string")throw new S(i,"string",o)}function C(o){return o===s||o===h}function n(o){return o===s}function r(o){return o>=P&&o<=u||o>=E&&o<=d}function m(o,i,f,b){let N="",c=0,g=-1,L=0,A=0;for(let M=0;M<=o.length;++M){if(M<o.length)A=o.charCodeAt(M);else{if(b(A))break;A=s}if(b(A)){if(!(g===M-1||L===1))if(L===2){if(N.length<2||c!==2||N.charCodeAt(N.length-1)!==l||N.charCodeAt(N.length-2)!==l){if(N.length>2){const R=N.lastIndexOf(f);R===-1?(N="",c=0):(N=N.slice(0,R),c=N.length-1-N.lastIndexOf(f)),g=M,L=0;continue}else if(N.length!==0){N="",c=0,g=M,L=0;continue}}i&&(N+=N.length>0?`${f}..`:"..",c=2)}else N.length>0?N+=`${f}${o.slice(g+1,M)}`:N=o.slice(g+1,M),c=M-g-1;g=M,L=0}else A===l&&L!==-1?++L:L=-1}return N}function _(o,i){if(i===null||typeof i!="object")throw new S("pathObject","Object",i);const f=i.dir||i.root,b=i.base||`${i.name||""}${i.ext||""}`;return f?f===i.root?`${f}${b}`:`${f}${o}${b}`:b}t.win32={resolve(...o){let i="",f="",b=!1;for(let N=o.length-1;N>=-1;N--){let c;if(N>=0){if(c=o[N],v(c,"path"),c.length===0)continue}else i.length===0?c=p.cwd():(c=p.env[`=${i}`]||p.cwd(),(c===void 0||c.slice(0,2).toLowerCase()!==i.toLowerCase()&&c.charCodeAt(2)===h)&&(c=`${i}\\`));const g=c.length;let L=0,A="",M=!1;const R=c.charCodeAt(0);if(g===1)C(R)&&(L=1,M=!0);else if(C(R))if(M=!0,C(c.charCodeAt(1))){let D=2,T=D;for(;D<g&&!C(c.charCodeAt(D));)D++;if(D<g&&D!==T){const $=c.slice(T,D);for(T=D;D<g&&C(c.charCodeAt(D));)D++;if(D<g&&D!==T){for(T=D;D<g&&!C(c.charCodeAt(D));)D++;(D===g||D!==T)&&(A=`\\\\${$}\\${c.slice(T,D)}`,L=D)}}}else L=1;else r(R)&&c.charCodeAt(1)===w&&(A=c.slice(0,2),L=2,g>2&&C(c.charCodeAt(2))&&(M=!0,L=3));if(A.length>0)if(i.length>0){if(A.toLowerCase()!==i.toLowerCase())continue}else i=A;if(b){if(i.length>0)break}else if(f=`${c.slice(L)}\\${f}`,b=M,M&&i.length>0)break}return f=m(f,!b,"\\",C),b?`${i}\\${f}`:`${i}${f}`||"."},normalize(o){v(o,"path");const i=o.length;if(i===0)return".";let f=0,b,N=!1;const c=o.charCodeAt(0);if(i===1)return n(c)?"\\":o;if(C(c))if(N=!0,C(o.charCodeAt(1))){let L=2,A=L;for(;L<i&&!C(o.charCodeAt(L));)L++;if(L<i&&L!==A){const M=o.slice(A,L);for(A=L;L<i&&C(o.charCodeAt(L));)L++;if(L<i&&L!==A){for(A=L;L<i&&!C(o.charCodeAt(L));)L++;if(L===i)return`\\\\${M}\\${o.slice(A)}\\`;L!==A&&(b=`\\\\${M}\\${o.slice(A,L)}`,f=L)}}}else f=1;else r(c)&&o.charCodeAt(1)===w&&(b=o.slice(0,2),f=2,i>2&&C(o.charCodeAt(2))&&(N=!0,f=3));let g=f<i?m(o.slice(f),!N,"\\",C):"";return g.length===0&&!N&&(g="."),g.length>0&&C(o.charCodeAt(i-1))&&(g+="\\"),b===void 0?N?`\\${g}`:g:N?`${b}\\${g}`:`${b}${g}`},isAbsolute(o){v(o,"path");const i=o.length;if(i===0)return!1;const f=o.charCodeAt(0);return C(f)||i>2&&r(f)&&o.charCodeAt(1)===w&&C(o.charCodeAt(2))},join(...o){if(o.length===0)return".";let i,f;for(let c=0;c<o.length;++c){const g=o[c];v(g,"path"),g.length>0&&(i===void 0?i=f=g:i+=`\\${g}`)}if(i===void 0)return".";let b=!0,N=0;if(typeof f=="string"&&C(f.charCodeAt(0))){++N;const c=f.length;c>1&&C(f.charCodeAt(1))&&(++N,c>2&&(C(f.charCodeAt(2))?++N:b=!1))}if(b){for(;N<i.length&&C(i.charCodeAt(N));)N++;N>=2&&(i=`\\${i.slice(N)}`)}return t.win32.normalize(i)},relative(o,i){if(v(o,"from"),v(i,"to"),o===i)return"";const f=t.win32.resolve(o),b=t.win32.resolve(i);if(f===b||(o=f.toLowerCase(),i=b.toLowerCase(),o===i))return"";let N=0;for(;N<o.length&&o.charCodeAt(N)===h;)N++;let c=o.length;for(;c-1>N&&o.charCodeAt(c-1)===h;)c--;const g=c-N;let L=0;for(;L<i.length&&i.charCodeAt(L)===h;)L++;let A=i.length;for(;A-1>L&&i.charCodeAt(A-1)===h;)A--;const M=A-L,R=g<M?g:M;let D=-1,T=0;for(;T<R;T++){const k=o.charCodeAt(N+T);if(k!==i.charCodeAt(L+T))break;k===h&&(D=T)}if(T!==R){if(D===-1)return b}else{if(M>R){if(i.charCodeAt(L+T)===h)return b.slice(L+T+1);if(T===2)return b.slice(L+T)}g>R&&(o.charCodeAt(N+T)===h?D=T:T===2&&(D=3)),D===-1&&(D=0)}let $="";for(T=N+D+1;T<=c;++T)(T===c||o.charCodeAt(T)===h)&&($+=$.length===0?"..":"\\..");return L+=D,$.length>0?`${$}${b.slice(L,A)}`:(b.charCodeAt(L)===h&&++L,b.slice(L,A))},toNamespacedPath(o){if(typeof o!="string")return o;if(o.length===0)return"";const i=t.win32.resolve(o);if(i.length<=2)return o;if(i.charCodeAt(0)===h){if(i.charCodeAt(1)===h){const f=i.charCodeAt(2);if(f!==a&&f!==l)return`\\\\?\\UNC\\${i.slice(2)}`}}else if(r(i.charCodeAt(0))&&i.charCodeAt(1)===w&&i.charCodeAt(2)===h)return`\\\\?\\${i}`;return o},dirname(o){v(o,"path");const i=o.length;if(i===0)return".";let f=-1,b=0;const N=o.charCodeAt(0);if(i===1)return C(N)?o:".";if(C(N)){if(f=b=1,C(o.charCodeAt(1))){let L=2,A=L;for(;L<i&&!C(o.charCodeAt(L));)L++;if(L<i&&L!==A){for(A=L;L<i&&C(o.charCodeAt(L));)L++;if(L<i&&L!==A){for(A=L;L<i&&!C(o.charCodeAt(L));)L++;if(L===i)return o;L!==A&&(f=b=L+1)}}}}else r(N)&&o.charCodeAt(1)===w&&(f=i>2&&C(o.charCodeAt(2))?3:2,b=f);let c=-1,g=!0;for(let L=i-1;L>=b;--L)if(C(o.charCodeAt(L))){if(!g){c=L;break}}else g=!1;if(c===-1){if(f===-1)return".";c=f}return o.slice(0,c)},basename(o,i){i!==void 0&&v(i,"ext"),v(o,"path");let f=0,b=-1,N=!0,c;if(o.length>=2&&r(o.charCodeAt(0))&&o.charCodeAt(1)===w&&(f=2),i!==void 0&&i.length>0&&i.length<=o.length){if(i===o)return"";let g=i.length-1,L=-1;for(c=o.length-1;c>=f;--c){const A=o.charCodeAt(c);if(C(A)){if(!N){f=c+1;break}}else L===-1&&(N=!1,L=c+1),g>=0&&(A===i.charCodeAt(g)?--g==-1&&(b=c):(g=-1,b=L))}return f===b?b=L:b===-1&&(b=o.length),o.slice(f,b)}for(c=o.length-1;c>=f;--c)if(C(o.charCodeAt(c))){if(!N){f=c+1;break}}else b===-1&&(N=!1,b=c+1);return b===-1?"":o.slice(f,b)},extname(o){v(o,"path");let i=0,f=-1,b=0,N=-1,c=!0,g=0;o.length>=2&&o.charCodeAt(1)===w&&r(o.charCodeAt(0))&&(i=b=2);for(let L=o.length-1;L>=i;--L){const A=o.charCodeAt(L);if(C(A)){if(!c){b=L+1;break}continue}N===-1&&(c=!1,N=L+1),A===l?f===-1?f=L:g!==1&&(g=1):f!==-1&&(g=-1)}return f===-1||N===-1||g===0||g===1&&f===N-1&&f===b+1?"":o.slice(f,N)},format:_.bind(null,"\\"),parse(o){v(o,"path");const i={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return i;const f=o.length;let b=0,N=o.charCodeAt(0);if(f===1)return C(N)?(i.root=i.dir=o,i):(i.base=i.name=o,i);if(C(N)){if(b=1,C(o.charCodeAt(1))){let D=2,T=D;for(;D<f&&!C(o.charCodeAt(D));)D++;if(D<f&&D!==T){for(T=D;D<f&&C(o.charCodeAt(D));)D++;if(D<f&&D!==T){for(T=D;D<f&&!C(o.charCodeAt(D));)D++;D===f?b=D:D!==T&&(b=D+1)}}}}else if(r(N)&&o.charCodeAt(1)===w){if(f<=2)return i.root=i.dir=o,i;if(b=2,C(o.charCodeAt(2))){if(f===3)return i.root=i.dir=o,i;b=3}}b>0&&(i.root=o.slice(0,b));let c=-1,g=b,L=-1,A=!0,M=o.length-1,R=0;for(;M>=b;--M){if(N=o.charCodeAt(M),C(N)){if(!A){g=M+1;break}continue}L===-1&&(A=!1,L=M+1),N===l?c===-1?c=M:R!==1&&(R=1):c!==-1&&(R=-1)}return L!==-1&&(c===-1||R===0||R===1&&c===L-1&&c===g+1?i.base=i.name=o.slice(g,L):(i.name=o.slice(g,c),i.base=o.slice(g,L),i.ext=o.slice(c,L))),g>0&&g!==b?i.dir=o.slice(0,g-1):i.dir=i.root,i},sep:"\\",delimiter:";",win32:null,posix:null},t.posix={resolve(...o){let i="",f=!1;for(let b=o.length-1;b>=-1&&!f;b--){const N=b>=0?o[b]:p.cwd();v(N,"path"),N.length!==0&&(i=`${N}/${i}`,f=N.charCodeAt(0)===s)}return i=m(i,!f,"/",n),f?`/${i}`:i.length>0?i:"."},normalize(o){if(v(o,"path"),o.length===0)return".";const i=o.charCodeAt(0)===s,f=o.charCodeAt(o.length-1)===s;return o=m(o,!i,"/",n),o.length===0?i?"/":f?"./":".":(f&&(o+="/"),i?`/${o}`:o)},isAbsolute(o){return v(o,"path"),o.length>0&&o.charCodeAt(0)===s},join(...o){if(o.length===0)return".";let i;for(let f=0;f<o.length;++f){const b=o[f];v(b,"path"),b.length>0&&(i===void 0?i=b:i+=`/${b}`)}return i===void 0?".":t.posix.normalize(i)},relative(o,i){if(v(o,"from"),v(i,"to"),o===i||(o=t.posix.resolve(o),i=t.posix.resolve(i),o===i))return"";const f=1,b=o.length,N=b-f,c=1,g=i.length-c,L=N<g?N:g;let A=-1,M=0;for(;M<L;M++){const D=o.charCodeAt(f+M);if(D!==i.charCodeAt(c+M))break;D===s&&(A=M)}if(M===L)if(g>L){if(i.charCodeAt(c+M)===s)return i.slice(c+M+1);if(M===0)return i.slice(c+M)}else N>L&&(o.charCodeAt(f+M)===s?A=M:M===0&&(A=0));let R="";for(M=f+A+1;M<=b;++M)(M===b||o.charCodeAt(M)===s)&&(R+=R.length===0?"..":"/..");return`${R}${i.slice(c+A)}`},toNamespacedPath(o){return o},dirname(o){if(v(o,"path"),o.length===0)return".";const i=o.charCodeAt(0)===s;let f=-1,b=!0;for(let N=o.length-1;N>=1;--N)if(o.charCodeAt(N)===s){if(!b){f=N;break}}else b=!1;return f===-1?i?"/":".":i&&f===1?"//":o.slice(0,f)},basename(o,i){i!==void 0&&v(i,"ext"),v(o,"path");let f=0,b=-1,N=!0,c;if(i!==void 0&&i.length>0&&i.length<=o.length){if(i===o)return"";let g=i.length-1,L=-1;for(c=o.length-1;c>=0;--c){const A=o.charCodeAt(c);if(A===s){if(!N){f=c+1;break}}else L===-1&&(N=!1,L=c+1),g>=0&&(A===i.charCodeAt(g)?--g==-1&&(b=c):(g=-1,b=L))}return f===b?b=L:b===-1&&(b=o.length),o.slice(f,b)}for(c=o.length-1;c>=0;--c)if(o.charCodeAt(c)===s){if(!N){f=c+1;break}}else b===-1&&(N=!1,b=c+1);return b===-1?"":o.slice(f,b)},extname(o){v(o,"path");let i=-1,f=0,b=-1,N=!0,c=0;for(let g=o.length-1;g>=0;--g){const L=o.charCodeAt(g);if(L===s){if(!N){f=g+1;break}continue}b===-1&&(N=!1,b=g+1),L===l?i===-1?i=g:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||b===-1||c===0||c===1&&i===b-1&&i===f+1?"":o.slice(i,b)},format:_.bind(null,"/"),parse(o){v(o,"path");const i={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return i;const f=o.charCodeAt(0)===s;let b;f?(i.root="/",b=1):b=0;let N=-1,c=0,g=-1,L=!0,A=o.length-1,M=0;for(;A>=b;--A){const R=o.charCodeAt(A);if(R===s){if(!L){c=A+1;break}continue}g===-1&&(L=!1,g=A+1),R===l?N===-1?N=A:M!==1&&(M=1):N!==-1&&(M=-1)}if(g!==-1){const R=c===0&&f?1:c;N===-1||M===0||M===1&&N===g-1&&N===c+1?i.base=i.name=o.slice(R,g):(i.name=o.slice(R,N),i.base=o.slice(R,g),i.ext=o.slice(N,g))}return c>0?i.dir=o.slice(0,c-1):f&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null},t.posix.win32=t.win32.win32=t.win32,t.posix.posix=t.win32.posix=t.posix,t.normalize=p.platform==="win32"?t.win32.normalize:t.posix.normalize,t.resolve=p.platform==="win32"?t.win32.resolve:t.posix.resolve,t.relative=p.platform==="win32"?t.win32.relative:t.posix.relative,t.dirname=p.platform==="win32"?t.win32.dirname:t.posix.dirname,t.basename=p.platform==="win32"?t.win32.basename:t.posix.basename,t.extname=p.platform==="win32"?t.win32.extname:t.posix.extname,t.sep=p.platform==="win32"?t.win32.sep:t.posix.sep}),V(z[8],G([0,1,2]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopWatch=void 0;const P=p.globals.performance&&typeof p.globals.performance.now=="function";class E{constructor(d){this._highResolution=P&&d,this._startTime=this._now(),this._stopTime=-1}static create(d=!0){return new E(d)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?p.globals.performance.now():Date.now()}}t.StopWatch=E}),V(z[9],G([0,1,4,7,18,8]),function(I,t,p,P,E,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Relay=t.EventBufferer=t.PauseableEmitter=t.Emitter=t.Event=void 0;var d;(function(C){C.None=()=>P.Disposable.None;function n(k){return(F,O=null,e)=>{let H=!1,B;return B=k(Q=>{if(!H)return B?B.dispose():H=!0,F.call(O,Q)},null,e),H&&B.dispose(),B}}C.once=n;function r(k,F){return b((O,e=null,H)=>k(B=>O.call(e,F(B)),null,H))}C.map=r;function m(k,F){return b((O,e=null,H)=>k(B=>{F(B),O.call(e,B)},null,H))}C.forEach=m;function _(k,F){return b((O,e=null,H)=>k(B=>F(B)&&O.call(e,B),null,H))}C.filter=_;function o(k){return k}C.signal=o;function i(...k){return(F,O=null,e)=>P.combinedDisposable(...k.map(H=>H(B=>F.call(O,B),null,e)))}C.any=i;function f(k,F,O){let e=O;return r(k,H=>(e=F(e,H),e))}C.reduce=f;function b(k){let F;const O=new w({onFirstListenerAdd(){F=k(O.fire,O)},onLastListenerRemove(){F.dispose()}});return O.event}C.snapshot=b;function N(k,F,O=100,e=!1,H){let B,Q,Z,ie=0;const re=new w({leakWarningThreshold:H,onFirstListenerAdd(){B=k(se=>{ie++,Q=F(Q,se),e&&!Z&&(re.fire(Q),Q=void 0),clearTimeout(Z),Z=setTimeout(()=>{const le=Q;Q=void 0,Z=void 0,(!e||ie>1)&&re.fire(le),ie=0},O)})},onLastListenerRemove(){B.dispose()}});return re.event}C.debounce=N;function c(k){const F=new Date().getTime();return r(n(k),O=>new Date().getTime()-F)}C.stopwatch=c;function g(k){let F=!0,O;return _(k,e=>{const H=F||e!==O;return F=!1,O=e,H})}C.latch=g;function L(k,F=!1,O=[]){let e=O.slice(),H=k(Z=>{e?e.push(Z):Q.fire(Z)});const B=()=>{e&&e.forEach(Z=>Q.fire(Z)),e=null},Q=new w({onFirstListenerAdd(){H||(H=k(Z=>Q.fire(Z)))},onFirstListenerDidAdd(){e&&(F?setTimeout(B):B())},onLastListenerRemove(){H&&H.dispose(),H=null}});return Q.event}C.buffer=L;class A{constructor(F){this.event=F}map(F){return new A(r(this.event,F))}forEach(F){return new A(m(this.event,F))}filter(F){return new A(_(this.event,F))}reduce(F,O){return new A(f(this.event,F,O))}latch(){return new A(g(this.event))}debounce(F,O=100,e=!1,H){return new A(N(this.event,F,O,e,H))}on(F,O,e){return this.event(F,O,e)}once(F,O,e){return n(this.event)(F,O,e)}}function M(k){return new A(k)}C.chain=M;function R(k,F,O=e=>e){const e=(...Z)=>Q.fire(O(...Z)),H=()=>k.on(F,e),B=()=>k.removeListener(F,e),Q=new w({onFirstListenerAdd:H,onLastListenerRemove:B});return Q.event}C.fromNodeEventEmitter=R;function D(k,F,O=e=>e){const e=(...Z)=>Q.fire(O(...Z)),H=()=>k.addEventListener(F,e),B=()=>k.removeEventListener(F,e),Q=new w({onFirstListenerAdd:H,onLastListenerRemove:B});return Q.event}C.fromDOMEventEmitter=D;function T(k){const F=new w;let O=!1;return k.then(void 0,()=>null).then(()=>{O?F.fire(void 0):setTimeout(()=>F.fire(void 0),0)}),O=!0,F.event}C.fromPromise=T;function $(k){return new Promise(F=>n(k)(F))}C.toPromise=$})(d=t.Event||(t.Event={}));class l{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${l._idPool++}`}start(n){this._stopWatch=new u.StopWatch(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}l._idPool=0;let s=-1;class h{constructor(n,r=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let r=s;if(typeof this.customThreshold=="number"&&(r=this.customThreshold),!(r<=0||n<r)){this._stacks||(this._stacks=new Map);const m=new Error().stack.split(` | ||
| 11 | -`).slice(3).join(` | ||
| 12 | -`),_=this._stacks.get(m)||0;if(this._stacks.set(m,_+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let o,i=0;for(const[f,b]of this._stacks)(!o||i<b)&&(o=f,i=b);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${i}):`),console.warn(o)}return()=>{const o=this._stacks.get(m)||0;this._stacks.set(m,o-1)}}}}class w{constructor(n){var r;this._disposed=!1,this._options=n,this._leakageMon=s>0?new h(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new l(this._options._profName):void 0}get event(){return this._event||(this._event=(n,r,m)=>{var _;this._listeners||(this._listeners=new E.LinkedList);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(r?[n,r]:n);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,r);const f=(_=this._leakageMon)===null||_===void 0?void 0:_.check(this._listeners.size);let b;return b={dispose:()=>{f&&f(),b.dispose=w._noop,this._disposed||(i(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))}},m instanceof P.DisposableStore?m.add(b):Array.isArray(m)&&m.push(b),b}),this._event}fire(n){var r,m;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new E.LinkedList);for(let _ of this._listeners)this._deliveryQueue.push([_,n]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[_,o]=this._deliveryQueue.shift();try{typeof _=="function"?_.call(void 0,o):_[0].call(_[1],o)}catch(i){p.onUnexpectedError(i)}}(m=this._perfMon)===null||m===void 0||m.stop()}}dispose(){var n,r,m;(n=this._listeners)===null||n===void 0||n.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(m=this._leakageMon)===null||m===void 0||m.dispose(),this._disposed=!0}}t.Emitter=w,w._noop=function(){};class a extends w{constructor(n){super(n);this._isPaused=0,this._eventQueue=new E.LinkedList,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}t.PauseableEmitter=a;class S{constructor(){this.buffers=[]}wrapEvent(n){return(r,m,_)=>n(o=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>r.call(m,o)):r.call(m,o)},void 0,_)}bufferEvents(n){const r=[];this.buffers.push(r);const m=n();return this.buffers.pop(),r.forEach(_=>_()),m}}t.EventBufferer=S;class v{constructor(){this.listening=!1,this.inputEvent=d.None,this.inputEventListener=P.Disposable.None,this.emitter=new w({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}t.Relay=v}),V(z[21],G([0,1,9]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const P=Object.freeze(function(l,s){const h=setTimeout(l.bind(s),0);return{dispose(){clearTimeout(h)}}});var E;(function(l){function s(h){return h===l.None||h===l.Cancelled||h instanceof u?!0:!h||typeof h!="object"?!1:typeof h.isCancellationRequested=="boolean"&&typeof h.onCancellationRequested=="function"}l.isCancellationToken=s,l.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:p.Event.None}),l.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:P})})(E=t.CancellationToken||(t.CancellationToken={}));class u{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?P:(this._emitter||(this._emitter=new p.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class d{constructor(s){this._token=void 0,this._parentListener=void 0,this._parentListener=s&&s.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new u),this._token}cancel(){this._token?this._token instanceof u&&this._token.cancel():this._token=E.Cancelled}dispose(s=!1){s&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof u&&this._token.dispose():this._token=E.None}}t.CancellationTokenSource=d}),V(z[5],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.breakBetweenGraphemeBreakType=t.getGraphemeBreakType=t.singleLetterHash=t.containsUppercaseCharacter=t.startsWithUTF8BOM=t.UTF8_BOM_CHARACTER=t.isEmojiImprecise=t.isFullWidthCharacter=t.containsFullWidthCharacter=t.containsUnusualLineTerminators=t.UNUSUAL_LINE_TERMINATORS=t.isBasicASCII=t.containsEmoji=t.containsRTL=t.decodeUTF8=t.prevCharLength=t.nextCharLength=t.getNextCodePoint=t.computeCodePoint=t.isLowSurrogate=t.isHighSurrogate=t.commonSuffixLength=t.commonPrefixLength=t.startsWithIgnoreCase=t.equalsIgnoreCase=t.isUpperAsciiLetter=t.isLowerAsciiLetter=t.compareSubstringIgnoreCase=t.compareIgnoreCase=t.compareSubstring=t.compare=t.lastNonWhitespaceIndex=t.getLeadingWhitespace=t.firstNonWhitespaceIndex=t.splitLines=t.regExpFlags=t.regExpLeadsToEndlessLoop=t.createRegExp=t.stripWildcards=t.convertSimple2RegExpPattern=t.rtrim=t.ltrim=t.trim=t.escapeRegExpCharacters=t.escape=t.format=t.isFalsyOrWhitespace=void 0;function p(y){return!y||typeof y!="string"?!0:y.trim().length===0}t.isFalsyOrWhitespace=p;const P=/{(\d+)}/g;function E(y,...U){return U.length===0?y:y.replace(P,function(W,q){const j=parseInt(q,10);return isNaN(j)||j<0||j>=U.length?W:U[j]})}t.format=E;function u(y){return y.replace(/[<>&]/g,function(U){switch(U){case"<":return"<";case">":return">";case"&":return"&";default:return U}})}t.escape=u;function d(y){return y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}t.escapeRegExpCharacters=d;function l(y,U=" "){const W=s(y,U);return h(W,U)}t.trim=l;function s(y,U){if(!y||!U)return y;const W=U.length;if(W===0||y.length===0)return y;let q=0;for(;y.indexOf(U,q)===q;)q=q+W;return y.substring(q)}t.ltrim=s;function h(y,U){if(!y||!U)return y;const W=U.length,q=y.length;if(W===0||q===0)return y;let j=q,Y=-1;for(;Y=y.lastIndexOf(U,j-1),!(Y===-1||Y+W!==j);){if(Y===0)return"";j=Y}return y.substring(0,j)}t.rtrim=h;function w(y){return y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}t.convertSimple2RegExpPattern=w;function a(y){return y.replace(/\*/g,"")}t.stripWildcards=a;function S(y,U,W={}){if(!y)throw new Error("Cannot create regex from empty string");U||(y=d(y)),W.wholeWord&&(/\B/.test(y.charAt(0))||(y="\\b"+y),/\B/.test(y.charAt(y.length-1))||(y=y+"\\b"));let q="";return W.global&&(q+="g"),W.matchCase||(q+="i"),W.multiline&&(q+="m"),W.unicode&&(q+="u"),new RegExp(y,q)}t.createRegExp=S;function v(y){return y.source==="^"||y.source==="^$"||y.source==="$"||y.source==="^\\s*$"?!1:!!(y.exec("")&&y.lastIndex===0)}t.regExpLeadsToEndlessLoop=v;function C(y){return(y.global?"g":"")+(y.ignoreCase?"i":"")+(y.multiline?"m":"")+(y.unicode?"u":"")}t.regExpFlags=C;function n(y){return y.split(/\r\n|\r|\n/)}t.splitLines=n;function r(y){for(let U=0,W=y.length;U<W;U++){const q=y.charCodeAt(U);if(q!==32&&q!==9)return U}return-1}t.firstNonWhitespaceIndex=r;function m(y,U=0,W=y.length){for(let q=U;q<W;q++){const j=y.charCodeAt(q);if(j!==32&&j!==9)return y.substring(U,q)}return y.substring(U,W)}t.getLeadingWhitespace=m;function _(y,U=y.length-1){for(let W=U;W>=0;W--){const q=y.charCodeAt(W);if(q!==32&&q!==9)return W}return-1}t.lastNonWhitespaceIndex=_;function o(y,U){return y<U?-1:y>U?1:0}t.compare=o;function i(y,U,W=0,q=y.length,j=0,Y=U.length){for(;W<q&&j<Y;W++,j++){let K=y.charCodeAt(W),te=U.charCodeAt(j);if(K<te)return-1;if(K>te)return 1}const J=q-W,x=Y-j;return J<x?-1:J>x?1:0}t.compareSubstring=i;function f(y,U){return b(y,U,0,y.length,0,U.length)}t.compareIgnoreCase=f;function b(y,U,W=0,q=y.length,j=0,Y=U.length){for(;W<q&&j<Y;W++,j++){let K=y.charCodeAt(W),te=U.charCodeAt(j);if(K!==te){const oe=K-te;if(!(oe===32&&c(te))&&!(oe===-32&&c(K)))return N(K)&&N(te)?oe:i(y.toLowerCase(),U.toLowerCase(),W,q,j,Y)}}const J=q-W,x=Y-j;return J<x?-1:J>x?1:0}t.compareSubstringIgnoreCase=b;function N(y){return y>=97&&y<=122}t.isLowerAsciiLetter=N;function c(y){return y>=65&&y<=90}t.isUpperAsciiLetter=c;function g(y){return N(y)||c(y)}function L(y,U){return y.length===U.length&&A(y,U)}t.equalsIgnoreCase=L;function A(y,U,W=y.length){for(let q=0;q<W;q++){const j=y.charCodeAt(q),Y=U.charCodeAt(q);if(j!==Y){if(g(j)&&g(Y)){const J=Math.abs(j-Y);if(J!==0&&J!==32)return!1}else if(String.fromCharCode(j).toLowerCase()!==String.fromCharCode(Y).toLowerCase())return!1}}return!0}function M(y,U){const W=U.length;return U.length>y.length?!1:A(y,U,W)}t.startsWithIgnoreCase=M;function R(y,U){let W,q=Math.min(y.length,U.length);for(W=0;W<q;W++)if(y.charCodeAt(W)!==U.charCodeAt(W))return W;return q}t.commonPrefixLength=R;function D(y,U){let W,q=Math.min(y.length,U.length);const j=y.length-1,Y=U.length-1;for(W=0;W<q;W++)if(y.charCodeAt(j-W)!==U.charCodeAt(Y-W))return W;return q}t.commonSuffixLength=D;function T(y){return 55296<=y&&y<=56319}t.isHighSurrogate=T;function $(y){return 56320<=y&&y<=57343}t.isLowSurrogate=$;function k(y,U){return(y-55296<<10)+(U-56320)+65536}t.computeCodePoint=k;function F(y,U,W){const q=y.charCodeAt(W);if(T(q)&&W+1<U){const j=y.charCodeAt(W+1);if($(j))return k(q,j)}return q}t.getNextCodePoint=F;function O(y,U){const W=y.charCodeAt(U-1);if($(W)&&U>1){const q=y.charCodeAt(U-2);if(T(q))return k(q,W)}return W}function e(y,U){const W=ee.getInstance(),q=U,j=y.length,Y=F(y,j,U);U+=Y>=65536?2:1;let J=W.getGraphemeBreakType(Y);for(;U<j;){const x=F(y,j,U),K=W.getGraphemeBreakType(x);if(ue(J,K))break;U+=x>=65536?2:1,J=K}return U-q}t.nextCharLength=e;function H(y,U){const W=ee.getInstance(),q=U,j=O(y,U);U-=j>=65536?2:1;let Y=W.getGraphemeBreakType(j);for(;U>0;){const J=O(y,U),x=W.getGraphemeBreakType(J);if(ue(x,Y))break;U-=J>=65536?2:1,Y=x}return q-U}t.prevCharLength=H;function B(y){const U=y.byteLength,W=[];let q=0;for(;q<U;){const j=y[q];let Y;if(j>=240&&q+3<U?Y=(y[q++]&7)<<18>>>0|(y[q++]&63)<<12>>>0|(y[q++]&63)<<6>>>0|(y[q++]&63)<<0>>>0:j>=224&&q+2<U?Y=(y[q++]&15)<<12>>>0|(y[q++]&63)<<6>>>0|(y[q++]&63)<<0>>>0:j>=192&&q+1<U?Y=(y[q++]&31)<<6>>>0|(y[q++]&63)<<0>>>0:Y=y[q++],Y>=0&&Y<=55295||Y>=57344&&Y<=65535)W.push(String.fromCharCode(Y));else if(Y>=65536&&Y<=1114111){const J=Y-65536,x=55296+((J&1047552)>>>10),K=56320+((J&1023)>>>0);W.push(String.fromCharCode(x)),W.push(String.fromCharCode(K))}else W.push(String.fromCharCode(65533))}return W.join("")}t.decodeUTF8=B;const Q=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function Z(y){return Q.test(y)}t.containsRTL=Z;const ie=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function re(y){return ie.test(y)}t.containsEmoji=re;const se=/^[\t\n\r\x20-\x7E]*$/;function le(y){return se.test(y)}t.isBasicASCII=le,t.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function he(y){return t.UNUSUAL_LINE_TERMINATORS.test(y)}t.containsUnusualLineTerminators=he;function de(y){for(let U=0,W=y.length;U<W;U++)if(ae(y.charCodeAt(U)))return!0;return!1}t.containsFullWidthCharacter=de;function ae(y){return y=+y,y>=11904&&y<=55215||y>=63744&&y<=64255||y>=65281&&y<=65374}t.isFullWidthCharacter=ae;function me(y){return y>=127462&&y<=127487||y===8986||y===8987||y===9200||y===9203||y>=9728&&y<=10175||y===11088||y===11093||y>=127744&&y<=128591||y>=128640&&y<=128764||y>=128992&&y<=129003||y>=129280&&y<=129535||y>=129648&&y<=129750}t.isEmojiImprecise=me,t.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function ge(y){return!!(y&&y.length>0&&y.charCodeAt(0)===65279)}t.startsWithUTF8BOM=ge;function _e(y,U=!1){return y?(U&&(y=y.replace(/\\./g,"")),y.toLowerCase()!==y):!1}t.containsUppercaseCharacter=_e;function ve(y){const U=90-65+1;return y=y%(2*U),y<U?String.fromCharCode(97+y):String.fromCharCode(65+y-U)}t.singleLetterHash=ve;function Ce(y){return ee.getInstance().getGraphemeBreakType(y)}t.getGraphemeBreakType=Ce;function ue(y,U){return y===0?U!==5&&U!==7:y===2&&U===3?!1:y===4||y===2||y===3||U===4||U===2||U===3?!0:!(y===8&&(U===8||U===9||U===11||U===12)||(y===11||y===9)&&(U===9||U===10)||(y===12||y===10)&&U===10||U===5||U===13||U===7||y===1||y===13&&U===14||y===6&&U===6)}t.breakBetweenGraphemeBreakType=ue;class ee{constructor(){this._data=be()}static getInstance(){return ee._INSTANCE||(ee._INSTANCE=new ee),ee._INSTANCE}getGraphemeBreakType(U){if(U<32)return U===10?3:U===13?2:4;if(U<127)return 0;const W=this._data,q=W.length/3;let j=1;for(;j<=q;)if(U<W[3*j])j=2*j;else if(U>W[3*j+1])j=2*j+1;else return W[3*j+2];return 0}}ee._INSTANCE=null;function be(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}}),V(z[22],G([0,1,5]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringSHA1=t.toHexString=t.stringHash=t.doHash=t.hash=void 0;function P(n){return E(n,0)}t.hash=P;function E(n,r){switch(typeof n){case"object":return n===null?u(349,r):Array.isArray(n)?s(n,r):h(n,r);case"string":return l(n,r);case"boolean":return d(n,r);case"number":return u(n,r);case"undefined":return u(937,r);default:return u(617,r)}}t.doHash=E;function u(n,r){return(r<<5)-r+n|0}function d(n,r){return u(n?433:863,r)}function l(n,r){r=u(149417,r);for(let m=0,_=n.length;m<_;m++)r=u(n.charCodeAt(m),r);return r}t.stringHash=l;function s(n,r){return r=u(104579,r),n.reduce((m,_)=>E(_,m),r)}function h(n,r){return r=u(181387,r),Object.keys(n).sort().reduce((m,_)=>(m=l(_,m),E(n[_],m)),r)}function w(n,r,m=32){const _=m-r,o=~((1<<_)-1);return(n<<r|(o&n)>>>_)>>>0}function a(n,r=0,m=n.byteLength,_=0){for(let o=0;o<m;o++)n[r+o]=_}function S(n,r,m="0"){for(;n.length<r;)n=m+n;return n}function v(n,r=32){return n instanceof ArrayBuffer?Array.from(new Uint8Array(n)).map(m=>m.toString(16).padStart(2,"0")).join(""):S((n>>>0).toString(16),r/4)}t.toHexString=v;class C{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(r){const m=r.length;if(m!==0){const _=this._buff;let o=this._buffLen,i=this._leftoverHighSurrogate,f,b;for(i!==0?(f=i,b=-1,i=0):(f=r.charCodeAt(0),b=0);;){let N=f;if(p.isHighSurrogate(f))if(b+1<m){const c=r.charCodeAt(b+1);p.isLowSurrogate(c)?(b++,N=p.computeCodePoint(f,c)):N=65533}else{i=f;break}else p.isLowSurrogate(f)&&(N=65533);if(o=this._push(_,o,N),b++,b<m)f=r.charCodeAt(b);else break}this._buffLen=o,this._leftoverHighSurrogate=i}}_push(r,m,_){return _<128?r[m++]=_:_<2048?(r[m++]=192|(_&1984)>>>6,r[m++]=128|(_&63)>>>0):_<65536?(r[m++]=224|(_&61440)>>>12,r[m++]=128|(_&4032)>>>6,r[m++]=128|(_&63)>>>0):(r[m++]=240|(_&1835008)>>>18,r[m++]=128|(_&258048)>>>12,r[m++]=128|(_&4032)>>>6,r[m++]=128|(_&63)>>>0),m>=64&&(this._step(),m-=64,this._totalLen+=64,r[0]=r[64+0],r[1]=r[64+1],r[2]=r[64+2]),m}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),v(this._h0)+v(this._h1)+v(this._h2)+v(this._h3)+v(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,a(this._buff,this._buffLen),this._buffLen>56&&(this._step(),a(this._buff));const r=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(r/4294967296),!1),this._buffDV.setUint32(60,r%4294967296,!1),this._step()}_step(){const r=C._bigBlock32,m=this._buffDV;for(let L=0;L<64;L+=4)r.setUint32(L,m.getUint32(L,!1),!1);for(let L=64;L<320;L+=4)r.setUint32(L,w(r.getUint32(L-12,!1)^r.getUint32(L-32,!1)^r.getUint32(L-56,!1)^r.getUint32(L-64,!1),1),!1);let _=this._h0,o=this._h1,i=this._h2,f=this._h3,b=this._h4,N,c,g;for(let L=0;L<80;L++)L<20?(N=o&i|~o&f,c=1518500249):L<40?(N=o^i^f,c=1859775393):L<60?(N=o&i|o&f|i&f,c=2400959708):(N=o^i^f,c=3395469782),g=w(_,5)+N+b+c+r.getUint32(L*4,!1)&4294967295,b=f,f=i,i=w(o,30),o=_,_=g;this._h0=this._h0+_&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+i&4294967295,this._h3=this._h3+f&4294967295,this._h4=this._h4+b&4294967295}}t.StringSHA1=C,C._bigBlock32=new DataView(new ArrayBuffer(320))}),V(z[10],G([0,1,15,22]),function(I,t,p,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LcsDiff=t.MyArray=t.Debug=t.stringDiff=t.StringDiffSequence=void 0;class E{constructor(a){this.source=a}getElements(){const a=this.source,S=new Int32Array(a.length);for(let v=0,C=a.length;v<C;v++)S[v]=a.charCodeAt(v);return S}}t.StringDiffSequence=E;function u(w,a,S){return new h(new E(w),new E(a)).ComputeDiff(S).changes}t.stringDiff=u;class d{static Assert(a,S){if(!a)throw new Error(S)}}t.Debug=d;class l{static Copy(a,S,v,C,n){for(let r=0;r<n;r++)v[C+r]=a[S+r]}static Copy2(a,S,v,C,n){for(let r=0;r<n;r++)v[C+r]=a[S+r]}}t.MyArray=l;class s{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new p.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(a,S){this.m_originalStart=Math.min(this.m_originalStart,a),this.m_modifiedStart=Math.min(this.m_modifiedStart,S),this.m_originalCount++}AddModifiedElement(a,S){this.m_originalStart=Math.min(this.m_originalStart,a),this.m_modifiedStart=Math.min(this.m_modifiedStart,S),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(a,S,v=null){this.ContinueProcessingPredicate=v;const[C,n,r]=h._getElements(a),[m,_,o]=h._getElements(S);this._hasStrings=r&&o,this._originalStringElements=C,this._originalElementsOrHash=n,this._modifiedStringElements=m,this._modifiedElementsOrHash=_,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(a){return a.length>0&&typeof a[0]=="string"}static _getElements(a){const S=a.getElements();if(h._isStringArray(S)){const v=new Int32Array(S.length);for(let C=0,n=S.length;C<n;C++)v[C]=P.stringHash(S[C],0);return[S,v,!0]}return S instanceof Int32Array?[[],S,!1]:[[],new Int32Array(S),!1]}ElementsAreEqual(a,S){return this._originalElementsOrHash[a]!==this._modifiedElementsOrHash[S]?!1:this._hasStrings?this._originalStringElements[a]===this._modifiedStringElements[S]:!0}OriginalElementsAreEqual(a,S){return this._originalElementsOrHash[a]!==this._originalElementsOrHash[S]?!1:this._hasStrings?this._originalStringElements[a]===this._originalStringElements[S]:!0}ModifiedElementsAreEqual(a,S){return this._modifiedElementsOrHash[a]!==this._modifiedElementsOrHash[S]?!1:this._hasStrings?this._modifiedStringElements[a]===this._modifiedStringElements[S]:!0}ComputeDiff(a){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,a)}_ComputeDiff(a,S,v,C,n){const r=[!1];let m=this.ComputeDiffRecursive(a,S,v,C,r);return n&&(m=this.PrettifyChanges(m)),{quitEarly:r[0],changes:m}}ComputeDiffRecursive(a,S,v,C,n){for(n[0]=!1;a<=S&&v<=C&&this.ElementsAreEqual(a,v);)a++,v++;for(;S>=a&&C>=v&&this.ElementsAreEqual(S,C);)S--,C--;if(a>S||v>C){let f;return v<=C?(d.Assert(a===S+1,"originalStart should only be one more than originalEnd"),f=[new p.DiffChange(a,0,v,C-v+1)]):a<=S?(d.Assert(v===C+1,"modifiedStart should only be one more than modifiedEnd"),f=[new p.DiffChange(a,S-a+1,v,0)]):(d.Assert(a===S+1,"originalStart should only be one more than originalEnd"),d.Assert(v===C+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const r=[0],m=[0],_=this.ComputeRecursionPoint(a,S,v,C,r,m,n),o=r[0],i=m[0];if(_!==null)return _;if(!n[0]){const f=this.ComputeDiffRecursive(a,o,v,i,n);let b=[];return n[0]?b=[new p.DiffChange(o+1,S-(o+1)+1,i+1,C-(i+1)+1)]:b=this.ComputeDiffRecursive(o+1,S,i+1,C,n),this.ConcatenateChanges(f,b)}return[new p.DiffChange(a,S-a+1,v,C-v+1)]}WALKTRACE(a,S,v,C,n,r,m,_,o,i,f,b,N,c,g,L,A,M){let R=null,D=null,T=new s,$=S,k=v,F=N[0]-L[0]-C,O=-1073741824,e=this.m_forwardHistory.length-1;do{const H=F+a;H===$||H<k&&o[H-1]<o[H+1]?(f=o[H+1],c=f-F-C,f<O&&T.MarkNextChange(),O=f,T.AddModifiedElement(f+1,c),F=H+1-a):(f=o[H-1]+1,c=f-F-C,f<O&&T.MarkNextChange(),O=f-1,T.AddOriginalElement(f,c+1),F=H-1-a),e>=0&&(o=this.m_forwardHistory[e],a=o[0],$=1,k=o.length-1)}while(--e>=-1);if(R=T.getReverseChanges(),M[0]){let H=N[0]+1,B=L[0]+1;if(R!==null&&R.length>0){const Q=R[R.length-1];H=Math.max(H,Q.getOriginalEnd()),B=Math.max(B,Q.getModifiedEnd())}D=[new p.DiffChange(H,b-H+1,B,g-B+1)]}else{T=new s,$=r,k=m,F=N[0]-L[0]-_,O=1073741824,e=A?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const H=F+n;H===$||H<k&&i[H-1]>=i[H+1]?(f=i[H+1]-1,c=f-F-_,f>O&&T.MarkNextChange(),O=f+1,T.AddOriginalElement(f+1,c+1),F=H+1-n):(f=i[H-1],c=f-F-_,f>O&&T.MarkNextChange(),O=f,T.AddModifiedElement(f+1,c+1),F=H-1-n),e>=0&&(i=this.m_reverseHistory[e],n=i[0],$=1,k=i.length-1)}while(--e>=-1);D=T.getChanges()}return this.ConcatenateChanges(R,D)}ComputeRecursionPoint(a,S,v,C,n,r,m){let _=0,o=0,i=0,f=0,b=0,N=0;a--,v--,n[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const c=S-a+(C-v),g=c+1,L=new Int32Array(g),A=new Int32Array(g),M=C-v,R=S-a,D=a-v,T=S-C,k=(R-M)%2==0;L[M]=a,A[R]=S,m[0]=!1;for(let F=1;F<=c/2+1;F++){let O=0,e=0;i=this.ClipDiagonalBound(M-F,F,M,g),f=this.ClipDiagonalBound(M+F,F,M,g);for(let B=i;B<=f;B+=2){B===i||B<f&&L[B-1]<L[B+1]?_=L[B+1]:_=L[B-1]+1,o=_-(B-M)-D;const Q=_;for(;_<S&&o<C&&this.ElementsAreEqual(_+1,o+1);)_++,o++;if(L[B]=_,_+o>O+e&&(O=_,e=o),!k&&Math.abs(B-R)<=F-1&&_>=A[B])return n[0]=_,r[0]=o,Q<=A[B]&&1447>0&&F<=1447+1?this.WALKTRACE(M,i,f,D,R,b,N,T,L,A,_,S,n,o,C,r,k,m):null}const H=(O-a+(e-v)-F)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(O,H))return m[0]=!0,n[0]=O,r[0]=e,H>0&&1447>0&&F<=1447+1?this.WALKTRACE(M,i,f,D,R,b,N,T,L,A,_,S,n,o,C,r,k,m):(a++,v++,[new p.DiffChange(a,S-a+1,v,C-v+1)]);b=this.ClipDiagonalBound(R-F,F,R,g),N=this.ClipDiagonalBound(R+F,F,R,g);for(let B=b;B<=N;B+=2){B===b||B<N&&A[B-1]>=A[B+1]?_=A[B+1]-1:_=A[B-1],o=_-(B-R)-T;const Q=_;for(;_>a&&o>v&&this.ElementsAreEqual(_,o);)_--,o--;if(A[B]=_,k&&Math.abs(B-M)<=F&&_<=L[B])return n[0]=_,r[0]=o,Q>=L[B]&&1447>0&&F<=1447+1?this.WALKTRACE(M,i,f,D,R,b,N,T,L,A,_,S,n,o,C,r,k,m):null}if(F<=1447){let B=new Int32Array(f-i+2);B[0]=M-i+1,l.Copy2(L,i,B,1,f-i+1),this.m_forwardHistory.push(B),B=new Int32Array(N-b+2),B[0]=R-b+1,l.Copy2(A,b,B,1,N-b+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(M,i,f,D,R,b,N,T,L,A,_,S,n,o,C,r,k,m)}PrettifyChanges(a){for(let S=0;S<a.length;S++){const v=a[S],C=S<a.length-1?a[S+1].originalStart:this._originalElementsOrHash.length,n=S<a.length-1?a[S+1].modifiedStart:this._modifiedElementsOrHash.length,r=v.originalLength>0,m=v.modifiedLength>0;for(;v.originalStart+v.originalLength<C&&v.modifiedStart+v.modifiedLength<n&&(!r||this.OriginalElementsAreEqual(v.originalStart,v.originalStart+v.originalLength))&&(!m||this.ModifiedElementsAreEqual(v.modifiedStart,v.modifiedStart+v.modifiedLength));)v.originalStart++,v.modifiedStart++;let _=[null];if(S<a.length-1&&this.ChangesOverlap(a[S],a[S+1],_)){a[S]=_[0],a.splice(S+1,1),S--;continue}}for(let S=a.length-1;S>=0;S--){const v=a[S];let C=0,n=0;if(S>0){const i=a[S-1];i.originalLength>0&&(C=i.originalStart+i.originalLength),i.modifiedLength>0&&(n=i.modifiedStart+i.modifiedLength)}const r=v.originalLength>0,m=v.modifiedLength>0;let _=0,o=this._boundaryScore(v.originalStart,v.originalLength,v.modifiedStart,v.modifiedLength);for(let i=1;;i++){const f=v.originalStart-i,b=v.modifiedStart-i;if(f<C||b<n||r&&!this.OriginalElementsAreEqual(f,f+v.originalLength)||m&&!this.ModifiedElementsAreEqual(b,b+v.modifiedLength))break;const N=this._boundaryScore(f,v.originalLength,b,v.modifiedLength);N>o&&(o=N,_=i)}v.originalStart-=_,v.modifiedStart-=_}if(this._hasStrings)for(let S=1,v=a.length;S<v;S++){const C=a[S-1],n=a[S],r=n.originalStart-C.originalStart-C.originalLength,m=C.originalStart,_=n.originalStart+n.originalLength,o=_-m,i=C.modifiedStart,f=n.modifiedStart+n.modifiedLength,b=f-i;if(r<5&&o<20&&b<20){const N=this._findBetterContiguousSequence(m,o,i,b,r);if(N){const[c,g]=N;(c!==C.originalStart+C.originalLength||g!==C.modifiedStart+C.modifiedLength)&&(C.originalLength=c-C.originalStart,C.modifiedLength=g-C.modifiedStart,n.originalStart=c+r,n.modifiedStart=g+r,n.originalLength=_-n.originalStart,n.modifiedLength=f-n.modifiedStart)}}}return a}_findBetterContiguousSequence(a,S,v,C,n){if(S<n||C<n)return null;const r=a+S-n+1,m=v+C-n+1;let _=0,o=0,i=0;for(let f=a;f<r;f++)for(let b=v;b<m;b++){const N=this._contiguousSequenceScore(f,b,n);N>0&&N>_&&(_=N,o=f,i=b)}return _>0?[o,i]:null}_contiguousSequenceScore(a,S,v){let C=0;for(let n=0;n<v;n++){if(!this.ElementsAreEqual(a+n,S+n))return 0;C+=this._originalStringElements[a+n].length}return C}_OriginalIsBoundary(a){return a<=0||a>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[a])}_OriginalRegionIsBoundary(a,S){if(this._OriginalIsBoundary(a)||this._OriginalIsBoundary(a-1))return!0;if(S>0){const v=a+S;if(this._OriginalIsBoundary(v-1)||this._OriginalIsBoundary(v))return!0}return!1}_ModifiedIsBoundary(a){return a<=0||a>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[a])}_ModifiedRegionIsBoundary(a,S){if(this._ModifiedIsBoundary(a)||this._ModifiedIsBoundary(a-1))return!0;if(S>0){const v=a+S;if(this._ModifiedIsBoundary(v-1)||this._ModifiedIsBoundary(v))return!0}return!1}_boundaryScore(a,S,v,C){const n=this._OriginalRegionIsBoundary(a,S)?1:0,r=this._ModifiedRegionIsBoundary(v,C)?1:0;return n+r}ConcatenateChanges(a,S){let v=[];if(a.length===0||S.length===0)return S.length>0?S:a;if(this.ChangesOverlap(a[a.length-1],S[0],v)){const C=new Array(a.length+S.length-1);return l.Copy(a,0,C,0,a.length-1),C[a.length-1]=v[0],l.Copy(S,1,C,a.length,S.length-1),C}else{const C=new Array(a.length+S.length);return l.Copy(a,0,C,0,a.length),l.Copy(S,0,C,a.length,S.length),C}}ChangesOverlap(a,S,v){if(d.Assert(a.originalStart<=S.originalStart,"Left change is not less than or equal to right change"),d.Assert(a.modifiedStart<=S.modifiedStart,"Left change is not less than or equal to right change"),a.originalStart+a.originalLength>=S.originalStart||a.modifiedStart+a.modifiedLength>=S.modifiedStart){const C=a.originalStart;let n=a.originalLength;const r=a.modifiedStart;let m=a.modifiedLength;return a.originalStart+a.originalLength>=S.originalStart&&(n=S.originalStart+S.originalLength-a.originalStart),a.modifiedStart+a.modifiedLength>=S.modifiedStart&&(m=S.modifiedStart+S.modifiedLength-a.modifiedStart),v[0]=new p.DiffChange(C,n,r,m),!0}else return v[0]=null,!1}ClipDiagonalBound(a,S,v,C){if(a>=0&&a<C)return a;const n=v,r=C-v-1,m=S%2==0;if(a<0){const _=n%2==0;return m===_?0:1}else{const _=r%2==0;return m===_?C-1:C-2}}}t.LcsDiff=h}),V(z[11],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withNullAsUndefined=t.createProxyObject=t.getAllMethodNames=t.getAllPropertyNames=t.validateConstraint=t.validateConstraints=t.isFunction=t.assertIsDefined=t.assertType=t.isUndefinedOrNull=t.isUndefined=t.isBoolean=t.isNumber=t.isObject=t.isString=t.isArray=void 0;function p(_){return Array.isArray(_)}t.isArray=p;function P(_){return typeof _=="string"}t.isString=P;function E(_){return typeof _=="object"&&_!==null&&!Array.isArray(_)&&!(_ instanceof RegExp)&&!(_ instanceof Date)}t.isObject=E;function u(_){return typeof _=="number"&&!isNaN(_)}t.isNumber=u;function d(_){return _===!0||_===!1}t.isBoolean=d;function l(_){return typeof _=="undefined"}t.isUndefined=l;function s(_){return l(_)||_===null}t.isUndefinedOrNull=s;function h(_,o){if(!_)throw new Error(o?`Unexpected type, expected '${o}'`:"Unexpected type")}t.assertType=h;function w(_){if(s(_))throw new Error("Assertion Failed: argument is undefined or null");return _}t.assertIsDefined=w;function a(_){return typeof _=="function"}t.isFunction=a;function S(_,o){const i=Math.min(_.length,o.length);for(let f=0;f<i;f++)v(_[f],o[f])}t.validateConstraints=S;function v(_,o){if(P(o)){if(typeof _!==o)throw new Error(`argument does not match constraint: typeof ${o}`)}else if(a(o)){try{if(_ instanceof o)return}catch(i){}if(!s(_)&&_.constructor===o||o.length===1&&o.call(void 0,_)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}t.validateConstraint=v;function C(_){let o=[],i=Object.getPrototypeOf(_);for(;Object.prototype!==i;)o=o.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return o}t.getAllPropertyNames=C;function n(_){const o=[];for(const i of C(_))typeof _[i]=="function"&&o.push(i);return o}t.getAllMethodNames=n;function r(_,o){const i=b=>function(){const N=Array.prototype.slice.call(arguments,0);return o(b,N)};let f={};for(const b of _)f[b]=i(b);return f}t.createProxyObject=r;function m(_){return _===null?void 0:_}t.withNullAsUndefined=m}),V(z[12],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUint32=t.toUint8=void 0;function p(E){return E<0?0:E>255?255:E|0}t.toUint8=p;function P(E){return E<0?0:E>4294967295?4294967295:E|0}t.toUint32=P}),V(z[13],G([0,1,2,20]),function(I,t,p,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const E=/^\w[\w\d+.-]*$/,u=/^\//,d=/^\/\//;function l(c,g){if(!c.scheme&&g)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${c.authority}", path: "${c.path}", query: "${c.query}", fragment: "${c.fragment}"}`);if(c.scheme&&!E.test(c.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(c.path){if(c.authority){if(!u.test(c.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(d.test(c.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function s(c,g){return!c&&!g?"file":c}function h(c,g){switch(c){case"https":case"http":case"file":g?g[0]!==a&&(g=a+g):g=a;break}return g}const w="",a="/",S=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class v{constructor(g,L,A,M,R,D=!1){typeof g=="object"?(this.scheme=g.scheme||w,this.authority=g.authority||w,this.path=g.path||w,this.query=g.query||w,this.fragment=g.fragment||w):(this.scheme=s(g,D),this.authority=L||w,this.path=h(this.scheme,A||w),this.query=M||w,this.fragment=R||w,l(this,D))}static isUri(g){return g instanceof v?!0:g?typeof g.authority=="string"&&typeof g.fragment=="string"&&typeof g.path=="string"&&typeof g.query=="string"&&typeof g.scheme=="string"&&typeof g.fsPath=="string"&&typeof g.with=="function"&&typeof g.toString=="function":!1}get fsPath(){return o(this,!1)}with(g){if(!g)return this;let{scheme:L,authority:A,path:M,query:R,fragment:D}=g;return L===void 0?L=this.scheme:L===null&&(L=w),A===void 0?A=this.authority:A===null&&(A=w),M===void 0?M=this.path:M===null&&(M=w),R===void 0?R=this.query:R===null&&(R=w),D===void 0?D=this.fragment:D===null&&(D=w),L===this.scheme&&A===this.authority&&M===this.path&&R===this.query&&D===this.fragment?this:new n(L,A,M,R,D)}static parse(g,L=!1){const A=S.exec(g);return A?new n(A[2]||w,N(A[4]||w),N(A[5]||w),N(A[7]||w),N(A[9]||w),L):new n(w,w,w,w,w)}static file(g){let L=w;if(p.isWindows&&(g=g.replace(/\\/g,a)),g[0]===a&&g[1]===a){const A=g.indexOf(a,2);A===-1?(L=g.substring(2),g=a):(L=g.substring(2,A),g=g.substring(A)||a)}return new n("file",L,g,w,w)}static from(g){return new n(g.scheme,g.authority,g.path,g.query,g.fragment)}static joinPath(g,...L){if(!g.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let A;return p.isWindows&&g.scheme==="file"?A=v.file(P.win32.join(o(g,!0),...L)).path:A=P.posix.join(g.path,...L),g.with({path:A})}toString(g=!1){return i(this,g)}toJSON(){return this}static revive(g){if(g){if(g instanceof v)return g;{const L=new n(g);return L._formatted=g.external,L._fsPath=g._sep===C?g.fsPath:null,L}}else return g}}t.URI=v;const C=p.isWindows?1:void 0;class n extends v{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=o(this,!1)),this._fsPath}toString(g=!1){return g?i(this,!0):(this._formatted||(this._formatted=i(this,!1)),this._formatted)}toJSON(){const g={$mid:1};return this._fsPath&&(g.fsPath=this._fsPath,g._sep=C),this._formatted&&(g.external=this._formatted),this.path&&(g.path=this.path),this.scheme&&(g.scheme=this.scheme),this.authority&&(g.authority=this.authority),this.query&&(g.query=this.query),this.fragment&&(g.fragment=this.fragment),g}}const r={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function m(c,g){let L,A=-1;for(let M=0;M<c.length;M++){const R=c.charCodeAt(M);if(R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===45||R===46||R===95||R===126||g&&R===47)A!==-1&&(L+=encodeURIComponent(c.substring(A,M)),A=-1),L!==void 0&&(L+=c.charAt(M));else{L===void 0&&(L=c.substr(0,M));const D=r[R];D!==void 0?(A!==-1&&(L+=encodeURIComponent(c.substring(A,M)),A=-1),L+=D):A===-1&&(A=M)}}return A!==-1&&(L+=encodeURIComponent(c.substring(A))),L!==void 0?L:c}function _(c){let g;for(let L=0;L<c.length;L++){const A=c.charCodeAt(L);A===35||A===63?(g===void 0&&(g=c.substr(0,L)),g+=r[A]):g!==void 0&&(g+=c[L])}return g!==void 0?g:c}function o(c,g){let L;return c.authority&&c.path.length>1&&c.scheme==="file"?L=`//${c.authority}${c.path}`:c.path.charCodeAt(0)===47&&(c.path.charCodeAt(1)>=65&&c.path.charCodeAt(1)<=90||c.path.charCodeAt(1)>=97&&c.path.charCodeAt(1)<=122)&&c.path.charCodeAt(2)===58?g?L=c.path.substr(1):L=c.path[1].toLowerCase()+c.path.substr(2):L=c.path,p.isWindows&&(L=L.replace(/\//g,"\\")),L}t.uriToFsPath=o;function i(c,g){const L=g?_:m;let A="",{scheme:M,authority:R,path:D,query:T,fragment:$}=c;if(M&&(A+=M,A+=":"),(R||M==="file")&&(A+=a,A+=a),R){let k=R.indexOf("@");if(k!==-1){const F=R.substr(0,k);R=R.substr(k+1),k=F.indexOf(":"),k===-1?A+=L(F,!1):(A+=L(F.substr(0,k),!1),A+=":",A+=L(F.substr(k+1),!1)),A+="@"}R=R.toLowerCase(),k=R.indexOf(":"),k===-1?A+=L(R,!1):(A+=L(R.substr(0,k),!1),A+=R.substr(k))}if(D){if(D.length>=3&&D.charCodeAt(0)===47&&D.charCodeAt(2)===58){const k=D.charCodeAt(1);k>=65&&k<=90&&(D=`/${String.fromCharCode(k+32)}:${D.substr(3)}`)}else if(D.length>=2&&D.charCodeAt(1)===58){const k=D.charCodeAt(0);k>=65&&k<=90&&(D=`${String.fromCharCode(k+32)}:${D.substr(2)}`)}A+=L(D,!0)}return T&&(A+="?",A+=L(T,!1)),$&&(A+="#",A+=g?$:m($,!1)),A}function f(c){try{return decodeURIComponent(c)}catch(g){return c.length>3?c.substr(0,3)+f(c.substr(3)):c}}const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(c){return c.match(b)?c.replace(b,g=>f(g)):c}}),V(z[34],G([0,1,4,7,2,11]),function(I,t,p,P,E,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=t.SimpleWorkerServer=t.SimpleWorkerClient=t.logOnceWebWorkerWarning=void 0;const d="$initialize";let l=!1;function s(v){!E.isWeb||(l||(l=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(v.message))}t.logOnceWebWorkerWarning=s;class h{constructor(C){this._workerId=-1,this._handler=C,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(C){this._workerId=C}sendMessage(C,n){let r=String(++this._lastSentReq);return new Promise((m,_)=>{this._pendingReplies[r]={resolve:m,reject:_},this._send({vsWorker:this._workerId,req:r,method:C,args:n})})}handleMessage(C){!C||!C.vsWorker||this._workerId!==-1&&C.vsWorker!==this._workerId||this._handleMessage(C)}_handleMessage(C){if(C.seq){let _=C;if(!this._pendingReplies[_.seq]){console.warn("Got reply to unknown seq");return}let o=this._pendingReplies[_.seq];if(delete this._pendingReplies[_.seq],_.err){let i=_.err;_.err.$isError&&(i=new Error,i.name=_.err.name,i.message=_.err.message,i.stack=_.err.stack),o.reject(i);return}o.resolve(_.res);return}let n=C,r=n.req;this._handler.handleMessage(n.method,n.args).then(_=>{this._send({vsWorker:this._workerId,seq:r,res:_,err:void 0})},_=>{_.detail instanceof Error&&(_.detail=p.transformErrorForSerialization(_.detail)),this._send({vsWorker:this._workerId,seq:r,res:void 0,err:p.transformErrorForSerialization(_)})})}_send(C){let n=[];if(C.req){const r=C;for(let m=0;m<r.args.length;m++)r.args[m]instanceof ArrayBuffer&&n.push(r.args[m])}else{const r=C;r.res instanceof ArrayBuffer&&n.push(r.res)}this._handler.sendMessage(C,n)}}class w extends P.Disposable{constructor(C,n,r){super();let m=null;this._worker=this._register(C.create("vs/base/common/worker/simpleWorker",f=>{this._protocol.handleMessage(f)},f=>{m&&m(f)})),this._protocol=new h({sendMessage:(f,b)=>{this._worker.postMessage(f,b)},handleMessage:(f,b)=>{if(typeof r[f]!="function")return Promise.reject(new Error("Missing method "+f+" on main thread host."));try{return Promise.resolve(r[f].apply(r,b))}catch(N){return Promise.reject(N)}}}),this._protocol.setWorkerId(this._worker.getId());let _=null;typeof self.require!="undefined"&&typeof self.require.getConfig=="function"?_=self.require.getConfig():typeof self.requirejs!="undefined"&&(_=self.requirejs.s.contexts._.config);const o=u.getAllMethodNames(r);this._onModuleLoaded=this._protocol.sendMessage(d,[this._worker.getId(),JSON.parse(JSON.stringify(_)),n,o]);const i=(f,b)=>this._request(f,b);this._lazyProxy=new Promise((f,b)=>{m=b,this._onModuleLoaded.then(N=>{f(u.createProxyObject(N,i))},N=>{b(N),this._onError("Worker failed to load "+n,N)})})}getProxyObject(){return this._lazyProxy}_request(C,n){return new Promise((r,m)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(C,n).then(r,m)},m)})}_onError(C,n){console.error(C),console.info(n)}}t.SimpleWorkerClient=w;class a{constructor(C,n){this._requestHandlerFactory=n,this._requestHandler=null,this._protocol=new h({sendMessage:(r,m)=>{C(r,m)},handleMessage:(r,m)=>this._handleMessage(r,m)})}onmessage(C){this._protocol.handleMessage(C)}_handleMessage(C,n){if(C===d)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[C]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+C));try{return Promise.resolve(this._requestHandler[C].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}initialize(C,n,r,m){this._protocol.setWorkerId(C);const _=(i,f)=>this._protocol.sendMessage(i,f),o=u.createProxyObject(m,_);return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(u.getAllMethodNames(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((i,f)=>{self.require([r],b=>{if(this._requestHandler=b.create(o),!this._requestHandler){f(new Error("No RequestHandler!"));return}i(u.getAllMethodNames(this._requestHandler))},f)}))}}t.SimpleWorkerServer=a;function S(v){return new a(v,null)}t.create=S}),V(z[23],G([0,1,12]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterSet=t.CharacterClassifier=void 0;class P{constructor(d){let l=p.toUint8(d);this._defaultValue=l,this._asciiMap=P._createAsciiMap(l),this._map=new Map}static _createAsciiMap(d){let l=new Uint8Array(256);for(let s=0;s<256;s++)l[s]=d;return l}set(d,l){let s=p.toUint8(l);d>=0&&d<256?this._asciiMap[d]=s:this._map.set(d,s)}get(d){return d>=0&&d<256?this._asciiMap[d]:this._map.get(d)||this._defaultValue}}t.CharacterClassifier=P;class E{constructor(){this._actual=new P(0)}add(d){this._actual.set(d,1)}has(d){return this._actual.get(d)===1}}t.CharacterSet=E}),V(z[3],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Position=void 0;class p{constructor(E,u){this.lineNumber=E,this.column=u}with(E=this.lineNumber,u=this.column){return E===this.lineNumber&&u===this.column?this:new p(E,u)}delta(E=0,u=0){return this.with(this.lineNumber+E,this.column+u)}equals(E){return p.equals(this,E)}static equals(E,u){return!E&&!u?!0:!!E&&!!u&&E.lineNumber===u.lineNumber&&E.column===u.column}isBefore(E){return p.isBefore(this,E)}static isBefore(E,u){return E.lineNumber<u.lineNumber?!0:u.lineNumber<E.lineNumber?!1:E.column<u.column}isBeforeOrEqual(E){return p.isBeforeOrEqual(this,E)}static isBeforeOrEqual(E,u){return E.lineNumber<u.lineNumber?!0:u.lineNumber<E.lineNumber?!1:E.column<=u.column}static compare(E,u){let d=E.lineNumber|0,l=u.lineNumber|0;if(d===l){let s=E.column|0,h=u.column|0;return s-h}return d-l}clone(){return new p(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(E){return new p(E.lineNumber,E.column)}static isIPosition(E){return E&&typeof E.lineNumber=="number"&&typeof E.column=="number"}}t.Position=p}),V(z[6],G([0,1,3]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Range=void 0;class P{constructor(u,d,l,s){u>l||u===l&&d>s?(this.startLineNumber=l,this.startColumn=s,this.endLineNumber=u,this.endColumn=d):(this.startLineNumber=u,this.startColumn=d,this.endLineNumber=l,this.endColumn=s)}isEmpty(){return P.isEmpty(this)}static isEmpty(u){return u.startLineNumber===u.endLineNumber&&u.startColumn===u.endColumn}containsPosition(u){return P.containsPosition(this,u)}static containsPosition(u,d){return!(d.lineNumber<u.startLineNumber||d.lineNumber>u.endLineNumber||d.lineNumber===u.startLineNumber&&d.column<u.startColumn||d.lineNumber===u.endLineNumber&&d.column>u.endColumn)}containsRange(u){return P.containsRange(this,u)}static containsRange(u,d){return!(d.startLineNumber<u.startLineNumber||d.endLineNumber<u.startLineNumber||d.startLineNumber>u.endLineNumber||d.endLineNumber>u.endLineNumber||d.startLineNumber===u.startLineNumber&&d.startColumn<u.startColumn||d.endLineNumber===u.endLineNumber&&d.endColumn>u.endColumn)}strictContainsRange(u){return P.strictContainsRange(this,u)}static strictContainsRange(u,d){return!(d.startLineNumber<u.startLineNumber||d.endLineNumber<u.startLineNumber||d.startLineNumber>u.endLineNumber||d.endLineNumber>u.endLineNumber||d.startLineNumber===u.startLineNumber&&d.startColumn<=u.startColumn||d.endLineNumber===u.endLineNumber&&d.endColumn>=u.endColumn)}plusRange(u){return P.plusRange(this,u)}static plusRange(u,d){let l,s,h,w;return d.startLineNumber<u.startLineNumber?(l=d.startLineNumber,s=d.startColumn):d.startLineNumber===u.startLineNumber?(l=d.startLineNumber,s=Math.min(d.startColumn,u.startColumn)):(l=u.startLineNumber,s=u.startColumn),d.endLineNumber>u.endLineNumber?(h=d.endLineNumber,w=d.endColumn):d.endLineNumber===u.endLineNumber?(h=d.endLineNumber,w=Math.max(d.endColumn,u.endColumn)):(h=u.endLineNumber,w=u.endColumn),new P(l,s,h,w)}intersectRanges(u){return P.intersectRanges(this,u)}static intersectRanges(u,d){let l=u.startLineNumber,s=u.startColumn,h=u.endLineNumber,w=u.endColumn,a=d.startLineNumber,S=d.startColumn,v=d.endLineNumber,C=d.endColumn;return l<a?(l=a,s=S):l===a&&(s=Math.max(s,S)),h>v?(h=v,w=C):h===v&&(w=Math.min(w,C)),l>h||l===h&&s>w?null:new P(l,s,h,w)}equalsRange(u){return P.equalsRange(this,u)}static equalsRange(u,d){return!!u&&!!d&&u.startLineNumber===d.startLineNumber&&u.startColumn===d.startColumn&&u.endLineNumber===d.endLineNumber&&u.endColumn===d.endColumn}getEndPosition(){return P.getEndPosition(this)}static getEndPosition(u){return new p.Position(u.endLineNumber,u.endColumn)}getStartPosition(){return P.getStartPosition(this)}static getStartPosition(u){return new p.Position(u.startLineNumber,u.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(u,d){return new P(this.startLineNumber,this.startColumn,u,d)}setStartPosition(u,d){return new P(u,d,this.endLineNumber,this.endColumn)}collapseToStart(){return P.collapseToStart(this)}static collapseToStart(u){return new P(u.startLineNumber,u.startColumn,u.startLineNumber,u.startColumn)}static fromPositions(u,d=u){return new P(u.lineNumber,u.column,d.lineNumber,d.column)}static lift(u){return u?new P(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn):null}static isIRange(u){return u&&typeof u.startLineNumber=="number"&&typeof u.startColumn=="number"&&typeof u.endLineNumber=="number"&&typeof u.endColumn=="number"}static areIntersectingOrTouching(u,d){return!(u.endLineNumber<d.startLineNumber||u.endLineNumber===d.startLineNumber&&u.endColumn<d.startColumn||d.endLineNumber<u.startLineNumber||d.endLineNumber===u.startLineNumber&&d.endColumn<u.startColumn)}static areIntersecting(u,d){return!(u.endLineNumber<d.startLineNumber||u.endLineNumber===d.startLineNumber&&u.endColumn<=d.startColumn||d.endLineNumber<u.startLineNumber||d.endLineNumber===u.startLineNumber&&d.endColumn<=u.startColumn)}static compareRangesUsingStarts(u,d){if(u&&d){const h=u.startLineNumber|0,w=d.startLineNumber|0;if(h===w){const a=u.startColumn|0,S=d.startColumn|0;if(a===S){const v=u.endLineNumber|0,C=d.endLineNumber|0;if(v===C){const n=u.endColumn|0,r=d.endColumn|0;return n-r}return v-C}return a-S}return h-w}return(u?1:0)-(d?1:0)}static compareRangesUsingEnds(u,d){return u.endLineNumber===d.endLineNumber?u.endColumn===d.endColumn?u.startLineNumber===d.startLineNumber?u.startColumn-d.startColumn:u.startLineNumber-d.startLineNumber:u.endColumn-d.endColumn:u.endLineNumber-d.endLineNumber}static spansMultipleLines(u){return u.endLineNumber>u.startLineNumber}}t.Range=P}),V(z[24],G([0,1,3,6]),function(I,t,p,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Selection=void 0;class E extends P.Range{constructor(d,l,s,h){super(d,l,s,h);this.selectionStartLineNumber=d,this.selectionStartColumn=l,this.positionLineNumber=s,this.positionColumn=h}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(d){return E.selectionsEqual(this,d)}static selectionsEqual(d,l){return d.selectionStartLineNumber===l.selectionStartLineNumber&&d.selectionStartColumn===l.selectionStartColumn&&d.positionLineNumber===l.positionLineNumber&&d.positionColumn===l.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(d,l){return this.getDirection()===0?new E(this.startLineNumber,this.startColumn,d,l):new E(d,l,this.startLineNumber,this.startColumn)}getPosition(){return new p.Position(this.positionLineNumber,this.positionColumn)}setStartPosition(d,l){return this.getDirection()===0?new E(d,l,this.endLineNumber,this.endColumn):new E(this.endLineNumber,this.endColumn,d,l)}static fromPositions(d,l=d){return new E(d.lineNumber,d.column,l.lineNumber,l.column)}static liftSelection(d){return new E(d.selectionStartLineNumber,d.selectionStartColumn,d.positionLineNumber,d.positionColumn)}static selectionsArrEqual(d,l){if(d&&!l||!d&&l)return!1;if(!d&&!l)return!0;if(d.length!==l.length)return!1;for(let s=0,h=d.length;s<h;s++)if(!this.selectionsEqual(d[s],l[s]))return!1;return!0}static isISelection(d){return d&&typeof d.selectionStartLineNumber=="number"&&typeof d.selectionStartColumn=="number"&&typeof d.positionLineNumber=="number"&&typeof d.positionColumn=="number"}static createWithDirection(d,l,s,h,w){return w===0?new E(d,l,s,h):new E(s,h,d,l)}}t.Selection=E}),V(z[25],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenizationResult2=t.TokenizationResult=t.Token=void 0;class p{constructor(d,l,s){this.offset=d|0,this.type=l,this.language=s}toString(){return"("+this.offset+", "+this.type+")"}}t.Token=p;class P{constructor(d,l){this.tokens=d,this.endState=l}}t.TokenizationResult=P;class E{constructor(d,l){this.tokens=d,this.endState=l}}t.TokenizationResult2=E}),V(z[26],G([0,1,10,5]),function(I,t,p,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffComputer=void 0;const E=3;function u(n,r,m,_){return new p.LcsDiff(n,r,m).ComputeDiff(_)}class d{constructor(r){const m=[],_=[];for(let o=0,i=r.length;o<i;o++)m[o]=S(r[o],1),_[o]=v(r[o],1);this.lines=r,this._startColumns=m,this._endColumns=_}getElements(){const r=[];for(let m=0,_=this.lines.length;m<_;m++)r[m]=this.lines[m].substring(this._startColumns[m]-1,this._endColumns[m]-1);return r}getStartLineNumber(r){return r+1}getEndLineNumber(r){return r+1}createCharSequence(r,m,_){const o=[],i=[],f=[];let b=0;for(let N=m;N<=_;N++){const c=this.lines[N],g=r?this._startColumns[N]:1,L=r?this._endColumns[N]:c.length+1;for(let A=g;A<L;A++)o[b]=c.charCodeAt(A-1),i[b]=N+1,f[b]=A,b++}return new l(o,i,f)}}class l{constructor(r,m,_){this._charCodes=r,this._lineNumbers=m,this._columns=_}getElements(){return this._charCodes}getStartLineNumber(r){return this._lineNumbers[r]}getStartColumn(r){return this._columns[r]}getEndLineNumber(r){return this._lineNumbers[r]}getEndColumn(r){return this._columns[r]+1}}class s{constructor(r,m,_,o,i,f,b,N){this.originalStartLineNumber=r,this.originalStartColumn=m,this.originalEndLineNumber=_,this.originalEndColumn=o,this.modifiedStartLineNumber=i,this.modifiedStartColumn=f,this.modifiedEndLineNumber=b,this.modifiedEndColumn=N}static createFromDiffChange(r,m,_){let o,i,f,b,N,c,g,L;return r.originalLength===0?(o=0,i=0,f=0,b=0):(o=m.getStartLineNumber(r.originalStart),i=m.getStartColumn(r.originalStart),f=m.getEndLineNumber(r.originalStart+r.originalLength-1),b=m.getEndColumn(r.originalStart+r.originalLength-1)),r.modifiedLength===0?(N=0,c=0,g=0,L=0):(N=_.getStartLineNumber(r.modifiedStart),c=_.getStartColumn(r.modifiedStart),g=_.getEndLineNumber(r.modifiedStart+r.modifiedLength-1),L=_.getEndColumn(r.modifiedStart+r.modifiedLength-1)),new s(o,i,f,b,N,c,g,L)}}function h(n){if(n.length<=1)return n;const r=[n[0]];let m=r[0];for(let _=1,o=n.length;_<o;_++){const i=n[_],f=i.originalStart-(m.originalStart+m.originalLength),b=i.modifiedStart-(m.modifiedStart+m.modifiedLength);Math.min(f,b)<E?(m.originalLength=i.originalStart+i.originalLength-m.originalStart,m.modifiedLength=i.modifiedStart+i.modifiedLength-m.modifiedStart):(r.push(i),m=i)}return r}class w{constructor(r,m,_,o,i){this.originalStartLineNumber=r,this.originalEndLineNumber=m,this.modifiedStartLineNumber=_,this.modifiedEndLineNumber=o,this.charChanges=i}static createFromDiffResult(r,m,_,o,i,f,b){let N,c,g,L,A;if(m.originalLength===0?(N=_.getStartLineNumber(m.originalStart)-1,c=0):(N=_.getStartLineNumber(m.originalStart),c=_.getEndLineNumber(m.originalStart+m.originalLength-1)),m.modifiedLength===0?(g=o.getStartLineNumber(m.modifiedStart)-1,L=0):(g=o.getStartLineNumber(m.modifiedStart),L=o.getEndLineNumber(m.modifiedStart+m.modifiedLength-1)),f&&m.originalLength>0&&m.originalLength<20&&m.modifiedLength>0&&m.modifiedLength<20&&i()){const M=_.createCharSequence(r,m.originalStart,m.originalStart+m.originalLength-1),R=o.createCharSequence(r,m.modifiedStart,m.modifiedStart+m.modifiedLength-1);let D=u(M,R,i,!0).changes;b&&(D=h(D)),A=[];for(let T=0,$=D.length;T<$;T++)A.push(s.createFromDiffChange(D[T],M,R))}return new w(N,c,g,L,A)}}class a{constructor(r,m,_){this.shouldComputeCharChanges=_.shouldComputeCharChanges,this.shouldPostProcessCharChanges=_.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=_.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=_.shouldMakePrettyDiff,this.originalLines=r,this.modifiedLines=m,this.original=new d(r),this.modified=new d(m),this.continueLineDiff=C(_.maxComputationTime),this.continueCharDiff=C(_.maxComputationTime===0?0:Math.min(_.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const r=u(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),m=r.changes,_=r.quitEarly;if(this.shouldIgnoreTrimWhitespace){const b=[];for(let N=0,c=m.length;N<c;N++)b.push(w.createFromDiffResult(this.shouldIgnoreTrimWhitespace,m[N],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:_,changes:b}}const o=[];let i=0,f=0;for(let b=-1,N=m.length;b<N;b++){const c=b+1<N?m[b+1]:null,g=c?c.originalStart:this.originalLines.length,L=c?c.modifiedStart:this.modifiedLines.length;for(;i<g&&f<L;){const A=this.originalLines[i],M=this.modifiedLines[f];if(A!==M){{let R=S(A,1),D=S(M,1);for(;R>1&&D>1;){const T=A.charCodeAt(R-2),$=M.charCodeAt(D-2);if(T!==$)break;R--,D--}(R>1||D>1)&&this._pushTrimWhitespaceCharChange(o,i+1,1,R,f+1,1,D)}{let R=v(A,1),D=v(M,1);const T=A.length+1,$=M.length+1;for(;R<T&&D<$;){const k=A.charCodeAt(R-1),F=A.charCodeAt(D-1);if(k!==F)break;R++,D++}(R<T||D<$)&&this._pushTrimWhitespaceCharChange(o,i+1,R,T,f+1,D,$)}}i++,f++}c&&(o.push(w.createFromDiffResult(this.shouldIgnoreTrimWhitespace,c,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),i+=c.originalLength,f+=c.modifiedLength)}return{quitEarly:_,changes:o}}_pushTrimWhitespaceCharChange(r,m,_,o,i,f,b){if(!this._mergeTrimWhitespaceCharChange(r,m,_,o,i,f,b)){let N;this.shouldComputeCharChanges&&(N=[new s(m,_,m,o,i,f,i,b)]),r.push(new w(m,m,i,i,N))}}_mergeTrimWhitespaceCharChange(r,m,_,o,i,f,b){const N=r.length;if(N===0)return!1;const c=r[N-1];return c.originalEndLineNumber===0||c.modifiedEndLineNumber===0?!1:c.originalEndLineNumber+1===m&&c.modifiedEndLineNumber+1===i?(c.originalEndLineNumber=m,c.modifiedEndLineNumber=i,this.shouldComputeCharChanges&&c.charChanges&&c.charChanges.push(new s(m,_,m,o,i,f,i,b)),!0):!1}}t.DiffComputer=a;function S(n,r){const m=P.firstNonWhitespaceIndex(n);return m===-1?r:m+1}function v(n,r){const m=P.lastNonWhitespaceIndex(n);return m===-1?r:m+2}function C(n){if(n===0)return()=>!0;const r=Date.now();return()=>Date.now()-r<n}}),V(z[27],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWordAtText=t.ensureValidWordDefinition=t.DEFAULT_WORD_REGEXP=t.USUAL_WORD_SEPARATORS=void 0,t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function p(l=""){let s="(-?\\d*\\.\\d\\w*)|([^";for(const h of t.USUAL_WORD_SEPARATORS)l.indexOf(h)>=0||(s+="\\"+h);return s+="\\s]+)",new RegExp(s,"g")}t.DEFAULT_WORD_REGEXP=p();function P(l){let s=t.DEFAULT_WORD_REGEXP;if(l&&l instanceof RegExp)if(l.global)s=l;else{let h="g";l.ignoreCase&&(h+="i"),l.multiline&&(h+="m"),l.unicode&&(h+="u"),s=new RegExp(l.source,h)}return s.lastIndex=0,s}t.ensureValidWordDefinition=P;const E={maxLen:1e3,windowSize:15,timeBudget:150};function u(l,s,h,w,a=E){if(h.length>a.maxLen){let r=l-a.maxLen/2;return r<0?r=0:w+=r,h=h.substring(r,l+a.maxLen/2),u(l,s,h,w,a)}const S=Date.now(),v=l-1-w;let C=-1,n=null;for(let r=1;!(Date.now()-S>=a.timeBudget);r++){const m=v-a.windowSize*r;s.lastIndex=Math.max(0,m);const _=d(s,h,v,C);if(!_&&n||(n=_,m<=0))break;C=m}if(n){let r={word:n[0],startColumn:w+1+n.index,endColumn:w+1+n.index+n[0].length};return s.lastIndex=0,r}return null}t.getWordAtText=u;function d(l,s,h,w){let a;for(;a=l.exec(s);){const S=a.index||0;if(S<=h&&l.lastIndex>=h)return a;if(w>0&&S>w)return null}return null}}),V(z[28],G([0,1,23]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeLinks=t.LinkComputer=t.StateMachine=t.Uint8Matrix=void 0;class P{constructor(S,v,C){const n=new Uint8Array(S*v);for(let r=0,m=S*v;r<m;r++)n[r]=C;this._data=n,this.rows=S,this.cols=v}get(S,v){return this._data[S*this.cols+v]}set(S,v,C){this._data[S*this.cols+v]=C}}t.Uint8Matrix=P;class E{constructor(S){let v=0,C=0;for(let r=0,m=S.length;r<m;r++){let[_,o,i]=S[r];o>v&&(v=o),_>C&&(C=_),i>C&&(C=i)}v++,C++;let n=new P(C,v,0);for(let r=0,m=S.length;r<m;r++){let[_,o,i]=S[r];n.set(_,o,i)}this._states=n,this._maxCharCode=v}nextState(S,v){return v<0||v>=this._maxCharCode?0:this._states.get(S,v)}}t.StateMachine=E;let u=null;function d(){return u===null&&(u=new E([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),u}let l=null;function s(){if(l===null){l=new p.CharacterClassifier(0);const a=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u3011\u300F\u300D\u300B\u3009\u201D\u2019\uFF40\uFF5E\u2026`;for(let v=0;v<a.length;v++)l.set(a.charCodeAt(v),1);const S=".,;";for(let v=0;v<S.length;v++)l.set(S.charCodeAt(v),2)}return l}class h{static _createLink(S,v,C,n,r){let m=r-1;do{const _=v.charCodeAt(m);if(S.get(_)!==2)break;m--}while(m>n);if(n>0){const _=v.charCodeAt(n-1),o=v.charCodeAt(m);(_===40&&o===41||_===91&&o===93||_===123&&o===125)&&m--}return{range:{startLineNumber:C,startColumn:n+1,endLineNumber:C,endColumn:m+2},url:v.substring(n,m+1)}}static computeLinks(S,v=d()){const C=s();let n=[];for(let r=1,m=S.getLineCount();r<=m;r++){const _=S.getLineContent(r),o=_.length;let i=0,f=0,b=0,N=1,c=!1,g=!1,L=!1,A=!1;for(;i<o;){let M=!1;const R=_.charCodeAt(i);if(N===13){let D;switch(R){case 40:c=!0,D=0;break;case 41:D=c?0:1;break;case 91:L=!0,g=!0,D=0;break;case 93:L=!1,D=g?0:1;break;case 123:A=!0,D=0;break;case 125:D=A?0:1;break;case 39:D=b===34||b===96?0:1;break;case 34:D=b===39||b===96?0:1;break;case 96:D=b===39||b===34?0:1;break;case 42:D=b===42?1:0;break;case 124:D=b===124?1:0;break;case 32:D=L?0:1;break;default:D=C.get(R)}D===1&&(n.push(h._createLink(C,_,r,f,i)),M=!0)}else if(N===12){let D;R===91?(g=!0,D=0):D=C.get(R),D===1?M=!0:N=13}else N=v.nextState(N,R),N===0&&(M=!0);M&&(N=1,c=!1,g=!1,A=!1,f=i+1,b=R),i++}N===13&&n.push(h._createLink(C,_,r,f,o))}return n}}t.LinkComputer=h;function w(a){return!a||typeof a.getLineCount!="function"||typeof a.getLineContent!="function"?[]:h.computeLinks(a)}t.computeLinks=w}),V(z[29],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicInplaceReplace=void 0;class p{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(E,u,d,l,s){if(E&&u){let h=this.doNavigateValueSet(u,s);if(h)return{range:E,value:h}}if(d&&l){let h=this.doNavigateValueSet(l,s);if(h)return{range:d,value:h}}return null}doNavigateValueSet(E,u){let d=this.numberReplace(E,u);return d!==null?d:this.textReplace(E,u)}numberReplace(E,u){let d=Math.pow(10,E.length-(E.lastIndexOf(".")+1)),l=Number(E),s=parseFloat(E);return!isNaN(l)&&!isNaN(s)&&l===s?l===0&&!u?null:(l=Math.floor(l*d),l+=u?d:-d,String(l/d)):null}textReplace(E,u){return this.valueSetsReplace(this._defaultValueSet,E,u)}valueSetsReplace(E,u,d){let l=null;for(let s=0,h=E.length;l===null&&s<h;s++)l=this.valueSetReplace(E[s],u,d);return l}valueSetReplace(E,u,d){let l=E.indexOf(u);return l>=0?(l+=d?1:-1,l<0?l=E.length-1:l%=E.length,E[l]):null}}t.BasicInplaceReplace=p,p.INSTANCE=new p}),V(z[30],G([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WrappingIndent=t.TrackedRangeStickiness=t.TextEditorCursorStyle=t.TextEditorCursorBlinkingStyle=t.SymbolTag=t.SymbolKind=t.SignatureHelpTriggerKind=t.SelectionDirection=t.ScrollbarVisibility=t.ScrollType=t.RenderMinimap=t.RenderLineNumbersType=t.OverviewRulerLane=t.OverlayWidgetPositionPreference=t.MouseTargetType=t.MinimapPosition=t.MarkerTag=t.MarkerSeverity=t.KeyCode=t.InlineHintKind=t.IndentAction=t.EndOfLineSequence=t.EndOfLinePreference=t.EditorOption=t.EditorAutoIndentStrategy=t.DocumentHighlightKind=t.DefaultEndOfLine=t.CursorChangeReason=t.ContentWidgetPositionPreference=t.CompletionTriggerKind=t.CompletionItemTag=t.CompletionItemKind=t.CompletionItemInsertTextRule=t.AccessibilitySupport=void 0;var p;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(p=t.AccessibilitySupport||(t.AccessibilitySupport={}));var P;(function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(P=t.CompletionItemInsertTextRule||(t.CompletionItemInsertTextRule={}));var E;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(E=t.CompletionItemKind||(t.CompletionItemKind={}));var u;(function(e){e[e.Deprecated=1]="Deprecated"})(u=t.CompletionItemTag||(t.CompletionItemTag={}));var d;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(d=t.CompletionTriggerKind||(t.CompletionTriggerKind={}));var l;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(l=t.ContentWidgetPositionPreference||(t.ContentWidgetPositionPreference={}));var s;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(s=t.CursorChangeReason||(t.CursorChangeReason={}));var h;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(h=t.DefaultEndOfLine||(t.DefaultEndOfLine={}));var w;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(w=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var a;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(a=t.EditorAutoIndentStrategy||(t.EditorAutoIndentStrategy={}));var S;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingOvertype=6]="autoClosingOvertype",e[e.autoClosingQuotes=7]="autoClosingQuotes",e[e.autoIndent=8]="autoIndent",e[e.automaticLayout=9]="automaticLayout",e[e.autoSurround=10]="autoSurround",e[e.codeLens=11]="codeLens",e[e.codeLensFontFamily=12]="codeLensFontFamily",e[e.codeLensFontSize=13]="codeLensFontSize",e[e.colorDecorators=14]="colorDecorators",e[e.columnSelection=15]="columnSelection",e[e.comments=16]="comments",e[e.contextmenu=17]="contextmenu",e[e.copyWithSyntaxHighlighting=18]="copyWithSyntaxHighlighting",e[e.cursorBlinking=19]="cursorBlinking",e[e.cursorSmoothCaretAnimation=20]="cursorSmoothCaretAnimation",e[e.cursorStyle=21]="cursorStyle",e[e.cursorSurroundingLines=22]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=23]="cursorSurroundingLinesStyle",e[e.cursorWidth=24]="cursorWidth",e[e.disableLayerHinting=25]="disableLayerHinting",e[e.disableMonospaceOptimizations=26]="disableMonospaceOptimizations",e[e.dragAndDrop=27]="dragAndDrop",e[e.emptySelectionClipboard=28]="emptySelectionClipboard",e[e.extraEditorClassName=29]="extraEditorClassName",e[e.fastScrollSensitivity=30]="fastScrollSensitivity",e[e.find=31]="find",e[e.fixedOverflowWidgets=32]="fixedOverflowWidgets",e[e.folding=33]="folding",e[e.foldingStrategy=34]="foldingStrategy",e[e.foldingHighlight=35]="foldingHighlight",e[e.unfoldOnClickAfterEndOfLine=36]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=37]="fontFamily",e[e.fontInfo=38]="fontInfo",e[e.fontLigatures=39]="fontLigatures",e[e.fontSize=40]="fontSize",e[e.fontWeight=41]="fontWeight",e[e.formatOnPaste=42]="formatOnPaste",e[e.formatOnType=43]="formatOnType",e[e.glyphMargin=44]="glyphMargin",e[e.gotoLocation=45]="gotoLocation",e[e.hideCursorInOverviewRuler=46]="hideCursorInOverviewRuler",e[e.highlightActiveIndentGuide=47]="highlightActiveIndentGuide",e[e.hover=48]="hover",e[e.inDiffEditor=49]="inDiffEditor",e[e.letterSpacing=50]="letterSpacing",e[e.lightbulb=51]="lightbulb",e[e.lineDecorationsWidth=52]="lineDecorationsWidth",e[e.lineHeight=53]="lineHeight",e[e.lineNumbers=54]="lineNumbers",e[e.lineNumbersMinChars=55]="lineNumbersMinChars",e[e.linkedEditing=56]="linkedEditing",e[e.links=57]="links",e[e.matchBrackets=58]="matchBrackets",e[e.minimap=59]="minimap",e[e.mouseStyle=60]="mouseStyle",e[e.mouseWheelScrollSensitivity=61]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=62]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=63]="multiCursorMergeOverlapping",e[e.multiCursorModifier=64]="multiCursorModifier",e[e.multiCursorPaste=65]="multiCursorPaste",e[e.occurrencesHighlight=66]="occurrencesHighlight",e[e.overviewRulerBorder=67]="overviewRulerBorder",e[e.overviewRulerLanes=68]="overviewRulerLanes",e[e.padding=69]="padding",e[e.parameterHints=70]="parameterHints",e[e.peekWidgetDefaultFocus=71]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=72]="definitionLinkOpensInPeek",e[e.quickSuggestions=73]="quickSuggestions",e[e.quickSuggestionsDelay=74]="quickSuggestionsDelay",e[e.readOnly=75]="readOnly",e[e.renameOnType=76]="renameOnType",e[e.renderControlCharacters=77]="renderControlCharacters",e[e.renderIndentGuides=78]="renderIndentGuides",e[e.renderFinalNewline=79]="renderFinalNewline",e[e.renderLineHighlight=80]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=81]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=82]="renderValidationDecorations",e[e.renderWhitespace=83]="renderWhitespace",e[e.revealHorizontalRightPadding=84]="revealHorizontalRightPadding",e[e.roundedSelection=85]="roundedSelection",e[e.rulers=86]="rulers",e[e.scrollbar=87]="scrollbar",e[e.scrollBeyondLastColumn=88]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=89]="scrollBeyondLastLine",e[e.scrollPredominantAxis=90]="scrollPredominantAxis",e[e.selectionClipboard=91]="selectionClipboard",e[e.selectionHighlight=92]="selectionHighlight",e[e.selectOnLineNumbers=93]="selectOnLineNumbers",e[e.showFoldingControls=94]="showFoldingControls",e[e.showUnused=95]="showUnused",e[e.snippetSuggestions=96]="snippetSuggestions",e[e.smartSelect=97]="smartSelect",e[e.smoothScrolling=98]="smoothScrolling",e[e.stickyTabStops=99]="stickyTabStops",e[e.stopRenderingLineAfter=100]="stopRenderingLineAfter",e[e.suggest=101]="suggest",e[e.suggestFontSize=102]="suggestFontSize",e[e.suggestLineHeight=103]="suggestLineHeight",e[e.suggestOnTriggerCharacters=104]="suggestOnTriggerCharacters",e[e.suggestSelection=105]="suggestSelection",e[e.tabCompletion=106]="tabCompletion",e[e.tabIndex=107]="tabIndex",e[e.unusualLineTerminators=108]="unusualLineTerminators",e[e.useTabStops=109]="useTabStops",e[e.wordSeparators=110]="wordSeparators",e[e.wordWrap=111]="wordWrap",e[e.wordWrapBreakAfterCharacters=112]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=113]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=114]="wordWrapColumn",e[e.wordWrapOverride1=115]="wordWrapOverride1",e[e.wordWrapOverride2=116]="wordWrapOverride2",e[e.wrappingIndent=117]="wrappingIndent",e[e.wrappingStrategy=118]="wrappingStrategy",e[e.showDeprecated=119]="showDeprecated",e[e.inlineHints=120]="inlineHints",e[e.editorClassName=121]="editorClassName",e[e.pixelRatio=122]="pixelRatio",e[e.tabFocusMode=123]="tabFocusMode",e[e.layoutInfo=124]="layoutInfo",e[e.wrappingInfo=125]="wrappingInfo"})(S=t.EditorOption||(t.EditorOption={}));var v;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(v=t.EndOfLinePreference||(t.EndOfLinePreference={}));var C;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(C=t.EndOfLineSequence||(t.EndOfLineSequence={}));var n;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(n=t.IndentAction||(t.IndentAction={}));var r;(function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(r=t.InlineHintKind||(t.InlineHintKind={}));var m;(function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"})(m=t.KeyCode||(t.KeyCode={}));var _;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(_=t.MarkerSeverity||(t.MarkerSeverity={}));var o;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(o=t.MarkerTag||(t.MarkerTag={}));var i;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(i=t.MinimapPosition||(t.MinimapPosition={}));var f;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(f=t.MouseTargetType||(t.MouseTargetType={}));var b;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(b=t.OverlayWidgetPositionPreference||(t.OverlayWidgetPositionPreference={}));var N;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(N=t.OverviewRulerLane||(t.OverviewRulerLane={}));var c;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(c=t.RenderLineNumbersType||(t.RenderLineNumbersType={}));var g;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(g=t.RenderMinimap||(t.RenderMinimap={}));var L;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(L=t.ScrollType||(t.ScrollType={}));var A;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(A=t.ScrollbarVisibility||(t.ScrollbarVisibility={}));var M;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(M=t.SelectionDirection||(t.SelectionDirection={}));var R;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(R=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={}));var D;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(D=t.SymbolKind||(t.SymbolKind={}));var T;(function(e){e[e.Deprecated=1]="Deprecated"})(T=t.SymbolTag||(t.SymbolTag={}));var $;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})($=t.TextEditorCursorBlinkingStyle||(t.TextEditorCursorBlinkingStyle={}));var k;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(k=t.TextEditorCursorStyle||(t.TextEditorCursorStyle={}));var F;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(F=t.TrackedRangeStickiness||(t.TrackedRangeStickiness={}));var O;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(O=t.WrappingIndent||(t.WrappingIndent={}))}),V(z[31],G([0,1,21,9,17,13,3,6,24,25,30]),function(I,t,p,P,E,u,d,l,s,h,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMonacoBaseAPI=t.KeyMod=void 0;class a{static chord(C,n){return E.KeyChord(C,n)}}t.KeyMod=a,a.CtrlCmd=2048,a.Shift=1024,a.Alt=512,a.WinCtrl=256;function S(){return{editor:void 0,languages:void 0,CancellationTokenSource:p.CancellationTokenSource,Emitter:P.Emitter,KeyCode:w.KeyCode,KeyMod:a,Position:d.Position,Range:l.Range,Selection:s.Selection,SelectionDirection:w.SelectionDirection,MarkerSeverity:w.MarkerSeverity,MarkerTag:w.MarkerTag,Uri:u.URI,Token:h.Token}}t.createMonacoBaseAPI=S}),V(z[32],G([0,1,12]),function(I,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixSumComputer=t.PrefixSumIndexOfResult=void 0;class P{constructor(d,l){this.index=d,this.remainder=l}}t.PrefixSumIndexOfResult=P;class E{constructor(d){this.values=d,this.prefixSum=new Uint32Array(d.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(d,l){d=p.toUint32(d);const s=this.values,h=this.prefixSum,w=l.length;return w===0?!1:(this.values=new Uint32Array(s.length+w),this.values.set(s.subarray(0,d),0),this.values.set(s.subarray(d),d+w),this.values.set(l,d),d-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=d-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(h.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(d,l){return d=p.toUint32(d),l=p.toUint32(l),this.values[d]===l?!1:(this.values[d]=l,d-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=d-1),!0)}removeValues(d,l){d=p.toUint32(d),l=p.toUint32(l);const s=this.values,h=this.prefixSum;if(d>=s.length)return!1;let w=s.length-d;return l>=w&&(l=w),l===0?!1:(this.values=new Uint32Array(s.length-l),this.values.set(s.subarray(0,d),0),this.values.set(s.subarray(d+l),d),this.prefixSum=new Uint32Array(this.values.length),d-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=d-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(h.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return this.values.length===0?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(d){return d<0?0:(d=p.toUint32(d),this._getAccumulatedValue(d))}_getAccumulatedValue(d){if(d<=this.prefixSumValidIndex[0])return this.prefixSum[d];let l=this.prefixSumValidIndex[0]+1;l===0&&(this.prefixSum[0]=this.values[0],l++),d>=this.values.length&&(d=this.values.length-1);for(let s=l;s<=d;s++)this.prefixSum[s]=this.prefixSum[s-1]+this.values[s];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],d),this.prefixSum[d]}getIndexOf(d){d=Math.floor(d),this.getTotalValue();let l=0,s=this.values.length-1,h=0,w=0,a=0;for(;l<=s;)if(h=l+(s-l)/2|0,w=this.prefixSum[h],a=w-this.values[h],d<a)s=h-1;else if(d>=w)l=h+1;else break;return new P(h,d-a)}}t.PrefixSumComputer=E}),V(z[33],G([0,1,5,3,32]),function(I,t,p,P,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MirrorTextModel=void 0;class u{constructor(l,s,h,w){this._uri=l,this._lines=s,this._eol=h,this._versionId=w,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(l){l.eol&&l.eol!==this._eol&&(this._eol=l.eol,this._lineStarts=null);const s=l.changes;for(const h of s)this._acceptDeleteRange(h.range),this._acceptInsertText(new P.Position(h.range.startLineNumber,h.range.startColumn),h.text);this._versionId=l.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const l=this._eol.length,s=this._lines.length,h=new Uint32Array(s);for(let w=0;w<s;w++)h[w]=this._lines[w].length+l;this._lineStarts=new E.PrefixSumComputer(h)}}_setLineText(l,s){this._lines[l]=s,this._lineStarts&&this._lineStarts.changeValue(l,this._lines[l].length+this._eol.length)}_acceptDeleteRange(l){if(l.startLineNumber===l.endLineNumber){if(l.startColumn===l.endColumn)return;this._setLineText(l.startLineNumber-1,this._lines[l.startLineNumber-1].substring(0,l.startColumn-1)+this._lines[l.startLineNumber-1].substring(l.endColumn-1));return}this._setLineText(l.startLineNumber-1,this._lines[l.startLineNumber-1].substring(0,l.startColumn-1)+this._lines[l.endLineNumber-1].substring(l.endColumn-1)),this._lines.splice(l.startLineNumber,l.endLineNumber-l.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(l.startLineNumber,l.endLineNumber-l.startLineNumber)}_acceptInsertText(l,s){if(s.length!==0){let h=p.splitLines(s);if(h.length===1){this._setLineText(l.lineNumber-1,this._lines[l.lineNumber-1].substring(0,l.column-1)+h[0]+this._lines[l.lineNumber-1].substring(l.column-1));return}h[h.length-1]+=this._lines[l.lineNumber-1].substring(l.column-1),this._setLineText(l.lineNumber-1,this._lines[l.lineNumber-1].substring(0,l.column-1)+h[0]);let w=new Uint32Array(h.length-1);for(let a=1;a<h.length;a++)this._lines.splice(l.lineNumber+a-1,0,h[a]),w[a-1]=h[a].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(l.lineNumber,w)}}}t.MirrorTextModel=u});var ne=this&&this.__awaiter||function(I,t,p,P){function E(u){return u instanceof p?u:new p(function(d){d(u)})}return new(p||(p=Promise))(function(u,d){function l(w){try{h(P.next(w))}catch(a){d(a)}}function s(w){try{h(P.throw(w))}catch(a){d(a)}}function h(w){w.done?u(w.value):E(w.value).then(l,s)}h((P=P.apply(I,t||[])).next())})};V(z[35],G([0,1,14,10,2,13,3,6,26,33,27,28,29,31,11,8]),function(I,t,p,P,E,u,d,l,s,h,w,a,S,v,C,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=t.EditorSimpleWorker=void 0;class r extends h.MirrorTextModel{get uri(){return this._uri}get version(){return this._versionId}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(i){return this._lines[i-1]}getWordAtPosition(i,f){let b=w.getWordAtText(i.column,w.ensureValidWordDefinition(f),this._lines[i.lineNumber-1],0);return b?new l.Range(i.lineNumber,b.startColumn,i.lineNumber,b.endColumn):null}words(i){const f=this._lines,b=this._wordenize.bind(this);let N=0,c="",g=0,L=[];return{*[Symbol.iterator](){for(;;)if(g<L.length){const A=c.substring(L[g].start,L[g].end);g+=1,yield A}else if(N<f.length)c=f[N],L=b(c,i),g=0,N+=1;else break}}}getLineWords(i,f){let b=this._lines[i-1],N=this._wordenize(b,f),c=[];for(const g of N)c.push({word:b.substring(g.start,g.end),startColumn:g.start+1,endColumn:g.end+1});return c}_wordenize(i,f){const b=[];let N;for(f.lastIndex=0;(N=f.exec(i))&&N[0].length!==0;)b.push({start:N.index,end:N.index+N[0].length});return b}getValueInRange(i){if(i=this._validateRange(i),i.startLineNumber===i.endLineNumber)return this._lines[i.startLineNumber-1].substring(i.startColumn-1,i.endColumn-1);let f=this._eol,b=i.startLineNumber-1,N=i.endLineNumber-1,c=[];c.push(this._lines[b].substring(i.startColumn-1));for(let g=b+1;g<N;g++)c.push(this._lines[g]);return c.push(this._lines[N].substring(0,i.endColumn-1)),c.join(f)}offsetAt(i){return i=this._validatePosition(i),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(i.lineNumber-2)+(i.column-1)}positionAt(i){i=Math.floor(i),i=Math.max(0,i),this._ensureLineStarts();let f=this._lineStarts.getIndexOf(i),b=this._lines[f.index].length;return{lineNumber:1+f.index,column:1+Math.min(f.remainder,b)}}_validateRange(i){const f=this._validatePosition({lineNumber:i.startLineNumber,column:i.startColumn}),b=this._validatePosition({lineNumber:i.endLineNumber,column:i.endColumn});return f.lineNumber!==i.startLineNumber||f.column!==i.startColumn||b.lineNumber!==i.endLineNumber||b.column!==i.endColumn?{startLineNumber:f.lineNumber,startColumn:f.column,endLineNumber:b.lineNumber,endColumn:b.column}:i}_validatePosition(i){if(!d.Position.isIPosition(i))throw new Error("bad position");let{lineNumber:f,column:b}=i,N=!1;if(f<1)f=1,b=1,N=!0;else if(f>this._lines.length)f=this._lines.length,b=this._lines[f-1].length+1,N=!0;else{let c=this._lines[f-1].length+1;b<1?(b=1,N=!0):b>c&&(b=c,N=!0)}return N?{lineNumber:f,column:b}:i}}class m{constructor(i,f){this._host=i,this._models=Object.create(null),this._foreignModuleFactory=f,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(i){return this._models[i]}_getModels(){let i=[];return Object.keys(this._models).forEach(f=>i.push(this._models[f])),i}acceptNewModel(i){this._models[i.url]=new r(u.URI.parse(i.url),i.lines,i.EOL,i.versionId)}acceptModelChanged(i,f){!this._models[i]||this._models[i].onEvents(f)}acceptRemovedModel(i){!this._models[i]||delete this._models[i]}computeDiff(i,f,b,N){return ne(this,void 0,void 0,function*(){const c=this._getModel(i),g=this._getModel(f);if(!c||!g)return null;const L=c.getLinesContent(),A=g.getLinesContent(),R=new s.DiffComputer(L,A,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:b,shouldMakePrettyDiff:!0,maxComputationTime:N}).computeDiff(),D=R.changes.length>0?!1:this._modelsAreIdentical(c,g);return{quitEarly:R.quitEarly,identical:D,changes:R.changes}})}_modelsAreIdentical(i,f){const b=i.getLineCount(),N=f.getLineCount();if(b!==N)return!1;for(let c=1;c<=b;c++){const g=i.getLineContent(c),L=f.getLineContent(c);if(g!==L)return!1}return!0}computeMoreMinimalEdits(i,f){return ne(this,void 0,void 0,function*(){const b=this._getModel(i);if(!b)return f;const N=[];let c;f=p.mergeSort(f,(g,L)=>{if(g.range&&L.range)return l.Range.compareRangesUsingStarts(g.range,L.range);let A=g.range?0:1,M=L.range?0:1;return A-M});for(let{range:g,text:L,eol:A}of f)if(typeof A=="number"&&(c=A),!(l.Range.isEmpty(g)&&!L)){const M=b.getValueInRange(g);if(L=L.replace(/\r\n|\n|\r/g,b.eol),M!==L){if(Math.max(L.length,M.length)>m._diffLimit){N.push({range:g,text:L});continue}const R=P.stringDiff(M,L,!1),D=b.offsetAt(l.Range.lift(g).getStartPosition());for(const T of R){const $=b.positionAt(D+T.originalStart),k=b.positionAt(D+T.originalStart+T.originalLength),F={text:L.substr(T.modifiedStart,T.modifiedLength),range:{startLineNumber:$.lineNumber,startColumn:$.column,endLineNumber:k.lineNumber,endColumn:k.column}};b.getValueInRange(F.range)!==F.text&&N.push(F)}}}return typeof c=="number"&&N.push({eol:c,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),N})}computeLinks(i){return ne(this,void 0,void 0,function*(){let f=this._getModel(i);return f?a.computeLinks(f):null})}textualSuggest(i,f,b,N){return ne(this,void 0,void 0,function*(){const c=new n.StopWatch(!0),g=new RegExp(b,N),L=new Set;e:for(let A of i){const M=this._getModel(A);if(!!M){for(let R of M.words(g))if(!(R===f||!isNaN(Number(R)))&&(L.add(R),L.size>m._suggestionsLimit))break e}}return{words:Array.from(L),duration:c.elapsed()}})}computeWordRanges(i,f,b,N){return ne(this,void 0,void 0,function*(){let c=this._getModel(i);if(!c)return Object.create(null);const g=new RegExp(b,N),L=Object.create(null);for(let A=f.startLineNumber;A<f.endLineNumber;A++){let M=c.getLineWords(A,g);for(const R of M)if(!!isNaN(Number(R.word))){let D=L[R.word];D||(D=[],L[R.word]=D),D.push({startLineNumber:A,startColumn:R.startColumn,endLineNumber:A,endColumn:R.endColumn})}}return L})}navigateValueSet(i,f,b,N,c){return ne(this,void 0,void 0,function*(){let g=this._getModel(i);if(!g)return null;let L=new RegExp(N,c);f.startColumn===f.endColumn&&(f={startLineNumber:f.startLineNumber,startColumn:f.startColumn,endLineNumber:f.endLineNumber,endColumn:f.endColumn+1});let A=g.getValueInRange(f),M=g.getWordAtPosition({lineNumber:f.startLineNumber,column:f.startColumn},L);if(!M)return null;let R=g.getValueInRange(M);return S.BasicInplaceReplace.INSTANCE.navigateValueSet(f,A,M,R,b)})}loadForeignModule(i,f,b){const N=(L,A)=>this._host.fhr(L,A);let g={host:C.createProxyObject(b,N),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(g,f),Promise.resolve(C.getAllMethodNames(this._foreignModule))):new Promise((L,A)=>{I([i],M=>{this._foreignModule=M.create(g,f),L(C.getAllMethodNames(this._foreignModule))},A)})}fmr(i,f){if(!this._foreignModule||typeof this._foreignModule[i]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+i));try{return Promise.resolve(this._foreignModule[i].apply(this._foreignModule,f))}catch(b){return Promise.reject(b)}}}t.EditorSimpleWorker=m,m._diffLimit=1e5,m._suggestionsLimit=1e4;function _(o){return new m(o,null)}t.create=_,typeof importScripts=="function"&&(E.globals.monaco=v.createMonacoBaseAPI())});"use strict";(function(){var I,t;const p=self.MonacoEnvironment,P=p&&p.baseUrl?p.baseUrl:"../../../",E=typeof((I=self.trustedTypes)===null||I===void 0?void 0:I.createPolicy)=="function"?(t=self.trustedTypes)===null||t===void 0?void 0:t.createPolicy("amdLoader",{createScriptURL:s=>s}):void 0;if(typeof self.define!="function"||!self.define.amd){let s=P+"vs/loader.js";E&&(s=E.createScriptURL(s)),importScripts(s)}require.config({baseUrl:P,catchError:!0,trustedTypesPolicy:E});let u=function(s){require([s],function(h){setTimeout(function(){let w=h.create((a,S)=>{self.postMessage(a,S)},null);for(self.onmessage=a=>w.onmessage(a.data);l.length>0;)self.onmessage(l.shift())},0)})},d=!0,l=[];self.onmessage=s=>{if(!d){l.push(s);return}d=!1,u(s.data)}})()}).call(this); |
yudao-server/src/main/resources/admin-ui/libs/monaco-editor/vs/base/worker/workerMain.js.gz deleted
No preview for this file type