Best JavaScript code snippet using mountebank
controller.js
Source:controller.js
1//This file is automatically generated2 //consumer-controller3let ConsumerController = {4 __name: 'ConsumerController',5 feign: {controller: 'ConsumerController' , method: 'feign'}, // feign6};7 //depart-index-controller8let DepartIndexController = {9 __name: 'DepartIndexController',10 addDepartIndex: {controller: 'DepartIndexController' , method: 'addDepartIndex'}, // é¨é¨ææ å½å
¥11 deleteDepartIndexByIds: {controller: 'DepartIndexController' , method: 'deleteDepartIndexByIds'}, // é¨é¨ææ å é¤(å¤éæ¡)12 searchDepartIndex: {controller: 'DepartIndexController' , method: 'searchDepartIndex'}, // é¨é¨ææ æ¥è¯¢13 updateDepartIndex: {controller: 'DepartIndexController' , method: 'updateDepartIndex'}, // é¨é¨ææ ä¿®æ¹14};15 //sys-notification-controller16let SysNotificationController = {17 __name: 'SysNotificationController',18 addNotice: {controller: 'SysNotificationController' , method: 'addNotice'}, // ç³»ç»å
¬åæ·»å 19 configUEditor: {controller: 'SysNotificationController' , method: 'configUEditor'}, // å¤çå
³äºueditoræ件ç¸å
³ç请æ±20 deleteNoticeByIds: {controller: 'SysNotificationController' , method: 'deleteNoticeByIds'}, // ç³»ç»å
¬åå é¤(å¤éæ¡)21 readNotice: {controller: 'SysNotificationController' , method: 'readNotice'}, // é
读å
¬å,é
读æ°+122 searchNotice: {controller: 'SysNotificationController' , method: 'searchNotice'}, // ç³»ç»å
¬åå页æ¥è¯¢23 updateNotice: {controller: 'SysNotificationController' , method: 'updateNotice'}, // ç³»ç»å
¬åä¿®æ¹24 uploadImage: {controller: 'SysNotificationController' , method: 'uploadImage'}, // å¤çå
³äºueditoræ件ç¸å
³ç请æ±25};26 //watch-card-controller27let WatchCardController = {28 __name: 'WatchCardController',29 addWatchCard: {controller: 'WatchCardController' , method: 'addWatchCard'}, // è§å¯å¡å½å
¥30 deleteWatchCardByIds: {controller: 'WatchCardController' , method: 'deleteWatchCardByIds'}, // è§å¯å¡åªé¤(å¤éæ¡)31 findWatchCardById: {controller: 'WatchCardController' , method: 'findWatchCardById'}, // æ ¹æ®IDæ¥è¯¢è§å¯å¡32 getCardCountByObserver: {controller: 'WatchCardController' , method: 'getCardCountByObserver'}, // æ ¹æ®è§å¯è
è·åè§å¯å¡æ°é33 getCardRecord: {controller: 'WatchCardController' , method: 'getCardRecord'}, // è·åè§å¯å¡å½å
¥åæ¾ä¿¡æ¯34 importExcel: {controller: 'WatchCardController' , method: 'importExcel'}, // è§å¯å¡Excel导å
¥35 searchWatchCard: {controller: 'WatchCardController' , method: 'searchWatchCard'}, // è§å¯å¡æ¨¡ç³æ¥è¯¢36 updateWatchCard: {controller: 'WatchCardController' , method: 'updateWatchCard'}, // æ ¹æ®IDç¼è¾è§å¯å¡37};38 //watch-card-mark-controller39let WatchCardMarkController = {40 __name: 'WatchCardMarkController',41 addCollectionCard: {controller: 'WatchCardMarkController' , method: 'addCollectionCard'}, // æ¶èæéè§å¯å¡42 addExcellentCard: {controller: 'WatchCardMarkController' , method: 'addExcellentCard'}, // æ è®°ä¼ç§è§å¯å¡43 cancelCollectionCard: {controller: 'WatchCardMarkController' , method: 'cancelCollectionCard'}, // åæ¶æ¶èè§å¯å¡44 cancelSignCard: {controller: 'WatchCardMarkController' , method: 'cancelSignCard'}, // åæ¶æ è®°è§å¯å¡45 exportMyMarkCard: {controller: 'WatchCardMarkController' , method: 'exportMyMarkCard'}, // 导åºææ è®°çä¼ç§è§å¯å¡46 findMyMarkCard: {controller: 'WatchCardMarkController' , method: 'findMyMarkCard'}, // æ¥è¯¢æçæ è®°ä¼ç§è§å¯å¡å表47 searchExcellentCard: {controller: 'WatchCardMarkController' , method: 'searchExcellentCard'}, // ä¼ç§è§å¯å¡å½å
¥-æ¥è¯¢ä¼ç§è§å¯å¡å表48 searchMyCollection: {controller: 'WatchCardMarkController' , method: 'searchMyCollection'}, // æ¥çæçæ¶è夹49 searchUnMarkCard: {controller: 'WatchCardMarkController' , method: 'searchUnMarkCard'}, // æ¥è¯¢æªæ è®°è§å¯å¡å表50 searchUpperLimit: {controller: 'WatchCardMarkController' , method: 'searchUpperLimit'}, // æ¥è¯¢å½åå£åº¦ä¼ç§è§å¯å¡æ è®°ä¸é51 updateExcellentCard: {controller: 'WatchCardMarkController' , method: 'updateExcellentCard'}, // ä¼ç§è§å¯å¡å½å
¥-å¡«åé®å¯å°ååä¿å52 updateUpperLimit: {controller: 'WatchCardMarkController' , method: 'updateUpperLimit'}, // æ´æ°å½åå£åº¦ä¼ç§è§å¯å¡æ è®°ä¸é 53};54 //watch-card-mark-notice-controller55let WatchCardMarkNoticeController = {56 __name: 'WatchCardMarkNoticeController',57 getNoticeCountByUserId: {controller: 'WatchCardMarkNoticeController' , method: 'getNoticeCountByUserId'}, // è·åéç¥ä¸ªæ°58 getNoticeListByUserId: {controller: 'WatchCardMarkNoticeController' , method: 'getNoticeListByUserId'}, // è·åéç¥å表59};60 //auth-tpl-controller61let AuthTplController = {62 __name: 'AuthTplController',63 addRootResourceGroups: {controller: 'AuthTplController' , method: 'addRootResourceGroups'}, // 为æé模æ¿æ·»å æ ¹èµæºç»64 create: {controller: 'AuthTplController' , method: 'create'}, // æ°å¢65 deleteByIds: {controller: 'AuthTplController' , method: 'deleteByIds'}, // æ主é®éåå é¤66 findById: {controller: 'AuthTplController' , method: 'findById'}, // æ主é®æ¥è¯¢67 queryALLAuthTpls: {controller: 'AuthTplController' , method: 'queryALLAuthTpls'}, // ååºææçæé模æ¿68 queryResGroups: {controller: 'AuthTplController' , method: 'queryResGroups'}, // æ¥è¯¢æ个æé模æ¿ä¸çæ ¹èµæºç»69 querySubRoleTemplates: {controller: 'AuthTplController' , method: 'querySubRoleTemplates'}, // æ¥è¯¢æé模æ¿ä¸çè§è²æ¨¡æ¿70 removeRootResourceGroups: {controller: 'AuthTplController' , method: 'removeRootResourceGroups'}, // ä»æé模æ¿ä¸ç§»é¤æ ¹èµæºç»71 update: {controller: 'AuthTplController' , method: 'update'}, // æ´æ°72};73 //dict-entry-controller74let DictEntryController = {75 __name: 'DictEntryController',76 create: {controller: 'DictEntryController' , method: 'create'}, // æ°å¢77 deleteByIds: {controller: 'DictEntryController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤78 findByCodeAndTypeCode: {controller: 'DictEntryController' , method: 'findByCodeAndTypeCode'}, // æ ¹æ®åå
¸Codeååå
¸ç±»åæ¥æ¾79 findByCriteria: {controller: 'DictEntryController' , method: 'findByCriteria'}, // å页æ¥è¯¢åå
¸é¡¹80 findById: {controller: 'DictEntryController' , method: 'findById'}, // æ主é®æ¥è¯¢81 findByNameAndTypeCode: {controller: 'DictEntryController' , method: 'findByNameAndTypeCode'}, // æ ¹æ®åå
¸å称ååå
¸ç±»åæ¥æ¾82 findDictTree: {controller: 'DictEntryController' , method: 'findDictTree'}, // è·åæå®åå
¸ç±»åæ å½¢ç»æ83 findSecondDictByCodeAndTypeCode: {controller: 'DictEntryController' , method: 'findSecondDictByCodeAndTypeCode'}, // æ ¹æ®æ ¹æ®åå
¸Codeååå
¸ç±»åè·åäºçº§åå
¸é¡¹84 findSecondList: {controller: 'DictEntryController' , method: 'findSecondList'}, // è·åäºçº§åå
¸é¡¹85 update: {controller: 'DictEntryController' , method: 'update'}, // æ´æ°86 updateDict: {controller: 'DictEntryController' , method: 'updateDict'}, // åå
¸ä¿®æ¹87};88 //dict-type-controller89let DictTypeController = {90 __name: 'DictTypeController',91 create: {controller: 'DictTypeController' , method: 'create'}, // æ°å¢92 deleteByIds: {controller: 'DictTypeController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤93 downloadDictTemplate: {controller: 'DictTypeController' , method: 'downloadDictTemplate'}, // ä¸è½½å¯¼å
¥æ¨¡æ¿94 exportExcelAll: {controller: 'DictTypeController' , method: 'exportExcelAll'}, // 导åºæææ°æ®åå
¸95 exportExcelByCodes: {controller: 'DictTypeController' , method: 'exportExcelByCodes'}, // æç»å®ç code æ¹é导åºæ°æ®åå
¸96 exportExcelById: {controller: 'DictTypeController' , method: 'exportExcelById'}, // 导åºç¶ç±»ä»¥ååç±»çæ°æ®åå
¸97 exportExcelByIds: {controller: 'DictTypeController' , method: 'exportExcelByIds'}, // æç»å®ç id æ¹é导åºæ°æ®åå
¸98 findByCriteria: {controller: 'DictTypeController' , method: 'findByCriteria'}, // å页æ¥è¯¢åå
¸ç±»å99 findById: {controller: 'DictTypeController' , method: 'findById'}, // æ主é®æ¥è¯¢100 importExcel: {controller: 'DictTypeController' , method: 'importExcel'}, // 导å
¥åå
¸101 querySubDictEntries: {controller: 'DictTypeController' , method: 'querySubDictEntries'}, // æ¥è¯¢ç±»åä¸çåå
¸é¡¹102 update: {controller: 'DictTypeController' , method: 'update'}, // æ´æ°103};104 //dimension-controller105let DimensionController = {106 __name: 'DimensionController',107 create: {controller: 'DimensionController' , method: 'create'}, // æ°å¢108 deleteByIds: {controller: 'DimensionController' , method: 'deleteByIds'}, // æ主é®éåå é¤109 findById: {controller: 'DimensionController' , method: 'findById'}, // æ主é®æ¥è¯¢110 queryByCriteria: {controller: 'DimensionController' , method: 'queryByCriteria'}, // ææ¡ä»¶æ¥è¯¢ç»´åº¦111 update: {controller: 'DimensionController' , method: 'update'}, // æ´æ°112};113 //employee-controller114let EmployeeController = {115 __name: 'EmployeeController',116 create: {controller: 'EmployeeController' , method: 'create'}, // æ°å¢åå·¥ï¼å¦æä¾ç¨æ·ä¿¡æ¯ï¼å¯éåæ¥å建ç¨æ·, æä¸å·²æç¨æ·è¿è¡ç»å®117 deleteByIds: {controller: 'EmployeeController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤118 findById: {controller: 'EmployeeController' , method: 'findById'}, // æ主é®æ¥è¯¢119 pagingByCriteria: {controller: 'EmployeeController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢ææåå·¥120 update: {controller: 'EmployeeController' , method: 'update'}, // æ´æ°121};122 //function-controller123let FunctionController = {124 __name: 'FunctionController',125 create: {controller: 'FunctionController' , method: 'create'}, // æ°å¢126 deleteByIds: {controller: 'FunctionController' , method: 'deleteByIds'}, // æ主é®éåå é¤127 findById: {controller: 'FunctionController' , method: 'findById'}, // æ主é®æ¥è¯¢128 importFunctions: {controller: 'FunctionController' , method: 'importFunctions'}, // æ¹é导å
¥129 update: {controller: 'FunctionController' , method: 'update'}, // æ´æ°130};131 //member-controller132let MemberController = {133 __name: 'MemberController',134 addMembers: {controller: 'MemberController' , method: 'addMembers'}, // æ·»å æå135 deleteMembers: {controller: 'MemberController' , method: 'deleteMembers'}, // å é¤æå136 pagingMembers: {controller: 'MemberController' , method: 'pagingMembers'}, // å页æ¥è¯¢æææå137};138 //menu-controller139let MenuController = {140 __name: 'MenuController',141 create: {controller: 'MenuController' , method: 'create'}, // æ°å¢142 deleteByIds: {controller: 'MenuController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤143 findById: {controller: 'MenuController' , method: 'findById'}, // æ主é®æ¥è¯¢144 pagingByCriteria: {controller: 'MenuController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢145 update: {controller: 'MenuController' , method: 'update'}, // æ´æ°146};147 //operation-log-controller148let OperationLogController = {149 __name: 'OperationLogController',150 getOperationLogDetail: {controller: 'OperationLogController' , method: 'getOperationLogDetail'}, // è·åæä½æ¥å¿è¯¦ç»151 pagingOperationLogs: {controller: 'OperationLogController' , method: 'pagingOperationLogs'}, // å页æ¥è¯¢æä½æ¥å¿152};153 //organization-controller154let OrganizationController = {155 __name: 'OrganizationController',156 addOrgEmployees: {controller: 'OrganizationController' , method: 'addOrgEmployees'}, // å¾æºæä¸æ¹éæ·»å åå·¥157 create: {controller: 'OrganizationController' , method: 'create'}, // æ°å¢158 deleteByIds: {controller: 'OrganizationController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤159 deleteOrg: {controller: 'OrganizationController' , method: 'deleteOrg'}, // é¨é¨å é¤160 findById: {controller: 'OrganizationController' , method: 'findById'}, // æ主é®æ¥è¯¢161 findDeptTraceByParentOrgId: {controller: 'OrganizationController' , method: 'findDeptTraceByParentOrgId'}, // æ ¹æ®é¨é¨Id,æ¥è¯¢ææä¸çº§é¨é¨162 findOrgByUserId: {controller: 'OrganizationController' , method: 'findOrgByUserId'}, // æ ¹æ®ç¨æ·Id,æ¥è¯¢å¯¹åºé¨é¨163 findOrgTree: {controller: 'OrganizationController' , method: 'findOrgTree'}, // é¨é¨æ å½¢å±ç¤º164 findOrgTreeIdList: {controller: 'OrganizationController' , method: 'findOrgTreeIdList'}, // è·ååé¨é¨Idéå165 findParentOrgTree: {controller: 'OrganizationController' , method: 'findParentOrgTree'}, // ä¸çº§é¨é¨æ å½¢å±ç¤º166 pagingByCriteria: {controller: 'OrganizationController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢167 querySubEmployees: {controller: 'OrganizationController' , method: 'querySubEmployees'}, // æ¥è¯¢æºæä¸çåå·¥168 querySubPositions: {controller: 'OrganizationController' , method: 'querySubPositions'}, // æ¥è¯¢æºæä¸çå²ä½169 querySubWorkgroups: {controller: 'OrganizationController' , method: 'querySubWorkgroups'}, // æ¥è¯¢æºæä¸çå·¥ä½ç»170 removeOrgEmployees: {controller: 'OrganizationController' , method: 'removeOrgEmployees'}, // ä»æºæä¸æ¹é移é¤åå·¥171 update: {controller: 'OrganizationController' , method: 'update'}, // æ´æ°172};173 //position-controller174let PositionController = {175 __name: 'PositionController',176 addPositionEmployees: {controller: 'PositionController' , method: 'addPositionEmployees'}, // å¾å²ä½ä¸æ·»å åå·¥177 create: {controller: 'PositionController' , method: 'create'}, // æ°å¢178 deleteByIds: {controller: 'PositionController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤179 findById: {controller: 'PositionController' , method: 'findById'}, // æ主é®æ¥è¯¢180 pagingByCriteria: {controller: 'PositionController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢181 querySubEmployees: {controller: 'PositionController' , method: 'querySubEmployees'}, // ååºæ¤å²ä½çåå·¥182 removePositionEmployees: {controller: 'PositionController' , method: 'removePositionEmployees'}, // ä»å²ä½ä¸ç§»é¤åå·¥183 update: {controller: 'PositionController' , method: 'update'}, // æ´æ°184};185 //res-group-controller186let ResGroupController = {187 __name: 'ResGroupController',188 create: {controller: 'ResGroupController' , method: 'create'}, // æ°å¢189 deleteByIds: {controller: 'ResGroupController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤190 findByCriteria: {controller: 'ResGroupController' , method: 'findByCriteria'}, // ææ¡ä»¶æ¥è¯¢191 findById: {controller: 'ResGroupController' , method: 'findById'}, // æ主é®æ¥è¯¢192 findSubFunctionByCriteria: {controller: 'ResGroupController' , method: 'findSubFunctionByCriteria'}, // æ¥è¯¢æèµæºç»ä¸çåè½193 findSubMenuByCriteria: {controller: 'ResGroupController' , method: 'findSubMenuByCriteria'}, // æ¥è¯¢æèµæºç»ä¸çèå194 pagingByCriteria: {controller: 'ResGroupController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢195 update: {controller: 'ResGroupController' , method: 'update'}, // æ´æ°196};197 //role-controller198let RoleController = {199 __name: 'RoleController',200 bindRoleToUsers: {controller: 'RoleController' , method: 'bindRoleToUsers'}, // å°è§è²ç»å®è³ç¨æ·(ç¨æ·id以','åå²)201 create: {controller: 'RoleController' , method: 'create'}, // æ°å¢202 deleteByIds: {controller: 'RoleController' , method: 'deleteByIds'}, // æ主é®éåå é¤203 findById: {controller: 'RoleController' , method: 'findById'}, // æ主é®æ¥è¯¢204 getUsersByRoleId: {controller: 'RoleController' , method: 'getUsersByRoleId'}, // å页æ¥è¯¢æ¥ææè§è²çç¨æ·205 handleRoleTplResource: {controller: 'RoleController' , method: 'handleRoleTplResource'}, // ä¿®æ¹è§è²èµæº206 loadWholeResources: {controller: 'RoleController' , method: 'loadWholeResources'}, // æ¥è¯¢è§è²å¯¹åºçå
¨é¨èµæº207 pagingByCriteria: {controller: 'RoleController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢ææè§è²208 unbindRoleToUsers: {controller: 'RoleController' , method: 'unbindRoleToUsers'}, // å°è§è²ç»å®çç¨æ·è§£ç»(ç¨æ·id以','åå²)209 update: {controller: 'RoleController' , method: 'update'}, // æ´æ°210};211 //role-tpl-controller212let RoleTplController = {213 __name: 'RoleTplController',214 create: {controller: 'RoleTplController' , method: 'create'}, // æ°å¢215 deleteByIds: {controller: 'RoleTplController' , method: 'deleteByIds'}, // æ主é®éåå é¤216 findByCriteria: {controller: 'RoleTplController' , method: 'findByCriteria'}, // ææ¡ä»¶æ¥è¯¢217 findById: {controller: 'RoleTplController' , method: 'findById'}, // æ主é®æ¥è¯¢218 handleRoleTplResource: {controller: 'RoleTplController' , method: 'handleRoleTplResource'}, // ä¿®æ¹è§è²æ¨¡æ¿èµæº219 loadWholeResources: {controller: 'RoleTplController' , method: 'loadWholeResources'}, // æ¥è¯¢è§è²æ¨¡æ¿å¯¹åºçèµæºæ 220 pageRoleByTemplateId: {controller: 'RoleTplController' , method: 'pageRoleByTemplateId'}, // æ¥è¯¢ä½¿ç¨æ¤æ¨¡æ¿å建çè§è²221 update: {controller: 'RoleTplController' , method: 'update'}, // æ´æ°222};223 //role-tpl-group-controller224let RoleTplGroupController = {225 __name: 'RoleTplGroupController',226 create: {controller: 'RoleTplGroupController' , method: 'create'}, // æ°å¢227 deleteByIds: {controller: 'RoleTplGroupController' , method: 'deleteByIds'}, // æ主é®éåå é¤228 findByCriteria: {controller: 'RoleTplGroupController' , method: 'findByCriteria'}, // ææ¡ä»¶æ¥è¯¢229 findById: {controller: 'RoleTplGroupController' , method: 'findById'}, // æ主é®æ¥è¯¢230 newRoleInstances: {controller: 'RoleTplGroupController' , method: 'newRoleInstances'}, // ææ¡ä»¶æ¥è¯¢231 update: {controller: 'RoleTplGroupController' , method: 'update'}, // æ´æ°232};233 //tools-controller234let ToolsController = {235 __name: 'ToolsController',236 scanFunctions: {controller: 'ToolsController' , method: 'scanFunctions'}, // éè¿ä»£ç æ«æ, è·ååºç¨çåè½å®ä¹237};238 //user-controller239let UserController = {240 __name: 'UserController',241 addUser: {controller: 'UserController' , method: 'addUser'}, // æ·»å ç¨æ·242 create: {controller: 'UserController' , method: 'create'}, // æ°å¢ç¨æ·, å¯åæ¶ç»å®åå·¥ãä¸ä¸ªåå·¥æå¤åªè½ç»å®ä¸ä¸ªç¨æ·243 delUsers: {controller: 'UserController' , method: 'delUsers'}, // å é¤ç¨æ·244 deleteByIds: {controller: 'UserController' , method: 'deleteByIds'}, // å é¤ç¨æ·, åªå ç¨æ·, ä¸å 对åºç人å245 disableUser: {controller: 'UserController' , method: 'disableUser'}, // ç¦ç¨ç¨æ·246 enableUser: {controller: 'UserController' , method: 'enableUser'}, // å¯ç¨ç¨æ·247 findById: {controller: 'UserController' , method: 'findById'}, // æ主é®æ¥è¯¢248 getAuthToken: {controller: 'UserController' , method: 'getAuthToken'}, // è·å认è¯token249 getDownRole: {controller: 'UserController' , method: 'getDownRole'}, // æ ¹æ®å½åç»å½ç¨æ·ä¸çº§ææè§è²250 getLoginUserRole: {controller: 'UserController' , method: 'getLoginUserRole'}, // è·åå½åç»å½ç¨æ·çè§è²251 getSsoUser: {controller: 'UserController' , method: 'getSsoUser'}, // è·åå½åç»å½ç¨æ·252 listRoles: {controller: 'UserController' , method: 'listRoles'}, // è·åæ个ç¨æ·çè§è²253 listUserFunctionCodes: {controller: 'UserController' , method: 'listUserFunctionCodes'}, // è·åç¨æ·çææå¯ç¨çåè½ç¼ç 254 listUserFunctions: {controller: 'UserController' , method: 'listUserFunctions'}, // è·åç¨æ·çææå¯ç¨çåè½255 listUserMenus: {controller: 'UserController' , method: 'listUserMenus'}, // è·åç¨æ·çææèå256 modifyPassword: {controller: 'UserController' , method: 'modifyPassword'}, // ä¿®æ¹ç¨æ·å¯ç 257 pagingByCriteria: {controller: 'UserController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢ææç¨æ·258 queryUsers: {controller: 'UserController' , method: 'queryUsers'}, // ç¨æ·æ¥è¯¢259 resetPassword: {controller: 'UserController' , method: 'resetPassword'}, // éç½®ç¨æ·å¯ç 260 updateUser: {controller: 'UserController' , method: 'updateUser'}, // ä¿®æ¹ç¨æ·261};262 //workgroup-controller263let WorkgroupController = {264 __name: 'WorkgroupController',265 addWorkgroupEmployees: {controller: 'WorkgroupController' , method: 'addWorkgroupEmployees'}, // å¾å·¥ä½ç»ä¸æ·»å åå·¥266 create: {controller: 'WorkgroupController' , method: 'create'}, // æ°å¢267 deleteByIds: {controller: 'WorkgroupController' , method: 'deleteByIds'}, // æ主é®éå(以','åå²)å é¤268 findById: {controller: 'WorkgroupController' , method: 'findById'}, // æ主é®æ¥è¯¢269 pagingByCriteria: {controller: 'WorkgroupController' , method: 'pagingByCriteria'}, // å页æ¥è¯¢270 querySubEmployees: {controller: 'WorkgroupController' , method: 'querySubEmployees'}, // æ¥è¯¢å·¥ä½ç»ä¸çåå·¥271 removeWorkgroupEmployees: {controller: 'WorkgroupController' , method: 'removeWorkgroupEmployees'}, // ä»å·¥ä½ç»ä¸ç§»é¤åå·¥272 update: {controller: 'WorkgroupController' , method: 'update'}, // æ´æ°273};274export {275 ConsumerController,276 DepartIndexController,277 SysNotificationController,278 WatchCardController,279 WatchCardMarkController,280 WatchCardMarkNoticeController,281 AuthTplController,282 DictEntryController,283 DictTypeController,284 DimensionController,285 EmployeeController,286 FunctionController,287 MemberController,288 MenuController,289 OperationLogController,290 OrganizationController,291 PositionController,292 ResGroupController,293 RoleController,294 RoleTplController,295 RoleTplGroupController,296 ToolsController,297 UserController,298 WorkgroupController,...
app.js
Source:app.js
...42 .otherwise({43 redirectTo: '/'44 });45 }])46 .controller('LandingPageController', function LandingPageController() {47 })48 .controller('NavController', function NavController($scope, $location) {49 $scope.matchesRoute = function(route) {50 var path = $location.path();51 return (path === ("/" + route) || path.indexOf("/" + route + "/") == 0);52 };...
index.ts
Source:index.ts
...25import makeDeleteUserController from "./user/delete-user";26import makeGetUserController from "./user/get-user";27import makeUpdateUserController from "./user/update-user";28//-------------------------------------------User controller-----------------------------------//29export const addUserController = makeAddUserController(new IUserControllerException(), { addUser });30export const updateUserController = makeUpdateUserController(new IUserControllerException(), {31 updateUser,32});33export const deleteUserController = makeDeleteUserController(new IUserControllerException(), {34 deleteUser,35});36export const getUserController = makeGetUserController(new IUserControllerException(), { getUser });37//-------------------------------------------follow controller--------------------------------//38export const followController = makeFollowController(new IFollowControllerException(), { follow });39export const unfollowController = makeUnfollowController(new IFollowControllerException(), {40 unFollow,41});42export const getFollowController = makeGetFollowController(new IFollowControllerException(), {43 getFollow,44});45export const clearFollowDocController = makeClearFollowDocController(46 new IFollowControllerException(),47 { clearFollow }48);49//-------------------------------------------token controller--------------------------------//50export const generateTokenController = makeGenerateTokensController(51 new ITokenControllerException(),52 { generateTokens }53);54export const refreshTokenController = makerefreshTokensController(new ITokenControllerException(), {55 refreshTokens,56});57export const verifyTokenController = makeverifyTokenController(new ITokenControllerException(), {58 verifyTokens,...
index.js
Source:index.js
1const { Router } = require('express')2const cors = require('cors')3const AccountController = require('./AccountController')4const TxController = require('./TxController')5const BlockController = require('./BlockController')6const TokenController = require('./TokenController')7const TokenTxController = require('./TokenTxController')8const TokenHolderController = require('./TokenHolderController')9// const AuthController = require('./AuthController')10// const FollowController = require('./FollowController')11const SettingController = require('./SettingController')12const ContractController = require('./ContractController')13const LogController = require('./LogController')14const RewardController = require('./RewardController')15const MixController = require('./MixController')16const MasternodeController = require('./MasternodeController')17const SignMessageController = require('./SignMessageController')18const HomeController = require('./HomeController')19const EpochController = require('./EpochController')20const OrderController = require('./OrderController')21const TradeController = require('./TradeController')22const LendingController = require('./LendingController')23const RelayerController = require('./RelayerController')24const router = Router()25// Add USERS Routes26router.all('*', cors())27// router.use(AuthController)28router.use(BlockController)29router.use(AccountController)30router.use(TxController)31router.use(TokenController)32router.use(TokenTxController)33router.use(TokenHolderController)34// router.use(FollowController)35router.use(SettingController)36router.use(ContractController)37router.use(LogController)38router.use(RewardController)39router.use(MixController)40router.use(MasternodeController)41router.use(SignMessageController)42router.use(HomeController)43router.use(EpochController)44router.use(OrderController)45router.use(TradeController)46router.use(LendingController)47router.use(RelayerController)...
Using AI Code Generation
1var mb = require('mountebank');2mb.create({3}, function (error) {4 if (error) {5 console.error('Error creating mountebank server', error);6 } else {7 console.log('mountebank server created');8 var imposter = {9 {10 {11 is: {12 headers: {13 },14 body: JSON.stringify({15 })16 }17 }18 }19 };20 mb.post('/imposters', imposter, function (error, response) {21 if (error) {22 console.error('Error creating imposter', error);23 } else {24 console.log('imposter created');25 }26 });27 }28});29* [mountebank](
Using AI Code Generation
1var mb = require('mountebank');2mb.create({3}, function (error, imposters) {4 if (error) {5 console.error('Failed to create mountebank', error);6 } else {7 console.log('mountebank created on port', imposters[0].port);8 }9});10mb.start({11}, function (error, imposters) {12 if (error) {13 console.error('Failed to start mountebank', error);14 } else {15 console.log('mountebank started on port', imposters[0].port);16 }17});18mb.stop({19}, function (error) {20 if (error) {21 console.error('Failed to stop mountebank', error);22 } else {23 console.log('mountebank stopped');24 }25});26mb.reset({27}, function (error) {28 if (error) {29 console.error('Failed to reset mountebank', error);30 } else {31 console.log('mountebank reset');32 }33});34mb.imposters({35}, function (error, imposters) {36 if (error) {37 console.error('Failed to get imposters', error);38 } else {39 console.log('Current imposters', imposters);40 }41});42mb.deleteImposter({43}, function (error) {44 if (error) {45 console.error('Failed to delete imposter', error);46 } else {47 console.log('Imposter deleted');48 }49});50mb.getImposter({51}, function (error, imposter) {52 if (error) {53 console.error('Failed to get imposter', error);54 } else {55 console.log('Current imposter', imposter);56 }57});58mb.putImposter({
Using AI Code Generation
1var mb = require('mountebank');2var imposter = mb.create({3 {4 {5 equals: {6 }7 }8 {9 is: {10 headers: {11 },12 body: JSON.stringify({status: 'OK'})13 }14 }15 }16});17imposter.then(function (imposter) {18 console.log(imposter.port);19 imposter.del();20});21var mb = require('mountebank');22var imposter = mb.create({23 {24 {25 equals: {26 }27 }28 {29 is: {30 headers: {31 },32 body: JSON.stringify({status: 'OK'})33 }34 }35 }36});37imposter.then(function (imposter) {38 console.log(imposter.port);39 imposter.del();40});41var mb = require('mountebank');42var imposter = mb.create({43 {44 {45 equals: {46 }47 }48 {49 is: {50 headers: {51 },52 body: JSON.stringify({status: 'OK'})53 }54 }55 }56});57imposter.then(function (imposter) {58 console.log(imposter.port);59 imposter.del();60});61var mb = require('mountebank');62var imposter = mb.create({
Using AI Code Generation
1var mb = require('mountebank');2var port = 2525;3var protocol = 'http';4var host = 'localhost';5var imposters = {6 {7 {8 is: {9 headers: { 'Content-Type': 'application/json' },10 body: JSON.stringify({ "status": "OK" })11 }12 }13 }14};15mb.create(url, imposters).then(function (response) {16 console.log(response);17});18{ port: 2525, protocol: 'http', name: 'mb', pid: 10568 }19var mb = require('mountebank');20var port = 2525;21var protocol = 'http';22var host = 'localhost';23var imposters = {24 {25 {26 is: {27 headers: { 'Content-Type': 'application/json' },28 body: JSON.stringify({ "status": "OK" })29 }30 }31 }32};33mb.create(url, imposters).then(function (response) {34 console.log(response);35});36{ port: 2525, protocol: 'http', name: 'mb', pid: 10568 }37var mb = require('mountebank');38var port = 2525;39var protocol = 'http';40var host = 'localhost';
Using AI Code Generation
1var mb = require('mountebank');2var mbHelper = require('mountebank-helper');3var port = 2525;4var imposters = [{5 "stubs": [{6 "responses": [{7 "is": {8 }9 }]10 }]11}];12mb.create(port, imposters).then(function (server) {13 console.log('Server running at %s', server.url);14 var request = require('request');15 });16});17### create(port, imposters, options)18- `port` (number): The port to run the mountebank server on19- `imposters` (array): An array of imposter definitions to be created on the server20- `options` (object): An object with the following optional properties:21 - `allowInjection` (boolean): If true, allows the use of the ${} syntax for injecting values into the stubs. Defaults to false22 - `pidfile` (string): The path to a file to create with the PID of the mountebank process. Defaults to no pidfile
Using AI Code Generation
1const request = require('request');2const mb = require('mountebank');3const port = 2525;4const imposterPort = 3000;5const imposterProtocol = 'http';6const imposterName = 'test';7const path = 'test';8const method = 'GET';9const response = { 'hello': 'world' };10const imposters = [{11 stubs: [{12 predicates: [{13 equals: {14 }15 }],16 responses: [{17 is: {18 }19 }]20 }]21}];22mb.create({ port: port, pidfile: 'mb.pid', logfile: 'mb.log', protofile: 'mb.proto' }, error => {23 if (error) {24 console.error(`Failed to start mountebank: ${error}`);25 } else {26 console.log('mountebank started');27 mb.post('/imposters', imposters, (error, response, body) => {28 if (error) {29 console.error(`Failed to create imposter: ${error}`);30 } else {31 console.log('Imposter created');32 request.get(url, (error, response, body) => {33 if (error) {34 console.error(`Failed to make request: ${error}`);35 } else {36 console.log(`Request succeeded: ${body}`);37 mb.del('/imposters', error => {38 if (error) {39 console.error(`Failed to delete imposter: ${error}`);40 } else {41 console.log('Imposter deleted');42 mb.stop('mb.pid', error => {43 if (error) {44 console.error(`Failed to stop mountebank: ${error}`);45 } else {46 console.log('mountebank stopped');47 }48 });49 }50 });51 }52 });53 }54 });55 }56});
Using AI Code Generation
1var mb = require('mountebank');2var mbHelper = require('./mbHelper');3var port = 2525;4 {5 {6 {7 is: {8 }9 }10 }11 }12];13mb.create({port: port, pidfile: 'mb.pid', logfile: 'mb.log', protofile: 'mb.proto'}, function () {14 mbHelper.postImposters(mbUrl, imposters, function () {15 console.log('Imposter created');16 mbHelper.get('/', mbUrl, function (response) {17 console.log('Got response ' + response.statusCode);18 console.log('Response body: ' + response.body);19 mbHelper.deleteAllImposters(mbUrl, function () {20 console.log('Imposter deleted');21 mbHelper.get('/', mbUrl, function (response) {22 console.log('Got response ' + response.statusCode);23 console.log('Response body: ' + response.body);24 mbHelper.delete(mbUrl, function () {25 console.log('Mb deleted');26 });27 });28 });29 });30 });31});32var request = require('request');33function postImposters (url, imposters, callback) {34 request({35 body: { imposters: imposters }36 }, function (error, response, body) {37 if (error) {38 console.log('Error creating imposter: ' + error.message);39 }40 callback(response);41 });42}43function get (path, url, callback) {44 request({45 }, function (error, response, body) {46 if (error) {47 console.log('Error creating imposter: ' + error.message);48 }49 callback(response);50 });51}52function deleteAllImposters (url, callback) {53 request({54 },
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!