api-doc.md.ftl 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. ## 用户登录
  2. ### 登录接口
  3. #### 登录
  4. - **URI:** /admin/upms/login/doLogin
  5. - **Type:** GET
  6. - **Content-Type:** multipart/form-data
  7. - **Request-Headers:**
  8. Name|Type|Description
  9. --|--|--
  10. Authorization|String|身份验证的Token
  11. - **Request-Parameters:**
  12. Parameter|Type|Required|Description
  13. --|--|--|--
  14. loginName|string|true|用户名
  15. password|string|true|加密后的用户密码
  16. #### 退出
  17. - **URI:** /admin/upms/login/logout
  18. - **Type:** POST
  19. - **Content-Type:** application/json; chartset=utf-8
  20. - **Request-Headers:**
  21. Name|Type|Description
  22. --|--|--
  23. Authorization|String|身份验证的Token
  24. #### 修改密码
  25. - **URI:** /admin/upms/login/changePassword
  26. - **Type:** POST
  27. - **Content-Type:** application/json; chartset=utf-8
  28. - **Request-Headers:**
  29. Name|Type|Description
  30. --|--|--
  31. Authorization|String|身份验证的Token
  32. - **Request-Parameters:**
  33. Parameter|Type|Required|Description
  34. --|--|--|--
  35. oldPass|string|true|加密后的原用户密码
  36. newPass|string|true|加密后的新用户密码
  37. <#list project.serviceList as service>
  38. ## ${service.showName}
  39. <#list service.defaultGroupClassSet as apiClass>
  40. ### ${apiClass.name}
  41. <#list apiClass.methodList as apiMethod>
  42. #### ${apiMethod.name}
  43. - **URI:** ${apiMethod.requestPath}
  44. - **Type:** ${apiMethod.httpMethod}
  45. - **Content-Type:** <#if apiMethod.httpMethod == "GET" || apiMethod.queryParamArgumentList?size gt 0 || apiMethod.uploadParamArgumentList?size gt 0>multipart/form-data<#else>application/json; chartset=utf-8</#if>
  46. - **Request-Headers:**
  47. Name|Type|Description
  48. --|--|--
  49. Authorization|String|身份验证的Token
  50. <#if apiMethod.queryParamArgumentList?size gt 0 || apiMethod.uploadParamArgumentList?size gt 0>
  51. - **Request-Parameters:**
  52. Parameter|Type|Required|Description
  53. --|--|--|--
  54. <#list apiMethod.queryParamArgumentList as apiArgument>
  55. <#if apiArgument.modelData??>
  56. <#list apiArgument.modelData.tableFieldList as apiField>
  57. ${apiField.name}|${apiField.typeName}|<#if apiMethod.listDictUrl>false<#else><#if apiField.requiredColumn>true<#else>false</#if></#if>|${apiField.comment}
  58. </#list>
  59. <#else>
  60. ${apiArgument.name}|${apiArgument.typeName}|<#if apiMethod.listDictUrl>false<#else><#if apiArgument.required>true<#else>false</#if></#if>|${apiArgument.comment}
  61. </#if><#-- apiArgument.modelData?? -->
  62. </#list>
  63. </#if>
  64. <#list apiMethod.uploadParamArgumentList as apiArgument>
  65. ${apiArgument.name}|File|true|${apiArgument.comment}
  66. </#list>
  67. <#if apiMethod.jsonParamArgumentList?size gt 0>
  68. - **Request-Body:**
  69. ``` json
  70. {
  71. <#list apiMethod.jsonParamArgumentList as apiArgument>
  72. <#if apiArgument.modelData??>
  73. <#if apiArgument.collectionParam>
  74. "${apiArgument.name}" : [
  75. {
  76. <#if apiMethod.listUrl>
  77. <#list apiArgument.modelData.filteredFieldList as apiField>
  78. "${apiField.name}" : "${apiField.typeName} | false | <#if apiField.name == "searchString">模糊搜索字符串。<#else>${apiField.comment}</#if>"<#if apiField_has_next>,</#if>
  79. </#list>
  80. <#else><#-- apiMethod.listUrl -->
  81. <#list apiArgument.modelData.tableFieldList as apiField>
  82. <#if !apiMethod.addUrl || !apiField.primaryKey>
  83. "${apiField.name}" : "${apiField.typeName} | <#if apiField.requiredColumn>true<#else>false</#if> | ${apiField.comment}"<#if apiField_has_next>,</#if>
  84. </#if>
  85. </#list>
  86. </#if><#-- apiMethod.listUrl -->
  87. }
  88. ]<#if apiArgument_has_next>,</#if>
  89. <#else><#-- apiArgument.collectionParam -->
  90. "${apiArgument.name}" : {
  91. <#if apiMethod.listUrl>
  92. <#list apiArgument.modelData.filteredFieldList as apiField>
  93. "${apiField.name}" : "${apiField.typeName} | false | <#if apiField.name == "searchString">模糊搜索字符串。<#else>${apiField.comment}</#if>"<#if apiField_has_next>,</#if>
  94. </#list>
  95. <#else><#-- apiMethod.listUrl -->
  96. <#list apiArgument.modelData.tableFieldList as apiField>
  97. <#if !apiMethod.addUrl || !apiField.primaryKey>
  98. "${apiField.name}" : "${apiField.typeName} | <#if apiField.requiredColumn>true<#else>false</#if> | ${apiField.comment}"<#if apiField_has_next>,</#if>
  99. </#if>
  100. </#list>
  101. </#if><#-- apiMethod.listUrl -->
  102. }<#if apiArgument_has_next>,</#if>
  103. </#if><#-- apiArgument.collectionParam -->
  104. <#elseif apiArgument.orderParam>
  105. "${apiArgument.name}" : [
  106. {
  107. "fieldName" : "String | false | 排序字段名",
  108. "asc" : "Boolean | false | 是否升序"
  109. }
  110. ]<#if apiArgument_has_next>,</#if>
  111. <#elseif apiArgument.groupParam>
  112. "${apiArgument.name}" : [
  113. {
  114. "fieldName" : "String | false | 分组字段名",
  115. "aliasName" : "String | false | 分组字段别名",
  116. "dateAggregateBy" : "String | false | 是否按照日期聚合,可选项(day|month|year)"
  117. }
  118. ]<#if apiArgument_has_next>,</#if>
  119. <#elseif apiArgument.pageParam>
  120. "${apiArgument.name}" : {
  121. "pageNum": "Integer | false | 分页页号",
  122. "pageSize": "Integer | false | 每页数据量"
  123. }<#if apiArgument_has_next>,</#if>
  124. <#elseif apiArgument.queryParam || apiArgument.aggregationParam>
  125. ${apiArgument.name}" : {
  126. }<#if apiArgument_has_next>,</#if>
  127. <#else><#-- apiArgument.modelData?? -->
  128. <#if apiArgument.collectionParam>
  129. "${apiArgument.name}" : [ "${apiArgument.typeName} | ${apiArgument.required}<#if apiArgument.comment??> | ${apiArgument.comment}</#if>" ]<#if apiArgument_has_next>,</#if>
  130. <#else>
  131. "${apiArgument.name}" : "${apiArgument.typeName} | ${apiArgument.required}<#if apiArgument.comment??> | ${apiArgument.comment}</#if>"<#if apiArgument_has_next>,</#if>
  132. </#if>
  133. </#if><#-- apiArgument.modelData?? -->
  134. </#list>
  135. }
  136. ```
  137. </#if>
  138. </#list><#-- apiClass.methodList as apiMethod -->
  139. </#list><#-- upmsClassList as apiClass -->
  140. </#list>