12.1重构mk
##购买
购买云存储
基本不需要登录,除了“当前套餐”接口
以前的接口:
- 企业用户(所有套餐信息):http://127.0.0.1:8099/api/web/pricing/hosteddata/general/enterprise.json
- 价格:http://127.0.0.1:8099/api/web/pricing/hosteddata.json
- 按量计费(以前的微服务里):http://127.0.0.1:8099/api/web/pricing/cloudstorage/sourcedata/credit?accessCount=10000&maxStorage=1024
- 。。。上面企业、下面个人
- 个人用户(所有套餐信息):http://127.0.0.1:8099/api/web/pricing/hosteddata/general.json
- 当前套餐(未登录为免费版,登录后动态获取):http://127.0.0.1:8099/api/web/mycontent/cloud/account/packages.json
- ——————
- 个人选择升级版本时计算价格:https://cdtest.supermapol.com/api/web/pricing/hosteddata.json
现在接口(没有企业版的接口):
- 个人用户(所有套餐信息):https://cdtest.supermapol.com/api/web/pricing/hosteddata/general.json
- 当前套餐(未登录为免费版,登录后动态获取):https://cdtest.supermapol.com/api/web/mycontent/cloud/account/packages.json
- 当前套餐(未登录为免费版,登录后动态获取):https://cdtest.supermapol.com/api/web/pricing/hosteddata.json
/upgradePackages.json
可升级的套餐信息,数据库pgradePackages表
/price.json
主机所有套餐id和name,数据库prices表()###我的云存储
以前的接口:
当前套餐(未登录为免费版,登录后动态获取):https://cdtest.supermapol.com/api/web/pricing/hosteddata.json
接口:
https://cdtest.supermapol.com/web/mycontent/datas/capacity.json
购买云主机
以前接口:
主机升级套餐(可能买了之后有升级的信息)http://127.0.0.1:8099/api/web/pricing/hostedgisserver/upgradePackages.json
所有价格(get,配置文件写死的所有价格)http://127.0.0.1:8099/api/web/pricing/hostedgisserver/price.json
主机版本(标准、专业、高级和可选模块)http://127.0.0.1:8099/api/web/cloudhosting/iservermodulesrequirements.json
。。。
主机套餐(9种)http://127.0.0.1:8099/api/web/pricing/hostedgisserver/packages.json
主机价格(根据选项,实时计算)http://127.0.0.1:8099/api/web/pricing/hostedgisserver/price.json
接口:
- 主机套餐(9种,现在只有3种)https://cdtest.supermapol.com/api/web/pricing/hostedgisserver/packages.json
- 主机价格(根据选项,实时计算)https://cdtest.supermapol.com/api/web/pricing/hostedgisserver/price.json
云主机的业务代码基本废弃了,是否保留?保持原样:简单重写
丢弃的话,可惜了辛苦写的代码,可惜啊购买许可
以前的接口和现在一样:
- 许可产品列表:https://cdtest.supermapol.com/api/web/pricing/timelicense/products.json?category=5
- 许可产品详情:https://cdtest.supermapol.com/api/web/pricing/timelicense/detail.json?productid=10001004
- 根据选择的产品计算价格:https://cdtest.supermapol.com/api/web/pricing/timelicense/calculate.json
##在线商店
创建许可订单
/api/web/mycontent/cloud/orders/timelicense.json
创建过程(OrderComponentImpl类):
- 插入orderCommonInfo表
- 插入orderCommand表
- 根据不同种类(重点),插入不同的表,如许可online_timelicenseorder表;并插入online_timelicenseorderrecord表
- 更新orderCommonInfo表的databaseResult字段以标识“INSERT_SUCEESS”,完成原子性,事务性
- 最后根据i++的次数,判断失败,倒序删除之前过程
未处理:
<insert id="insertOrderPaidCommand" parameterType="java.util.Map">
insert into
orderCommand(orderId,paidCmd)
values(#{orderId},#{paidCmd,javaType=java.io.Serializable}) on
duplicate key update
paidCmd = #{paidCmd,javaType=java.io.Serializable}
</insert>创建云存储订单
/api/web/mycontent/cloud/orders/hosteddata.json
##我的订单
查询过程:
- 查询orderCommonInfo表的符合条件的次数count(*)
- 查询orderCommonInfo表(符合条件)
订单详情:https://cdtest.supermapol.com/api/web/mycontent/cloud/orders/02-2022012515302030200000.json
- 多表联查:online_timelicenseorder、online_timelicenseorderrecord、timelicenseproduct_to_module、online_timelicensemodule、online_timelicenseproduct、ordercommoninfo
- 根据订单Id查询支付信息:order_payment_detail表
- 查询订单:查询orderCommonInfo表根据id
发票详情:https://cdtest.supermapol.com/api/web/mycontent/invoices.json?orderid=02-2022012515302030200000
云存储资源:https://cdtest.supermapol.com/api/web/pricing/hosteddata/general.json?packageId=0100
