api.d.ts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  1. /**
  2. * Namespace Api
  3. *
  4. * All backend api type
  5. */
  6. declare namespace Api {
  7. namespace Common {
  8. /** common params of paginating */
  9. interface PaginatingCommonParams {
  10. /** current page number */
  11. current: number;
  12. /** page size */
  13. size: number;
  14. /** total count */
  15. total: number;
  16. }
  17. /** common params of paginating query list data */
  18. interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
  19. records: T[];
  20. }
  21. /** common search params of table */
  22. type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
  23. /**
  24. * enable status
  25. *
  26. * - "1": enabled
  27. * - "0": disabled
  28. */
  29. type EnableStatus = '0' | '1';
  30. /** common record */
  31. type CommonRecord<T = any> = {
  32. /** record id */
  33. id: number;
  34. /** record creator */
  35. createBy: string;
  36. /** record create time */
  37. createTime: string;
  38. /** record updater */
  39. updateBy: string;
  40. /** record update time */
  41. updateTime: string;
  42. /** record status */
  43. status: EnableStatus | null;
  44. } & T;
  45. /**
  46. * 通用状态
  47. */
  48. type commonStatus = 0 | 1;
  49. }
  50. /**
  51. * namespace Auth
  52. *
  53. * backend api module: "auth"
  54. */
  55. namespace Auth {
  56. interface LoginToken {
  57. token: string;
  58. refreshToken: string;
  59. }
  60. interface UserInfo {
  61. userId: string;
  62. username: string;
  63. roles: string[];
  64. buttons: string[];
  65. email: string;
  66. mobile: string;
  67. }
  68. interface UserPassWord {
  69. password: string;
  70. newPassword: string;
  71. }
  72. }
  73. /**
  74. * namespace Route
  75. *
  76. * backend api module: "route"
  77. */
  78. namespace Route {
  79. // type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
  80. interface MenuRoute extends ElegantConstRoute {
  81. id: string;
  82. }
  83. interface UserRoute {
  84. [x: string]: any;
  85. routes: MenuRoute[];
  86. home: import('@elegant-router/types').LastLevelRouteKey;
  87. }
  88. }
  89. /**
  90. * 商品管理模块
  91. */
  92. namespace goods {
  93. interface ShopCategory {
  94. children?: ShopCategory[];
  95. /**
  96. * 编码
  97. */
  98. code?: string;
  99. /**
  100. * 前台类目模板id(一级时有)
  101. */
  102. frontCategoryId?: number;
  103. /**
  104. * 主键
  105. */
  106. id?: number;
  107. /**
  108. * 是否删除(0 正常 1 已被删除)
  109. */
  110. isDelete?: number;
  111. /**
  112. * 是否叶子(1-是,2-不是)
  113. */
  114. isLeaves?: number;
  115. /**
  116. * 类目等级
  117. */
  118. level?: number;
  119. /**
  120. * 类目名称
  121. */
  122. name?: string;
  123. /**
  124. * 序号
  125. */
  126. num?: number;
  127. /**
  128. * 操作人
  129. */
  130. operateUser?: string;
  131. /**
  132. * 父级分类编码
  133. */
  134. parentCode?: string;
  135. /**
  136. * 父级分类名称
  137. */
  138. parentName?: string;
  139. /**
  140. * 门店ID
  141. */
  142. shopId?: number;
  143. [property: string]: any;
  144. }
  145. interface tag {
  146. /**
  147. * 创建日期
  148. */
  149. creationDate?: string;
  150. /**
  151. * 主键
  152. */
  153. id?: number;
  154. /**
  155. * 是否删除(0-未删除,1-已删除)
  156. */
  157. isDelete?: number;
  158. /**
  159. * 标签名称
  160. */
  161. name?: string;
  162. /**
  163. * 标签类型
  164. */
  165. type?: number;
  166. [property: string]: any;
  167. }
  168. interface ChannelProd {
  169. /**
  170. * 渠道ID
  171. */
  172. channelId?: number;
  173. /**
  174. * 渠道对应商品售价
  175. */
  176. channelProdPrice?: number;
  177. /**
  178. * 出货价
  179. */
  180. deliveryPrice?: number;
  181. /**
  182. * 海博商品ID
  183. */
  184. hbSkuId?: string;
  185. /**
  186. * 主键
  187. */
  188. id?: number;
  189. /**
  190. * 删除状态(0-正常,1-删除)
  191. */
  192. isDelete?: number;
  193. /**
  194. * 进货价
  195. */
  196. purchasePrice?: number;
  197. /**
  198. * 记录时间
  199. */
  200. recTime?: string;
  201. /**
  202. * 门店ID
  203. */
  204. shopId?: number;
  205. /**
  206. * 门店名称
  207. */
  208. shopName?: string;
  209. /**
  210. * 单品ID
  211. */
  212. skuId?: number;
  213. /**
  214. * 修改时间
  215. */
  216. updateTime?: string;
  217. /**
  218. * 渠道名称 */
  219. channelName?: string;
  220. [property: string]: any;
  221. }
  222. interface Sku {
  223. /**
  224. * 实际库存
  225. */
  226. actualStocks?: number;
  227. /**
  228. * 单品编码(海博)
  229. */
  230. hbSkuId?: number;
  231. /**
  232. * 商品编码(海博)
  233. */
  234. hbSpuId?: number;
  235. /**
  236. * 0 正常 1 已被删除
  237. */
  238. isDelete?: number;
  239. /**
  240. * 商品条形码
  241. */
  242. modelId?: string;
  243. /**
  244. * 原价
  245. */
  246. oriPrice?: number;
  247. /**
  248. * 商家编码
  249. */
  250. partyCode?: string;
  251. /**
  252. * sku图片
  253. */
  254. pic: string;
  255. /**
  256. * 价格
  257. */
  258. price?: number;
  259. /**
  260. * 商品ID
  261. */
  262. prodId?: number;
  263. /**
  264. * 商品名称
  265. */
  266. prodName?: string;
  267. /**
  268. * 销售属性组合字符串,格式是p1:v1;p2:v2
  269. */
  270. properties?: string;
  271. /**
  272. * 记录时间
  273. */
  274. recTime?: string;
  275. skuCode?: string;
  276. /**
  277. * 单品ID
  278. */
  279. skuId?: number;
  280. /**
  281. * sku名称
  282. */
  283. skuName?: string;
  284. /**
  285. * 积分价格
  286. */
  287. skuScore?: number;
  288. /**
  289. * 状态:0禁用 1 启用
  290. */
  291. status?: number;
  292. /**
  293. * 库存
  294. */
  295. stocks?: number;
  296. /**
  297. * 修改时间
  298. */
  299. updateTime?: string;
  300. version?: number;
  301. /**
  302. * 体积
  303. */
  304. volume?: number;
  305. /**
  306. * 重量
  307. */
  308. weight?: number;
  309. weightUnit?: string;
  310. [property: string]: any;
  311. }
  312. interface ShopSku {
  313. /**
  314. * 渠道商品
  315. */
  316. channelProdList?: ChannelProd[];
  317. /**
  318. * 门店商品表ID
  319. */
  320. id?: number;
  321. /**
  322. * 0 正常 1 已被删除
  323. */
  324. isDelete?: number;
  325. /**
  326. * 记录时间
  327. */
  328. recTime?: string;
  329. /**
  330. * 门店ID
  331. */
  332. shopId?: number;
  333. /**
  334. * 商品对应门店价格
  335. */
  336. shopSkuPrice?: number;
  337. /**
  338. * 商品对应门店库存
  339. */
  340. shopSkuStocks?: number;
  341. /**
  342. * 单品ID
  343. */
  344. skuId?: number;
  345. /**
  346. * 商品详细
  347. */
  348. sku: Sku;
  349. /**
  350. * 修改时间
  351. */
  352. updateTime?: string;
  353. [property: string]: any;
  354. }
  355. interface Channel {
  356. /**
  357. * 渠道名称
  358. */
  359. channelName?: string;
  360. /**
  361. * 主键
  362. */
  363. id?: number;
  364. /**
  365. * 渠道类型(1-企业用户,2-B端用户,3-C端用户)
  366. */
  367. type?: string;
  368. [property: string]: any;
  369. }
  370. }
  371. /**
  372. * 门店管理模块
  373. */
  374. namespace Store {
  375. interface ShopDetail {
  376. /**
  377. * 店铺所在区域(描述)
  378. */
  379. area?: string;
  380. /**
  381. * 店铺所在区域Id
  382. */
  383. areaId?: number;
  384. /**
  385. * 营业执照
  386. */
  387. businessLicense?: string;
  388. /**
  389. * 物品类型
  390. */
  391. category?: string;
  392. /**
  393. * 店铺所在城市(描述)
  394. */
  395. city?: string;
  396. /**
  397. * 店铺所在城市Id
  398. */
  399. cityId?: number;
  400. /**
  401. * 创建时间
  402. */
  403. createTime?: string;
  404. /**
  405. * 海博门店ID
  406. */
  407. hbStationId?: string;
  408. /**
  409. * 海博门店编码
  410. */
  411. hbStationNo?: string;
  412. /**
  413. * 身份证正面
  414. */
  415. identityCardFront?: string;
  416. /**
  417. * 身份证反面
  418. */
  419. identityCardLater?: string;
  420. /**
  421. * 店铺简介(可修改)
  422. */
  423. intro?: string;
  424. /**
  425. * 分销设置(0关闭 1开启)
  426. */
  427. isDistribution?: number;
  428. /**
  429. * 坐标类型 1 高德|腾讯 2 百度
  430. */
  431. mapType?: string;
  432. /**
  433. * 店铺绑定的手机(登录账号:唯一)
  434. */
  435. mobile?: string;
  436. /**
  437. * ERP门店编码
  438. */
  439. outStationNo?: string;
  440. /**
  441. * 登录密码
  442. */
  443. password?: string;
  444. /**
  445. * 店铺所在省份(描述)
  446. */
  447. province?: string;
  448. /**
  449. * 店铺所在省份Id
  450. */
  451. provinceId?: number;
  452. /**
  453. * 店铺详细地址
  454. */
  455. shopAddress?: string;
  456. /**
  457. * 配送平台店铺编码
  458. */
  459. shopCode?: string;
  460. /**
  461. * 店铺id
  462. */
  463. shopId?: number;
  464. /**
  465. * 店铺所在纬度(可修改)
  466. */
  467. shopLat?: string;
  468. /**
  469. * 店铺所在经度(可修改)
  470. */
  471. shopLng?: string;
  472. /**
  473. * 店铺logo(可修改)
  474. */
  475. shopLogo?: string;
  476. /**
  477. * 店铺名称(数字、中文,英文(可混合,不可有特殊字符),可修改)、不唯一
  478. */
  479. shopName?: string;
  480. /**
  481. * 店长
  482. */
  483. shopOwner?: string;
  484. /**
  485. * 店铺状态(-1:未开通 0: 停业中 1:营业中),可修改
  486. */
  487. shopStatus?: Api.Common.commonStatus;
  488. /**
  489. * 是否同步到配送平台
  490. */
  491. sync?: boolean;
  492. /**
  493. * 店铺联系电话
  494. */
  495. tel?: string;
  496. /**
  497. * 第三方id
  498. */
  499. thirdPartyCode?: string;
  500. /**
  501. * 更新时间
  502. */
  503. updateTime?: string;
  504. /**
  505. * 店长用户id
  506. */
  507. userId?: string;
  508. /**
  509. * 经营状态(0:停业,1正常)
  510. */
  511. runStatus?: Api.Common.commonStatus;
  512. /**
  513. * 营业状态(0:营业,1:打烊)
  514. */
  515. businessTime?: { startTime: string; endTime: string }[];
  516. [property: string]: any;
  517. }
  518. }
  519. /**
  520. * 政企管理模块
  521. */
  522. namespace government {
  523. /**
  524. * 积分充值实体类
  525. *
  526. * PointsRecharge
  527. */
  528. interface PointsRecharge {
  529. /**
  530. * 渠道(企业ID)
  531. */
  532. channelId?: number;
  533. /**
  534. * 渠道(企业)名称
  535. */
  536. channelName?: string;
  537. /**
  538. * 创建者
  539. */
  540. createBy?: string;
  541. /**
  542. * 创建时间
  543. */
  544. createTime?: string;
  545. /**
  546. * 过期日期
  547. */
  548. expiryDate?: string;
  549. /**
  550. * 主键
  551. */
  552. id?: number;
  553. /**
  554. * 充值积分
  555. */
  556. points?: number;
  557. /**
  558. * 充值单号
  559. */
  560. rechargeNumber?: string;
  561. /**
  562. * 积分状态(1-未过期,2-过期)
  563. */
  564. rechargeStatus?: number;
  565. /**
  566. * 备注
  567. */
  568. remark?: string;
  569. /**
  570. * 充值类型
  571. */
  572. type?: number;
  573. /**
  574. * 更新时间
  575. */
  576. updateTime?: string;
  577. /**
  578. * 用户ID
  579. */
  580. userId?: number;
  581. /**
  582. * 员工名称
  583. */
  584. userName?: string;
  585. /**
  586. * 电话号码
  587. */
  588. userPhone?: string;
  589. [property: string]: any;
  590. }
  591. /**
  592. * 充值积分记录统计列表
  593. *
  594. * PointsRechargeVO
  595. */
  596. interface PointsRechargeVO {
  597. /**
  598. * 渠道(企业)名称
  599. */
  600. channelName?: string;
  601. /**
  602. * 操作时间
  603. */
  604. createTime?: string;
  605. /**
  606. * 总充值积分
  607. */
  608. totalPoints?: number;
  609. /**
  610. * 总充值人数
  611. */
  612. totalUserCount?: number;
  613. [property: string]: any;
  614. }
  615. /**
  616. * 积分任务执行失败记录列表
  617. */
  618. interface PointsFailureRecordVO {
  619. /**
  620. * 操作人
  621. */
  622. createBy?: string;
  623. /**
  624. * 时间
  625. */
  626. createTime?: string;
  627. /**
  628. * 失败状态数量
  629. */
  630. failureStatus?: number;
  631. /**
  632. * 任务名称
  633. */
  634. name?: string;
  635. /**
  636. * 成功状态数量
  637. */
  638. successStatus?: number;
  639. [property: string]: any;
  640. }
  641. /**
  642. * 渠道统计
  643. *
  644. * ChannelVO
  645. */
  646. interface ChannelVO {
  647. /**
  648. * 渠道名称
  649. */
  650. channelName?: string;
  651. /**
  652. * 企业编号
  653. */
  654. channelNo?: string;
  655. /**
  656. * 创建日期
  657. */
  658. createTime?: { [key: string]: any };
  659. /**
  660. * 正常员工数
  661. */
  662. normalCount?: number;
  663. /**
  664. * 总员工数
  665. */
  666. staffCount?: number;
  667. /**
  668. * 企业状态(1-正常,0-停用)
  669. */
  670. status: Api.Common.commonStatus;
  671. /**
  672. * 渠道类型(1-企业用户,2-B端用户,3-C端用户)
  673. */
  674. type?: number;
  675. [property: string]: any;
  676. }
  677. /**
  678. * 员工列表
  679. */
  680. interface userList {
  681. /**
  682. * 可用
  683. */
  684. available: number;
  685. /**
  686. * 所属企业
  687. */
  688. channelName: string;
  689. /**
  690. * 已过期积分
  691. */
  692. expired: number;
  693. /**
  694. * 真实姓名
  695. */
  696. realName: string;
  697. /**
  698. * 状态 1正常 ,0 无效
  699. */
  700. status: Common.commonStatus;
  701. /**
  702. * 总积分
  703. */
  704. total: number;
  705. /**
  706. * 使用积分
  707. */
  708. used: number;
  709. /**
  710. * 手机号
  711. */
  712. userMobile: string;
  713. /**
  714. * 员工id
  715. */
  716. userId: number;
  717. }
  718. /**
  719. * 员工导入记录
  720. */
  721. interface importRecordList {
  722. batchNo: string;
  723. channel: string;
  724. completeTime: string;
  725. createTime: string;
  726. error: number;
  727. id: number;
  728. operator: string;
  729. phone: string;
  730. realName: string;
  731. success: number;
  732. taskName: string;
  733. total: number;
  734. }
  735. }
  736. namespace operation {
  737. interface HotSearch {
  738. /**
  739. * 内容
  740. */
  741. content?: string;
  742. /**
  743. * 主键
  744. */
  745. hotSearchId?: number;
  746. /**
  747. * 录入时间
  748. */
  749. recDate?: string;
  750. /**
  751. * 顺序
  752. */
  753. seq?: number;
  754. /**
  755. * 店铺id
  756. */
  757. shopId?: number;
  758. /**
  759. * 状态 默认是1,0为下线
  760. */
  761. status?: number;
  762. /**
  763. * 标题
  764. */
  765. title?: string;
  766. [property: string]: any;
  767. }
  768. /**
  769. * 广告
  770. */
  771. interface AdvertInfo {
  772. /**
  773. * 背景图
  774. */
  775. advertBack?: string;
  776. /**
  777. * 广告图片
  778. */
  779. advertImg?: string;
  780. /**
  781. * 广告名称
  782. */
  783. advertName?: string;
  784. /**
  785. * 排序
  786. */
  787. advertSort?: number;
  788. createTime?: string;
  789. deleted?: number;
  790. id?: number;
  791. /**
  792. * 跳转路径
  793. */
  794. jumpUrl?: string;
  795. /**
  796. * 状态 1正常 2删除
  797. */
  798. status?: Api.Common.commonStatus;
  799. [property: string]: any;
  800. }
  801. }
  802. namespace userManagement {
  803. interface userList {
  804. userId: string;
  805. /**
  806. * 账户名
  807. */
  808. userName: string;
  809. /**
  810. * 昵称
  811. */
  812. nickName: string;
  813. /**
  814. * 真实姓名
  815. */
  816. realName: string;
  817. /**
  818. * 邮箱
  819. */
  820. userMail: string;
  821. /**
  822. * 登录密码
  823. */
  824. loginPassword: string;
  825. /**
  826. * 支付密码
  827. */
  828. payPassword: string;
  829. /**
  830. * 手机号
  831. */
  832. userMobile: string;
  833. modifyTime: string;
  834. userRegtime: string;
  835. userRegip: string;
  836. userMemo: string;
  837. sex: string;
  838. birthDate: string;
  839. /**
  840. * 用户头像
  841. */
  842. pic: string;
  843. /**
  844. * 状态 1正常 0禁用
  845. */
  846. status: Common.commonStatus;
  847. growth: string;
  848. level: number;
  849. levelType: number;
  850. vipEndTime: string;
  851. levelName: string;
  852. /**
  853. * 平台1企业用户,2夫妻店,3市民请集合
  854. */
  855. platform: number;
  856. /**
  857. * 渠道id
  858. */
  859. channelId: number;
  860. }
  861. }
  862. }