Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

210 lignes
5.8 KiB

  1. {
  2. "meta": {
  3. "$_GET": [
  4. {
  5. "type": "text",
  6. "name": "sort"
  7. },
  8. {
  9. "type": "text",
  10. "name": "dir"
  11. },
  12. {
  13. "type": "text",
  14. "name": "filter"
  15. },
  16. {
  17. "type": "number",
  18. "name": "userid"
  19. }
  20. ]
  21. },
  22. "exec": {
  23. "steps": {
  24. "name": "query",
  25. "module": "dbconnector",
  26. "action": "select",
  27. "options": {
  28. "connection": "authdb",
  29. "sql": {
  30. "type": "select",
  31. "columns": [
  32. {
  33. "table": "xuserrole",
  34. "column": "id"
  35. },
  36. {
  37. "table": "roles",
  38. "column": "id",
  39. "alias": "roleid"
  40. },
  41. {
  42. "table": "roles",
  43. "column": "name"
  44. }
  45. ],
  46. "params": [
  47. {
  48. "operator": "equal",
  49. "type": "expression",
  50. "name": ":P1",
  51. "value": "{{$_GET.userid}}",
  52. "test": ""
  53. }
  54. ],
  55. "table": {
  56. "name": "xuserrole"
  57. },
  58. "primary": "id",
  59. "joins": [
  60. {
  61. "table": "roles",
  62. "column": "*",
  63. "type": "INNER",
  64. "clauses": {
  65. "condition": "AND",
  66. "rules": [
  67. {
  68. "table": "roles",
  69. "column": "id",
  70. "operator": "equal",
  71. "operation": "=",
  72. "value": {
  73. "table": "xuserrole",
  74. "column": "roleid"
  75. }
  76. }
  77. ]
  78. },
  79. "primary": "id"
  80. }
  81. ],
  82. "query": "select `xuserrole`.`id`, `roles`.`id` as `roleid`, `roles`.`name` from `xuserrole` inner join `roles` on `roles`.`id` = `xuserrole`.`roleid` where `xuserrole`.`roleid` <> ? and `xuserrole`.`roleid` <> ? and `xuserrole`.`roleid` <> ? and `xuserrole`.`roleid` <> ? and `xuserrole`.`userid` = ?",
  83. "wheres": {
  84. "condition": "AND",
  85. "rules": [
  86. {
  87. "id": "xuserrole.roleid",
  88. "field": "xuserrole.roleid",
  89. "type": "double",
  90. "operator": "not_equal",
  91. "value": 4,
  92. "data": {
  93. "table": "xuserrole",
  94. "column": "roleid",
  95. "type": "number",
  96. "columnObj": {
  97. "type": "integer",
  98. "primary": false,
  99. "unique": false,
  100. "nullable": true,
  101. "name": "roleid"
  102. }
  103. },
  104. "operation": "<>"
  105. },
  106. {
  107. "id": "xuserrole.roleid",
  108. "field": "xuserrole.roleid",
  109. "type": "double",
  110. "operator": "not_equal",
  111. "value": 6,
  112. "data": {
  113. "table": "xuserrole",
  114. "column": "roleid",
  115. "type": "number",
  116. "columnObj": {
  117. "type": "integer",
  118. "primary": false,
  119. "unique": false,
  120. "nullable": true,
  121. "name": "roleid"
  122. }
  123. },
  124. "operation": "<>"
  125. },
  126. {
  127. "id": "xuserrole.roleid",
  128. "field": "xuserrole.roleid",
  129. "type": "double",
  130. "operator": "not_equal",
  131. "value": 1,
  132. "data": {
  133. "table": "xuserrole",
  134. "column": "roleid",
  135. "type": "number",
  136. "columnObj": {
  137. "type": "integer",
  138. "primary": false,
  139. "unique": false,
  140. "nullable": true,
  141. "name": "roleid"
  142. }
  143. },
  144. "operation": "<>"
  145. },
  146. {
  147. "id": "xuserrole.roleid",
  148. "field": "xuserrole.roleid",
  149. "type": "double",
  150. "operator": "not_equal",
  151. "value": 7,
  152. "data": {
  153. "table": "xuserrole",
  154. "column": "roleid",
  155. "type": "number",
  156. "columnObj": {
  157. "type": "integer",
  158. "primary": false,
  159. "unique": false,
  160. "nullable": true,
  161. "name": "roleid"
  162. }
  163. },
  164. "operation": "<>"
  165. },
  166. {
  167. "id": "xuserrole.userid",
  168. "field": "xuserrole.userid",
  169. "type": "double",
  170. "operator": "equal",
  171. "value": "{{$_GET.userid}}",
  172. "data": {
  173. "table": "xuserrole",
  174. "column": "userid",
  175. "type": "number",
  176. "columnObj": {
  177. "type": "integer",
  178. "primary": false,
  179. "unique": false,
  180. "nullable": true,
  181. "name": "userid"
  182. }
  183. },
  184. "operation": "="
  185. }
  186. ],
  187. "conditional": null,
  188. "valid": true
  189. }
  190. }
  191. },
  192. "output": true,
  193. "meta": [
  194. {
  195. "type": "number",
  196. "name": "id"
  197. },
  198. {
  199. "type": "number",
  200. "name": "roleid"
  201. },
  202. {
  203. "type": "text",
  204. "name": "name"
  205. }
  206. ],
  207. "outputType": "array"
  208. }
  209. }
  210. }