O2URLContext.swift 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. //
  2. // O2URLContext.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 16/7/6.
  6. // Copyright © 2016年 zoneland. All rights reserved.
  7. //
  8. import Foundation
  9. //用户登录请求URL
  10. //#define ZL_LOGIN_MODULE_KEY @"x_organization_assemble_authentication"
  11. //#define ZL_LOGIN_ACTION_QEURY @"jaxrs/authentication"
  12. struct LoginContext{
  13. static let loginContextKey = "x_organization_assemble_authentication"
  14. static let loginActionQuery = "jaxrs/authentication"//校验token
  15. static let codeLoginActionQuery = "jaxrs/authentication/code/credential/##credential##"
  16. static let codeAuthActionQuery = "jaxrs/authentication/code"
  17. static let scanCodeAuthActionQuery = "jaxrs/authentication/bind/meta/##meta##"
  18. }
  19. ////文件管理上下文
  20. //#define ZL_FILE_MANAGE_MODULE_KEY @"x_file_assemble_control"
  21. //#define ZL_FILE_MANAGE_FOLDER_TOP_QUERY @"jaxrs/complex/top"
  22. //#define ZL_FILE_MANAGE_FOLDER_QUERY @"jaxrs/complex/folder/p0"
  23. //#define ZL_FILE_MANAGE_FOLDER_DELETE_QUERY @"jaxrs/folder/p0"
  24. //#define ZL_FILE_MANAGE_FOLDER_RENAME_QUERY @"jaxrs/folder/p0"
  25. //#define ZL_FILE_DOWNLOAD_QUERY @"servlet/download/p0"
  26. //#define ZL_FILE_MANAGE_FOLDER_CREATE_QUERY @"jaxrs/folder"
  27. //#define ZL_FILE_MANAGE_FILE_UPLOAD_QUERY @"servlet/upload"
  28. //#define ZL_FILE_MANAGE_FILE_EDITOR_QUERY @"jaxrs/editor/list"
  29. //#define ZL_FILE_MANAGE_FILE_SHARE_QUERY @"jaxrs/share/list"
  30. //#define ZL_FILE_MANAGE_FILE_DELETE_QUERY @"jaxrs/attachment/p0"
  31. //#define ZL_FILE_MANAGE_FILE_RENAME_QUERY @"jaxrs/attachment/p0"
  32. //#define ZL_FILE_MANAGE_FILE_DOWNLOAD_QUERY @"servlet/download/p0/stream"
  33. //#define ZL_FILE_MANAGE_FILE_MY_SHARE_QUERY @"jaxrs/attachment/list/share/p0"
  34. //#define ZL_FILE_MANAGE_FILE_MY_EDITOR_QUERY @"jaxrs/attachment/list/editor/p0"
  35. /**
  36. * 云盘相关
  37. */
  38. struct FileContext {
  39. static let fileContextKey = "x_file_assemble_control"
  40. static let fileTopListQuery = "jaxrs/complex/top"
  41. static let fileFolderItemIdQuery = "jaxrs/complex/folder/##id##"
  42. static let fileFolderActionIdQuery = "jaxrs/folder/##id##"
  43. static let fileFolderCreateQuery = "jaxrs/folder"
  44. static let fileDownloadCMSIdQuery = "servlet/download/##id##/stream"
  45. static let fileDownloadItemIdQuery = "jaxrs/attachment/##id##/download/stream"
  46. static let fileDownloadPicItemIdQuery = "jaxrs/file/##id##/download/stream"
  47. static let fileDownloadNoStreamIdQuery = "jaxrs/file/##id##/download"
  48. static let fileUploadTopQuery = "jaxrs/attachment/upload/folder/(0)"
  49. static let fileUploadSubQuery = "jaxrs/attachment/upload/folder/##id##"
  50. static let fileUploadReference = "jaxrs/file/upload/referencetype/##referencetype##/reference/##reference##/scale/##scale##"
  51. static let fileEditorQuery = "jaxrs/editor/list"
  52. static let fileShareQuery = "jaxrs/share/list"
  53. static let fileDeleteQuery = "jaxrs/attachment/##id##"
  54. static let fileRenameQuery = "jaxrs/attachment/##id##"
  55. static let fileShareActionQuery = "jaxrs/attachment/##id##"
  56. static let fileMyShareListQuery = "jaxrs/attachment/list/share/##name##"
  57. static let fileMyEditorListQuery = "jaxrs/attachment/list/editor/##name##"
  58. }
  59. /**
  60. * 个人信息相关
  61. */
  62. struct PersonContext {
  63. static let personContextKey = "x_organization_assemble_personal" //API上下文
  64. static let personInfoQuery = "jaxrs/person" //获得个人信息 提交个人信息
  65. static let personPasswordQuery = "jaxrs/password/decrypt" //获得明文口令
  66. static let personPasswordUpdateQuery = "jaxrs/password" //修改口令
  67. static let personIconUploadQuery = "jaxrs/person/icon" //更改图像
  68. }
  69. /**
  70. * 通讯录相关
  71. */
  72. struct ContactContext {
  73. static let contactsContextKey = "x_organization_assemble_express"
  74. static let contactsContextKeyV2 = "x_organization_assemble_control"
  75. static let topLevelUnitByIdentity = "jaxrs/unit/identity/level/object" // x_organization_assemble_express 上下文下的
  76. static let personInfoByNameQuery = "jaxrs/person/##name##"
  77. static let personIconByNameQuery = "servlet/icon/##name##" //获取图像
  78. static let personIconByNameQueryV2 = "jaxrs/person/##name##/icon"
  79. static let personIdentityByNameQuery = "jaxrs/identity/list/person/##name##"
  80. static let personOfDepartmentByNameQuery = "jaxrs/department/list/person/##name##"
  81. static let personOfGroupByNameQuery = "jaxrs/group/list/person/##name##/sup/nested"
  82. static let personSearchByKeyQuery = "jaxrs/person/list/like/##key##"
  83. static let personSearchByKeyQueryV2 = "jaxrs/person/list/like"
  84. static let topCompanyQuery = "jaxrs/complex/list/company/top"
  85. static let topUnitQuery = "jaxrs/unit/list/top"
  86. static let subGroupByNameQuery = "jaxrs/group/list/##name##/sub/direct"
  87. static let subCompanyByNameQuery = "jaxrs/complex/company/##name##"
  88. static let companySearchByKeyQuery = "jaxrs/company/list/like/##key##"
  89. static let subDepartByNameQuery = "jaxrs/complex/department/##name##"
  90. static let subUnitByNameQuery = "jaxrs/unit/list/##name##/sub/direct"
  91. static let subPersonByNameQuery = "jaxrs/complex/list/identity/person/##name##"
  92. static let subIdentityByNameQuery = "jaxrs/identity/list/unit/##name##"
  93. static let departmentSearchByKeyQuery = "jaxrs/department/list/like/##key##"
  94. static let subPersonInfoByNameQuery = "jaxrs/complex/person/##name##"
  95. static let personNextListQuery = "jaxrs/person/list/##id##/next/##count##"
  96. static let personPrevListQuery = "jaxrs/person/list/##id##/prev/##count##"
  97. static let personDirectManageQuery = "jaxrs/personattribute/##attribute##/person/##name##"
  98. static let OrgContextKey = "x_organization_assemble_control"
  99. }
  100. struct ApplicationContext {
  101. static let applicationContextKey = "x_processplatform_assemble_surface"
  102. static let applicationContextKey2 = "x_portal_assemble_surface"
  103. static let applicationListQuery = "jaxrs/application/list/complex"
  104. static let applicationOnlyListQuery = "jaxrs/application/list"
  105. static let applicationOnlyFlowByAppQuery = "jaxrs/process/list/application/##applicationId##"
  106. static let applicationListQuery2 = "application.json"
  107. static let applicationListQueryForPortal = "jaxrs/portal/list"
  108. static let applicationIconQuery = "jaxrs/portal/##applicationId##/icon"
  109. }
  110. //首页图片
  111. struct HotpicContext {
  112. static let hotpicContextKey = "x_hotpic_assemble_control"
  113. static let hotpicImageByIdQuery = "servlet/picture/##id##"
  114. static let hotpicImageSizeByIdQuery = "servlet/picture/##id##/size/##size##"
  115. static let hotpicAllListQuery = "jaxrs/user/hotpic/filter/list/page/##page##/count/##count##"
  116. }
  117. /**
  118. * 工作任务相关
  119. */
  120. struct TaskContext {
  121. static let taskContextKey = "x_processplatform_assemble_surface"
  122. static let taskDataContextKey = "x_processplatform_assemble_surface"
  123. static let taskDataSaveQuery = "jaxrs/data/work/##id##"
  124. static let taskWorkDeleteQuery = "jaxrs/work/##id##"
  125. static let todoTaskSaveAndSubmitQuery = "jaxrs/task/##id##/processing"
  126. static let todoTaskListQuery = "jaxrs/task/list/##id##/next/##count##"
  127. static let todoTaskListFilterQuery = "jaxrs/task/list/##id##/next/##count##/filter"
  128. static let todoTaskSubmitQuery = "jaxrs/task/##id##"
  129. static let todoTaskGetAttachmentInfoQuery = "jaxrs/attachment/##attachmentId##/work/##workId##"
  130. static let todoTaskGetAttachmentQuery = "jaxrs/attachment/download/##attachmentId##/work/##workId##"
  131. static let todoTaskUpReplaceAttachmentQuery = "jaxrs/attachment/update/##attachmentId##/work/##workId##"
  132. static let todoTaskUploadAttachmentQuery = "jaxrs/attachment/upload/work/##workId##"
  133. static let todoCreateAvaiableIdentityByIdQuery = "jaxrs/process/list/available/identity/process/##processId##"
  134. }
  135. struct ReadContext {
  136. static let readContextKey = "x_processplatform_assemble_surface"
  137. static let readSubmitQuery = "jaxrs/read/##id##"
  138. static let readProcessing = "jaxrs/read/##id##/processing"
  139. static let readListByPageSizeQuery = "jaxrs/read/list/##id##/next/##count##"
  140. static let readListByPageSizeFilterQuery = "jaxrs/read/list/##id##/next/##count##/filter"
  141. }
  142. struct TaskedContext {
  143. static let taskedContextKey = "x_processplatform_assemble_surface"
  144. static let taskedListByPageSizeQuery = "jaxrs/taskcompleted/list/##id##/next/##count##"
  145. static let taskedListByPageSizeFilterQuery = "jaxrs/taskcompleted/list/##id##/next/##count##/filter"
  146. static let taskedDataByIdQuery = "jaxrs/taskcompleted/##id##/reference"
  147. static let taskedRetractQuery = "jaxrs/work/##work##/retract"
  148. static let taskedGetAttachmentInfoQuery = "jaxrs/attachment/##attachmentId##/workcompleted/##workcompletedId##"
  149. static let taskedGetAttachmentQuery = "jaxrs/attachment/download/##attachmentId##/workcompleted/##workcompletedId##"
  150. }
  151. struct ReadedContext {
  152. static let readedContextKey = "x_processplatform_assemble_surface"
  153. static let readedListByPageSizeQuery = "jaxrs/readcompleted/list/##id##/next/##count##"
  154. static let readedListByPageSizeFilterQuery = "jaxrs/readcompleted/list/##id##/next/##count##/filter"
  155. }
  156. struct WorkContext {
  157. static let workContextKey = "x_processplatform_assemble_surface"
  158. static let workCreateQuery = "jaxrs/work/process/##id##"
  159. static let draftWorkCreateQuery = "jaxrs/draft/process/##processId##"
  160. }
  161. /**
  162. * 会议相关
  163. */
  164. struct MeetingContext {
  165. static let meetingContextKey = "x_meeting_assemble_control"
  166. static let buildCreateQuery = "jaxrs/building"
  167. static let buildSearchPinYinQuery = "jaxrs/building//list/like/pinyin/##pinyin##"
  168. static let buildListQuery = "jaxrs/building/list"
  169. static let buildListSearchQuery = "jaxrs/building/list/like/##searchkey##"
  170. static let buildListPinYinInitialSearchQuery = "jaxrs/building/list/pinyininitial/##pinyininitial##"
  171. static let buildListStartAndCompletedQuery = "jaxrs/building/list/start/##start##/completed/##completed##"
  172. static let buildItemIdQuery = "jaxrs/building/##id##"
  173. static let roomCreateQuery = "jaxrs/room"
  174. static let roomSearchPinYinQuery = "jaxrs/room//list/like/pinyin/##pinyin##"
  175. static let roomListQuery = "jaxrs/room/list"
  176. static let roomListSearchQuery = "jaxrs/room/list/like/##searchkey##"
  177. static let roomLIstPinYinInitialSearchQuery = "jaxrs/room/list/pinyininitial/##pinyininitial##"
  178. static let roomItemIdQuery = "jaxrs/room/##id##"
  179. static let meetingCreateQuery = "jaxrs/meeting"
  180. static let meetingListDayCountQuery = "jaxrs/meeting/list/coming/day/##day##"
  181. static let meetingListMonthCountQuery = "jaxrs/meeting/list/coming/month/##month##"
  182. static let meetingListAcceptQuery = "jaxrs/meeting/list/wait/accept"
  183. static let meetingListConfirmQuery = "jaxrs/meeting/list/wait/confirm"
  184. static let meetingListYearMonthQuery = "jaxrs/meeting/list/year/##year##/month/##month##"
  185. static let meetingListYearMonthDayQuery = "jaxrs/meeting/list/year/##year##/month/##month##/day/##day##"
  186. static let meetingItemIdQuery = "jaxrs/meeting/##id##"
  187. static let meetingItemAcceptIdQuery = "jaxrs/meeting/##id##/accept"
  188. static let meetingItemAddInviteIdQuery = "jaxrs/meeting/##id##/add/invite"
  189. static let meetingItemConfirmAllowIdQuery = "jaxrs/meeting/##id##/confirm/allow"
  190. static let meetingItemConfirmDenyIdQuery = "jaxrs/meeting/##id##/confirm/deny"
  191. static let meetingItemCompletedIdQuery = "jaxrs/meeting/##id##/manual/completed"
  192. static let meetingItemRejectIdQuery = "jaxrs/meeting/##id##/reject"
  193. }
  194. //考勤管理
  195. //#define ZL_ATTENDANCE_MODULE_KEY @"x_attendance_assemble_control"
  196. //#define ZL_ATTENDANCE_DETAIL_LIST_QUERY @"jaxrs/attendancedetail/filter/list/p0/next/p1"
  197. //#define ZL_ATTENDANCE_DETAIL_MONTH_PIECHART_QUERY @"jaxrs/attendancedetail/filter/list/user"
  198. //#define ZL_ATTENDANCE_SETTING_APPEALABLE_QUERY @"jaxrs/attendancesetting/code/APPEALABLE"
  199. //#define ZL_ATTENDANCE_ATTENDANCE_INFO_QUERY @"jaxrs/attendanceappealInfo/appeal/p0"
  200. //#define ZL_ATTENDANCE_ATTENDANCE_CHECK_LIST_QUERY @"jaxrs/attendanceappealInfo/filter/list/p0/next/p1"
  201. //#define ZL_ATTENDANCE_ATTENDANCE_CHECK_SUBMIT_QUERY @"jaxrs/attendanceappealInfo/process/p0"
  202. struct icContext {
  203. static let icContextKey = "x_attendance_assemble_control"
  204. static let detailListQuery = "jaxrs/attendancedetail/filter/list/##id##/next/##count##"
  205. static let detailMonthPieChartQuery = "jaxrs/attendancedetail/filter/list/user"
  206. static let settingAppealableQuery = "jaxrs/attendancesetting/code/APPEALABLE"
  207. static let attendanceInfoQuery = "jaxrs/attendanceappealInfo/appeal/##id##"
  208. static let attendanceCheckListQuery = "jaxrs/attendanceappealInfo/filter/list/##id##/next/##count##"
  209. static let attendanceCheckSubmitQuery = "jaxrs/attendanceappealInfo/process/##id##"
  210. }
  211. struct CMSContext {
  212. static let cmsContextKey = "x_cms_assemble_control"
  213. static let cmsCategoryQuery = "jaxrs/appinfo/list/user/view"
  214. static let cmsCanPublishCategoryQuery = "jaxrs/appinfo/get/user/publish/##appId##" //GET 查询app下当前用户能发布的category,返回的是app对象
  215. static let cmsCategoryListQuery = "jaxrs/categoryinfo/list/publish/app/##appId##"
  216. static let cmsCategoryDetailQuery = "jaxrs/document/filter/list/##id##/next/##count##"
  217. static let cmsDocumentDraftQuery = "jaxrs/document/draft/list/##id##/next/##count##" //PUT 查询草稿 {"categoryIdList":["36783507-3109-4701-a1bd-487e12340af5"],"creatorList":["楼国栋@louguodong@P"],"documentType":"全部"}
  218. static let cmsDocumentPost = "jaxrs/document" //保存修改文档 POST
  219. static let cmsAttachmentListQuery = "jaxrs/fileinfo/list/document/##documentId##"
  220. static let cmsAttachmentGET = "jaxrs/fileinfo/##attachId##/document/##documentId##" //附件对象获取
  221. static let cmsAttachmentDownloadQuery = "servlet/download/##id##/stream"
  222. static let cmsAttachmentDownloadNewQuery = "jaxrs/fileinfo/download/document/##attachId##" //下载附件 GET
  223. static let cmsAttachmentUpload = "jaxrs/fileinfo/upload/document/##docId##" //上传附件POST
  224. static let cmsAttachmentReplace = "jaxrs/fileinfo/update/document/##docId##/attachment/##attachId##" //替换附件 POST
  225. }
  226. //BBS
  227. struct BBSContext {
  228. static let bbsContextKey = "x_bbs_assemble_control"
  229. static let getCategoryAndSectionQuery = "jaxrs/mobile/view/all" //所有分区及所有子板块
  230. static let getSectionItemQuery = "jaxrs/section/##id##" //板块详细信息列表
  231. static let sectionTopItemQuery = "jaxrs/subject/top/##id##" //板块内的置顶帖
  232. static let subjectByIdQuery = "jaxrs/subject/view/##id##" //获得具体帖子
  233. static let subjectFromSectionByPageQuery = "jaxrs/subject/filter/list/page/##pageNumber##/count/##pageSize##" //板块帖子分页查询
  234. static let uploadImageQuery = "servlet/upload/subject" //上传图片
  235. static let imageDisplayQuery = "servlet/download/subjectattachment/##id##/stream" //图片显示地址
  236. static let itemCreateQuery = "jaxrs/user/subject"//发帖
  237. static let itemReplyQuery = "jaxrs/user/reply" //回帖
  238. static let bbsSectionIconQuery = "servlet/section/##id##/icon"
  239. }
  240. struct CommunicateContext {
  241. static let communicateContextKey = "x_message_assemble_communicate"
  242. static let imUploadFileQuery = "jaxrs/im/msg/upload/##conversationId##/type/##type##"
  243. //文件打开地址
  244. static let imDownloadFileQuery = "jaxrs/im/msg/download/##id##"
  245. //图片根据尺寸压缩 0<width<5000 0<height<5000
  246. static let imDownloadImageWithSizeQuery = "jaxrs/im/msg/download/##id##/image/width/##width##/height/##height##"
  247. }
  248. struct DesktopContext {
  249. static let DesktopContextKey = "x_desktop"
  250. static let todoDesktopQuery = "workmobilewithaction.html?workid=##workid##"
  251. static let todoedDestopQuery = "workmobilewithaction.html?workcompletedid=##workCompletedId##"
  252. static let todoDraftQuery = "workmobilewithaction.html?draft=##draft##" //draft 对象 ProcessDraftBean
  253. static let bbsItemDetailQuery = "forumdocMobile.html?id=##subjectId##"
  254. static let cmsItemDetailQuery = "cmsdocMobile.html?id=##documentId##"
  255. static let appDetailQuery = "appMobile.html?app=portal.Portal&status=##status##"
  256. static let portalMobileQuery = "portalmobile.html?id=##portalId##"
  257. }