oak-pay-business 2.6.3-alpha → 2.8.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (750) hide show
  1. package/es/aspects/AspectDict.d.ts +10 -1
  2. package/es/aspects/index.js +3 -0
  3. package/es/aspects/ship.d.ts +18 -0
  4. package/es/aspects/ship.js +41 -0
  5. package/es/aspects/withdraw.js +2 -2
  6. package/es/checkers/accountOper.js +23 -6
  7. package/es/checkers/index.js +2 -0
  8. package/es/checkers/offlineAccount.js +4 -4
  9. package/es/checkers/order.js +69 -15
  10. package/es/checkers/pay.js +19 -36
  11. package/es/checkers/ship.d.ts +5 -0
  12. package/es/checkers/ship.js +100 -0
  13. package/es/checkers/wpProduct.js +4 -4
  14. package/es/components/AbstractComponents.d.ts +62 -11
  15. package/es/components/AbstractComponents.js +0 -4
  16. package/es/components/account/detail/index.d.ts +1 -0
  17. package/es/components/account/detail/index.js +127 -2
  18. package/es/components/account/detail/index.json +1 -0
  19. package/es/components/account/detail/index.xml +4 -0
  20. package/es/components/account/detail/locales/zh-CN.json +9 -1
  21. package/es/components/accountOper/pure/List.pc.d.ts +1 -0
  22. package/es/components/offlineAccount/upsert/index.d.ts +1 -0
  23. package/es/components/offlineAccount/upsert/web.pc.js +3 -3
  24. package/es/components/order/list/index.d.ts +1 -0
  25. package/es/components/order/pay/index.d.ts +3 -1
  26. package/es/components/order/pay/index.js +8 -3
  27. package/es/components/order/pay/index.less +1 -1
  28. package/es/components/order/pay/index.xml +1 -1
  29. package/es/components/order/pay/info.d.ts +1 -0
  30. package/es/components/order/pay/web.d.ts +1 -2
  31. package/es/components/order/pay/web.js +6 -6
  32. package/es/components/order/pay/web.mobile.module.less +1 -1
  33. package/es/components/order/pay/web.pc.d.ts +1 -2
  34. package/es/components/order/pay/web.pc.js +7 -7
  35. package/es/components/order/pay/web.pc.module.less +2 -2
  36. package/es/components/pay/channelPicker2/web.d.ts +1 -0
  37. package/es/components/pay/channelPicker2/web.pc.d.ts +1 -0
  38. package/es/components/pay/channelPicker2/web.pc.js +3 -1
  39. package/es/components/pay/detail/index.d.ts +5 -1
  40. package/es/components/pay/detail/index.js +200 -35
  41. package/es/components/pay/detail/index.xml +17 -15
  42. package/es/components/pay/detail/locales/zh-CN.json +18 -2
  43. package/es/components/pay/detail/web.d.ts +6 -0
  44. package/es/components/pay/detail/web.js +64 -41
  45. package/es/components/pay/detail/web.mobile.module.less +2 -1
  46. package/es/components/pay/detail/web.pc.d.ts +7 -1
  47. package/es/components/pay/detail/web.pc.js +91 -55
  48. package/es/components/pay/detail/web.pc.module.less +4 -1
  49. package/es/components/pay/list/index.d.ts +1 -0
  50. package/es/components/pay/list/web.pc.js +1 -1
  51. package/es/components/payConfig/system/index.d.ts +1 -0
  52. package/es/components/payConfig/system/web.pc.js +1 -4
  53. package/es/components/refund/list/index.d.ts +1 -0
  54. package/es/components/ship/system/index.d.ts +3 -0
  55. package/es/components/ship/system/index.js +15 -0
  56. package/es/components/ship/system/index.json +1 -0
  57. package/es/components/ship/system/locales/zh-CN.json +8 -0
  58. package/es/components/ship/system/web.pc.d.ts +10 -0
  59. package/es/components/ship/system/web.pc.js +79 -0
  60. package/es/components/ship/system/web.pc.module.less +16 -0
  61. package/es/components/ship/wechatMpShip/index.d.ts +4 -0
  62. package/es/components/ship/wechatMpShip/index.js +47 -0
  63. package/es/components/ship/wechatMpShip/index.json +1 -0
  64. package/es/components/ship/wechatMpShip/locales/zh-CN.json +10 -0
  65. package/es/components/ship/wechatMpShip/upsert/index.d.ts +4 -0
  66. package/es/components/ship/wechatMpShip/upsert/index.js +52 -0
  67. package/es/components/ship/wechatMpShip/upsert/index.json +1 -0
  68. package/es/components/ship/wechatMpShip/upsert/locales/zh-CN.json +6 -0
  69. package/es/components/ship/wechatMpShip/upsert/web.pc.d.ts +11 -0
  70. package/es/components/ship/wechatMpShip/upsert/web.pc.js +27 -0
  71. package/es/components/ship/wechatMpShip/web.pc.d.ts +7 -0
  72. package/es/components/ship/wechatMpShip/web.pc.js +73 -0
  73. package/es/components/{payConfig/upsert → ship/wechatMpShip}/web.pc.module.less +2 -5
  74. package/es/components/shipServiceSystem/list/index.d.ts +5 -0
  75. package/es/components/shipServiceSystem/list/index.js +123 -0
  76. package/es/components/shipServiceSystem/list/index.json +1 -0
  77. package/es/components/shipServiceSystem/list/locales/zh-CN.json +6 -0
  78. package/es/components/shipServiceSystem/list/web.pc.d.ts +13 -0
  79. package/es/components/shipServiceSystem/list/web.pc.js +131 -0
  80. package/es/components/shipServiceSystem/list/web.pc.module.less +6 -0
  81. package/es/components/sysAccount/survey/index.d.ts +0 -1
  82. package/es/components/sysAccount/survey/index.js +161 -144
  83. package/es/components/sysAccount/survey/locales/zh-CN.json +1 -1
  84. package/es/components/sysAccount/survey/web.pc.d.ts +13 -0
  85. package/es/components/sysAccount/survey/web.pc.js +21 -8
  86. package/es/components/sysAccount/transferList/index.d.ts +1 -0
  87. package/es/components/wechatPay/upsert/index.d.ts +2 -1
  88. package/es/components/withdraw/create/index.d.ts +1 -9
  89. package/es/components/withdraw/create/index.js +1 -0
  90. package/es/components/withdraw/create/web.d.ts +1 -1
  91. package/es/components/withdraw/create/web.pc.d.ts +1 -1
  92. package/es/components/withdraw/detail/index.d.ts +1 -0
  93. package/es/components/withdraw/display/index.d.ts +1 -5
  94. package/es/components/withdraw/display/web.d.ts +1 -0
  95. package/es/components/withdraw/display/web.pc.d.ts +1 -0
  96. package/es/components/withdrawTransfer/list/index.d.ts +1 -0
  97. package/es/components/wpAccount/config/index.js +1 -0
  98. package/es/components/wpAccount/config/web.pc.js +3 -2
  99. package/es/components/wpAccount/upsert/index.js +2 -0
  100. package/es/components/wpProduct/config/index.js +2 -0
  101. package/es/components/wpProduct/config/web.pc.js +1 -1
  102. package/es/components/wpProduct/upsert/index.js +5 -0
  103. package/es/components/wpProduct/upsert/locales/zh-CN.json +13 -1
  104. package/es/components/wpProduct/upsert/web.pc.js +26 -2
  105. package/es/config/constants.d.ts +2 -0
  106. package/es/config/constants.js +2 -0
  107. package/es/configuration/attrUpdateMatrix.js +12 -17
  108. package/es/configuration/relation.js +2 -0
  109. package/es/context/BackendRuntimeContext.d.ts +1 -1
  110. package/es/data/actionAuth.js +11 -0
  111. package/es/data/i18n.js +90 -82
  112. package/es/data/index.js +4 -0
  113. package/es/data/path.js +15 -1
  114. package/es/data/shipCompany.d.ts +7 -0
  115. package/es/data/shipCompany.js +3 -0
  116. package/es/data/shipCompany.json +9056 -0
  117. package/es/data/shipService.d.ts +3 -0
  118. package/es/data/shipService.js +89 -0
  119. package/es/endpoints/wechatPay.d.ts +5 -0
  120. package/es/endpoints/wechatPay.js +19 -0
  121. package/es/entities/AbstactPayProduct.d.ts +13 -0
  122. package/es/entities/AbstactPayProduct.js +16 -0
  123. package/es/entities/AbstractAccount.d.ts +2 -1
  124. package/es/entities/AbstractAccount.js +2 -1
  125. package/es/entities/AbstractPayAccount.d.ts +16 -0
  126. package/es/entities/AbstractPayAccount.js +34 -0
  127. package/es/entities/AbstractShipAccount.d.ts +14 -0
  128. package/es/entities/AbstractShipAccount.js +16 -0
  129. package/es/entities/AccountOper.d.ts +1 -1
  130. package/es/entities/AccountOper.js +4 -2
  131. package/es/entities/Deposit.d.ts +2 -0
  132. package/es/entities/Deposit.js +2 -1
  133. package/es/entities/OfflineAccount.d.ts +3 -6
  134. package/es/entities/OfflineAccount.js +4 -3
  135. package/es/entities/Order.d.ts +3 -0
  136. package/es/entities/Order.js +4 -1
  137. package/es/entities/Pay.d.ts +4 -2
  138. package/es/entities/Pay.js +2 -0
  139. package/es/entities/Settlement.d.ts +18 -0
  140. package/es/entities/Settlement.js +44 -0
  141. package/es/entities/Ship.d.ts +35 -0
  142. package/es/entities/Ship.js +109 -0
  143. package/es/entities/ShipCompany.d.ts +9 -0
  144. package/es/entities/ShipCompany.js +27 -0
  145. package/es/entities/ShipCompanySystem.d.ts +9 -0
  146. package/es/entities/ShipCompanySystem.js +12 -0
  147. package/es/entities/ShipOrder.d.ts +9 -0
  148. package/es/entities/ShipOrder.js +12 -0
  149. package/es/entities/ShipService.d.ts +9 -0
  150. package/es/entities/ShipService.js +12 -0
  151. package/es/entities/ShipServiceSystem.d.ts +9 -0
  152. package/es/entities/ShipServiceSystem.js +12 -0
  153. package/es/entities/System.js +1 -0
  154. package/es/entities/WechatMpShip.d.ts +7 -0
  155. package/es/entities/WechatMpShip.js +17 -0
  156. package/es/entities/WpAccount.d.ts +3 -6
  157. package/es/entities/WpAccount.js +4 -3
  158. package/es/entities/WpProduct.d.ts +2 -8
  159. package/es/entities/WpProduct.js +6 -4
  160. package/es/features/Pay.d.ts +0 -2
  161. package/es/features/Pay.js +0 -3
  162. package/es/locales/error/zh-CN.json +7 -0
  163. package/es/oak-app-domain/AbstactPayProduct/Schema.d.ts +19 -0
  164. package/es/oak-app-domain/AbstactPayProduct/Schema.js +1 -0
  165. package/es/oak-app-domain/AbstactPayProduct/Storage.d.ts +3 -0
  166. package/es/oak-app-domain/AbstactPayProduct/Storage.js +40 -0
  167. package/es/oak-app-domain/AbstactPayProduct/_baseSchema.d.ts +57 -0
  168. package/es/oak-app-domain/AbstactPayProduct/locales/zh_CN.json +11 -0
  169. package/es/oak-app-domain/AbstractAccount/Storage.js +4 -0
  170. package/es/oak-app-domain/AbstractAccount/_baseSchema.d.ts +5 -1
  171. package/es/oak-app-domain/AbstractAccount/locales/zh_CN.json +2 -1
  172. package/es/oak-app-domain/AbstractPayAccount/Action.d.ts +5 -0
  173. package/es/oak-app-domain/AbstractPayAccount/Action.js +2 -0
  174. package/es/oak-app-domain/AbstractPayAccount/Schema.d.ts +19 -0
  175. package/es/oak-app-domain/AbstractPayAccount/Schema.js +1 -0
  176. package/es/oak-app-domain/AbstractPayAccount/Storage.d.ts +3 -0
  177. package/es/oak-app-domain/AbstractPayAccount/Storage.js +51 -0
  178. package/es/oak-app-domain/AbstractPayAccount/Style.d.ts +3 -0
  179. package/es/oak-app-domain/AbstractPayAccount/Style.js +9 -0
  180. package/es/oak-app-domain/AbstractPayAccount/_baseSchema.d.ts +65 -0
  181. package/es/oak-app-domain/AbstractPayAccount/_baseSchema.js +1 -0
  182. package/es/oak-app-domain/AbstractPayAccount/locales/zh_CN.json +20 -0
  183. package/es/oak-app-domain/AbstractShipAccount/Schema.d.ts +19 -0
  184. package/es/oak-app-domain/AbstractShipAccount/Schema.js +1 -0
  185. package/es/oak-app-domain/AbstractShipAccount/Storage.d.ts +3 -0
  186. package/es/oak-app-domain/AbstractShipAccount/Storage.js +37 -0
  187. package/es/oak-app-domain/AbstractShipAccount/_baseSchema.d.ts +53 -0
  188. package/es/oak-app-domain/AbstractShipAccount/_baseSchema.js +1 -0
  189. package/es/oak-app-domain/AbstractShipAccount/locales/zh_CN.json +11 -0
  190. package/es/oak-app-domain/Account/_baseSchema.d.ts +1 -0
  191. package/es/oak-app-domain/AccountOper/Storage.js +1 -1
  192. package/es/oak-app-domain/AccountOper/Style.js +2 -1
  193. package/es/oak-app-domain/AccountOper/_baseSchema.d.ts +2 -1
  194. package/es/oak-app-domain/AccountOper/locales/zh_CN.json +3 -2
  195. package/es/oak-app-domain/ActionAuth/_baseSchema.d.ts +2 -0
  196. package/es/oak-app-domain/ActionDefDict.d.ts +7 -1
  197. package/es/oak-app-domain/ActionDefDict.js +6 -2
  198. package/es/oak-app-domain/Address/_baseSchema.d.ts +1 -0
  199. package/es/oak-app-domain/Application/Storage.js +15 -0
  200. package/es/oak-app-domain/Application/_baseSchema.d.ts +16 -0
  201. package/es/oak-app-domain/Application/locales/zh_CN.json +4 -1
  202. package/es/oak-app-domain/ApplicationPassport/_baseSchema.d.ts +2 -0
  203. package/es/oak-app-domain/Area/_baseSchema.d.ts +1 -0
  204. package/es/oak-app-domain/Article/_baseSchema.d.ts +1 -0
  205. package/es/oak-app-domain/ArticleMenu/_baseSchema.d.ts +1 -0
  206. package/es/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts +1 -0
  207. package/es/oak-app-domain/Deposit/Storage.js +4 -0
  208. package/es/oak-app-domain/Deposit/_baseSchema.d.ts +6 -0
  209. package/es/oak-app-domain/Deposit/locales/zh_CN.json +2 -1
  210. package/es/oak-app-domain/Domain/_baseSchema.d.ts +1 -0
  211. package/es/oak-app-domain/Email/_baseSchema.d.ts +1 -0
  212. package/es/oak-app-domain/EntityDict.d.ts +659 -34
  213. package/es/oak-app-domain/ExtraFile/_baseSchema.d.ts +1 -0
  214. package/es/oak-app-domain/LoginName/_baseSchema.d.ts +1 -0
  215. package/es/oak-app-domain/Message/_baseSchema.d.ts +2 -0
  216. package/es/oak-app-domain/MessageSystem/_baseSchema.d.ts +2 -0
  217. package/es/oak-app-domain/MessageTypeSmsTemplate/_baseSchema.d.ts +1 -0
  218. package/es/oak-app-domain/MessageTypeTemplate/_baseSchema.d.ts +1 -0
  219. package/es/oak-app-domain/Mobile/_baseSchema.d.ts +1 -0
  220. package/es/oak-app-domain/ModiEntity/_baseSchema.d.ts +1 -0
  221. package/es/oak-app-domain/Notification/_baseSchema.d.ts +2 -0
  222. package/es/oak-app-domain/OfflineAccount/Storage.js +12 -10
  223. package/es/oak-app-domain/OfflineAccount/_baseSchema.d.ts +14 -9
  224. package/es/oak-app-domain/OfflineAccount/locales/zh_CN.json +5 -4
  225. package/es/oak-app-domain/Oper/_baseSchema.d.ts +2 -0
  226. package/es/oak-app-domain/OperEntity/_baseSchema.d.ts +1 -0
  227. package/es/oak-app-domain/Order/Storage.js +7 -0
  228. package/es/oak-app-domain/Order/Style.js +1 -0
  229. package/es/oak-app-domain/Order/_baseSchema.d.ts +10 -0
  230. package/es/oak-app-domain/Order/locales/zh_CN.json +3 -1
  231. package/es/oak-app-domain/Parasite/_baseSchema.d.ts +1 -0
  232. package/es/oak-app-domain/Passport/_baseSchema.d.ts +1 -0
  233. package/es/oak-app-domain/Pay/Storage.js +6 -0
  234. package/es/oak-app-domain/Pay/_baseSchema.d.ts +11 -0
  235. package/es/oak-app-domain/Pay/locales/zh_CN.json +3 -1
  236. package/es/oak-app-domain/Platform/Storage.js +6 -0
  237. package/es/oak-app-domain/Platform/_baseSchema.d.ts +4 -0
  238. package/es/oak-app-domain/Platform/locales/zh_CN.json +2 -1
  239. package/es/oak-app-domain/ReadRemark/_baseSchema.d.ts +2 -0
  240. package/es/oak-app-domain/Refund/_baseSchema.d.ts +3 -0
  241. package/es/oak-app-domain/RelationAuth/_baseSchema.d.ts +3 -0
  242. package/es/oak-app-domain/Session/_baseSchema.d.ts +1 -0
  243. package/es/oak-app-domain/SessionMessage/_baseSchema.d.ts +4 -0
  244. package/es/oak-app-domain/Settlement/Action.d.ts +11 -0
  245. package/es/oak-app-domain/Settlement/Action.js +10 -0
  246. package/es/oak-app-domain/Settlement/Schema.d.ts +19 -0
  247. package/es/oak-app-domain/Settlement/Schema.js +1 -0
  248. package/es/oak-app-domain/Settlement/Storage.d.ts +3 -0
  249. package/es/oak-app-domain/Settlement/Storage.js +25 -0
  250. package/es/oak-app-domain/Settlement/Style.d.ts +3 -0
  251. package/es/oak-app-domain/Settlement/Style.js +13 -0
  252. package/es/oak-app-domain/Settlement/_baseSchema.d.ts +49 -0
  253. package/es/oak-app-domain/Settlement/_baseSchema.js +1 -0
  254. package/es/oak-app-domain/Settlement/locales/zh_CN.json +20 -0
  255. package/es/oak-app-domain/Ship/Action.d.ts +12 -0
  256. package/es/oak-app-domain/Ship/Action.js +16 -0
  257. package/es/oak-app-domain/Ship/Schema.d.ts +19 -0
  258. package/es/oak-app-domain/Ship/Schema.js +1 -0
  259. package/es/oak-app-domain/Ship/Storage.d.ts +3 -0
  260. package/es/oak-app-domain/Ship/Storage.js +100 -0
  261. package/es/oak-app-domain/Ship/Style.d.ts +3 -0
  262. package/es/oak-app-domain/Ship/Style.js +25 -0
  263. package/es/oak-app-domain/Ship/_baseSchema.d.ts +97 -0
  264. package/es/oak-app-domain/Ship/_baseSchema.js +1 -0
  265. package/es/oak-app-domain/Ship/locales/zh_CN.json +49 -0
  266. package/es/oak-app-domain/ShipCompany/Schema.d.ts +19 -0
  267. package/es/oak-app-domain/ShipCompany/Schema.js +1 -0
  268. package/es/oak-app-domain/ShipCompany/Storage.d.ts +3 -0
  269. package/es/oak-app-domain/ShipCompany/Storage.js +41 -0
  270. package/es/oak-app-domain/ShipCompany/_baseSchema.d.ts +44 -0
  271. package/es/oak-app-domain/ShipCompany/_baseSchema.js +1 -0
  272. package/es/oak-app-domain/ShipCompany/locales/zh_CN.json +8 -0
  273. package/es/oak-app-domain/ShipCompanySystem/Schema.d.ts +19 -0
  274. package/es/oak-app-domain/ShipCompanySystem/Schema.js +1 -0
  275. package/es/oak-app-domain/ShipCompanySystem/Storage.d.ts +3 -0
  276. package/es/oak-app-domain/ShipCompanySystem/Storage.js +17 -0
  277. package/es/oak-app-domain/ShipCompanySystem/_baseSchema.d.ts +38 -0
  278. package/es/oak-app-domain/ShipCompanySystem/_baseSchema.js +1 -0
  279. package/es/oak-app-domain/ShipCompanySystem/locales/zh_CN.json +7 -0
  280. package/es/oak-app-domain/ShipOrder/Schema.d.ts +19 -0
  281. package/es/oak-app-domain/ShipOrder/Schema.js +1 -0
  282. package/es/oak-app-domain/ShipOrder/Storage.d.ts +3 -0
  283. package/es/oak-app-domain/ShipOrder/Storage.js +17 -0
  284. package/es/oak-app-domain/ShipOrder/_baseSchema.d.ts +40 -0
  285. package/es/oak-app-domain/ShipOrder/_baseSchema.js +1 -0
  286. package/es/oak-app-domain/ShipOrder/locales/zh_CN.json +7 -0
  287. package/es/oak-app-domain/ShipService/Schema.d.ts +19 -0
  288. package/es/oak-app-domain/ShipService/Schema.js +1 -0
  289. package/es/oak-app-domain/ShipService/Storage.d.ts +3 -0
  290. package/es/oak-app-domain/ShipService/Storage.js +19 -0
  291. package/es/oak-app-domain/ShipService/_baseSchema.d.ts +41 -0
  292. package/es/oak-app-domain/ShipService/_baseSchema.js +1 -0
  293. package/es/oak-app-domain/ShipService/locales/zh_CN.json +7 -0
  294. package/es/oak-app-domain/ShipServiceSystem/Schema.d.ts +19 -0
  295. package/es/oak-app-domain/ShipServiceSystem/Schema.js +1 -0
  296. package/es/oak-app-domain/ShipServiceSystem/Storage.d.ts +3 -0
  297. package/es/oak-app-domain/ShipServiceSystem/Storage.js +17 -0
  298. package/es/oak-app-domain/ShipServiceSystem/_baseSchema.d.ts +40 -0
  299. package/es/oak-app-domain/ShipServiceSystem/_baseSchema.js +1 -0
  300. package/es/oak-app-domain/ShipServiceSystem/locales/zh_CN.json +7 -0
  301. package/es/oak-app-domain/SmsTemplate/_baseSchema.d.ts +1 -0
  302. package/es/oak-app-domain/Station/_baseSchema.d.ts +1 -0
  303. package/es/oak-app-domain/Storage.js +20 -2
  304. package/es/oak-app-domain/StyleDict.js +6 -2
  305. package/es/oak-app-domain/Subway/_baseSchema.d.ts +1 -0
  306. package/es/oak-app-domain/SubwayStation/_baseSchema.d.ts +2 -0
  307. package/es/oak-app-domain/SysAccountMove/_baseSchema.d.ts +2 -0
  308. package/es/oak-app-domain/SysAccountOper/_baseSchema.d.ts +4 -0
  309. package/es/oak-app-domain/System/Storage.js +10 -5
  310. package/es/oak-app-domain/System/_baseSchema.d.ts +5 -0
  311. package/es/oak-app-domain/System/locales/zh_CN.json +2 -1
  312. package/es/oak-app-domain/Token/_baseSchema.d.ts +3 -0
  313. package/es/oak-app-domain/User/_baseSchema.d.ts +1 -0
  314. package/es/oak-app-domain/UserEntityClaim/_baseSchema.d.ts +4 -0
  315. package/es/oak-app-domain/UserEntityGrant/_baseSchema.d.ts +1 -0
  316. package/es/oak-app-domain/UserRelation/_baseSchema.d.ts +2 -0
  317. package/es/oak-app-domain/UserSystem/_baseSchema.d.ts +2 -0
  318. package/es/oak-app-domain/UserWechatPublicTag/_baseSchema.d.ts +2 -0
  319. package/es/oak-app-domain/WechatLogin/_baseSchema.d.ts +2 -0
  320. package/es/oak-app-domain/WechatMenu/_baseSchema.d.ts +2 -0
  321. package/es/oak-app-domain/WechatMpJump/_baseSchema.d.ts +1 -0
  322. package/es/oak-app-domain/WechatMpShip/Schema.d.ts +19 -0
  323. package/es/oak-app-domain/WechatMpShip/Schema.js +1 -0
  324. package/es/oak-app-domain/WechatMpShip/Storage.d.ts +3 -0
  325. package/es/oak-app-domain/WechatMpShip/Storage.js +42 -0
  326. package/es/oak-app-domain/WechatMpShip/_baseSchema.d.ts +57 -0
  327. package/es/oak-app-domain/WechatMpShip/_baseSchema.js +1 -0
  328. package/es/oak-app-domain/WechatMpShip/locales/zh_CN.json +12 -0
  329. package/es/oak-app-domain/WechatPay/_baseSchema.d.ts +1 -0
  330. package/es/oak-app-domain/WechatPublicAutoReply/_baseSchema.d.ts +1 -0
  331. package/es/oak-app-domain/WechatPublicTag/_baseSchema.d.ts +1 -0
  332. package/es/oak-app-domain/WechatQrCode/_baseSchema.d.ts +1 -0
  333. package/es/oak-app-domain/WechatTemplate/_baseSchema.d.ts +1 -0
  334. package/es/oak-app-domain/WechatUser/_baseSchema.d.ts +2 -0
  335. package/es/oak-app-domain/Withdraw/_baseSchema.d.ts +2 -0
  336. package/es/oak-app-domain/WithdrawAccount/_baseSchema.d.ts +2 -0
  337. package/es/oak-app-domain/WithdrawChannel/_baseSchema.d.ts +1 -0
  338. package/es/oak-app-domain/WithdrawTransfer/_baseSchema.d.ts +4 -0
  339. package/es/oak-app-domain/WpAccount/Storage.js +12 -10
  340. package/es/oak-app-domain/WpAccount/_baseSchema.d.ts +15 -9
  341. package/es/oak-app-domain/WpAccount/locales/zh_CN.json +5 -4
  342. package/es/oak-app-domain/WpProduct/Storage.js +25 -12
  343. package/es/oak-app-domain/WpProduct/_baseSchema.d.ts +22 -12
  344. package/es/oak-app-domain/WpProduct/locales/zh_CN.json +6 -4
  345. package/es/oak-app-domain/_SubQuery.d.ts +39 -1
  346. package/es/registry.d.ts +5 -9
  347. package/es/registry.frontend.d.ts +4 -0
  348. package/es/registry.frontend.js +4 -0
  349. package/es/registry.js +5 -8
  350. package/es/timers/index.d.ts +2 -2
  351. package/es/timers/index.js +5 -1
  352. package/es/timers/ship.d.ts +5 -0
  353. package/es/timers/ship.js +70 -0
  354. package/es/triggers/accountOper.js +1 -0
  355. package/es/triggers/deposit.d.ts +5 -1
  356. package/es/triggers/deposit.js +146 -10
  357. package/es/triggers/index.js +8 -2
  358. package/es/triggers/order.d.ts +5 -1
  359. package/es/triggers/order.js +198 -2
  360. package/es/triggers/pay.d.ts +0 -1
  361. package/es/triggers/pay.js +48 -33
  362. package/es/triggers/refund.js +106 -23
  363. package/es/triggers/ship.d.ts +5 -0
  364. package/es/triggers/ship.js +385 -0
  365. package/es/types/Exception.d.ts +8 -4
  366. package/es/types/Exception.js +13 -8
  367. package/es/types/PayClazz.d.ts +1 -0
  368. package/es/types/ShipClazz.d.ts +21 -0
  369. package/es/types/ShipClazz.js +1 -0
  370. package/es/utils/application.d.ts +1 -1
  371. package/es/utils/pay.d.ts +1 -0
  372. package/es/utils/payClazz/Offline.js +7 -4
  373. package/es/utils/payClazz/WechatPay/WechatPay.d.ts +1 -0
  374. package/es/utils/payClazz/WechatPay/WechatPay.debug.js +5 -2
  375. package/es/utils/payClazz/WechatPay/WechatPay.js +7 -1
  376. package/es/utils/payClazz/WechatPay/index.d.ts +1 -1
  377. package/es/utils/payClazz/WechatPay/index.js +2 -1
  378. package/es/utils/payClazz/index.d.ts +2 -4
  379. package/es/utils/payClazz/index.js +30 -14
  380. package/es/utils/ship.d.ts +40 -0
  381. package/es/utils/ship.js +498 -0
  382. package/es/utils/shipClazz/WechatMpShip/WechatMpShip.d.ts +17 -0
  383. package/es/utils/shipClazz/WechatMpShip/WechatMpShip.debug.d.ts +53 -0
  384. package/es/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js +324 -0
  385. package/es/utils/shipClazz/WechatMpShip/WechatMpShip.js +81 -0
  386. package/es/utils/shipClazz/WechatMpShip/index.d.ts +3 -0
  387. package/es/utils/shipClazz/WechatMpShip/index.js +3 -0
  388. package/es/utils/shipClazz/index.d.ts +16 -0
  389. package/es/utils/shipClazz/index.js +78 -0
  390. package/es/utils/wpProductFrontend.js +1 -1
  391. package/es/watchers/index.js +2 -0
  392. package/es/watchers/pay.js +2 -1
  393. package/es/watchers/ship.d.ts +5 -0
  394. package/es/watchers/ship.js +34 -0
  395. package/lib/aspects/AspectDict.d.ts +10 -1
  396. package/lib/aspects/index.js +3 -0
  397. package/lib/aspects/ship.d.ts +18 -0
  398. package/lib/aspects/ship.js +46 -0
  399. package/lib/aspects/withdraw.js +4 -3
  400. package/lib/checkers/abstractChecker.js +2 -2
  401. package/lib/checkers/accountOper.js +23 -6
  402. package/lib/checkers/index.js +2 -0
  403. package/lib/checkers/offlineAccount.js +4 -4
  404. package/lib/checkers/order.js +69 -15
  405. package/lib/checkers/pay.js +20 -37
  406. package/lib/checkers/ship.d.ts +5 -0
  407. package/lib/checkers/ship.js +102 -0
  408. package/lib/checkers/wpProduct.js +4 -4
  409. package/lib/config/constants.d.ts +2 -0
  410. package/lib/config/constants.js +2 -0
  411. package/lib/configuration/attrUpdateMatrix.js +12 -17
  412. package/lib/configuration/relation.js +2 -0
  413. package/lib/context/BackendRuntimeContext.d.ts +1 -1
  414. package/lib/data/actionAuth.js +11 -0
  415. package/lib/data/i18n.js +90 -82
  416. package/lib/data/index.js +4 -0
  417. package/lib/data/path.js +15 -1
  418. package/lib/data/shipCompany.d.ts +7 -0
  419. package/lib/data/shipCompany.js +6 -0
  420. package/lib/data/shipCompany.json +9056 -0
  421. package/lib/data/shipService.d.ts +3 -0
  422. package/lib/data/shipService.js +91 -0
  423. package/lib/endpoints/wechatPay.d.ts +5 -0
  424. package/lib/endpoints/wechatPay.js +22 -0
  425. package/lib/entities/AbstactPayProduct.d.ts +13 -0
  426. package/lib/entities/AbstactPayProduct.js +19 -0
  427. package/lib/entities/AbstractAccount.d.ts +2 -1
  428. package/lib/entities/AbstractAccount.js +2 -1
  429. package/lib/entities/AbstractPayAccount.d.ts +16 -0
  430. package/lib/entities/AbstractPayAccount.js +37 -0
  431. package/lib/entities/AbstractShipAccount.d.ts +14 -0
  432. package/lib/entities/AbstractShipAccount.js +19 -0
  433. package/lib/entities/AccountOper.d.ts +1 -1
  434. package/lib/entities/AccountOper.js +4 -2
  435. package/lib/entities/Deposit.d.ts +2 -0
  436. package/lib/entities/Deposit.js +2 -1
  437. package/lib/entities/OfflineAccount.d.ts +3 -6
  438. package/lib/entities/OfflineAccount.js +4 -3
  439. package/lib/entities/Order.d.ts +3 -0
  440. package/lib/entities/Order.js +4 -1
  441. package/lib/entities/Pay.d.ts +4 -2
  442. package/lib/entities/Pay.js +2 -0
  443. package/lib/entities/Settlement.d.ts +18 -0
  444. package/lib/entities/Settlement.js +47 -0
  445. package/lib/entities/Ship.d.ts +35 -0
  446. package/lib/entities/Ship.js +112 -0
  447. package/lib/entities/ShipCompany.d.ts +9 -0
  448. package/lib/entities/ShipCompany.js +30 -0
  449. package/lib/entities/ShipCompanySystem.d.ts +9 -0
  450. package/lib/entities/ShipCompanySystem.js +15 -0
  451. package/lib/entities/ShipOrder.d.ts +9 -0
  452. package/lib/entities/ShipOrder.js +15 -0
  453. package/lib/entities/ShipService.d.ts +9 -0
  454. package/lib/entities/ShipService.js +15 -0
  455. package/lib/entities/ShipServiceSystem.d.ts +9 -0
  456. package/lib/entities/ShipServiceSystem.js +15 -0
  457. package/lib/entities/System.js +1 -0
  458. package/lib/entities/WechatMpShip.d.ts +7 -0
  459. package/lib/entities/WechatMpShip.js +20 -0
  460. package/lib/entities/WpAccount.d.ts +3 -6
  461. package/lib/entities/WpAccount.js +4 -3
  462. package/lib/entities/WpProduct.d.ts +2 -8
  463. package/lib/entities/WpProduct.js +6 -4
  464. package/lib/features/Pay.d.ts +0 -2
  465. package/lib/features/Pay.js +0 -3
  466. package/lib/features/index.js +3 -2
  467. package/lib/hooks/useFeatures.js +1 -1
  468. package/lib/locales/error/zh-CN.json +7 -0
  469. package/lib/oak-app-domain/AbstactPayProduct/Schema.d.ts +19 -0
  470. package/lib/oak-app-domain/AbstactPayProduct/Schema.js +4 -0
  471. package/lib/oak-app-domain/AbstactPayProduct/Storage.d.ts +3 -0
  472. package/lib/oak-app-domain/AbstactPayProduct/Storage.js +43 -0
  473. package/lib/oak-app-domain/AbstactPayProduct/_baseSchema.d.ts +57 -0
  474. package/lib/oak-app-domain/AbstactPayProduct/locales/zh_CN.json +11 -0
  475. package/lib/oak-app-domain/AbstractAccount/Storage.js +4 -0
  476. package/lib/oak-app-domain/AbstractAccount/_baseSchema.d.ts +5 -1
  477. package/lib/oak-app-domain/AbstractAccount/locales/zh_CN.json +2 -1
  478. package/lib/oak-app-domain/AbstractPayAccount/Action.d.ts +5 -0
  479. package/lib/oak-app-domain/AbstractPayAccount/Action.js +5 -0
  480. package/lib/oak-app-domain/AbstractPayAccount/Schema.d.ts +19 -0
  481. package/lib/oak-app-domain/AbstractPayAccount/Schema.js +4 -0
  482. package/lib/oak-app-domain/AbstractPayAccount/Storage.d.ts +3 -0
  483. package/lib/oak-app-domain/AbstractPayAccount/Storage.js +54 -0
  484. package/lib/oak-app-domain/AbstractPayAccount/Style.d.ts +3 -0
  485. package/lib/oak-app-domain/AbstractPayAccount/Style.js +12 -0
  486. package/lib/oak-app-domain/AbstractPayAccount/_baseSchema.d.ts +65 -0
  487. package/lib/oak-app-domain/AbstractPayAccount/_baseSchema.js +2 -0
  488. package/lib/oak-app-domain/AbstractPayAccount/locales/zh_CN.json +20 -0
  489. package/lib/oak-app-domain/AbstractShipAccount/Schema.d.ts +19 -0
  490. package/lib/oak-app-domain/AbstractShipAccount/Schema.js +4 -0
  491. package/lib/oak-app-domain/AbstractShipAccount/Storage.d.ts +3 -0
  492. package/lib/oak-app-domain/AbstractShipAccount/Storage.js +40 -0
  493. package/lib/oak-app-domain/AbstractShipAccount/_baseSchema.d.ts +53 -0
  494. package/lib/oak-app-domain/AbstractShipAccount/_baseSchema.js +2 -0
  495. package/lib/oak-app-domain/AbstractShipAccount/locales/zh_CN.json +11 -0
  496. package/lib/oak-app-domain/Account/_baseSchema.d.ts +1 -0
  497. package/lib/oak-app-domain/AccountOper/Storage.js +1 -1
  498. package/lib/oak-app-domain/AccountOper/Style.js +2 -1
  499. package/lib/oak-app-domain/AccountOper/_baseSchema.d.ts +2 -1
  500. package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +3 -2
  501. package/lib/oak-app-domain/ActionAuth/_baseSchema.d.ts +2 -0
  502. package/lib/oak-app-domain/ActionDefDict.d.ts +7 -1
  503. package/lib/oak-app-domain/ActionDefDict.js +18 -14
  504. package/lib/oak-app-domain/Address/_baseSchema.d.ts +1 -0
  505. package/lib/oak-app-domain/Application/Storage.js +15 -0
  506. package/lib/oak-app-domain/Application/_baseSchema.d.ts +16 -0
  507. package/lib/oak-app-domain/Application/locales/zh_CN.json +4 -1
  508. package/lib/oak-app-domain/ApplicationPassport/_baseSchema.d.ts +2 -0
  509. package/lib/oak-app-domain/Area/_baseSchema.d.ts +1 -0
  510. package/lib/oak-app-domain/Article/_baseSchema.d.ts +1 -0
  511. package/lib/oak-app-domain/ArticleMenu/_baseSchema.d.ts +1 -0
  512. package/lib/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts +1 -0
  513. package/lib/oak-app-domain/Deposit/Storage.js +4 -0
  514. package/lib/oak-app-domain/Deposit/_baseSchema.d.ts +6 -0
  515. package/lib/oak-app-domain/Deposit/locales/zh_CN.json +2 -1
  516. package/lib/oak-app-domain/Domain/_baseSchema.d.ts +1 -0
  517. package/lib/oak-app-domain/Email/_baseSchema.d.ts +1 -0
  518. package/lib/oak-app-domain/EntityDict.d.ts +659 -34
  519. package/lib/oak-app-domain/ExtraFile/_baseSchema.d.ts +1 -0
  520. package/lib/oak-app-domain/LoginName/_baseSchema.d.ts +1 -0
  521. package/lib/oak-app-domain/Message/_baseSchema.d.ts +2 -0
  522. package/lib/oak-app-domain/MessageSystem/_baseSchema.d.ts +2 -0
  523. package/lib/oak-app-domain/MessageTypeSmsTemplate/_baseSchema.d.ts +1 -0
  524. package/lib/oak-app-domain/MessageTypeTemplate/_baseSchema.d.ts +1 -0
  525. package/lib/oak-app-domain/Mobile/_baseSchema.d.ts +1 -0
  526. package/lib/oak-app-domain/ModiEntity/_baseSchema.d.ts +1 -0
  527. package/lib/oak-app-domain/Notification/_baseSchema.d.ts +2 -0
  528. package/lib/oak-app-domain/OfflineAccount/Storage.js +12 -10
  529. package/lib/oak-app-domain/OfflineAccount/_baseSchema.d.ts +14 -9
  530. package/lib/oak-app-domain/OfflineAccount/locales/zh_CN.json +5 -4
  531. package/lib/oak-app-domain/Oper/_baseSchema.d.ts +2 -0
  532. package/lib/oak-app-domain/OperEntity/_baseSchema.d.ts +1 -0
  533. package/lib/oak-app-domain/Order/Storage.js +7 -0
  534. package/lib/oak-app-domain/Order/Style.js +1 -0
  535. package/lib/oak-app-domain/Order/_baseSchema.d.ts +10 -0
  536. package/lib/oak-app-domain/Order/locales/zh_CN.json +3 -1
  537. package/lib/oak-app-domain/Parasite/_baseSchema.d.ts +1 -0
  538. package/lib/oak-app-domain/Passport/_baseSchema.d.ts +1 -0
  539. package/lib/oak-app-domain/Pay/Storage.js +6 -0
  540. package/lib/oak-app-domain/Pay/_baseSchema.d.ts +11 -0
  541. package/lib/oak-app-domain/Pay/locales/zh_CN.json +3 -1
  542. package/lib/oak-app-domain/Platform/Storage.js +6 -0
  543. package/lib/oak-app-domain/Platform/_baseSchema.d.ts +4 -0
  544. package/lib/oak-app-domain/Platform/locales/zh_CN.json +2 -1
  545. package/lib/oak-app-domain/ReadRemark/_baseSchema.d.ts +2 -0
  546. package/lib/oak-app-domain/Refund/_baseSchema.d.ts +3 -0
  547. package/lib/oak-app-domain/RelationAuth/_baseSchema.d.ts +3 -0
  548. package/lib/oak-app-domain/Session/_baseSchema.d.ts +1 -0
  549. package/lib/oak-app-domain/SessionMessage/_baseSchema.d.ts +4 -0
  550. package/lib/oak-app-domain/Settlement/Action.d.ts +11 -0
  551. package/lib/oak-app-domain/Settlement/Action.js +13 -0
  552. package/lib/oak-app-domain/Settlement/Schema.d.ts +19 -0
  553. package/lib/oak-app-domain/Settlement/Schema.js +4 -0
  554. package/lib/oak-app-domain/Settlement/Storage.d.ts +3 -0
  555. package/lib/oak-app-domain/Settlement/Storage.js +28 -0
  556. package/lib/oak-app-domain/Settlement/Style.d.ts +3 -0
  557. package/lib/oak-app-domain/Settlement/Style.js +16 -0
  558. package/lib/oak-app-domain/Settlement/_baseSchema.d.ts +49 -0
  559. package/lib/oak-app-domain/Settlement/_baseSchema.js +2 -0
  560. package/lib/oak-app-domain/Settlement/locales/zh_CN.json +20 -0
  561. package/lib/oak-app-domain/Ship/Action.d.ts +12 -0
  562. package/lib/oak-app-domain/Ship/Action.js +19 -0
  563. package/lib/oak-app-domain/Ship/Schema.d.ts +19 -0
  564. package/lib/oak-app-domain/Ship/Schema.js +4 -0
  565. package/lib/oak-app-domain/Ship/Storage.d.ts +3 -0
  566. package/lib/oak-app-domain/Ship/Storage.js +103 -0
  567. package/lib/oak-app-domain/Ship/Style.d.ts +3 -0
  568. package/lib/oak-app-domain/Ship/Style.js +28 -0
  569. package/lib/oak-app-domain/Ship/_baseSchema.d.ts +97 -0
  570. package/lib/oak-app-domain/Ship/_baseSchema.js +2 -0
  571. package/lib/oak-app-domain/Ship/locales/zh_CN.json +49 -0
  572. package/lib/oak-app-domain/ShipCompany/Schema.d.ts +19 -0
  573. package/lib/oak-app-domain/ShipCompany/Schema.js +4 -0
  574. package/lib/oak-app-domain/ShipCompany/Storage.d.ts +3 -0
  575. package/lib/oak-app-domain/ShipCompany/Storage.js +44 -0
  576. package/lib/oak-app-domain/ShipCompany/_baseSchema.d.ts +44 -0
  577. package/lib/oak-app-domain/ShipCompany/_baseSchema.js +2 -0
  578. package/lib/oak-app-domain/ShipCompany/locales/zh_CN.json +8 -0
  579. package/lib/oak-app-domain/ShipCompanySystem/Schema.d.ts +19 -0
  580. package/lib/oak-app-domain/ShipCompanySystem/Schema.js +4 -0
  581. package/lib/oak-app-domain/ShipCompanySystem/Storage.d.ts +3 -0
  582. package/lib/oak-app-domain/ShipCompanySystem/Storage.js +20 -0
  583. package/lib/oak-app-domain/ShipCompanySystem/_baseSchema.d.ts +38 -0
  584. package/lib/oak-app-domain/ShipCompanySystem/_baseSchema.js +2 -0
  585. package/lib/oak-app-domain/ShipCompanySystem/locales/zh_CN.json +7 -0
  586. package/lib/oak-app-domain/ShipOrder/Schema.d.ts +19 -0
  587. package/lib/oak-app-domain/ShipOrder/Schema.js +4 -0
  588. package/lib/oak-app-domain/ShipOrder/Storage.d.ts +3 -0
  589. package/lib/oak-app-domain/ShipOrder/Storage.js +20 -0
  590. package/lib/oak-app-domain/ShipOrder/_baseSchema.d.ts +40 -0
  591. package/lib/oak-app-domain/ShipOrder/_baseSchema.js +2 -0
  592. package/lib/oak-app-domain/ShipOrder/locales/zh_CN.json +7 -0
  593. package/lib/oak-app-domain/ShipService/Schema.d.ts +19 -0
  594. package/lib/oak-app-domain/ShipService/Schema.js +4 -0
  595. package/lib/oak-app-domain/ShipService/Storage.d.ts +3 -0
  596. package/lib/oak-app-domain/ShipService/Storage.js +22 -0
  597. package/lib/oak-app-domain/ShipService/_baseSchema.d.ts +41 -0
  598. package/lib/oak-app-domain/ShipService/_baseSchema.js +2 -0
  599. package/lib/oak-app-domain/ShipService/locales/zh_CN.json +7 -0
  600. package/lib/oak-app-domain/ShipServiceSystem/Schema.d.ts +19 -0
  601. package/lib/oak-app-domain/ShipServiceSystem/Schema.js +4 -0
  602. package/lib/oak-app-domain/ShipServiceSystem/Storage.d.ts +3 -0
  603. package/lib/oak-app-domain/ShipServiceSystem/Storage.js +20 -0
  604. package/lib/oak-app-domain/ShipServiceSystem/_baseSchema.d.ts +40 -0
  605. package/lib/oak-app-domain/ShipServiceSystem/_baseSchema.js +2 -0
  606. package/lib/oak-app-domain/ShipServiceSystem/locales/zh_CN.json +7 -0
  607. package/lib/oak-app-domain/SmsTemplate/_baseSchema.d.ts +1 -0
  608. package/lib/oak-app-domain/Station/_baseSchema.d.ts +1 -0
  609. package/lib/oak-app-domain/Storage.js +52 -34
  610. package/lib/oak-app-domain/StyleDict.js +22 -18
  611. package/lib/oak-app-domain/Subway/_baseSchema.d.ts +1 -0
  612. package/lib/oak-app-domain/SubwayStation/_baseSchema.d.ts +2 -0
  613. package/lib/oak-app-domain/SysAccountMove/_baseSchema.d.ts +2 -0
  614. package/lib/oak-app-domain/SysAccountOper/_baseSchema.d.ts +4 -0
  615. package/lib/oak-app-domain/System/Storage.js +10 -5
  616. package/lib/oak-app-domain/System/_baseSchema.d.ts +5 -0
  617. package/lib/oak-app-domain/System/locales/zh_CN.json +2 -1
  618. package/lib/oak-app-domain/Token/_baseSchema.d.ts +3 -0
  619. package/lib/oak-app-domain/User/_baseSchema.d.ts +1 -0
  620. package/lib/oak-app-domain/UserEntityClaim/_baseSchema.d.ts +4 -0
  621. package/lib/oak-app-domain/UserEntityGrant/_baseSchema.d.ts +1 -0
  622. package/lib/oak-app-domain/UserRelation/_baseSchema.d.ts +2 -0
  623. package/lib/oak-app-domain/UserSystem/_baseSchema.d.ts +2 -0
  624. package/lib/oak-app-domain/UserWechatPublicTag/_baseSchema.d.ts +2 -0
  625. package/lib/oak-app-domain/WechatLogin/_baseSchema.d.ts +2 -0
  626. package/lib/oak-app-domain/WechatMenu/_baseSchema.d.ts +2 -0
  627. package/lib/oak-app-domain/WechatMpJump/_baseSchema.d.ts +1 -0
  628. package/lib/oak-app-domain/WechatMpShip/Schema.d.ts +19 -0
  629. package/lib/oak-app-domain/WechatMpShip/Schema.js +4 -0
  630. package/lib/oak-app-domain/WechatMpShip/Storage.d.ts +3 -0
  631. package/lib/oak-app-domain/WechatMpShip/Storage.js +45 -0
  632. package/lib/oak-app-domain/WechatMpShip/_baseSchema.d.ts +57 -0
  633. package/lib/oak-app-domain/WechatMpShip/_baseSchema.js +2 -0
  634. package/lib/oak-app-domain/WechatMpShip/locales/zh_CN.json +12 -0
  635. package/lib/oak-app-domain/WechatPay/_baseSchema.d.ts +1 -0
  636. package/lib/oak-app-domain/WechatPublicAutoReply/_baseSchema.d.ts +1 -0
  637. package/lib/oak-app-domain/WechatPublicTag/_baseSchema.d.ts +1 -0
  638. package/lib/oak-app-domain/WechatQrCode/_baseSchema.d.ts +1 -0
  639. package/lib/oak-app-domain/WechatTemplate/_baseSchema.d.ts +1 -0
  640. package/lib/oak-app-domain/WechatUser/_baseSchema.d.ts +2 -0
  641. package/lib/oak-app-domain/Withdraw/_baseSchema.d.ts +2 -0
  642. package/lib/oak-app-domain/WithdrawAccount/_baseSchema.d.ts +2 -0
  643. package/lib/oak-app-domain/WithdrawChannel/_baseSchema.d.ts +1 -0
  644. package/lib/oak-app-domain/WithdrawTransfer/_baseSchema.d.ts +4 -0
  645. package/lib/oak-app-domain/WpAccount/Storage.js +12 -10
  646. package/lib/oak-app-domain/WpAccount/_baseSchema.d.ts +15 -9
  647. package/lib/oak-app-domain/WpAccount/locales/zh_CN.json +5 -4
  648. package/lib/oak-app-domain/WpProduct/Storage.js +25 -12
  649. package/lib/oak-app-domain/WpProduct/_baseSchema.d.ts +22 -12
  650. package/lib/oak-app-domain/WpProduct/locales/zh_CN.json +6 -4
  651. package/lib/oak-app-domain/_SubQuery.d.ts +39 -1
  652. package/lib/registry.d.ts +5 -9
  653. package/lib/registry.frontend.d.ts +4 -0
  654. package/lib/registry.frontend.js +12 -0
  655. package/lib/registry.js +12 -10
  656. package/lib/timers/index.d.ts +2 -2
  657. package/lib/timers/index.js +6 -1
  658. package/lib/timers/ship.d.ts +5 -0
  659. package/lib/timers/ship.js +72 -0
  660. package/lib/triggers/accountOper.js +1 -0
  661. package/lib/triggers/deposit.d.ts +5 -1
  662. package/lib/triggers/deposit.js +147 -9
  663. package/lib/triggers/index.js +8 -2
  664. package/lib/triggers/order.d.ts +5 -1
  665. package/lib/triggers/order.js +199 -1
  666. package/lib/triggers/pay.d.ts +0 -1
  667. package/lib/triggers/pay.js +50 -36
  668. package/lib/triggers/refund.js +106 -23
  669. package/lib/triggers/ship.d.ts +5 -0
  670. package/lib/triggers/ship.js +388 -0
  671. package/lib/triggers/withdraw.d.ts +1 -1
  672. package/lib/triggers/withdraw.js +2 -1
  673. package/lib/types/DependentExceptions.js +1 -1
  674. package/lib/types/Exception.d.ts +8 -4
  675. package/lib/types/Exception.js +16 -10
  676. package/lib/types/PayClazz.d.ts +1 -0
  677. package/lib/types/ShipClazz.d.ts +21 -0
  678. package/lib/types/ShipClazz.js +2 -0
  679. package/lib/utils/application.d.ts +1 -1
  680. package/lib/utils/application.js +2 -2
  681. package/lib/utils/pay.d.ts +1 -0
  682. package/lib/utils/pay.js +4 -4
  683. package/lib/utils/payClazz/Offline.js +7 -4
  684. package/lib/utils/payClazz/WechatPay/WechatPay.d.ts +1 -0
  685. package/lib/utils/payClazz/WechatPay/WechatPay.debug.js +7 -3
  686. package/lib/utils/payClazz/WechatPay/WechatPay.js +7 -1
  687. package/lib/utils/payClazz/WechatPay/index.js +2 -1
  688. package/lib/utils/payClazz/index.d.ts +2 -4
  689. package/lib/utils/payClazz/index.js +34 -17
  690. package/lib/utils/ship.d.ts +40 -0
  691. package/lib/utils/ship.js +508 -0
  692. package/lib/utils/shipClazz/WechatMpShip/WechatMpShip.d.ts +17 -0
  693. package/lib/utils/shipClazz/WechatMpShip/WechatMpShip.debug.d.ts +53 -0
  694. package/lib/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js +328 -0
  695. package/lib/utils/shipClazz/WechatMpShip/WechatMpShip.js +85 -0
  696. package/lib/utils/shipClazz/WechatMpShip/index.d.ts +3 -0
  697. package/lib/utils/shipClazz/WechatMpShip/index.js +6 -0
  698. package/lib/utils/shipClazz/index.d.ts +16 -0
  699. package/lib/utils/shipClazz/index.js +85 -0
  700. package/lib/utils/wpProduct.js +2 -1
  701. package/lib/utils/wpProductFrontend.js +4 -3
  702. package/lib/watchers/index.js +2 -0
  703. package/lib/watchers/pay.js +2 -1
  704. package/lib/watchers/ship.d.ts +5 -0
  705. package/lib/watchers/ship.js +36 -0
  706. package/package.json +19 -17
  707. package/src/entities/AbstactPayProduct.ts +38 -0
  708. package/src/entities/{AbstractAccount.ts → AbstractPayAccount.ts} +13 -8
  709. package/src/entities/AbstractShipAccount.ts +39 -0
  710. package/src/entities/AccountOper.ts +6 -4
  711. package/src/entities/Deposit.ts +4 -1
  712. package/src/entities/OfflineAccount.ts +6 -8
  713. package/src/entities/Order.ts +11 -2
  714. package/src/entities/Pay.ts +8 -5
  715. package/src/entities/Settlement.ts +70 -0
  716. package/src/entities/Ship.ts +151 -0
  717. package/src/entities/ShipCompany.ts +43 -0
  718. package/src/entities/ShipOrder.ts +29 -0
  719. package/src/entities/ShipService.ts +27 -0
  720. package/src/entities/ShipServiceSystem.ts +29 -0
  721. package/src/entities/System.ts +1 -0
  722. package/src/entities/WechatMpShip.ts +33 -0
  723. package/src/entities/WpAccount.ts +6 -8
  724. package/src/entities/WpProduct.ts +8 -10
  725. package/es/components/account/deposit/index.d.ts +0 -10
  726. package/es/components/account/deposit/index.js +0 -117
  727. package/es/components/account/deposit/index.json +0 -10
  728. package/es/components/account/deposit/index.less +0 -10
  729. package/es/components/account/deposit/index.xml +0 -27
  730. package/es/components/account/deposit/locales/zh-CN.json +0 -11
  731. package/es/components/account/deposit/web.d.ts +0 -19
  732. package/es/components/account/deposit/web.js +0 -37
  733. package/es/components/account/deposit/web.pc.d.ts +0 -18
  734. package/es/components/account/deposit/web.pc.js +0 -32
  735. package/es/components/account/deposit/web.pc.module.less +0 -3
  736. package/es/components/payConfig/upsert/account/index.d.ts +0 -7
  737. package/es/components/payConfig/upsert/account/index.js +0 -24
  738. package/es/components/payConfig/upsert/account/locales/zh-CN.json +0 -11
  739. package/es/components/payConfig/upsert/index.d.ts +0 -17
  740. package/es/components/payConfig/upsert/index.js +0 -86
  741. package/es/components/payConfig/upsert/locales/zh-CN.json +0 -4
  742. package/es/components/payConfig/upsert/offline/index.d.ts +0 -7
  743. package/es/components/payConfig/upsert/offline/index.js +0 -76
  744. package/es/components/payConfig/upsert/offline/locales/zh-CN.json +0 -8
  745. package/es/components/payConfig/upsert/offline/web.pc.module.less +0 -5
  746. package/es/components/payConfig/upsert/wechatPay/index.d.ts +0 -10
  747. package/es/components/payConfig/upsert/wechatPay/index.js +0 -72
  748. package/es/components/payConfig/upsert/wechatPay/locales/zh-CN.json +0 -24
  749. /package/es/oak-app-domain/{_SubQuery.js → AbstactPayProduct/_baseSchema.js} +0 -0
  750. /package/lib/oak-app-domain/{_SubQuery.js → AbstactPayProduct/_baseSchema.js} +0 -0
@@ -5,5 +5,14 @@ export type AspectDict<ED extends EntityDict> = {
5
5
  accountId: string;
6
6
  price: number;
7
7
  withdrawAccountId?: string;
8
- }, context: BackendRuntimeContext<ED>) => Promise<EntityDict['withdraw']['CreateOperationData']>;
8
+ }, context: BackendRuntimeContext<ED>) => Promise<EntityDict['withdraw']['CreateSingle']['data']>;
9
+ getMpShipState: (params: {
10
+ shipId: string;
11
+ }, context: BackendRuntimeContext<ED>) => Promise<EntityDict['ship']['Schema']['iState']>;
12
+ getExpressPrintInfo: (params: {
13
+ shipId: string;
14
+ }, context: BackendRuntimeContext<ED>) => Promise<{
15
+ type: "html";
16
+ data: string;
17
+ }>;
9
18
  };
@@ -1,5 +1,8 @@
1
1
  import { getWithdrawCreateData } from './withdraw';
2
+ import { getExpressPrintInfo, getMpShipState } from './ship';
2
3
  const aspectDict = {
4
+ getMpShipState,
3
5
  getWithdrawCreateData,
6
+ getExpressPrintInfo,
4
7
  };
5
8
  export default aspectDict;
@@ -0,0 +1,18 @@
1
+ import { BRC } from '../types/RuntimeCxt';
2
+ /**
3
+ * 获取小程序订单发货状态
4
+ * @param params
5
+ * @param context
6
+ */
7
+ export declare function getMpShipState(params: {
8
+ shipId: string;
9
+ }, context: BRC): Promise<string | null | undefined>;
10
+ /**
11
+ * 获取打印面单
12
+ */
13
+ export declare function getExpressPrintInfo(params: {
14
+ shipId: string;
15
+ }, context: BRC): Promise<{
16
+ type: "html";
17
+ data: string;
18
+ }>;
@@ -0,0 +1,41 @@
1
+ import { OakPreConditionUnsetException } from 'oak-domain/lib/types';
2
+ import { getOrderShipState } from '../utils/ship';
3
+ import { getShipClazz } from '../utils/shipClazz';
4
+ /**
5
+ * 获取小程序订单发货状态
6
+ * @param params
7
+ * @param context
8
+ */
9
+ export async function getMpShipState(params, context) {
10
+ const application = context.getApplication();
11
+ const { type, } = application;
12
+ if (type === 'wechatMp') {
13
+ const { shipId } = params;
14
+ const shipState = await getOrderShipState(context, shipId);
15
+ return shipState;
16
+ }
17
+ }
18
+ /**
19
+ * 获取打印面单
20
+ */
21
+ export async function getExpressPrintInfo(params, context) {
22
+ const { shipId } = params;
23
+ const [ship] = await context.select('ship', {
24
+ data: {
25
+ id: 1,
26
+ type: 1,
27
+ entity: 1,
28
+ entityId: 1,
29
+ extraShipId: 1,
30
+ },
31
+ filter: {
32
+ id: shipId,
33
+ }
34
+ }, { forUpdate: true });
35
+ const { type, entity, entityId, extraShipId } = ship;
36
+ if (!entity || !entityId || !extraShipId || type !== 'express') {
37
+ throw new OakPreConditionUnsetException("error::ship.noClazz", "ship", undefined, "oak-pay-business");
38
+ }
39
+ const clazz = await getShipClazz(entity, entityId, context);
40
+ return await clazz.getPrintInfo(shipId, context);
41
+ }
@@ -28,7 +28,7 @@ export async function getWithdrawCreateData(params, context) {
28
28
  const { system } = context.getApplication();
29
29
  const withdrawLoss = system?.payConfig?.withdrawLoss;
30
30
  if (!withdrawLoss || (!withdrawLoss.conservative && typeof withdrawLoss.ratio !== 'number')) {
31
- throw new OakException('error::system.withdrawLossUnSet');
31
+ throw new OakException('error::system.withdrawLossUnSet', 'oak-pay-business');
32
32
  }
33
33
  const { accountId, price: totalPrice, withdrawAccountId } = params;
34
34
  const [account] = await context.select('account', {
@@ -46,7 +46,7 @@ export async function getWithdrawCreateData(params, context) {
46
46
  // throw new OakInputIllegalException('withdraw', ['price'], 'error::withdraw.overflow');
47
47
  // }
48
48
  if (totalPrice > refundable && !withdrawAccountId) {
49
- throw new OakInputIllegalException('withdraw', ['price'], 'error::withdraw.needWithdrawAccountId');
49
+ throw new OakInputIllegalException('withdraw', ['price'], 'error::withdraw.needWithdrawAccountId', 'oak-pay-business');
50
50
  }
51
51
  const data = {
52
52
  id: await generateNewIdAsync(),
@@ -52,6 +52,11 @@ const checkers = [
52
52
  break;
53
53
  }
54
54
  case 'refund':
55
+ //当订单未完成分账时,仅减少total,此时totalPlus与availPlus不相等
56
+ if (totalPlus > 0 || availPlus > 0) {
57
+ throw new OakInputIllegalException('accountOper', ['totalPlus', 'availPlus'], `accountOper为${type}时,其totalPlus必须为非正数`);
58
+ }
59
+ break;
55
60
  case 'withdraw': {
56
61
  if (totalPlus >= 0 || availPlus >= 0 || totalPlus !== availPlus) {
57
62
  throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为相等的负数`);
@@ -59,6 +64,10 @@ const checkers = [
59
64
  break;
60
65
  }
61
66
  case 'refundFailure':
67
+ if (totalPlus < 0 || availPlus < 0) {
68
+ throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为非负数`);
69
+ }
70
+ break;
62
71
  case 'withdrawBack':
63
72
  case 'consumeBack': {
64
73
  if (totalPlus < 0 || availPlus < 0 || totalPlus !== availPlus) {
@@ -72,12 +81,6 @@ const checkers = [
72
81
  }
73
82
  break;
74
83
  }
75
- case 'encash': {
76
- if (totalPlus !== 0 || availPlus <= 0) {
77
- throw new OakInputIllegalException('accountOper', ['availPlus'], 'accountOper为encash时,其totalPlus必须为0、availPlus必须为正数');
78
- }
79
- break;
80
- }
81
84
  case 'cutoffRefundable': {
82
85
  if (totalPlus !== 0 || availPlus !== 0 || typeof refundablePlus !== 'number' || refundablePlus >= 0) {
83
86
  throw new OakInputIllegalException('accountOper', ['refundablePlus'], 'accountOper为cutoffRefundable时,其totalPlus/availPlus必须为0,且refundablePlus必须为负数');
@@ -96,6 +99,20 @@ const checkers = [
96
99
  }
97
100
  break;
98
101
  }
102
+ case 'preSettle': {
103
+ //预分账时账户total增加,avail不变,refundable不变
104
+ if (totalPlus < 0 || availPlus !== 0 || (refundablePlus && refundablePlus !== 0)) {
105
+ throw new OakInputIllegalException('accountOper', ['totalPlus', 'availPlus', 'refundablePlus'], 'accountOper为preSettle时,其totalPlus必须为非负数、availPlus必须为0,refundable必须为空或者0');
106
+ }
107
+ break;
108
+ }
109
+ case 'settle': {
110
+ //分账时账户total不变,refundable不变
111
+ if (totalPlus !== 0 || (refundablePlus && refundablePlus !== 0)) {
112
+ throw new OakInputIllegalException('accountOper', ['totalPlus', 'refundablePlus'], 'accountOper为settle时,其totalPlus必须为0,refundable必须为空或者0');
113
+ }
114
+ break;
115
+ }
99
116
  default: {
100
117
  assert(false);
101
118
  break;
@@ -8,6 +8,7 @@ import abstractCheckers from './abstractChecker';
8
8
  import withdrawAccounts from './withdrawAccount';
9
9
  import refundCheckers from './refund';
10
10
  import withdrawTransferCheckers from './withdrawTransfer';
11
+ import shipCheckers from './ship';
11
12
  const checkers = [
12
13
  ...refundCheckers,
13
14
  ...withdrawAccounts,
@@ -19,5 +20,6 @@ const checkers = [
19
20
  ...offlineAccountCheckers,
20
21
  ...wpProductCheckers,
21
22
  ...withdrawTransferCheckers,
23
+ ...shipCheckers,
22
24
  ];
23
25
  export default checkers;
@@ -14,7 +14,7 @@ function checkAttributes(data) {
14
14
  case 'wechat':
15
15
  case 'alipay': {
16
16
  if (!name && !qrCode) {
17
- throw new OakInputIllegalException('offlineAccount', ['name', 'qrCode'], 'offlineAccount::error.nameQrCodeBothNull');
17
+ throw new OakInputIllegalException('offlineAccount', ['name', 'qrCode'], 'offlineAccount::error.nameQrCodeBothNull', 'oak-pay-business');
18
18
  }
19
19
  break;
20
20
  }
@@ -29,13 +29,13 @@ function checkAttributes(data) {
29
29
  }
30
30
  const { refundCompensateRatio, refundGapDays, withdrawTransferLossRatio } = data;
31
31
  if (typeof refundGapDays !== 'number' || refundGapDays < 0) {
32
- throw new OakInputIllegalException('offlineAccount', ['refundGapDays'], 'offlineAccount::error.refundGapDaysNotNegative');
32
+ throw new OakInputIllegalException('offlineAccount', ['refundGapDays'], 'offlineAccount::error.refundGapDaysNotNegative', 'oak-pay-business');
33
33
  }
34
34
  if (typeof refundCompensateRatio !== 'number' || refundCompensateRatio < 0 || refundCompensateRatio > 100) {
35
- throw new OakInputIllegalException('offlineAccount', ['refundGapDays'], 'offlineAccount::error.refundCompensateIllegal');
35
+ throw new OakInputIllegalException('offlineAccount', ['refundGapDays'], 'offlineAccount::error.refundCompensateIllegal', 'oak-pay-business');
36
36
  }
37
37
  if (typeof withdrawTransferLossRatio !== 'number' || withdrawTransferLossRatio < 0) {
38
- throw new OakInputIllegalException('offlineAccount', ['withdrawTransferLossRatio'], 'offlineAccount::error.withdrawTransferLossRatioNotNegative');
38
+ throw new OakInputIllegalException('offlineAccount', ['withdrawTransferLossRatio'], 'offlineAccount::error.withdrawTransferLossRatioNotNegative', 'oak-pay-business');
39
39
  }
40
40
  }
41
41
  const checkers = [
@@ -21,6 +21,52 @@ const checkers = [
21
21
  }
22
22
  }
23
23
  },
24
+ /* {
25
+ // 订单创建的时候要传入合法的settlement
26
+ type: 'logicalData',
27
+ entity: 'order',
28
+ action: 'startPaying',
29
+ checker: (operation, context) => {
30
+ const { data, filter } = operation as EntityDict['order']['Update'];
31
+ const { id } = filter!;
32
+ assert(id);
33
+
34
+ return pipeline(
35
+ () => context.select('order', {
36
+ data: {
37
+ id: 1,
38
+ price: 1,
39
+ settlement$order: {
40
+ $entity: 'settlement',
41
+ data: {
42
+ id: 1,
43
+ price: 1,
44
+ iState: 1,
45
+ accountId: 1,
46
+ },
47
+ },
48
+ },
49
+ filter: {
50
+ id,
51
+ },
52
+ }, { dontCollect: true }),
53
+ (orders: EntityDict['order']['Schema'][]) => {
54
+ const [ order ] = orders;
55
+ const { price, settlement$order } = order;
56
+
57
+ let total = 0 ;
58
+ settlement$order?.forEach(
59
+ (ele) => {
60
+ total += ele.price!;
61
+ assert(ele.iState === 'unsettled');
62
+ }
63
+ );
64
+
65
+ assert(total === price, '付款前订单应设置好分帐目标');
66
+ }
67
+ )
68
+ }
69
+ }, */
24
70
  {
25
71
  type: 'logicalData',
26
72
  entity: 'order',
@@ -45,7 +91,7 @@ const checkers = [
45
91
  assert(['unpaid', 'partiallyRefunded'].includes(iState) && paid === 0);
46
92
  const { pay$order: pays } = data;
47
93
  if (!(pays instanceof Array) || !pays.length) {
48
- throw new OakInputIllegalException('order', ['pay$order'], 'error::order.nonePay');
94
+ throw new OakInputIllegalException('order', ['pay$order'], 'error::order.nonePay', 'oak-pay-business');
49
95
  }
50
96
  let amount = 0;
51
97
  pays.forEach(({ action, data }) => {
@@ -54,13 +100,13 @@ const checkers = [
54
100
  amount += price;
55
101
  });
56
102
  if (!allowPartialPay && amount !== price) {
57
- throw new OakInputIllegalException('order', ['pay$order'], 'error::order.payAmountNotEnough');
103
+ throw new OakInputIllegalException('order', ['pay$order'], 'error::order.payAmountNotEnough', 'oak-pay-business');
58
104
  }
59
105
  });
60
106
  }
61
107
  },
62
108
  {
63
- // 订单结算,将收入分帐到相关的Account中
109
+ // 订单结算,检查存在关联的未结算的settlement,其price之和等于订单的已支付与已退款的差值
64
110
  type: 'logicalData',
65
111
  entity: 'order',
66
112
  action: 'settle',
@@ -75,27 +121,35 @@ const checkers = [
75
121
  paid: 1,
76
122
  refunded: 1,
77
123
  iState: 1,
124
+ settlement$order: {
125
+ $entity: 'settlement',
126
+ data: {
127
+ id: 1,
128
+ accountId: 1,
129
+ price: 1,
130
+ iState: 1,
131
+ },
132
+ filter: {
133
+ iState: 'unsettled'
134
+ }
135
+ }
78
136
  },
79
137
  filter: {
80
138
  id: filter.id,
81
139
  },
82
140
  }, {}), (orders) => {
83
141
  const [order] = orders;
84
- const { price, paid, refunded, iState } = order;
85
- assert(['paid', 'partiallyRefunded'].includes(iState));
86
- const { accountOper$entity: opers } = data;
87
- assert(opers instanceof Array);
142
+ const { price, paid, refunded, iState, settlement$order: settlements } = order;
143
+ assert(['paid'].includes(iState) && refunded === 0 && paid === price);
144
+ assert(settlements && settlements.length > 0, '该结算订单需添加结算明细');
88
145
  let amount = 0;
89
- opers.forEach(({ action, data }) => {
90
- assert(action === 'create');
91
- const { type, totalPlus, availPlus, refundablePlus } = data;
92
- assert(type === 'earn');
93
- // assert(totalPlus === availPlus);
94
- amount += totalPlus;
146
+ settlements.forEach((settlement) => {
147
+ amount += settlement.price;
148
+ assert(settlement.iState === 'unsettled', '订单结算前,settlement必须处于未分账状态');
95
149
  });
96
- assert(amount === paid - refunded);
150
+ assert(amount === paid);
97
151
  });
98
152
  }
99
- }
153
+ },
100
154
  ];
101
155
  export default checkers;
@@ -1,5 +1,4 @@
1
1
  import { OakAttrNotNullException, OakInputIllegalException } from 'oak-domain/lib/types';
2
- import { pipeline } from 'oak-domain/lib/utils/executor';
3
2
  import assert from 'assert';
4
3
  const checkers = [
5
4
  {
@@ -74,7 +73,7 @@ const checkers = [
74
73
  let pricePaying = 0;
75
74
  pays.forEach((pay) => pricePaying += pay.price);
76
75
  if (pricePaying + price > orderPrice) {
77
- throw new OakInputIllegalException('pay', ['price'], 'pay.create.priceOverflow');
76
+ throw new OakInputIllegalException('pay', ['price'], 'error::pay.priceOverflow', 'oak-pay-business');
78
77
  }
79
78
  };
80
79
  if (order instanceof Promise) {
@@ -110,53 +109,37 @@ const checkers = [
110
109
  if (!successAt) {
111
110
  throw new OakAttrNotNullException('pay', ['successAt']);
112
111
  }
113
- assert(typeof filter?.id === 'string');
114
- // 必须有ExternalId,除非之间prepay的时候已经填过了
115
- if (!externalId) {
116
- return pipeline(() => context.select('pay', {
117
- data: {
118
- id: 1,
119
- externalId: 1,
120
- entity: 1,
121
- },
122
- filter: {
123
- id: filter.id,
124
- }
125
- }, { dontCollect: true }), (pays) => {
126
- const [pay] = pays;
127
- if (pay.entity !== 'account' && !pay.externalId) {
128
- throw new OakAttrNotNullException('pay', ['externalId']);
129
- }
130
- });
131
- }
132
112
  }
133
113
  },
134
- {
114
+ /* {
135
115
  // 如果在开始支付或者继续支付过程中,paid达到了price,pay的状态可以改为paid
136
116
  entity: 'pay',
137
117
  type: 'logical',
138
118
  action: ['continuePaying', 'startPaying'],
139
119
  // priority: CHECKER_MAX_PRIORITY - 1, // 要超过action矩阵定义的赋state值
140
120
  checker: (operation, context) => {
141
- const { data, filter } = operation;
121
+ const { data, filter } = operation as EntityDict['pay']['Update'];
142
122
  assert(filter && typeof filter.id === 'string');
143
123
  const { paid } = data || {};
144
124
  if (paid) {
145
- return pipeline(() => context.select('pay', {
146
- data: {
147
- id: 1,
148
- paid: 1,
149
- price: 1,
150
- },
151
- }, {}), (pays) => {
152
- const [pay] = pays;
153
- const { paid: payPaid, price } = pay;
154
- if (payPaid + paid === price) {
155
- data.iState === 'paid';
125
+ return pipeline(
126
+ () => context.select('pay', {
127
+ data: {
128
+ id: 1,
129
+ paid: 1,
130
+ price: 1,
131
+ },
132
+ }, {}),
133
+ (pays: EntityDict['pay']['OpSchema'][]) => {
134
+ const [pay] = pays;
135
+ const { paid: payPaid, price } = pay;
136
+ if (payPaid + paid === price) {
137
+ data.iState === 'paid';
138
+ }
156
139
  }
157
- });
140
+ )
158
141
  }
159
142
  }
160
- }
143
+ } */
161
144
  ];
162
145
  export default checkers;
@@ -0,0 +1,5 @@
1
+ import { Checker } from 'oak-domain/lib/types/Auth';
2
+ import { EntityDict } from '../oak-app-domain';
3
+ import { RuntimeCxt } from '../types/RuntimeCxt';
4
+ declare const checkers: Checker<EntityDict, 'ship', RuntimeCxt>[];
5
+ export default checkers;
@@ -0,0 +1,100 @@
1
+ const checkers = [
2
+ {
3
+ entity: 'ship',
4
+ action: ['syncPaths', 'syncState', 'syncAll'],
5
+ type: 'row',
6
+ filter: {
7
+ iState: {
8
+ $in: ['unshipped', 'shipping'],
9
+ }
10
+ }
11
+ },
12
+ {
13
+ entity: 'ship',
14
+ action: ['ship', 'receive'],
15
+ type: 'row',
16
+ filter: (operation, context) => {
17
+ // 只有root或者未设置extraShipId的才可手动设置
18
+ const isRoot = context.isRoot();
19
+ if (isRoot) {
20
+ return;
21
+ }
22
+ return {
23
+ extraShipId: {
24
+ $exists: false,
25
+ },
26
+ };
27
+ }
28
+ },
29
+ {
30
+ entity: 'ship',
31
+ action: 'print',
32
+ type: 'row',
33
+ filter: {
34
+ entity: {
35
+ $exists: true,
36
+ },
37
+ entityId: {
38
+ $exists: true,
39
+ },
40
+ extraShipId: {
41
+ $exists: true,
42
+ },
43
+ iState: 'unshipped',
44
+ }
45
+ },
46
+ {
47
+ entity: 'ship',
48
+ type: 'logicalData',
49
+ action: 'receive',
50
+ checker: (operation) => {
51
+ const { data } = operation;
52
+ if (!data.receiveAt) {
53
+ const now = Date.now();
54
+ data.receiveAt = now;
55
+ }
56
+ }
57
+ },
58
+ {
59
+ entity: 'ship',
60
+ type: 'row',
61
+ action: ['startReceiving', 'succeedReceiving'],
62
+ filter: {
63
+ $or: [
64
+ {
65
+ type: 'virtual',
66
+ },
67
+ {
68
+ shipOrder$ship: {
69
+ order: {
70
+ pay$order: {
71
+ wpProduct: {
72
+ needReceiving: true
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ ]
79
+ }
80
+ },
81
+ {
82
+ entity: 'ship',
83
+ type: 'row',
84
+ action: 'receive',
85
+ filter: {
86
+ shipOrder$ship: {
87
+ '#sqp': 'all',
88
+ order: {
89
+ pay$order: {
90
+ '#sqp': 'not in',
91
+ wpProduct: {
92
+ needReceiving: true
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ ];
100
+ export default checkers;
@@ -79,27 +79,27 @@ const checkers = [
79
79
  }, { dontCollect: true }), (applications) => {
80
80
  const { type, config } = applications[0];
81
81
  if (!getAppTypeFromProductType(data.type).includes(type)) {
82
- throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.TypeConflict');
82
+ throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.TypeConflict', 'oak-pay-business');
83
83
  }
84
84
  switch (type) {
85
85
  case 'web': {
86
86
  const { wechat } = config;
87
87
  if (!wechat?.appId) {
88
- throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp');
88
+ throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp', 'oak-pay-business');
89
89
  }
90
90
  break;
91
91
  }
92
92
  case 'wechatMp': {
93
93
  const { appId } = config;
94
94
  if (!appId) {
95
- throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp');
95
+ throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp', 'oak-pay-business');
96
96
  }
97
97
  break;
98
98
  }
99
99
  case 'wechatPublic': {
100
100
  const { appId } = config;
101
101
  if (!appId) {
102
- throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp');
102
+ throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp', 'oak-pay-business');
103
103
  }
104
104
  break;
105
105
  }
@@ -4,15 +4,66 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { EntityDict } from '../oak-app-domain';
7
- import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef } from 'oak-frontend-base';
8
- import AbsFilterPanel from 'oak-frontend-base/es/components/filterPanel';
9
- import AbsList from 'oak-frontend-base/es/components/list';
10
- import AbsListPro from 'oak-frontend-base/es/components/listPro';
11
- import AbsDetail from 'oak-frontend-base/es/components/detail';
12
- import AbsUpsert from 'oak-frontend-base/es/components/upsert';
13
- declare const FilterPanel: <T extends keyof EntityDict>(...props: Parameters<typeof AbsFilterPanel<EntityDict, T>>) => React.ReactElement;
14
- declare const List: <T extends keyof EntityDict>(...props: Parameters<typeof AbsList<EntityDict, T>>) => React.ReactElement;
15
- declare const ListPro: <T extends keyof EntityDict>(...props: Parameters<typeof AbsListPro<EntityDict, T>>) => React.ReactElement;
16
- declare const Detail: <T extends keyof EntityDict>(...props: Parameters<typeof AbsDetail<EntityDict, T>>) => React.ReactElement;
17
- declare const Upsert: <T extends keyof EntityDict>(...props: Parameters<typeof AbsUpsert<EntityDict, T>>) => React.ReactElement;
7
+ import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, ListButtonProps, OakAbsAttrUpsertDef } from 'oak-frontend-base';
8
+ declare const FilterPanel: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
9
+ entity: T;
10
+ columns: ColumnProps<EntityDict, T>[];
11
+ }>) => React.ReactElement;
12
+ declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
13
+ entity: T;
14
+ extraActions: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]);
15
+ onAction: onActionFnDef;
16
+ disabledOp: boolean;
17
+ attributes: OakAbsAttrDef[];
18
+ data: RowWithActions<EntityDict, T>[];
19
+ loading: boolean;
20
+ tablePagination?: React.ReactNode;
21
+ rowSelection?: any;
22
+ hideHeader?: boolean | undefined;
23
+ disableSerialNumber?: boolean | undefined;
24
+ size?: "small" | "middle" | "large" | undefined;
25
+ scroll?: any;
26
+ empty?: React.ReactNode;
27
+ opWidth?: number | undefined;
28
+ ellipsis?: boolean | undefined;
29
+ }>) => React.ReactElement;
30
+ declare const ListPro: <T extends keyof EntityDict>(props: {
31
+ title?: any;
32
+ extraContent?: any;
33
+ hideDefaultButtons?: boolean | undefined;
34
+ buttonGroup?: ListButtonProps[] | undefined;
35
+ onReload?: (() => void) | undefined;
36
+ entity: T;
37
+ extraActions?: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]) | undefined;
38
+ onAction?: onActionFnDef | undefined;
39
+ disabledOp?: boolean | undefined;
40
+ attributes: OakAbsAttrDef[];
41
+ data: RowWithActions<EntityDict, T>[];
42
+ loading?: boolean | undefined;
43
+ tablePagination?: any;
44
+ rowSelection?: any;
45
+ disableSerialNumber?: boolean | undefined;
46
+ size?: "small" | "middle" | "large" | undefined;
47
+ scroll?: any;
48
+ empty?: any;
49
+ opWidth?: number | undefined;
50
+ oakPath?: string | undefined;
51
+ }) => React.ReactElement;
52
+ declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
53
+ column?: number | Record<Breakpoint, number> | undefined;
54
+ entity: T;
55
+ attributes: OakAbsAttrDef[];
56
+ data: Partial<EntityDict[T]["Schema"]>;
57
+ title?: string | undefined;
58
+ bordered?: boolean | undefined;
59
+ layout?: "horizontal" | "vertical" | undefined;
60
+ }>) => React.ReactElement;
61
+ declare const Upsert: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
62
+ helps: Record<string, string>;
63
+ entity: T;
64
+ attributes: OakAbsAttrUpsertDef<EntityDict, T, string | number>[];
65
+ data: EntityDict[T]["Schema"];
66
+ layout: "horizontal" | "vertical";
67
+ mode: "default" | "card";
68
+ }>) => React.ReactElement;
18
69
  export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };
@@ -1,7 +1,3 @@
1
- /**
2
- * 抽象组件在业务层根据EntityDict的重新声明
3
- * by Xc 20230807
4
- */
5
1
  import AbsFilterPanel from 'oak-frontend-base/es/components/filterPanel';
6
2
  import AbsList from 'oak-frontend-base/es/components/list';
7
3
  import AbsListPro from 'oak-frontend-base/es/components/listPro';
@@ -1,6 +1,7 @@
1
1
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "account", false, {
2
2
  depositMinCent: number;
3
3
  depositMaxCent: number;
4
+ autoStartPay: boolean;
4
5
  onGoToUnfinishedPay: (payId: string) => void;
5
6
  onWithdraw: () => void;
6
7
  textColor: string;