Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 1.26 KB

用户购买阅读权+所有权.md

File metadata and controls

60 lines (38 loc) · 1.26 KB

1.普通用户购买阅读权

功能描述:点击选项,用户确认购买

服务标识符 serviceID : service100@mooc

用户标识符 user : test@qqqq.com

POST  Parameters:

{
  "$class": "org.education.UserConsumeService",
  "serviceID": "service100@mooc",
  "user": "test@qqqq.com"
}

Curl:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d ' \ 
 { \ 
   "$class": "org.education.UserConsumeService", \ 
   "serviceID": "service100%40mooc", \ 
   "user": "test%40qqqq.com" \ 
 }' 'http://IP:3000/api/UserConsumeService'

2.机构用户购买所有权

功能描述:点击选项,用户确认购买。合约逻辑:所有权购买成功后,服务的所有者更新为购买机构用户。

服务标识符 serviceID : service100@mooc

用户标识符 user : CCNU@email.com

POST  Parameters:

{
  "$class": "org.education.CompanyBuyOnwership",
  "serviceID": "service100@mooc",
  "company": "CCNU@email.com"
}

Curl:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ 
   "$class": "org.education.CompanyBuyOnwership", \ 
   "serviceID": "service100%40mooc", \ 
   "company": "CCNU%40email.com" \ 
 } \ 
 ' 'http://IP:3000/api/CompanyBuyOnwership'