Showing
24 changed files
with
37 additions
and
57 deletions
@@ -74,7 +74,7 @@ public class SysJobController extends BaseController { | @@ -74,7 +74,7 @@ public class SysJobController extends BaseController { | ||
74 | } | 74 | } |
75 | 75 | ||
76 | /** 任务调度状态修改 */ | 76 | /** 任务调度状态修改 */ |
77 | - @PutMapping("/changeStatus/{id}/{status}") | 77 | + @PutMapping("/change_status/{id}/{status}") |
78 | @ApiOperation(value = "任务调度状态修改") | 78 | @ApiOperation(value = "任务调度状态修改") |
79 | public ResponseResult<Boolean> changeStatus( | 79 | public ResponseResult<Boolean> changeStatus( |
80 | @PathVariable("id") String id, @PathVariable("status") Integer status) | 80 | @PathVariable("id") String id, @PathVariable("status") Integer status) |
@@ -120,7 +120,7 @@ public class SysJobController extends BaseController { | @@ -120,7 +120,7 @@ public class SysJobController extends BaseController { | ||
120 | } | 120 | } |
121 | 121 | ||
122 | /** 校验cron表达式是否有效 */ | 122 | /** 校验cron表达式是否有效 */ |
123 | - @GetMapping("/checkCron/{cronExpression}") | 123 | + @GetMapping("/check_cron/{cronExpression}") |
124 | @ApiOperation(value = "校验cron表达式是否有效") | 124 | @ApiOperation(value = "校验cron表达式是否有效") |
125 | public boolean checkCronExpressionIsValid(@PathVariable("cronExpression") String cronExpression) { | 125 | public boolean checkCronExpressionIsValid(@PathVariable("cronExpression") String cronExpression) { |
126 | if (StringUtils.isEmpty(cronExpression)) { | 126 | if (StringUtils.isEmpty(cronExpression)) { |
@@ -130,7 +130,7 @@ public class SysJobController extends BaseController { | @@ -130,7 +130,7 @@ public class SysJobController extends BaseController { | ||
130 | } | 130 | } |
131 | 131 | ||
132 | /** 查询cron表达式近5次的执行时间 */ | 132 | /** 查询cron表达式近5次的执行时间 */ |
133 | - @GetMapping("/queryCronExpression/{cronExpression}") | 133 | + @GetMapping("/query_cron_expression/{cronExpression}") |
134 | @ResponseBody | 134 | @ResponseBody |
135 | @ApiOperation(value = "查询cron表达式近5次的执行时间") | 135 | @ApiOperation(value = "查询cron表达式近5次的执行时间") |
136 | public ResponseResult queryCronExpression(@PathVariable("cronExpression") String cronExpression) { | 136 | public ResponseResult queryCronExpression(@PathVariable("cronExpression") String cronExpression) { |
@@ -25,7 +25,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -25,7 +25,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | @RestController | 27 | @RestController |
28 | -@RequestMapping("api/yt/monitor/jobLog") | 28 | +@RequestMapping("api/yt/monitor/job_log") |
29 | @RequiredArgsConstructor | 29 | @RequiredArgsConstructor |
30 | @Api(tags = {"定时任务执行日志"}) | 30 | @Api(tags = {"定时任务执行日志"}) |
31 | public class SysJobLogController extends BaseController { | 31 | public class SysJobLogController extends BaseController { |
@@ -36,7 +36,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -36,7 +36,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
36 | * @Description 告警联系人 @Author cxy @Date 2021/11/2 14:54 | 36 | * @Description 告警联系人 @Author cxy @Date 2021/11/2 14:54 |
37 | */ | 37 | */ |
38 | @RestController | 38 | @RestController |
39 | -@RequestMapping("/api/yt/alarmContact") | 39 | +@RequestMapping("/api/yt/alarm_contact") |
40 | @RequiredArgsConstructor | 40 | @RequiredArgsConstructor |
41 | @Api(tags = "告警联系人") | 41 | @Api(tags = "告警联系人") |
42 | public class YtAlarmContactController extends BaseController { | 42 | public class YtAlarmContactController extends BaseController { |
@@ -18,7 +18,7 @@ import org.thingsboard.server.dao.yunteng.service.SysAppDesignService; | @@ -18,7 +18,7 @@ import org.thingsboard.server.dao.yunteng.service.SysAppDesignService; | ||
18 | */ | 18 | */ |
19 | @Api(tags = "APP定制") | 19 | @Api(tags = "APP定制") |
20 | @RestController | 20 | @RestController |
21 | -@RequestMapping("api/yt/appDesign") | 21 | +@RequestMapping("api/yt/app_design") |
22 | @RequiredArgsConstructor | 22 | @RequiredArgsConstructor |
23 | public class YtAppDesignController extends BaseController { | 23 | public class YtAppDesignController extends BaseController { |
24 | 24 |
@@ -24,7 +24,7 @@ import java.util.List; | @@ -24,7 +24,7 @@ import java.util.List; | ||
24 | public class YtAreaController { | 24 | public class YtAreaController { |
25 | private final SysAreaService sysAreaService; | 25 | private final SysAreaService sysAreaService; |
26 | 26 | ||
27 | - @PostMapping("areaList") | 27 | + @PostMapping("list") |
28 | @ApiOperation("查询") | 28 | @ApiOperation("查询") |
29 | public ResponseEntity<List<SysAreaDTO>> areaList(@RequestBody SysAreaDTO sysAreaDTO) { | 29 | public ResponseEntity<List<SysAreaDTO>> areaList(@RequestBody SysAreaDTO sysAreaDTO) { |
30 | return ResponseEntity.ok(sysAreaService.list(sysAreaDTO)); | 30 | return ResponseEntity.ok(sysAreaService.list(sysAreaDTO)); |
application/src/main/java/org/thingsboard/server/controller/yunteng/YtCommonController.java
deleted
100644 → 0
1 | -package org.thingsboard.server.controller.yunteng; | ||
2 | - | ||
3 | -import io.swagger.annotations.ApiOperation; | ||
4 | -import lombok.RequiredArgsConstructor; | ||
5 | -import org.springframework.http.ResponseEntity; | ||
6 | -import org.springframework.web.bind.annotation.GetMapping; | ||
7 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
8 | -import org.springframework.web.bind.annotation.RestController; | ||
9 | -import org.thingsboard.server.common.data.exception.ThingsboardException; | ||
10 | -import org.thingsboard.server.common.data.yunteng.common.YtCommonService; | ||
11 | -import org.thingsboard.server.controller.BaseController; | ||
12 | - | ||
13 | -@RequiredArgsConstructor | ||
14 | -@RequestMapping("/api/yt/common") | ||
15 | -@RestController | ||
16 | -public class YtCommonController extends BaseController { | ||
17 | - private final YtCommonService commonService; | ||
18 | - | ||
19 | - | ||
20 | -} |
@@ -97,7 +97,7 @@ public class YtConfigurationCenterController extends BaseController { | @@ -97,7 +97,7 @@ public class YtConfigurationCenterController extends BaseController { | ||
97 | return ResponseEntity.ok(ytConfigurationCenterService.deleteConfigurationCenter(deleteDTO)); | 97 | return ResponseEntity.ok(ytConfigurationCenterService.deleteConfigurationCenter(deleteDTO)); |
98 | } | 98 | } |
99 | 99 | ||
100 | - @GetMapping("/getConfigurationInfo/{id}") | 100 | + @GetMapping("/get_configuration_info/{id}") |
101 | @ApiOperation("获取组态信息") | 101 | @ApiOperation("获取组态信息") |
102 | public ResponseEntity<ConfigurationContentInfoDTO> getConfigurationInfos( | 102 | public ResponseEntity<ConfigurationContentInfoDTO> getConfigurationInfos( |
103 | @PathVariable("id") String id) throws ThingsboardException { | 103 | @PathVariable("id") String id) throws ThingsboardException { |
@@ -72,10 +72,10 @@ public class YtConfigurationNodeController extends BaseController { | @@ -72,10 +72,10 @@ public class YtConfigurationNodeController extends BaseController { | ||
72 | return ResponseEntity.ok(nodeDTO); | 72 | return ResponseEntity.ok(nodeDTO); |
73 | } | 73 | } |
74 | 74 | ||
75 | - @PostMapping("datascource") | 75 | + @PostMapping("datasource") |
76 | @ApiOperation("编辑数据源") | 76 | @ApiOperation("编辑数据源") |
77 | - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:datascource:post'})") | ||
78 | - public ResponseEntity<ConfigurationDatasourceDTO> saveDatascource( | 77 | + @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:datasource:post'})") |
78 | + public ResponseEntity<ConfigurationDatasourceDTO> saveDatasource( | ||
79 | @Validated({AddGroup.class}) @RequestBody ConfigurationDatasourceDTO datasourceDTO) | 79 | @Validated({AddGroup.class}) @RequestBody ConfigurationDatasourceDTO datasourceDTO) |
80 | throws ThingsboardException { | 80 | throws ThingsboardException { |
81 | datasourceDTO.setTenantId(getCurrentUser().getCurrentTenantId()); | 81 | datasourceDTO.setTenantId(getCurrentUser().getCurrentTenantId()); |
@@ -106,10 +106,10 @@ public class YtConfigurationNodeController extends BaseController { | @@ -106,10 +106,10 @@ public class YtConfigurationNodeController extends BaseController { | ||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | - @DeleteMapping("datascource") | 109 | + @DeleteMapping("datasource") |
110 | @ApiOperation("删除数据源") | 110 | @ApiOperation("删除数据源") |
111 | - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:datascource:delete'})") | ||
112 | - public ResponseEntity<Boolean> deleteDatascource(@RequestBody ConfigurationDatasourceDTO deleteDTO) | 111 | + @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:datasource:delete'})") |
112 | + public ResponseEntity<Boolean> deleteDatasource(@RequestBody ConfigurationDatasourceDTO deleteDTO) | ||
113 | throws ThingsboardException { | 113 | throws ThingsboardException { |
114 | deleteDTO.setTenantId(getCurrentUser().getCurrentTenantId()); | 114 | deleteDTO.setTenantId(getCurrentUser().getCurrentTenantId()); |
115 | return ResponseEntity.ok(datasourceService.deleteConfigurationDatasource(deleteDTO)); | 115 | return ResponseEntity.ok(datasourceService.deleteConfigurationDatasource(deleteDTO)); |
@@ -47,7 +47,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -47,7 +47,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
47 | 47 | ||
48 | @RestController | 48 | @RestController |
49 | @RequiredArgsConstructor | 49 | @RequiredArgsConstructor |
50 | -@RequestMapping("api/yt/deviceProfile") | 50 | +@RequestMapping("api/yt/device_profile") |
51 | @Api(tags = {"设备配置管理"}) | 51 | @Api(tags = {"设备配置管理"}) |
52 | public class YtDeviceProfileController extends BaseController { | 52 | public class YtDeviceProfileController extends BaseController { |
53 | private final YtDeviceProfileService ytDeviceProfileService; | 53 | private final YtDeviceProfileService ytDeviceProfileService; |
@@ -25,7 +25,7 @@ import java.util.Map; | @@ -25,7 +25,7 @@ import java.util.Map; | ||
25 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 25 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
26 | 26 | ||
27 | @RestController | 27 | @RestController |
28 | -@RequestMapping("api/yt/dictItem") | 28 | +@RequestMapping("api/yt/dict_item") |
29 | @RequiredArgsConstructor | 29 | @RequiredArgsConstructor |
30 | public class YtDictItemController extends BaseController { | 30 | public class YtDictItemController extends BaseController { |
31 | private final SysDictItemService sysDictItemService; | 31 | private final SysDictItemService sysDictItemService; |
@@ -17,7 +17,7 @@ import java.util.HashMap; | @@ -17,7 +17,7 @@ import java.util.HashMap; | ||
17 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 17 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
18 | 18 | ||
19 | @RestController | 19 | @RestController |
20 | -@RequestMapping("api/yt/mailLog") | 20 | +@RequestMapping("api/yt/mail_log") |
21 | @RequiredArgsConstructor | 21 | @RequiredArgsConstructor |
22 | public class YtMailLogController extends BaseController { | 22 | public class YtMailLogController extends BaseController { |
23 | 23 |
@@ -36,7 +36,7 @@ public class YtMenuController extends BaseController { | @@ -36,7 +36,7 @@ public class YtMenuController extends BaseController { | ||
36 | getCurrentUser().isPtTenantAdmin(),needButton); | 36 | getCurrentUser().isPtTenantAdmin(),needButton); |
37 | } | 37 | } |
38 | 38 | ||
39 | - @GetMapping("getMenuIdsByRoleId/{roleId}") | 39 | + @GetMapping("get_ids/{roleId}") |
40 | public Set<String> getMenuIdsByRoleId(@PathVariable("roleId") String roleId) { | 40 | public Set<String> getMenuIdsByRoleId(@PathVariable("roleId") String roleId) { |
41 | return menuService.getMenuIdsByRoleId(roleId); | 41 | return menuService.getMenuIdsByRoleId(roleId); |
42 | } | 42 | } |
application/src/main/java/org/thingsboard/server/controller/yunteng/YtMessageTemplateController.java
@@ -88,7 +88,7 @@ public class YtMessageTemplateController extends BaseController { | @@ -88,7 +88,7 @@ public class YtMessageTemplateController extends BaseController { | ||
88 | return messageTemplateService.updateMessageTemplate(templateDTO); | 88 | return messageTemplateService.updateMessageTemplate(templateDTO); |
89 | } | 89 | } |
90 | 90 | ||
91 | - @PostMapping("/sendSms") | 91 | + @PostMapping("/send_sms") |
92 | public ResponseResult<String> sendSms( | 92 | public ResponseResult<String> sendSms( |
93 | @Validated({AddGroup.class}) @RequestBody SmsReqDTO smsReqDTO) { | 93 | @Validated({AddGroup.class}) @RequestBody SmsReqDTO smsReqDTO) { |
94 | boolean result = smsService.sendSms(smsReqDTO); | 94 | boolean result = smsService.sendSms(smsReqDTO); |
@@ -96,7 +96,7 @@ public class YtMessageTemplateController extends BaseController { | @@ -96,7 +96,7 @@ public class YtMessageTemplateController extends BaseController { | ||
96 | return ResponseResult.success(message); | 96 | return ResponseResult.success(message); |
97 | } | 97 | } |
98 | 98 | ||
99 | - @PostMapping("/sendEmail") | 99 | + @PostMapping("/send_email") |
100 | public ResponseResult<String> sendEmail( | 100 | public ResponseResult<String> sendEmail( |
101 | @Validated({AddGroup.class}) @RequestBody EmailReqDTO emailReqDTO) { | 101 | @Validated({AddGroup.class}) @RequestBody EmailReqDTO emailReqDTO) { |
102 | boolean result = mailService.sendEmail(emailReqDTO); | 102 | boolean result = mailService.sendEmail(emailReqDTO); |
@@ -39,7 +39,7 @@ public class YtNoAuthController{ | @@ -39,7 +39,7 @@ public class YtNoAuthController{ | ||
39 | private final YtDataComponentService ytDataComponentService; | 39 | private final YtDataComponentService ytDataComponentService; |
40 | private final YtDataBoardService ytDataBoardService; | 40 | private final YtDataBoardService ytDataBoardService; |
41 | 41 | ||
42 | - @PostMapping("/sendLoginSmsCode/{phoneNumber}") | 42 | + @PostMapping("/send_login_code/{phoneNumber}") |
43 | public boolean sendVerificationCode(@PathVariable("phoneNumber") String phoneNumber) { | 43 | public boolean sendVerificationCode(@PathVariable("phoneNumber") String phoneNumber) { |
44 | Assert.isTrue( | 44 | Assert.isTrue( |
45 | CHINA_MOBILE_PATTERN.matcher(phoneNumber).matches(), "please input correct phone number"); | 45 | CHINA_MOBILE_PATTERN.matcher(phoneNumber).matches(), "please input correct phone number"); |
@@ -54,7 +54,7 @@ public class YtNoAuthController{ | @@ -54,7 +54,7 @@ public class YtNoAuthController{ | ||
54 | userService.forgetPassword(phoneNumber, forget); | 54 | userService.forgetPassword(phoneNumber, forget); |
55 | } | 55 | } |
56 | 56 | ||
57 | - @PostMapping("/resetCode/{phoneNumber}") | 57 | + @PostMapping("/reset_code/{phoneNumber}") |
58 | @ApiOperation("密码找回短信验证码") | 58 | @ApiOperation("密码找回短信验证码") |
59 | public void forgetPasswordCode(@PathVariable("phoneNumber") String phoneNumber) { | 59 | public void forgetPasswordCode(@PathVariable("phoneNumber") String phoneNumber) { |
60 | smsService.sendSmsCode(phoneNumber, MsgTemplatePurposeEnum.FOR_FORGET_PASSWORD); | 60 | smsService.sendSmsCode(phoneNumber, MsgTemplatePurposeEnum.FOR_FORGET_PASSWORD); |
@@ -112,7 +112,7 @@ public class YtNoAuthController{ | @@ -112,7 +112,7 @@ public class YtNoAuthController{ | ||
112 | objectNode.put("unchange", true); | 112 | objectNode.put("unchange", true); |
113 | return objectNode; | 113 | return objectNode; |
114 | } | 114 | } |
115 | - @GetMapping("/share/dataBoard/{boardId}/{tenantId}") | 115 | + @GetMapping("/share/data_board/{boardId}/{tenantId}") |
116 | @ApiOperation(value = "查询看板下的所有组件信息") | 116 | @ApiOperation(value = "查询看板下的所有组件信息") |
117 | public ResponseResult<MoreDataComponentInfoDTO> getDataComponentsByBoardId( | 117 | public ResponseResult<MoreDataComponentInfoDTO> getDataComponentsByBoardId( |
118 | @PathVariable("boardId") String boardId,@PathVariable("tenantId") String tenantId) throws ThingsboardException { | 118 | @PathVariable("boardId") String boardId,@PathVariable("tenantId") String tenantId) throws ThingsboardException { |
@@ -25,7 +25,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -25,7 +25,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
25 | */ | 25 | */ |
26 | @Api(tags = "我的通知") | 26 | @Api(tags = "我的通知") |
27 | @RestController | 27 | @RestController |
28 | -@RequestMapping("api/yt/noticeUser") | 28 | +@RequestMapping("api/yt/notice_user") |
29 | @RequiredArgsConstructor | 29 | @RequiredArgsConstructor |
30 | public class YtNoticeUserController extends BaseController { | 30 | public class YtNoticeUserController extends BaseController { |
31 | 31 |
@@ -82,7 +82,7 @@ public class YtOrganizationController extends BaseController { | @@ -82,7 +82,7 @@ public class YtOrganizationController extends BaseController { | ||
82 | getCurrentUser().getCurrentUserId())); | 82 | getCurrentUser().getCurrentUserId())); |
83 | } | 83 | } |
84 | 84 | ||
85 | - @PutMapping("saveOrUpdateUserOrganizationMapping/{userId}") | 85 | + @PutMapping("save_organization_mapping/{userId}") |
86 | public void bindUserToOrganization( | 86 | public void bindUserToOrganization( |
87 | @RequestBody String[] organizationIds, @PathVariable("userId") String userId) throws ThingsboardException { | 87 | @RequestBody String[] organizationIds, @PathVariable("userId") String userId) throws ThingsboardException { |
88 | organizationService.bindUserToOrganization(getCurrentUser().getCurrentTenantId(), userId, organizationIds); | 88 | organizationService.bindUserToOrganization(getCurrentUser().getCurrentTenantId(), userId, organizationIds); |
@@ -24,7 +24,7 @@ public class YtOssFileController { | @@ -24,7 +24,7 @@ public class YtOssFileController { | ||
24 | return fileStorageService.upload(file); | 24 | return fileStorageService.upload(file); |
25 | } | 25 | } |
26 | 26 | ||
27 | - @GetMapping("/downloadFile/{fileName:.+}") | 27 | + @GetMapping("/download_file/{fileName:.+}") |
28 | public ResponseEntity<?> downloadFile( | 28 | public ResponseEntity<?> downloadFile( |
29 | @PathVariable String fileName, HttpServletRequest request, HttpServletResponse response) { | 29 | @PathVariable String fileName, HttpServletRequest request, HttpServletResponse response) { |
30 | return fileStorageService.download(fileName, request, response); | 30 | return fileStorageService.download(fileName, request, response); |
@@ -66,14 +66,14 @@ public class YtRoleController extends BaseController { | @@ -66,14 +66,14 @@ public class YtRoleController extends BaseController { | ||
66 | return roleService.getPermissions(getCurrentUser().isPtSysadmin(), getCurrentUser().isPtTenantAdmin(), getCurrentUser().getCurrentTenantId(), getCurrentUser().getCurrentUserId()); | 66 | return roleService.getPermissions(getCurrentUser().isPtSysadmin(), getCurrentUser().isPtTenantAdmin(), getCurrentUser().getCurrentTenantId(), getCurrentUser().getCurrentUserId()); |
67 | } | 67 | } |
68 | 68 | ||
69 | - @PutMapping("updateRoleStatus/{roleId}/{status}") | 69 | + @PutMapping("update_status/{roleId}/{status}") |
70 | public void updateRoleStatus( | 70 | public void updateRoleStatus( |
71 | @PathVariable("roleId") String roleId, @PathVariable("status") int status) throws ThingsboardException { | 71 | @PathVariable("roleId") String roleId, @PathVariable("status") int status) throws ThingsboardException { |
72 | Assert.isTrue(status == 0 || status == 1, "role status is not correct"); | 72 | Assert.isTrue(status == 0 || status == 1, "role status is not correct"); |
73 | roleService.updateRoleStatus(roleId, status, getCurrentUser().isPtSysadmin() ,getCurrentUser().getCurrentTenantId()); | 73 | roleService.updateRoleStatus(roleId, status, getCurrentUser().isPtSysadmin() ,getCurrentUser().getCurrentTenantId()); |
74 | } | 74 | } |
75 | 75 | ||
76 | - @PostMapping("saveOrUpdateRoleInfoWithMenu") | 76 | + @PostMapping("save_with_menu") |
77 | @PreAuthorize("@check.checkPermissions({},{'api:yt:role:saveOrUpdateRoleInfoWithMenu:post','api:yt:role:saveOrUpdateRoleInfoWithMenu:update'})") | 77 | @PreAuthorize("@check.checkPermissions({},{'api:yt:role:saveOrUpdateRoleInfoWithMenu:post','api:yt:role:saveOrUpdateRoleInfoWithMenu:update'})") |
78 | public RoleDTO saveOrUpdateRoleInfoWithMenu(@RequestBody RoleReqDTO roleReqDTO) throws ThingsboardException { | 78 | public RoleDTO saveOrUpdateRoleInfoWithMenu(@RequestBody RoleReqDTO roleReqDTO) throws ThingsboardException { |
79 | return roleService.saveOrUpdateRoleInfoWithMenu( | 79 | return roleService.saveOrUpdateRoleInfoWithMenu( |
@@ -15,7 +15,7 @@ import org.thingsboard.server.dao.yunteng.service.YtRuleChainService; | @@ -15,7 +15,7 @@ import org.thingsboard.server.dao.yunteng.service.YtRuleChainService; | ||
15 | 15 | ||
16 | @RestController | 16 | @RestController |
17 | @RequiredArgsConstructor | 17 | @RequiredArgsConstructor |
18 | -@RequestMapping("api/yt/rulechain") | 18 | +@RequestMapping("api/yt/rule_chain") |
19 | @Api(tags = {"规则链管理"}) | 19 | @Api(tags = {"规则链管理"}) |
20 | public class YtRuleChainController extends BaseController { | 20 | public class YtRuleChainController extends BaseController { |
21 | private final YtRuleChainService chainService; | 21 | private final YtRuleChainService chainService; |
@@ -35,7 +35,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -35,7 +35,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
35 | 35 | ||
36 | /** @Description 场景联动 @Author cxy @Date 2021/11/25 11:25 */ | 36 | /** @Description 场景联动 @Author cxy @Date 2021/11/25 11:25 */ |
37 | @RestController | 37 | @RestController |
38 | -@RequestMapping("/api/yt/sceneLinkage") | 38 | +@RequestMapping("/api/yt/scene_linkage") |
39 | @RequiredArgsConstructor | 39 | @RequiredArgsConstructor |
40 | @Api(tags = "场景联动") | 40 | @Api(tags = "场景联动") |
41 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 41 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
@@ -19,7 +19,7 @@ import java.util.HashMap; | @@ -19,7 +19,7 @@ import java.util.HashMap; | ||
19 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 19 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
20 | 20 | ||
21 | @RestController | 21 | @RestController |
22 | -@RequestMapping("api/yt/smsLog") | 22 | +@RequestMapping("api/yt/sms_log") |
23 | @RequiredArgsConstructor | 23 | @RequiredArgsConstructor |
24 | public class YtSmsLogController extends BaseController { | 24 | public class YtSmsLogController extends BaseController { |
25 | 25 |
@@ -36,7 +36,7 @@ public class YtTenantController extends AbstractUserAccount { | @@ -36,7 +36,7 @@ public class YtTenantController extends AbstractUserAccount { | ||
36 | this.accountProperties = accountProperties; | 36 | this.accountProperties = accountProperties; |
37 | } | 37 | } |
38 | 38 | ||
39 | - @PostMapping("/resetPassword/{userId}") | 39 | + @PostMapping("/reset_password/{userId}") |
40 | @PreAuthorize("hasAnyAuthority('SYS_ADMIN')") | 40 | @PreAuthorize("hasAnyAuthority('SYS_ADMIN')") |
41 | public void resetPassword(@PathVariable("userId") String userId) throws ThingsboardException { | 41 | public void resetPassword(@PathVariable("userId") String userId) throws ThingsboardException { |
42 | //check is tenant account | 42 | //check is tenant account |
@@ -20,7 +20,7 @@ import java.util.List; | @@ -20,7 +20,7 @@ import java.util.List; | ||
20 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 20 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
21 | 21 | ||
22 | @RestController | 22 | @RestController |
23 | -@RequestMapping("/api/yt/tenantProfiles") | 23 | +@RequestMapping("/api/yt/tenant_profiles") |
24 | @RequiredArgsConstructor | 24 | @RequiredArgsConstructor |
25 | public class YtTenantProfilesController extends BaseController { | 25 | public class YtTenantProfilesController extends BaseController { |
26 | 26 |
@@ -181,7 +181,7 @@ public class YtUserController extends AbstractUserAccount { | @@ -181,7 +181,7 @@ public class YtUserController extends AbstractUserAccount { | ||
181 | 181 | ||
182 | 182 | ||
183 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN'},{'api:yt:user:saveTenantAdmin:post'})") | 183 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN'},{'api:yt:user:saveTenantAdmin:post'})") |
184 | - @PostMapping("saveTenantAdmin") | 184 | + @PostMapping("save_tenant_admin") |
185 | public UserDTO saveTenantAdmin(@Validated(AddGroup.class) @RequestBody UserDTO userDTO) | 185 | public UserDTO saveTenantAdmin(@Validated(AddGroup.class) @RequestBody UserDTO userDTO) |
186 | throws ThingsboardException { | 186 | throws ThingsboardException { |
187 | if (StringUtils.isEmpty(userDTO.getTenantId())) { | 187 | if (StringUtils.isEmpty(userDTO.getTenantId())) { |
@@ -226,7 +226,7 @@ public class YtUserController extends AbstractUserAccount { | @@ -226,7 +226,7 @@ public class YtUserController extends AbstractUserAccount { | ||
226 | deleteDTO.getIds(), getCurrentUser().isPtSysadmin(), getCurrentUser().getCurrentTenantId()); | 226 | deleteDTO.getIds(), getCurrentUser().isPtSysadmin(), getCurrentUser().getCurrentTenantId()); |
227 | } | 227 | } |
228 | 228 | ||
229 | - @GetMapping("getGroupUserByGroupId/{groupId}") | 229 | + @GetMapping("get_group_user/{groupId}") |
230 | public ResponseEntity<List<UserDTO>> getGroupUserByGroupId( | 230 | public ResponseEntity<List<UserDTO>> getGroupUserByGroupId( |
231 | @PathVariable("groupId") String groupId) throws ThingsboardException { | 231 | @PathVariable("groupId") String groupId) throws ThingsboardException { |
232 | return ResponseEntity.of( | 232 | return ResponseEntity.of( |
@@ -245,7 +245,7 @@ public class YtUserController extends AbstractUserAccount { | @@ -245,7 +245,7 @@ public class YtUserController extends AbstractUserAccount { | ||
245 | ExcelUtil.exportExcel(response, "用户信息", "user info", List.of(me), UserInfoDTO.class); | 245 | ExcelUtil.exportExcel(response, "用户信息", "user info", List.of(me), UserInfoDTO.class); |
246 | } | 246 | } |
247 | 247 | ||
248 | - @GetMapping("/accountExist/{username}") | 248 | + @GetMapping("/account_exist/{username}") |
249 | public ResponseResult<UserDTO> accountExist(@PathVariable String username) | 249 | public ResponseResult<UserDTO> accountExist(@PathVariable String username) |
250 | throws ThingsboardException { | 250 | throws ThingsboardException { |
251 | return ResponseResult.success( | 251 | return ResponseResult.success( |
@@ -253,7 +253,7 @@ public class YtUserController extends AbstractUserAccount { | @@ -253,7 +253,7 @@ public class YtUserController extends AbstractUserAccount { | ||
253 | } | 253 | } |
254 | 254 | ||
255 | @ApiOperation(value = "判断电话是否重复") | 255 | @ApiOperation(value = "判断电话是否重复") |
256 | - @GetMapping("/findUserByPhoneNumber/{phoneNumber}") | 256 | + @GetMapping("/get_user/{phoneNumber}") |
257 | public ResponseResult<UserDTO> findUserByPhoneNumber(@PathVariable String phoneNumber) throws ThingsboardException { | 257 | public ResponseResult<UserDTO> findUserByPhoneNumber(@PathVariable String phoneNumber) throws ThingsboardException { |
258 | return ResponseResult.success( | 258 | return ResponseResult.success( |
259 | userService.findUserByPhoneNumber(phoneNumber)); | 259 | userService.findUserByPhoneNumber(phoneNumber)); |