Skip to content

12.1重构mk

##购买

购买云存储

基本不需要登录,除了“当前套餐”接口

以前的接口:

现在接口(没有企业版的接口):

/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

购买云主机

以前接口:

接口:

云主机的业务代码基本废弃了,是否保留?保持原样:简单重写
丢弃的话,可惜了辛苦写的代码,可惜啊

购买许可

以前的接口和现在一样:

##在线商店

创建许可订单

/api/web/mycontent/cloud/orders/timelicense.json

创建过程(OrderComponentImpl类):

  1. 插入orderCommonInfo表
  2. 插入orderCommand表
  3. 根据不同种类(重点),插入不同的表,如许可online_timelicenseorder表;并插入online_timelicenseorderrecord表
  4. 更新orderCommonInfo表的databaseResult字段以标识“INSERT_SUCEESS”,完成原子性,事务性
  5. 最后根据i++的次数,判断失败,倒序删除之前过程

未处理:

xml
<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

##我的订单

订单列表:https://cdtest.supermapol.com/api/web/mycontent/cloud/orders.json?orderSearchParameter={"currentPage"%3A1%2C"pageSize"%3A10%2C"orderBy"%3A"CREATETIME"%2C"orderType"%3A"DESC"}

查询过程:

  1. 查询orderCommonInfo表的符合条件的次数count(*)
  2. 查询orderCommonInfo表(符合条件)

订单详情:https://cdtest.supermapol.com/api/web/mycontent/cloud/orders/02-2022012515302030200000.json

  1. 多表联查:online_timelicenseorder、online_timelicenseorderrecord、timelicenseproduct_to_module、online_timelicensemodule、online_timelicenseproduct、ordercommoninfo
  2. 根据订单Id查询支付信息:order_payment_detail表
  3. 查询订单:查询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