Commit d401024d1c4e11d4823fade04279d969e3ac0524
1 parent
2fbc7bd3
fix: thingsModel service/event TSL and renamed class
Showing
125 changed files
with
384 additions
and
403 deletions
@@ -48,7 +48,7 @@ import org.thingsboard.server.common.data.id.EntityId; | @@ -48,7 +48,7 @@ import org.thingsboard.server.common.data.id.EntityId; | ||
48 | import org.thingsboard.server.common.data.id.EntityIdFactory; | 48 | import org.thingsboard.server.common.data.id.EntityIdFactory; |
49 | import org.thingsboard.server.common.data.page.PageData; | 49 | import org.thingsboard.server.common.data.page.PageData; |
50 | import org.thingsboard.server.common.data.page.TimePageLink; | 50 | import org.thingsboard.server.common.data.page.TimePageLink; |
51 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceService; | 51 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceService; |
52 | import org.thingsboard.server.queue.util.TbCoreComponent; | 52 | import org.thingsboard.server.queue.util.TbCoreComponent; |
53 | import org.thingsboard.server.service.security.permission.Operation; | 53 | import org.thingsboard.server.service.security.permission.Operation; |
54 | import org.thingsboard.server.service.security.permission.Resource; | 54 | import org.thingsboard.server.service.security.permission.Resource; |
@@ -91,7 +91,7 @@ public class AlarmController extends BaseController { | @@ -91,7 +91,7 @@ public class AlarmController extends BaseController { | ||
91 | private static final String ALARM_QUERY_FETCH_ORIGINATOR_DESCRIPTION = "A boolean value to specify if the alarm originator name will be " + | 91 | private static final String ALARM_QUERY_FETCH_ORIGINATOR_DESCRIPTION = "A boolean value to specify if the alarm originator name will be " + |
92 | "filled in the AlarmInfo object field: 'originatorName' or will returns as null."; | 92 | "filled in the AlarmInfo object field: 'originatorName' or will returns as null."; |
93 | 93 | ||
94 | - private final YtDeviceService ytDeviceService; | 94 | + private final TkDeviceService ytDeviceService; |
95 | 95 | ||
96 | @ApiOperation(value = "Get Alarm (getAlarmById)", | 96 | @ApiOperation(value = "Get Alarm (getAlarmById)", |
97 | notes = "Fetch the Alarm object based on the provided Alarm Id. " + ALARM_SECURITY_CHECK, produces = MediaType.APPLICATION_JSON_VALUE) | 97 | notes = "Fetch the Alarm object based on the provided Alarm Id. " + ALARM_SECURITY_CHECK, produces = MediaType.APPLICATION_JSON_VALUE) |
@@ -22,7 +22,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -22,7 +22,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
22 | import org.thingsboard.server.controller.BaseController; | 22 | import org.thingsboard.server.controller.BaseController; |
23 | import org.thingsboard.server.dao.util.yunteng.CronUtils; | 23 | import org.thingsboard.server.dao.util.yunteng.CronUtils; |
24 | import org.thingsboard.server.dao.util.yunteng.ScheduleUtils; | 24 | import org.thingsboard.server.dao.util.yunteng.ScheduleUtils; |
25 | -import org.thingsboard.server.dao.yunteng.service.YtSysJobService; | 25 | +import org.thingsboard.server.dao.yunteng.service.TkSysJobService; |
26 | 26 | ||
27 | import java.util.HashMap; | 27 | import java.util.HashMap; |
28 | import java.util.List; | 28 | import java.util.List; |
@@ -37,7 +37,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -37,7 +37,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
37 | @Api(tags = {"定时任务"}) | 37 | @Api(tags = {"定时任务"}) |
38 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{})") | 38 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{})") |
39 | public class SysJobController extends BaseController { | 39 | public class SysJobController extends BaseController { |
40 | - private final YtSysJobService jobService; | 40 | + private final TkSysJobService jobService; |
41 | 41 | ||
42 | @GetMapping( | 42 | @GetMapping( |
43 | path = "/page", | 43 | path = "/page", |
@@ -3,7 +3,6 @@ package org.thingsboard.server.controller.yunteng; | @@ -3,7 +3,6 @@ package org.thingsboard.server.controller.yunteng; | ||
3 | import io.swagger.annotations.Api; | 3 | import io.swagger.annotations.Api; |
4 | import io.swagger.annotations.ApiOperation; | 4 | import io.swagger.annotations.ApiOperation; |
5 | import lombok.RequiredArgsConstructor; | 5 | import lombok.RequiredArgsConstructor; |
6 | -import org.apache.commons.lang3.StringUtils; | ||
7 | import org.quartz.SchedulerException; | 6 | import org.quartz.SchedulerException; |
8 | import org.springframework.security.access.prepost.PreAuthorize; | 7 | import org.springframework.security.access.prepost.PreAuthorize; |
9 | import org.springframework.web.bind.annotation.*; | 8 | import org.springframework.web.bind.annotation.*; |
@@ -14,7 +13,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -14,7 +13,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
14 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 13 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
15 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 14 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
16 | import org.thingsboard.server.controller.BaseController; | 15 | import org.thingsboard.server.controller.BaseController; |
17 | -import org.thingsboard.server.dao.yunteng.service.YtSysJobLogService; | 16 | +import org.thingsboard.server.dao.yunteng.service.TkSysJobLogService; |
18 | 17 | ||
19 | import java.util.HashMap; | 18 | import java.util.HashMap; |
20 | 19 | ||
@@ -32,7 +31,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -32,7 +31,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
32 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{})") | 31 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{})") |
33 | public class SysJobLogController extends BaseController { | 32 | public class SysJobLogController extends BaseController { |
34 | 33 | ||
35 | - private final YtSysJobLogService ytSysJobLogService; | 34 | + private final TkSysJobLogService tkSysJobLogService; |
36 | 35 | ||
37 | @GetMapping( | 36 | @GetMapping( |
38 | path = "/page", | 37 | path = "/page", |
@@ -59,26 +58,26 @@ public class SysJobLogController extends BaseController { | @@ -59,26 +58,26 @@ public class SysJobLogController extends BaseController { | ||
59 | if (orderType != null) { | 58 | if (orderType != null) { |
60 | queryMap.put(ORDER_TYPE, orderType.name()); | 59 | queryMap.put(ORDER_TYPE, orderType.name()); |
61 | } | 60 | } |
62 | - return ytSysJobLogService.sysJobLogPageByJobId(queryMap); | 61 | + return tkSysJobLogService.sysJobLogPageByJobId(queryMap); |
63 | } | 62 | } |
64 | 63 | ||
65 | @DeleteMapping | 64 | @DeleteMapping |
66 | @ApiOperation(value = "删除定时任务") | 65 | @ApiOperation(value = "删除定时任务") |
67 | public ResponseResult<Boolean> deleteSysJobLog(@RequestBody DeleteDTO deleteDTO) | 66 | public ResponseResult<Boolean> deleteSysJobLog(@RequestBody DeleteDTO deleteDTO) |
68 | throws SchedulerException { | 67 | throws SchedulerException { |
69 | - return ResponseResult.success(ytSysJobLogService.deleteSysJobLog(deleteDTO)); | 68 | + return ResponseResult.success(tkSysJobLogService.deleteSysJobLog(deleteDTO)); |
70 | } | 69 | } |
71 | 70 | ||
72 | @GetMapping("/get/{jobId}/{id}") | 71 | @GetMapping("/get/{jobId}/{id}") |
73 | @ApiOperation(value = "获取详情") | 72 | @ApiOperation(value = "获取详情") |
74 | public ResponseResult<SysJobLogDTO> getSysJobLog(@PathVariable("jobId") String jobId,@PathVariable("id") String id) | 73 | public ResponseResult<SysJobLogDTO> getSysJobLog(@PathVariable("jobId") String jobId,@PathVariable("id") String id) |
75 | throws SchedulerException { | 74 | throws SchedulerException { |
76 | - return ResponseResult.success(ytSysJobLogService.findSysJobLogById(jobId,id)); | 75 | + return ResponseResult.success(tkSysJobLogService.findSysJobLogById(jobId,id)); |
77 | } | 76 | } |
78 | 77 | ||
79 | @PostMapping("/clean") | 78 | @PostMapping("/clean") |
80 | @ApiOperation(value = "清空调度日志") | 79 | @ApiOperation(value = "清空调度日志") |
81 | public ResponseResult<Boolean> clean() { | 80 | public ResponseResult<Boolean> clean() { |
82 | - return ResponseResult.success(ytSysJobLogService.cleanJobLog()); | 81 | + return ResponseResult.success(tkSysJobLogService.cleanJobLog()); |
83 | } | 82 | } |
84 | } | 83 | } |
@@ -23,9 +23,10 @@ import org.thingsboard.server.common.data.yunteng.enums.StatusEnum; | @@ -23,9 +23,10 @@ import org.thingsboard.server.common.data.yunteng.enums.StatusEnum; | ||
23 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 23 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
24 | import org.thingsboard.server.controller.BaseController; | 24 | import org.thingsboard.server.controller.BaseController; |
25 | import org.thingsboard.server.dao.yunteng.service.ThingsModelService; | 25 | import org.thingsboard.server.dao.yunteng.service.ThingsModelService; |
26 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceProfileService; | 26 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceProfileService; |
27 | 27 | ||
28 | import java.util.HashMap; | 28 | import java.util.HashMap; |
29 | +import java.util.List; | ||
29 | 30 | ||
30 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 31 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
31 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.ORDER_TYPE; | 32 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.ORDER_TYPE; |
@@ -36,7 +37,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -36,7 +37,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
36 | @Api(tags = {"物模型管理"}) | 37 | @Api(tags = {"物模型管理"}) |
37 | public class ThingsModelController extends BaseController { | 38 | public class ThingsModelController extends BaseController { |
38 | private final ThingsModelService thingsModelService; | 39 | private final ThingsModelService thingsModelService; |
39 | - private final YtDeviceProfileService ytDeviceProfileService; | 40 | + private final TkDeviceProfileService tkDeviceProfileService; |
40 | 41 | ||
41 | @GetMapping( | 42 | @GetMapping( |
42 | path = "/page", | 43 | path = "/page", |
@@ -51,7 +52,7 @@ public class ThingsModelController extends BaseController { | @@ -51,7 +52,7 @@ public class ThingsModelController extends BaseController { | ||
51 | @RequestParam(value = ORDER_FILED, required = false) String orderBy, | 52 | @RequestParam(value = ORDER_FILED, required = false) String orderBy, |
52 | @RequestParam(value = ORDER_TYPE, required = false) OrderTypeEnum orderType) | 53 | @RequestParam(value = ORDER_TYPE, required = false) OrderTypeEnum orderType) |
53 | throws ThingsboardException { | 54 | throws ThingsboardException { |
54 | - if(StringUtils.isEmpty(deviceProfileId)){ | 55 | + if (StringUtils.isEmpty(deviceProfileId)) { |
55 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | 56 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); |
56 | } | 57 | } |
57 | HashMap<String, Object> queryMap = new HashMap<>(); | 58 | HashMap<String, Object> queryMap = new HashMap<>(); |
@@ -109,11 +110,12 @@ public class ThingsModelController extends BaseController { | @@ -109,11 +110,12 @@ public class ThingsModelController extends BaseController { | ||
109 | } | 110 | } |
110 | 111 | ||
111 | @PutMapping("/{deviceProfileId}") | 112 | @PutMapping("/{deviceProfileId}") |
113 | + // @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN'},{'api:yt:things_model:release'})") | ||
112 | @ApiOperation("物模型发布") | 114 | @ApiOperation("物模型发布") |
113 | public ResponseEntity<Boolean> releaseTSL(@PathVariable("deviceProfileId") String deviceProfileId) | 115 | public ResponseEntity<Boolean> releaseTSL(@PathVariable("deviceProfileId") String deviceProfileId) |
114 | throws ThingsboardException { | 116 | throws ThingsboardException { |
115 | String tenantId = getCurrentUser().getCurrentTenantId(); | 117 | String tenantId = getCurrentUser().getCurrentTenantId(); |
116 | - DeviceProfileDTO dto = ytDeviceProfileService.findDeviceProfileById(tenantId, deviceProfileId); | 118 | + DeviceProfileDTO dto = tkDeviceProfileService.findDeviceProfileById(tenantId, deviceProfileId); |
117 | if (null == dto) { | 119 | if (null == dto) { |
118 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | 120 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); |
119 | } | 121 | } |
@@ -122,11 +124,25 @@ public class ThingsModelController extends BaseController { | @@ -122,11 +124,25 @@ public class ThingsModelController extends BaseController { | ||
122 | deviceProfileId, tenantId, StatusEnum.ENABLE.getIndex())); | 124 | deviceProfileId, tenantId, StatusEnum.ENABLE.getIndex())); |
123 | } | 125 | } |
124 | 126 | ||
127 | + @GetMapping("/get_services/{deviceProfileId}") | ||
128 | + @ApiOperation("获取产品服务") | ||
129 | + public ResponseEntity<List<ThingsModelDTO>> getServices( | ||
130 | + @PathVariable("deviceProfileId") String deviceProfileId) throws ThingsboardException { | ||
131 | + String tenantId = getCurrentUser().getCurrentTenantId(); | ||
132 | + DeviceProfileDTO dto = tkDeviceProfileService.findDeviceProfileById(tenantId, deviceProfileId); | ||
133 | + if (null == dto) { | ||
134 | + throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | ||
135 | + } | ||
136 | + return ResponseEntity.ok( | ||
137 | + thingsModelService.selectByDeviceProfileId( | ||
138 | + FunctionTypeEnum.services, tenantId, deviceProfileId)); | ||
139 | + } | ||
140 | + | ||
125 | private ThingsModelDTO saveOrUpdate(ThingsModelDTO thingsModelDTO) throws ThingsboardException { | 141 | private ThingsModelDTO saveOrUpdate(ThingsModelDTO thingsModelDTO) throws ThingsboardException { |
126 | 142 | ||
127 | String tenantId = getCurrentUser().getCurrentTenantId(); | 143 | String tenantId = getCurrentUser().getCurrentTenantId(); |
128 | DeviceProfileDTO deviceProfileDTO = | 144 | DeviceProfileDTO deviceProfileDTO = |
129 | - ytDeviceProfileService.findDeviceProfileById(tenantId, thingsModelDTO.getDeviceProfileId()); | 145 | + tkDeviceProfileService.findDeviceProfileById(tenantId, thingsModelDTO.getDeviceProfileId()); |
130 | if (null == deviceProfileDTO) { | 146 | if (null == deviceProfileDTO) { |
131 | throw new YtDataValidationException(ErrorMessage.NOT_BELONG_CURRENT_TENANT.getMessage()); | 147 | throw new YtDataValidationException(ErrorMessage.NOT_BELONG_CURRENT_TENANT.getMessage()); |
132 | } | 148 | } |
@@ -31,8 +31,8 @@ import org.thingsboard.server.controller.BaseController; | @@ -31,8 +31,8 @@ import org.thingsboard.server.controller.BaseController; | ||
31 | import org.thingsboard.server.dao.tenant.TenantService; | 31 | import org.thingsboard.server.dao.tenant.TenantService; |
32 | import org.thingsboard.server.dao.user.UserService; | 32 | import org.thingsboard.server.dao.user.UserService; |
33 | import org.thingsboard.server.dao.yunteng.service.MenuService; | 33 | import org.thingsboard.server.dao.yunteng.service.MenuService; |
34 | -import org.thingsboard.server.dao.yunteng.service.YtTenantService; | ||
35 | -import org.thingsboard.server.dao.yunteng.service.YtUserService; | 34 | +import org.thingsboard.server.dao.yunteng.service.TkTenantService; |
35 | +import org.thingsboard.server.dao.yunteng.service.TkUserService; | ||
36 | import org.thingsboard.server.service.install.InstallScripts; | 36 | import org.thingsboard.server.service.install.InstallScripts; |
37 | import org.thingsboard.server.service.security.permission.Operation; | 37 | import org.thingsboard.server.service.security.permission.Operation; |
38 | 38 | ||
@@ -51,9 +51,9 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -51,9 +51,9 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
51 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{})") | 51 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{})") |
52 | public class YtAdminController extends BaseController { | 52 | public class YtAdminController extends BaseController { |
53 | 53 | ||
54 | - private final YtTenantService ytTenantService; | 54 | + private final TkTenantService tkTenantService; |
55 | private final MenuService menuService; | 55 | private final MenuService menuService; |
56 | - private final YtUserService userService; | 56 | + private final TkUserService userService; |
57 | private final TenantService tenantService; | 57 | private final TenantService tenantService; |
58 | private final InstallScripts installScripts; | 58 | private final InstallScripts installScripts; |
59 | private final UserService tbUserService; | 59 | private final UserService tbUserService; |
@@ -62,7 +62,7 @@ public class YtAdminController extends BaseController { | @@ -62,7 +62,7 @@ public class YtAdminController extends BaseController { | ||
62 | @Deprecated | 62 | @Deprecated |
63 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{'api:yt:admin:tenant:post'})") | 63 | @PreAuthorize("@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{'api:yt:admin:tenant:post'})") |
64 | public ResponseEntity<TenantDTO> saveTenant(@RequestBody TenantReqDTO tenantReqDTO) { | 64 | public ResponseEntity<TenantDTO> saveTenant(@RequestBody TenantReqDTO tenantReqDTO) { |
65 | - TenantDTO newTenant = ytTenantService.createNewTenant(tenantReqDTO); | 65 | + TenantDTO newTenant = tkTenantService.createNewTenant(tenantReqDTO); |
66 | URI location = | 66 | URI location = |
67 | ServletUriComponentsBuilder.fromCurrentRequest() | 67 | ServletUriComponentsBuilder.fromCurrentRequest() |
68 | .path("/tenant/getById/{id}") | 68 | .path("/tenant/getById/{id}") |
@@ -88,7 +88,7 @@ public class YtAdminController extends BaseController { | @@ -88,7 +88,7 @@ public class YtAdminController extends BaseController { | ||
88 | queryMap.put(ORDER_TYPE, orderType.name()); | 88 | queryMap.put(ORDER_TYPE, orderType.name()); |
89 | } | 89 | } |
90 | queryMap.put("tenantName", tenantName); | 90 | queryMap.put("tenantName", tenantName); |
91 | - return ytTenantService.page(queryMap); | 91 | + return tkTenantService.page(queryMap); |
92 | } | 92 | } |
93 | 93 | ||
94 | @PutMapping("/tenant") | 94 | @PutMapping("/tenant") |
@@ -96,13 +96,13 @@ public class YtAdminController extends BaseController { | @@ -96,13 +96,13 @@ public class YtAdminController extends BaseController { | ||
96 | public TenantDTO updateTenant(@RequestBody TenantDTO tenantDTO) { | 96 | public TenantDTO updateTenant(@RequestBody TenantDTO tenantDTO) { |
97 | Assert.notNull(tenantDTO, "tenant cannot be null"); | 97 | Assert.notNull(tenantDTO, "tenant cannot be null"); |
98 | Assert.notNull(tenantDTO.getId(), "tenant id cannot be null when update"); | 98 | Assert.notNull(tenantDTO.getId(), "tenant id cannot be null when update"); |
99 | - return ytTenantService.updateTenant(tenantDTO); | 99 | + return tkTenantService.updateTenant(tenantDTO); |
100 | } | 100 | } |
101 | 101 | ||
102 | @GetMapping("/tenant/roles/{tenantId}") | 102 | @GetMapping("/tenant/roles/{tenantId}") |
103 | public ResponseEntity<List<String>> getTenantRolesByTenantId( | 103 | public ResponseEntity<List<String>> getTenantRolesByTenantId( |
104 | @PathVariable("tenantId") String tenantId) { | 104 | @PathVariable("tenantId") String tenantId) { |
105 | - return ResponseEntity.ok(ytTenantService.getTenantRolesByTenantId(tenantId)); | 105 | + return ResponseEntity.ok(tkTenantService.getTenantRolesByTenantId(tenantId)); |
106 | } | 106 | } |
107 | 107 | ||
108 | @DeleteMapping("/tenant") | 108 | @DeleteMapping("/tenant") |
@@ -114,7 +114,7 @@ public class YtAdminController extends BaseController { | @@ -114,7 +114,7 @@ public class YtAdminController extends BaseController { | ||
114 | .getIds() | 114 | .getIds() |
115 | .forEach( | 115 | .forEach( |
116 | id -> { | 116 | id -> { |
117 | - ytTenantService | 117 | + tkTenantService |
118 | .findById(id) | 118 | .findById(id) |
119 | .ifPresent( | 119 | .ifPresent( |
120 | tenantDTO -> { | 120 | tenantDTO -> { |
@@ -125,7 +125,7 @@ public class YtAdminController extends BaseController { | @@ -125,7 +125,7 @@ public class YtAdminController extends BaseController { | ||
125 | } | 125 | } |
126 | }); | 126 | }); |
127 | }); | 127 | }); |
128 | - ytTenantService.deleteTenants( | 128 | + tkTenantService.deleteTenants( |
129 | deleteDTO.getIds().toArray(new String[deleteDTO.getIds().size()])); | 129 | deleteDTO.getIds().toArray(new String[deleteDTO.getIds().size()])); |
130 | } | 130 | } |
131 | 131 | ||
@@ -149,7 +149,7 @@ public class YtAdminController extends BaseController { | @@ -149,7 +149,7 @@ public class YtAdminController extends BaseController { | ||
149 | 149 | ||
150 | @GetMapping("/tenant/getById/{id}") | 150 | @GetMapping("/tenant/getById/{id}") |
151 | public ResponseEntity<TenantDTO> getTenant(@PathVariable("id") String id) { | 151 | public ResponseEntity<TenantDTO> getTenant(@PathVariable("id") String id) { |
152 | - return ResponseEntity.of(ytTenantService.findById(id)); | 152 | + return ResponseEntity.of(tkTenantService.findById(id)); |
153 | } | 153 | } |
154 | 154 | ||
155 | @PostMapping("/tenant/adminUser") | 155 | @PostMapping("/tenant/adminUser") |
@@ -205,7 +205,7 @@ public class YtAdminController extends BaseController { | @@ -205,7 +205,7 @@ public class YtAdminController extends BaseController { | ||
205 | @Validated(UpdateGroup.class) @RequestBody TenantReqDTO tenantReqDTO) | 205 | @Validated(UpdateGroup.class) @RequestBody TenantReqDTO tenantReqDTO) |
206 | throws ThingsboardException { | 206 | throws ThingsboardException { |
207 | updateOrSaveTenant(tenantReqDTO); | 207 | updateOrSaveTenant(tenantReqDTO); |
208 | - return ytTenantService.updateOrCreateTenant(tenantReqDTO); | 208 | + return tkTenantService.updateOrCreateTenant(tenantReqDTO); |
209 | } | 209 | } |
210 | 210 | ||
211 | private void deleteTenantAdmin(String strUserId) throws ThingsboardException { | 211 | private void deleteTenantAdmin(String strUserId) throws ThingsboardException { |
@@ -20,7 +20,7 @@ import org.thingsboard.server.common.data.yunteng.dto.AlarmProfileDTO; | @@ -20,7 +20,7 @@ import org.thingsboard.server.common.data.yunteng.dto.AlarmProfileDTO; | ||
20 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 20 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
21 | import org.thingsboard.server.controller.BaseController; | 21 | import org.thingsboard.server.controller.BaseController; |
22 | import org.thingsboard.server.dao.yunteng.service.AlarmProfileService; | 22 | import org.thingsboard.server.dao.yunteng.service.AlarmProfileService; |
23 | -import org.thingsboard.server.dao.yunteng.service.YtAlarmContactService; | 23 | +import org.thingsboard.server.dao.yunteng.service.TkAlarmContactService; |
24 | 24 | ||
25 | import java.net.URI; | 25 | import java.net.URI; |
26 | import java.util.HashMap; | 26 | import java.util.HashMap; |
@@ -40,7 +40,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -40,7 +40,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
40 | @RequiredArgsConstructor | 40 | @RequiredArgsConstructor |
41 | @Api(tags = "告警联系人") | 41 | @Api(tags = "告警联系人") |
42 | public class YtAlarmContactController extends BaseController { | 42 | public class YtAlarmContactController extends BaseController { |
43 | - private final YtAlarmContactService alarmService; | 43 | + private final TkAlarmContactService alarmService; |
44 | private final AlarmProfileService alarmProfileService; | 44 | private final AlarmProfileService alarmProfileService; |
45 | 45 | ||
46 | @ApiOperation(value = "新增联系人|编辑") | 46 | @ApiOperation(value = "新增联系人|编辑") |
@@ -19,7 +19,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -19,7 +19,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
19 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 19 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
20 | import org.thingsboard.server.controller.BaseController; | 20 | import org.thingsboard.server.controller.BaseController; |
21 | import org.thingsboard.server.dao.yunteng.entities.TkAlarmEntity; | 21 | import org.thingsboard.server.dao.yunteng.entities.TkAlarmEntity; |
22 | -import org.thingsboard.server.dao.yunteng.service.YtAlarmInfoService; | 22 | +import org.thingsboard.server.dao.yunteng.service.TkAlarmInfoService; |
23 | 23 | ||
24 | import java.util.HashMap; | 24 | import java.util.HashMap; |
25 | import java.util.List; | 25 | import java.util.List; |
@@ -39,7 +39,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -39,7 +39,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
39 | @Api(tags = "告警中心") | 39 | @Api(tags = "告警中心") |
40 | public class YtAlarmInfoController extends BaseController { | 40 | public class YtAlarmInfoController extends BaseController { |
41 | 41 | ||
42 | - private final YtAlarmInfoService alarmInfoService; | 42 | + private final TkAlarmInfoService alarmInfoService; |
43 | 43 | ||
44 | 44 | ||
45 | //分页测试通过 | 45 | //分页测试通过 |
@@ -8,7 +8,7 @@ import org.springframework.security.authentication.BadCredentialsException; | @@ -8,7 +8,7 @@ import org.springframework.security.authentication.BadCredentialsException; | ||
8 | import org.springframework.util.Assert; | 8 | import org.springframework.util.Assert; |
9 | import org.springframework.web.bind.annotation.*; | 9 | import org.springframework.web.bind.annotation.*; |
10 | import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; | 10 | import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; |
11 | -import org.thingsboard.server.dao.yunteng.service.YtNoticeService; | 11 | +import org.thingsboard.server.dao.yunteng.service.TkNoticeService; |
12 | import org.thingsboard.server.service.security.exception.JwtExpiredTokenException; | 12 | import org.thingsboard.server.service.security.exception.JwtExpiredTokenException; |
13 | 13 | ||
14 | import java.net.InetAddress; | 14 | import java.net.InetAddress; |
@@ -31,7 +31,7 @@ import java.net.InetAddress; | @@ -31,7 +31,7 @@ import java.net.InetAddress; | ||
31 | @Deprecated | 31 | @Deprecated |
32 | public class YtAlarmNoticeController { | 32 | public class YtAlarmNoticeController { |
33 | 33 | ||
34 | - private final YtNoticeService service; | 34 | + private final TkNoticeService service; |
35 | 35 | ||
36 | @PostMapping("/alert/{alarmProfileId}") | 36 | @PostMapping("/alert/{alarmProfileId}") |
37 | public void alertNotice(@RequestParam(value = "token", required = true) String token, | 37 | public void alertNotice(@RequestParam(value = "token", required = true) String token, |
@@ -18,7 +18,7 @@ import org.thingsboard.server.common.data.yunteng.dto.request.ConfigurationConte | @@ -18,7 +18,7 @@ import org.thingsboard.server.common.data.yunteng.dto.request.ConfigurationConte | ||
18 | import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | 18 | import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; |
19 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 19 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
20 | import org.thingsboard.server.controller.BaseController; | 20 | import org.thingsboard.server.controller.BaseController; |
21 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationCenterService; | 21 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationCenterService; |
22 | 22 | ||
23 | import java.util.HashMap; | 23 | import java.util.HashMap; |
24 | 24 | ||
@@ -31,7 +31,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -31,7 +31,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
31 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 31 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
32 | public class YtConfigurationCenterController extends BaseController { | 32 | public class YtConfigurationCenterController extends BaseController { |
33 | 33 | ||
34 | - private final YtConfigurationCenterService ytConfigurationCenterService; | 34 | + private final TkConfigurationCenterService ytConfigurationCenterService; |
35 | 35 | ||
36 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 36 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
37 | @ApiOperation("分页") | 37 | @ApiOperation("分页") |
@@ -4,7 +4,6 @@ import io.swagger.annotations.Api; | @@ -4,7 +4,6 @@ import io.swagger.annotations.Api; | ||
4 | import io.swagger.annotations.ApiOperation; | 4 | import io.swagger.annotations.ApiOperation; |
5 | import lombok.RequiredArgsConstructor; | 5 | import lombok.RequiredArgsConstructor; |
6 | import org.springframework.http.ResponseEntity; | 6 | import org.springframework.http.ResponseEntity; |
7 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
8 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
9 | import org.springframework.web.bind.annotation.*; | 8 | import org.springframework.web.bind.annotation.*; |
10 | import org.thingsboard.server.common.data.exception.ThingsboardException; | 9 | import org.thingsboard.server.common.data.exception.ThingsboardException; |
@@ -15,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationContentDTO; | @@ -15,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationContentDTO; | ||
15 | import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | 14 | import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; |
16 | import org.thingsboard.server.common.data.yunteng.dto.request.ConfigurationContentInfoDTO; | 15 | import org.thingsboard.server.common.data.yunteng.dto.request.ConfigurationContentInfoDTO; |
17 | import org.thingsboard.server.controller.BaseController; | 16 | import org.thingsboard.server.controller.BaseController; |
18 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationContentService; | 17 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationContentService; |
19 | 18 | ||
20 | @RestController | 19 | @RestController |
21 | @RequestMapping("/api/yt/configuration/content") | 20 | @RequestMapping("/api/yt/configuration/content") |
@@ -23,7 +22,7 @@ import org.thingsboard.server.dao.yunteng.service.YtConfigurationContentService; | @@ -23,7 +22,7 @@ import org.thingsboard.server.dao.yunteng.service.YtConfigurationContentService; | ||
23 | @Api(tags = "组态内容") | 22 | @Api(tags = "组态内容") |
24 | public class YtConfigurationContentController extends BaseController { | 23 | public class YtConfigurationContentController extends BaseController { |
25 | 24 | ||
26 | - private final YtConfigurationContentService ytConfigurationContentService; | 25 | + private final TkConfigurationContentService ytConfigurationContentService; |
27 | 26 | ||
28 | @PostMapping | 27 | @PostMapping |
29 | @ApiOperation("新增") | 28 | @ApiOperation("新增") |
@@ -5,7 +5,6 @@ import io.swagger.annotations.ApiOperation; | @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiOperation; | ||
5 | import io.swagger.annotations.ApiParam; | 5 | import io.swagger.annotations.ApiParam; |
6 | import lombok.RequiredArgsConstructor; | 6 | import lombok.RequiredArgsConstructor; |
7 | import org.springframework.http.ResponseEntity; | 7 | import org.springframework.http.ResponseEntity; |
8 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
9 | import org.springframework.validation.annotation.Validated; | 8 | import org.springframework.validation.annotation.Validated; |
10 | import org.springframework.web.bind.annotation.*; | 9 | import org.springframework.web.bind.annotation.*; |
11 | import org.thingsboard.server.common.data.exception.ThingsboardException; | 10 | import org.thingsboard.server.common.data.exception.ThingsboardException; |
@@ -13,9 +12,9 @@ import org.thingsboard.server.common.data.yunteng.common.AddGroup; | @@ -13,9 +12,9 @@ import org.thingsboard.server.common.data.yunteng.common.AddGroup; | ||
13 | import org.thingsboard.server.common.data.yunteng.dto.*; | 12 | import org.thingsboard.server.common.data.yunteng.dto.*; |
14 | import org.thingsboard.server.common.data.yunteng.utils.JacksonUtil; | 13 | import org.thingsboard.server.common.data.yunteng.utils.JacksonUtil; |
15 | import org.thingsboard.server.controller.BaseController; | 14 | import org.thingsboard.server.controller.BaseController; |
16 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationActService; | ||
17 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationDatasourceService; | ||
18 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationEventService; | 15 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationActService; |
16 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationDatasourceService; | ||
17 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationEventService; | ||
19 | 18 | ||
20 | import java.util.List; | 19 | import java.util.List; |
21 | import java.util.Optional; | 20 | import java.util.Optional; |
@@ -29,9 +28,9 @@ import java.util.Optional; | @@ -29,9 +28,9 @@ import java.util.Optional; | ||
29 | @Api(tags = "组态结点管理") | 28 | @Api(tags = "组态结点管理") |
30 | public class YtConfigurationNodeController extends BaseController { | 29 | public class YtConfigurationNodeController extends BaseController { |
31 | 30 | ||
32 | - private final YtConfigurationDatasourceService datasourceService; | ||
33 | - private final YtConfigurationEventService eventService; | ||
34 | - private final YtConfigurationActService actService; | 31 | + private final TkConfigurationDatasourceService datasourceService; |
32 | + private final TkConfigurationEventService eventService; | ||
33 | + private final TkConfigurationActService actService; | ||
35 | 34 | ||
36 | @PostMapping | 35 | @PostMapping |
37 | @ApiOperation("保存节点数据源并刷新节点的交互和动效信息") | 36 | @ApiOperation("保存节点数据源并刷新节点的交互和动效信息") |
@@ -33,7 +33,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -33,7 +33,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
33 | import org.thingsboard.server.controller.BaseController; | 33 | import org.thingsboard.server.controller.BaseController; |
34 | import org.thingsboard.server.dao.yunteng.service.ConvertConfigService; | 34 | import org.thingsboard.server.dao.yunteng.service.ConvertConfigService; |
35 | import org.thingsboard.server.dao.yunteng.service.SceneLinkageService; | 35 | import org.thingsboard.server.dao.yunteng.service.SceneLinkageService; |
36 | -import org.thingsboard.server.dao.yunteng.service.YtRuleChainService; | 36 | +import org.thingsboard.server.dao.yunteng.service.TkRuleChainService; |
37 | import org.thingsboard.server.service.rule.TbRuleChainService; | 37 | import org.thingsboard.server.service.rule.TbRuleChainService; |
38 | import org.thingsboard.server.service.security.permission.Operation; | 38 | import org.thingsboard.server.service.security.permission.Operation; |
39 | 39 | ||
@@ -48,7 +48,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -48,7 +48,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
48 | @Api(tags = {"数据流转控制器"}) | 48 | @Api(tags = {"数据流转控制器"}) |
49 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN'},{})") | 49 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN'},{})") |
50 | public class YtConvertDataToController extends BaseController { | 50 | public class YtConvertDataToController extends BaseController { |
51 | - private final YtRuleChainService ytRuleChainService; | 51 | + private final TkRuleChainService tkRuleChainService; |
52 | 52 | ||
53 | @Value("${actors.rule.chain.debug_mode_rate_limits_per_tenant.enabled}") | 53 | @Value("${actors.rule.chain.debug_mode_rate_limits_per_tenant.enabled}") |
54 | private boolean debugPerTenantEnabled; | 54 | private boolean debugPerTenantEnabled; |
@@ -225,7 +225,7 @@ public class YtConvertDataToController extends BaseController { | @@ -225,7 +225,7 @@ public class YtConvertDataToController extends BaseController { | ||
225 | boolean needSaveRuleNode; | 225 | boolean needSaveRuleNode; |
226 | TenantId tenantId = getTenantId(); | 226 | TenantId tenantId = getTenantId(); |
227 | // 1. GET DEFAULT RULE CHAIN | 227 | // 1. GET DEFAULT RULE CHAIN |
228 | - RuleChain ruleChain = ytRuleChainService.getRootTenantRuleChain(getTenantId()); | 228 | + RuleChain ruleChain = tkRuleChainService.getRootTenantRuleChain(getTenantId()); |
229 | // 2. GET RULE CHAIN METADATA | 229 | // 2. GET RULE CHAIN METADATA |
230 | RuleChainMetaData ruleChainMetaData = | 230 | RuleChainMetaData ruleChainMetaData = |
231 | ruleChainService.loadRuleChainMetaData(getTenantId(), ruleChain.getId()); | 231 | ruleChainService.loadRuleChainMetaData(getTenantId(), ruleChain.getId()); |
@@ -21,7 +21,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -21,7 +21,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
21 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 21 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
22 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 22 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
23 | import org.thingsboard.server.controller.BaseController; | 23 | import org.thingsboard.server.controller.BaseController; |
24 | -import org.thingsboard.server.dao.yunteng.service.YtDataBoardService; | 24 | +import org.thingsboard.server.dao.yunteng.service.TkDataBoardService; |
25 | 25 | ||
26 | import java.util.HashMap; | 26 | import java.util.HashMap; |
27 | import java.util.List; | 27 | import java.util.List; |
@@ -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 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 35 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
36 | @Api(tags = {"数据看板"}) | 36 | @Api(tags = {"数据看板"}) |
37 | public class YtDataBoardController extends BaseController { | 37 | public class YtDataBoardController extends BaseController { |
38 | - private final YtDataBoardService ytDataBoardService; | 38 | + private final TkDataBoardService ytDataBoardService; |
39 | 39 | ||
40 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 40 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
41 | @ApiOperation("分页查询") | 41 | @ApiOperation("分页查询") |
@@ -22,8 +22,8 @@ import org.thingsboard.server.common.data.yunteng.dto.board.ComponentLayoutDTO; | @@ -22,8 +22,8 @@ import org.thingsboard.server.common.data.yunteng.dto.board.ComponentLayoutDTO; | ||
22 | import org.thingsboard.server.common.data.yunteng.dto.board.MoreDataComponentInfoDTO; | 22 | import org.thingsboard.server.common.data.yunteng.dto.board.MoreDataComponentInfoDTO; |
23 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 23 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
24 | import org.thingsboard.server.controller.BaseController; | 24 | import org.thingsboard.server.controller.BaseController; |
25 | -import org.thingsboard.server.dao.yunteng.service.YtDataBoardService; | ||
26 | -import org.thingsboard.server.dao.yunteng.service.YtDataComponentService; | 25 | +import org.thingsboard.server.dao.yunteng.service.TkDataBoardService; |
26 | +import org.thingsboard.server.dao.yunteng.service.TkDataComponentService; | ||
27 | 27 | ||
28 | import java.util.ArrayList; | 28 | import java.util.ArrayList; |
29 | import java.util.List; | 29 | import java.util.List; |
@@ -34,8 +34,8 @@ import java.util.List; | @@ -34,8 +34,8 @@ import java.util.List; | ||
34 | @RequestMapping("api/yt/data_component") | 34 | @RequestMapping("api/yt/data_component") |
35 | @Api(tags = {"数据组件"}) | 35 | @Api(tags = {"数据组件"}) |
36 | public class YtDataComponentController extends BaseController { | 36 | public class YtDataComponentController extends BaseController { |
37 | - private final YtDataComponentService ytDataComponentService; | ||
38 | - private final YtDataBoardService ytDataBoardService; | 37 | + private final TkDataComponentService ytDataComponentService; |
38 | + private final TkDataBoardService ytDataBoardService; | ||
39 | 39 | ||
40 | @GetMapping("/{boardId}") | 40 | @GetMapping("/{boardId}") |
41 | @ApiOperation(value = "查询看板下的所有组件信息") | 41 | @ApiOperation(value = "查询看板下的所有组件信息") |
@@ -36,8 +36,8 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | @@ -36,8 +36,8 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | ||
36 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 36 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
37 | import org.thingsboard.server.controller.BaseController; | 37 | import org.thingsboard.server.controller.BaseController; |
38 | import org.thingsboard.server.dao.device.DeviceService; | 38 | import org.thingsboard.server.dao.device.DeviceService; |
39 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceProfileService; | ||
40 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceService; | 39 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceProfileService; |
40 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceService; | ||
41 | import org.thingsboard.server.service.security.permission.Operation; | 41 | import org.thingsboard.server.service.security.permission.Operation; |
42 | import org.thingsboard.server.service.security.permission.Resource; | 42 | import org.thingsboard.server.service.security.permission.Resource; |
43 | 43 | ||
@@ -54,10 +54,10 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -54,10 +54,10 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
54 | @Api(tags = {"设备管理"}) | 54 | @Api(tags = {"设备管理"}) |
55 | @Slf4j | 55 | @Slf4j |
56 | public class YtDeviceController extends BaseController { | 56 | public class YtDeviceController extends BaseController { |
57 | - private final YtDeviceService deviceService; | 57 | + private final TkDeviceService deviceService; |
58 | private final DeviceService tbDeviceService; | 58 | private final DeviceService tbDeviceService; |
59 | private final ObjectMapper objectMapper; | 59 | private final ObjectMapper objectMapper; |
60 | - private final YtDeviceProfileService ytDeviceProfileService; | 60 | + private final TkDeviceProfileService ytDeviceProfileService; |
61 | 61 | ||
62 | @PostMapping | 62 | @PostMapping |
63 | @ApiOperation("创建|编辑") | 63 | @ApiOperation("创建|编辑") |
@@ -31,8 +31,8 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -31,8 +31,8 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
31 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 31 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
32 | import org.thingsboard.server.common.msg.queue.ServiceQueue; | 32 | import org.thingsboard.server.common.msg.queue.ServiceQueue; |
33 | import org.thingsboard.server.controller.BaseController; | 33 | import org.thingsboard.server.controller.BaseController; |
34 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceScriptService; | ||
35 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceProfileService; | 34 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceScriptService; |
35 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceProfileService; | ||
36 | import org.thingsboard.server.service.security.permission.Operation; | 36 | import org.thingsboard.server.service.security.permission.Operation; |
37 | 37 | ||
38 | import java.time.LocalDateTime; | 38 | import java.time.LocalDateTime; |
@@ -48,8 +48,8 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -48,8 +48,8 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
48 | @RequestMapping("api/yt/device_profile") | 48 | @RequestMapping("api/yt/device_profile") |
49 | @Api(tags = {"设备配置管理"}) | 49 | @Api(tags = {"设备配置管理"}) |
50 | public class YtDeviceProfileController extends BaseController { | 50 | public class YtDeviceProfileController extends BaseController { |
51 | - private final YtDeviceProfileService ytDeviceProfileService; | ||
52 | - private final YtDeviceScriptService javaScriptService; | 51 | + private final TkDeviceProfileService ytDeviceProfileService; |
52 | + private final TkDeviceScriptService javaScriptService; | ||
53 | 53 | ||
54 | @PostMapping() | 54 | @PostMapping() |
55 | @PreAuthorize( | 55 | @PreAuthorize( |
@@ -41,8 +41,8 @@ import org.thingsboard.server.common.msg.queue.ServiceQueue; | @@ -41,8 +41,8 @@ import org.thingsboard.server.common.msg.queue.ServiceQueue; | ||
41 | import org.thingsboard.server.common.yunteng.script.YtScriptInvokeService; | 41 | import org.thingsboard.server.common.yunteng.script.YtScriptInvokeService; |
42 | import org.thingsboard.server.common.yunteng.script.YtScriptType; | 42 | import org.thingsboard.server.common.yunteng.script.YtScriptType; |
43 | import org.thingsboard.server.controller.BaseController; | 43 | import org.thingsboard.server.controller.BaseController; |
44 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceProfileService; | ||
45 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceScriptService; | 44 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceProfileService; |
45 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceScriptService; | ||
46 | 46 | ||
47 | import java.time.LocalDateTime; | 47 | import java.time.LocalDateTime; |
48 | import java.time.ZoneOffset; | 48 | import java.time.ZoneOffset; |
@@ -60,8 +60,8 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -60,8 +60,8 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
60 | public class YtDeviceScriptController extends BaseController { | 60 | public class YtDeviceScriptController extends BaseController { |
61 | private static final JsonParser parser = new JsonParser(); | 61 | private static final JsonParser parser = new JsonParser(); |
62 | private static final ObjectMapper objectMapper = new ObjectMapper(); | 62 | private static final ObjectMapper objectMapper = new ObjectMapper(); |
63 | - private final YtDeviceScriptService scriptService; | ||
64 | - private final YtDeviceProfileService ytDeviceProfileService; | 63 | + private final TkDeviceScriptService scriptService; |
64 | + private final TkDeviceProfileService ytDeviceProfileService; | ||
65 | private final YtScriptInvokeService jsEngine; | 65 | private final YtScriptInvokeService jsEngine; |
66 | 66 | ||
67 | @PostMapping() | 67 | @PostMapping() |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | ||
16 | import org.thingsboard.server.common.data.yunteng.dto.DeviceTypeDTO; | 16 | import org.thingsboard.server.common.data.yunteng.dto.DeviceTypeDTO; |
17 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 17 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
18 | import org.thingsboard.server.controller.BaseController; | 18 | import org.thingsboard.server.controller.BaseController; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceTypeService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceTypeService; |
20 | 20 | ||
21 | import java.util.List; | 21 | import java.util.List; |
22 | 22 | ||
@@ -25,7 +25,7 @@ import java.util.List; | @@ -25,7 +25,7 @@ import java.util.List; | ||
25 | @RequiredArgsConstructor | 25 | @RequiredArgsConstructor |
26 | @Api(value = "设备类型") | 26 | @Api(value = "设备类型") |
27 | public class YtDeviceTypeController extends BaseController { | 27 | public class YtDeviceTypeController extends BaseController { |
28 | - private final YtDeviceTypeService deviceTypeService; | 28 | + private final TkDeviceTypeService deviceTypeService; |
29 | 29 | ||
30 | @GetMapping | 30 | @GetMapping |
31 | @ApiOperation(value = "获取当前用户的设备类型树形") | 31 | @ApiOperation(value = "获取当前用户的设备类型树形") |
@@ -7,7 +7,7 @@ import org.springframework.security.access.prepost.PreAuthorize; | @@ -7,7 +7,7 @@ import org.springframework.security.access.prepost.PreAuthorize; | ||
7 | import org.springframework.web.bind.annotation.*; | 7 | import org.springframework.web.bind.annotation.*; |
8 | import org.thingsboard.server.common.data.exception.ThingsboardException; | 8 | import org.thingsboard.server.common.data.exception.ThingsboardException; |
9 | import org.thingsboard.server.common.data.yunteng.dto.FrpInfoDTO; | 9 | import org.thingsboard.server.common.data.yunteng.dto.FrpInfoDTO; |
10 | -import org.thingsboard.server.dao.yunteng.service.YtFrpInfoService; | 10 | +import org.thingsboard.server.dao.yunteng.service.TkFrpInfoService; |
11 | 11 | ||
12 | @RestController | 12 | @RestController |
13 | @RequestMapping("api/yt/frp") | 13 | @RequestMapping("api/yt/frp") |
@@ -16,7 +16,7 @@ import org.thingsboard.server.dao.yunteng.service.YtFrpInfoService; | @@ -16,7 +16,7 @@ import org.thingsboard.server.dao.yunteng.service.YtFrpInfoService; | ||
16 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 16 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
17 | public class YtFrpInfoController { | 17 | public class YtFrpInfoController { |
18 | 18 | ||
19 | - private final YtFrpInfoService frpInfoService; | 19 | + private final TkFrpInfoService frpInfoService; |
20 | 20 | ||
21 | @GetMapping("/{proxyName}") | 21 | @GetMapping("/{proxyName}") |
22 | @ApiOperation("通过代理名称或SN获取内网穿透信息") | 22 | @ApiOperation("通过代理名称或SN获取内网穿透信息") |
@@ -10,7 +10,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -10,7 +10,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
10 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 10 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
11 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 11 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
12 | import org.thingsboard.server.controller.BaseController; | 12 | import org.thingsboard.server.controller.BaseController; |
13 | -import org.thingsboard.server.dao.yunteng.service.YtMailLogService; | 13 | +import org.thingsboard.server.dao.yunteng.service.TkMailLogService; |
14 | 14 | ||
15 | import java.util.HashMap; | 15 | import java.util.HashMap; |
16 | 16 | ||
@@ -21,7 +21,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -21,7 +21,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
21 | @RequiredArgsConstructor | 21 | @RequiredArgsConstructor |
22 | public class YtMailLogController extends BaseController { | 22 | public class YtMailLogController extends BaseController { |
23 | 23 | ||
24 | - private final YtMailLogService mailLogService; | 24 | + private final TkMailLogService mailLogService; |
25 | 25 | ||
26 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 26 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
27 | public YtPageData<MailLogDTO> pageMessageConfig( | 27 | public YtPageData<MailLogDTO> pageMessageConfig( |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
16 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 16 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
17 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 17 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
18 | import org.thingsboard.server.controller.BaseController; | 18 | import org.thingsboard.server.controller.BaseController; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtMessageConfigService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkMessageConfigService; |
20 | 20 | ||
21 | import java.util.HashMap; | 21 | import java.util.HashMap; |
22 | import java.util.List; | 22 | import java.util.List; |
@@ -28,7 +28,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -28,7 +28,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
28 | @RequiredArgsConstructor | 28 | @RequiredArgsConstructor |
29 | public class YtMessageConfigController extends BaseController { | 29 | public class YtMessageConfigController extends BaseController { |
30 | 30 | ||
31 | - private final YtMessageConfigService messageConfigService; | 31 | + private final TkMessageConfigService messageConfigService; |
32 | 32 | ||
33 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 33 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
34 | public YtPageData<MessageConfigDTO> pageMessageConfig( | 34 | public YtPageData<MessageConfigDTO> pageMessageConfig( |
application/src/main/java/org/thingsboard/server/controller/yunteng/YtMessageTemplateController.java
@@ -22,9 +22,9 @@ import org.thingsboard.server.common.data.yunteng.enums.ResponseCodeEnum; | @@ -22,9 +22,9 @@ import org.thingsboard.server.common.data.yunteng.enums.ResponseCodeEnum; | ||
22 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 22 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
23 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 23 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
24 | import org.thingsboard.server.controller.BaseController; | 24 | import org.thingsboard.server.controller.BaseController; |
25 | -import org.thingsboard.server.dao.yunteng.service.YtMailService; | ||
26 | -import org.thingsboard.server.dao.yunteng.service.YtMessageTemplateService; | ||
27 | -import org.thingsboard.server.dao.yunteng.service.YtSmsService; | 25 | +import org.thingsboard.server.dao.yunteng.service.TkMailService; |
26 | +import org.thingsboard.server.dao.yunteng.service.TkMessageTemplateService; | ||
27 | +import org.thingsboard.server.dao.yunteng.service.TkSmsService; | ||
28 | 28 | ||
29 | import java.util.HashMap; | 29 | import java.util.HashMap; |
30 | 30 | ||
@@ -35,11 +35,11 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -35,11 +35,11 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
35 | @RequiredArgsConstructor | 35 | @RequiredArgsConstructor |
36 | public class YtMessageTemplateController extends BaseController { | 36 | public class YtMessageTemplateController extends BaseController { |
37 | 37 | ||
38 | - private final YtMessageTemplateService messageTemplateService; | 38 | + private final TkMessageTemplateService messageTemplateService; |
39 | 39 | ||
40 | - private final YtSmsService smsService; | 40 | + private final TkSmsService smsService; |
41 | 41 | ||
42 | - private final YtMailService mailService; | 42 | + private final TkMailService mailService; |
43 | 43 | ||
44 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 44 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
45 | public YtPageData<MessageTemplateDTO> pageMessageTemplate( | 45 | public YtPageData<MessageTemplateDTO> pageMessageTemplate( |
@@ -33,11 +33,11 @@ import static org.thingsboard.server.common.data.yunteng.constant.FastIotConstan | @@ -33,11 +33,11 @@ import static org.thingsboard.server.common.data.yunteng.constant.FastIotConstan | ||
33 | @RequiredArgsConstructor | 33 | @RequiredArgsConstructor |
34 | public class YtNoAuthController{ | 34 | public class YtNoAuthController{ |
35 | 35 | ||
36 | - private final YtSmsService smsService; | ||
37 | - private final YtUserService userService; | ||
38 | - private final YtFrpInfoService frpInfoService; | ||
39 | - private final YtDataComponentService ytDataComponentService; | ||
40 | - private final YtDataBoardService ytDataBoardService; | 36 | + private final TkSmsService smsService; |
37 | + private final TkUserService userService; | ||
38 | + private final TkFrpInfoService frpInfoService; | ||
39 | + private final TkDataComponentService ytDataComponentService; | ||
40 | + private final TkDataBoardService ytDataBoardService; | ||
41 | 41 | ||
42 | @PostMapping("/send_login_code/{phoneNumber}") | 42 | @PostMapping("/send_login_code/{phoneNumber}") |
43 | public boolean sendVerificationCode(@PathVariable("phoneNumber") String phoneNumber) { | 43 | public boolean sendVerificationCode(@PathVariable("phoneNumber") String phoneNumber) { |
@@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
15 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 15 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
16 | import org.thingsboard.server.controller.BaseController; | 16 | import org.thingsboard.server.controller.BaseController; |
17 | import org.thingsboard.server.dao.yunteng.entities.TkOpinionEntity; | 17 | import org.thingsboard.server.dao.yunteng.entities.TkOpinionEntity; |
18 | -import org.thingsboard.server.dao.yunteng.service.YtOpinionService; | 18 | +import org.thingsboard.server.dao.yunteng.service.TkOpinionService; |
19 | 19 | ||
20 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 20 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
21 | 21 | ||
@@ -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 | @RequiredArgsConstructor | 25 | @RequiredArgsConstructor |
26 | public class YtOpinionController extends BaseController { | 26 | public class YtOpinionController extends BaseController { |
27 | 27 | ||
28 | - private final YtOpinionService opinionService; | 28 | + private final TkOpinionService opinionService; |
29 | 29 | ||
30 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 30 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
31 | @ApiOperation("分页") | 31 | @ApiOperation("分页") |
@@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.common.UpdateGroup; | @@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.common.UpdateGroup; | ||
15 | import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | 15 | import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; |
16 | import org.thingsboard.server.common.data.yunteng.dto.OrganizationDTO; | 16 | import org.thingsboard.server.common.data.yunteng.dto.OrganizationDTO; |
17 | import org.thingsboard.server.controller.BaseController; | 17 | import org.thingsboard.server.controller.BaseController; |
18 | -import org.thingsboard.server.dao.yunteng.service.YtOrganizationService; | 18 | +import org.thingsboard.server.dao.yunteng.service.TkOrganizationService; |
19 | 19 | ||
20 | import java.net.URI; | 20 | import java.net.URI; |
21 | import java.util.List; | 21 | import java.util.List; |
@@ -27,7 +27,7 @@ import java.util.Optional; | @@ -27,7 +27,7 @@ import java.util.Optional; | ||
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class YtOrganizationController extends BaseController { | 28 | public class YtOrganizationController extends BaseController { |
29 | 29 | ||
30 | - private final YtOrganizationService organizationService; | 30 | + private final TkOrganizationService organizationService; |
31 | 31 | ||
32 | @PostMapping | 32 | @PostMapping |
33 | @PreAuthorize("@check.checkPermissions({},{'api:yt:organization:post'})") | 33 | @PreAuthorize("@check.checkPermissions({},{'api:yt:organization:post'})") |
@@ -21,7 +21,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -21,7 +21,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
21 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 21 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
22 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 22 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
23 | import org.thingsboard.server.controller.BaseController; | 23 | import org.thingsboard.server.controller.BaseController; |
24 | -import org.thingsboard.server.dao.yunteng.service.YtReportFormConfigService; | 24 | +import org.thingsboard.server.dao.yunteng.service.TkReportFormConfigService; |
25 | 25 | ||
26 | import java.sql.Timestamp; | 26 | import java.sql.Timestamp; |
27 | import java.util.HashMap; | 27 | import java.util.HashMap; |
@@ -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 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 36 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
37 | public class YtReportFormConfigController extends BaseController { | 37 | public class YtReportFormConfigController extends BaseController { |
38 | 38 | ||
39 | - private final YtReportFormConfigService reportFormConfigService; | 39 | + private final TkReportFormConfigService reportFormConfigService; |
40 | 40 | ||
41 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 41 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
42 | @ApiOperation("分页") | 42 | @ApiOperation("分页") |
@@ -22,8 +22,8 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -22,8 +22,8 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
22 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | 22 | import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; |
23 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 23 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
24 | import org.thingsboard.server.controller.BaseController; | 24 | import org.thingsboard.server.controller.BaseController; |
25 | -import org.thingsboard.server.dao.yunteng.service.YtReportFormConfigService; | ||
26 | -import org.thingsboard.server.dao.yunteng.service.YtReportGenerateRecordService; | 25 | +import org.thingsboard.server.dao.yunteng.service.TkReportFormConfigService; |
26 | +import org.thingsboard.server.dao.yunteng.service.TkReportGenerateRecordService; | ||
27 | 27 | ||
28 | import java.sql.Timestamp; | 28 | import java.sql.Timestamp; |
29 | import java.util.ArrayList; | 29 | import java.util.ArrayList; |
@@ -40,8 +40,8 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -40,8 +40,8 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
40 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 40 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
41 | public class YtReportGenerateRecordController extends BaseController { | 41 | public class YtReportGenerateRecordController extends BaseController { |
42 | 42 | ||
43 | - private final YtReportGenerateRecordService reportFormGenerateRecordService; | ||
44 | - private final YtReportFormConfigService ytReportFormConfigService; | 43 | + private final TkReportGenerateRecordService reportFormGenerateRecordService; |
44 | + private final TkReportFormConfigService tkReportFormConfigService; | ||
45 | 45 | ||
46 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 46 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
47 | @ApiOperation("分页") | 47 | @ApiOperation("分页") |
@@ -104,7 +104,7 @@ public class YtReportGenerateRecordController extends BaseController { | @@ -104,7 +104,7 @@ public class YtReportGenerateRecordController extends BaseController { | ||
104 | JacksonUtil.convertValue( | 104 | JacksonUtil.convertValue( |
105 | json.get(FastIotConstants.CHART_EXECUTE_CONDITION), QueryConditionDTO.class); | 105 | json.get(FastIotConstants.CHART_EXECUTE_CONDITION), QueryConditionDTO.class); |
106 | List<ExecuteAttributesDTO> list = new ArrayList<>(); | 106 | List<ExecuteAttributesDTO> list = new ArrayList<>(); |
107 | - ytReportFormConfigService.getExecuteConditionAndAttribute( | 107 | + tkReportFormConfigService.getExecuteConditionAndAttribute( |
108 | json.get(FastIotConstants.CHART_EXECUTE_ATTRIBUTES), list); | 108 | json.get(FastIotConstants.CHART_EXECUTE_ATTRIBUTES), list); |
109 | 109 | ||
110 | map.put(FastIotConstants.CHART_EXECUTE_CONDITION, queryConditionDTO); | 110 | map.put(FastIotConstants.CHART_EXECUTE_CONDITION, queryConditionDTO); |
@@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
15 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 15 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
16 | import org.thingsboard.server.controller.BaseController; | 16 | import org.thingsboard.server.controller.BaseController; |
17 | import org.thingsboard.server.dao.yunteng.entities.TkRpcRecordEntity; | 17 | import org.thingsboard.server.dao.yunteng.entities.TkRpcRecordEntity; |
18 | -import org.thingsboard.server.dao.yunteng.service.YtRpcRecordService; | 18 | +import org.thingsboard.server.dao.yunteng.service.TkRpcRecordService; |
19 | 19 | ||
20 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 20 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
21 | 21 | ||
@@ -27,7 +27,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -27,7 +27,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
27 | @Api(tags = {"命令下发记录"}) | 27 | @Api(tags = {"命令下发记录"}) |
28 | @RequiredArgsConstructor | 28 | @RequiredArgsConstructor |
29 | public class YtRpcRecordController extends BaseController { | 29 | public class YtRpcRecordController extends BaseController { |
30 | - private final YtRpcRecordService recordService; | 30 | + private final TkRpcRecordService recordService; |
31 | 31 | ||
32 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 32 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
33 | @ApiOperation("分页") | 33 | @ApiOperation("分页") |
@@ -11,14 +11,14 @@ import org.thingsboard.server.common.data.exception.ThingsboardException; | @@ -11,14 +11,14 @@ import org.thingsboard.server.common.data.exception.ThingsboardException; | ||
11 | import org.thingsboard.server.common.data.id.TenantId; | 11 | import org.thingsboard.server.common.data.id.TenantId; |
12 | import org.thingsboard.server.common.data.rule.RuleChainType; | 12 | import org.thingsboard.server.common.data.rule.RuleChainType; |
13 | import org.thingsboard.server.controller.BaseController; | 13 | import org.thingsboard.server.controller.BaseController; |
14 | -import org.thingsboard.server.dao.yunteng.service.YtRuleChainService; | 14 | +import org.thingsboard.server.dao.yunteng.service.TkRuleChainService; |
15 | 15 | ||
16 | @RestController | 16 | @RestController |
17 | @RequiredArgsConstructor | 17 | @RequiredArgsConstructor |
18 | @RequestMapping("api/yt/rule_chain") | 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 TkRuleChainService chainService; |
22 | 22 | ||
23 | 23 | ||
24 | 24 |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
16 | import org.thingsboard.server.controller.BaseController; | 16 | import org.thingsboard.server.controller.BaseController; |
17 | import org.thingsboard.server.dao.model.ModelConstants; | 17 | import org.thingsboard.server.dao.model.ModelConstants; |
18 | import org.thingsboard.server.dao.yunteng.entities.SysLogEntity; | 18 | import org.thingsboard.server.dao.yunteng.entities.SysLogEntity; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtSysLogService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkSysLogService; |
20 | 20 | ||
21 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; | 21 | import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant.*; |
22 | 22 | ||
@@ -26,7 +26,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -26,7 +26,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
26 | @RequiredArgsConstructor | 26 | @RequiredArgsConstructor |
27 | public class YtSyslogController extends BaseController { | 27 | public class YtSyslogController extends BaseController { |
28 | 28 | ||
29 | - private final YtSysLogService logService; | 29 | + private final TkSysLogService logService; |
30 | 30 | ||
31 | @GetMapping("{entityId}") | 31 | @GetMapping("{entityId}") |
32 | @PreAuthorize("@check.checkPermissions({},{})") | 32 | @PreAuthorize("@check.checkPermissions({},{})") |
@@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.UserDTO; | @@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.UserDTO; | ||
14 | import org.thingsboard.server.common.data.yunteng.dto.request.SendResetPasswordEmailMsg; | 14 | import org.thingsboard.server.common.data.yunteng.dto.request.SendResetPasswordEmailMsg; |
15 | import org.thingsboard.server.common.data.yunteng.enums.MessageTypeEnum; | 15 | import org.thingsboard.server.common.data.yunteng.enums.MessageTypeEnum; |
16 | import org.thingsboard.server.dao.user.UserService; | 16 | import org.thingsboard.server.dao.user.UserService; |
17 | -import org.thingsboard.server.dao.yunteng.service.YtUserService; | 17 | +import org.thingsboard.server.dao.yunteng.service.TkUserService; |
18 | import org.thingsboard.server.service.security.model.SecurityUser; | 18 | import org.thingsboard.server.service.security.model.SecurityUser; |
19 | import org.thingsboard.server.service.security.system.SystemSecurityService; | 19 | import org.thingsboard.server.service.security.system.SystemSecurityService; |
20 | 20 | ||
@@ -24,12 +24,12 @@ import java.util.UUID; | @@ -24,12 +24,12 @@ import java.util.UUID; | ||
24 | @RequestMapping("/api/yt/tenant") | 24 | @RequestMapping("/api/yt/tenant") |
25 | public class YtTenantController extends AbstractUserAccount { | 25 | public class YtTenantController extends AbstractUserAccount { |
26 | 26 | ||
27 | - private final YtUserService userService; | 27 | + private final TkUserService userService; |
28 | private final AccountProperties accountProperties; | 28 | private final AccountProperties accountProperties; |
29 | public YtTenantController(UserService tbUserService, ApplicationEventPublisher eventPublisher, | 29 | public YtTenantController(UserService tbUserService, ApplicationEventPublisher eventPublisher, |
30 | SystemSecurityService systemSecurityService, | 30 | SystemSecurityService systemSecurityService, |
31 | BCryptPasswordEncoder passwordEncoder, | 31 | BCryptPasswordEncoder passwordEncoder, |
32 | - YtUserService userService, | 32 | + TkUserService userService, |
33 | AccountProperties accountProperties) { | 33 | AccountProperties accountProperties) { |
34 | super(tbUserService,eventPublisher,systemSecurityService,passwordEncoder); | 34 | super(tbUserService,eventPublisher,systemSecurityService,passwordEncoder); |
35 | this.userService = userService; | 35 | this.userService = userService; |
@@ -24,8 +24,8 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -24,8 +24,8 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
24 | import org.thingsboard.server.controller.BaseController; | 24 | import org.thingsboard.server.controller.BaseController; |
25 | import org.thingsboard.server.dao.exception.DataValidationException; | 25 | import org.thingsboard.server.dao.exception.DataValidationException; |
26 | import org.thingsboard.server.dao.yunteng.entities.TkThirdUserEntity; | 26 | import org.thingsboard.server.dao.yunteng.entities.TkThirdUserEntity; |
27 | -import org.thingsboard.server.dao.yunteng.service.YtThirdPlatformService; | ||
28 | -import org.thingsboard.server.dao.yunteng.service.YtUserService; | 27 | +import org.thingsboard.server.dao.yunteng.service.TkThirdPlatformService; |
28 | +import org.thingsboard.server.dao.yunteng.service.TkUserService; | ||
29 | import org.thingsboard.server.service.security.auth.jwt.RefreshTokenRepository; | 29 | import org.thingsboard.server.service.security.auth.jwt.RefreshTokenRepository; |
30 | import org.thingsboard.server.service.security.auth.yunteng.YtLoginResponse; | 30 | import org.thingsboard.server.service.security.auth.yunteng.YtLoginResponse; |
31 | import org.thingsboard.server.service.security.model.SecurityUser; | 31 | import org.thingsboard.server.service.security.model.SecurityUser; |
@@ -48,8 +48,8 @@ public class YtThirdPlatformController extends BaseController { | @@ -48,8 +48,8 @@ public class YtThirdPlatformController extends BaseController { | ||
48 | 48 | ||
49 | private final JwtTokenFactory tokenFactory; | 49 | private final JwtTokenFactory tokenFactory; |
50 | private final RefreshTokenRepository refreshTokenRepository; | 50 | private final RefreshTokenRepository refreshTokenRepository; |
51 | - private final YtThirdPlatformService thirdService; | ||
52 | - private final YtUserService ytUserService; | 51 | + private final TkThirdPlatformService thirdService; |
52 | + private final TkUserService tkUserService; | ||
53 | 53 | ||
54 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 54 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
55 | @ApiOperation("分页") | 55 | @ApiOperation("分页") |
@@ -105,7 +105,7 @@ public class YtThirdPlatformController extends BaseController { | @@ -105,7 +105,7 @@ public class YtThirdPlatformController extends BaseController { | ||
105 | @ApiOperation("组态用户认证") | 105 | @ApiOperation("组态用户认证") |
106 | public YtLoginResponse unionidLogin(@PathVariable("userId") String userId) | 106 | public YtLoginResponse unionidLogin(@PathVariable("userId") String userId) |
107 | throws ThingsboardException { | 107 | throws ThingsboardException { |
108 | - UserDTO userDto = ytUserService.findUserInfoById(userId); | 108 | + UserDTO userDto = tkUserService.findUserInfoById(userId); |
109 | if (userDto == null) { | 109 | if (userDto == null) { |
110 | return new YtLoginResponse().setThirdUserId(userId); | 110 | return new YtLoginResponse().setThirdUserId(userId); |
111 | } | 111 | } |
@@ -121,7 +121,7 @@ public class YtThirdPlatformController extends BaseController { | @@ -121,7 +121,7 @@ public class YtThirdPlatformController extends BaseController { | ||
121 | if(!authrizeKey.equals(dto.getAuthrizeKey()) || !authrizeSecret.equals(dto.getAuthrizeSecret())){ | 121 | if(!authrizeKey.equals(dto.getAuthrizeKey()) || !authrizeSecret.equals(dto.getAuthrizeSecret())){ |
122 | throw new DataValidationException( ErrorMessage.NO_PERMISSION.getMessage()); | 122 | throw new DataValidationException( ErrorMessage.NO_PERMISSION.getMessage()); |
123 | } | 123 | } |
124 | - UserDTO userDto = ytUserService.accountExist(dto.getUserName()); | 124 | + UserDTO userDto = tkUserService.accountExist(dto.getUserName()); |
125 | if (userDto == null) { | 125 | if (userDto == null) { |
126 | return new YtLoginResponse().setThirdUserId(dto.getAuthrizeKey()); | 126 | return new YtLoginResponse().setThirdUserId(dto.getAuthrizeKey()); |
127 | } | 127 | } |
@@ -135,7 +135,7 @@ public class YtThirdPlatformController extends BaseController { | @@ -135,7 +135,7 @@ public class YtThirdPlatformController extends BaseController { | ||
135 | if (userDto != null && StringUtils.isNotEmpty(userDto.getTbUser())) { | 135 | if (userDto != null && StringUtils.isNotEmpty(userDto.getTbUser())) { |
136 | UserId userId = new UserId(UUID.fromString(userDto.getTbUser())); | 136 | UserId userId = new UserId(UUID.fromString(userDto.getTbUser())); |
137 | User user = userService.findUserById(null, userId); | 137 | User user = userService.findUserById(null, userId); |
138 | - List<UserDetailsDTO> userDetailsDTOS = ytUserService.findUserDetailsByUsername(userDto.getUsername(),userDto.getTenantId()); | 138 | + List<UserDetailsDTO> userDetailsDTOS = tkUserService.findUserDetailsByUsername(userDto.getUsername(),userDto.getTenantId()); |
139 | user.setUserDetailsDTO(userDetailsDTOS.get(0)); | 139 | user.setUserDetailsDTO(userDetailsDTOS.get(0)); |
140 | UserCredentials credentials = userService.findUserCredentialsByUserId(user.getTenantId(), userId); | 140 | UserCredentials credentials = userService.findUserCredentialsByUserId(user.getTenantId(), userId); |
141 | String email = user.getEmail(); | 141 | String email = user.getEmail(); |
@@ -40,7 +40,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | @@ -40,7 +40,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | ||
40 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 40 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
41 | import org.thingsboard.server.dao.user.UserService; | 41 | import org.thingsboard.server.dao.user.UserService; |
42 | import org.thingsboard.server.dao.yunteng.entities.SysUserEntity; | 42 | import org.thingsboard.server.dao.yunteng.entities.SysUserEntity; |
43 | -import org.thingsboard.server.dao.yunteng.service.YtUserService; | 43 | +import org.thingsboard.server.dao.yunteng.service.TkUserService; |
44 | import org.thingsboard.server.service.security.model.SecurityUser; | 44 | import org.thingsboard.server.service.security.model.SecurityUser; |
45 | import org.thingsboard.server.service.security.permission.Operation; | 45 | import org.thingsboard.server.service.security.permission.Operation; |
46 | import org.thingsboard.server.service.security.permission.Resource; | 46 | import org.thingsboard.server.service.security.permission.Resource; |
@@ -59,12 +59,12 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -59,12 +59,12 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
59 | @Api(value = "用户接口") | 59 | @Api(value = "用户接口") |
60 | public class YtUserController extends AbstractUserAccount { | 60 | public class YtUserController extends AbstractUserAccount { |
61 | 61 | ||
62 | - private final YtUserService userService; | 62 | + private final TkUserService userService; |
63 | private final AccountProperties accountProperties; | 63 | private final AccountProperties accountProperties; |
64 | public YtUserController(UserService tbUserService, ApplicationEventPublisher eventPublisher, | 64 | public YtUserController(UserService tbUserService, ApplicationEventPublisher eventPublisher, |
65 | SystemSecurityService systemSecurityService, | 65 | SystemSecurityService systemSecurityService, |
66 | BCryptPasswordEncoder passwordEncoder, | 66 | BCryptPasswordEncoder passwordEncoder, |
67 | - YtUserService userService, | 67 | + TkUserService userService, |
68 | AccountProperties accountProperties) { | 68 | AccountProperties accountProperties) { |
69 | super(tbUserService,eventPublisher,systemSecurityService,passwordEncoder); | 69 | super(tbUserService,eventPublisher,systemSecurityService,passwordEncoder); |
70 | this.userService = userService; | 70 | this.userService = userService; |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.ResponseResult; | ||
16 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 16 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
17 | import org.thingsboard.server.controller.BaseController; | 17 | import org.thingsboard.server.controller.BaseController; |
18 | import org.thingsboard.server.dao.yunteng.entities.TkVideoEntity; | 18 | import org.thingsboard.server.dao.yunteng.entities.TkVideoEntity; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtVideoService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkVideoService; |
20 | 20 | ||
21 | import java.util.HashMap; | 21 | import java.util.HashMap; |
22 | import java.util.Map; | 22 | import java.util.Map; |
@@ -30,7 +30,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -30,7 +30,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
30 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 30 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
31 | public class YtVideoController extends BaseController { | 31 | public class YtVideoController extends BaseController { |
32 | 32 | ||
33 | - private final YtVideoService videoService; | 33 | + private final TkVideoService videoService; |
34 | 34 | ||
35 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 35 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
36 | @ApiOperation("分页") | 36 | @ApiOperation("分页") |
@@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | @@ -15,7 +15,7 @@ import org.thingsboard.server.common.data.yunteng.enums.OrderTypeEnum; | ||
15 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 15 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
16 | import org.thingsboard.server.controller.BaseController; | 16 | import org.thingsboard.server.controller.BaseController; |
17 | import org.thingsboard.server.dao.yunteng.entities.TkVideoPlatformEntity; | 17 | import org.thingsboard.server.dao.yunteng.entities.TkVideoPlatformEntity; |
18 | -import org.thingsboard.server.dao.yunteng.service.YtVideoPlatformService; | 18 | +import org.thingsboard.server.dao.yunteng.service.TkVideoPlatformService; |
19 | 19 | ||
20 | import java.util.List; | 20 | import java.util.List; |
21 | 21 | ||
@@ -28,7 +28,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | @@ -28,7 +28,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.QueryConstant. | ||
28 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") | 28 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
29 | public class YtVideoPlatformController extends BaseController { | 29 | public class YtVideoPlatformController extends BaseController { |
30 | 30 | ||
31 | - private final YtVideoPlatformService videoPlatformService; | 31 | + private final TkVideoPlatformService videoPlatformService; |
32 | 32 | ||
33 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 33 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
34 | @ApiOperation("分页") | 34 | @ApiOperation("分页") |
@@ -16,7 +16,6 @@ | @@ -16,7 +16,6 @@ | ||
16 | package org.thingsboard.server.service.security.auth.jwt; | 16 | package org.thingsboard.server.service.security.auth.jwt; |
17 | 17 | ||
18 | import lombok.RequiredArgsConstructor; | 18 | import lombok.RequiredArgsConstructor; |
19 | -import org.springframework.beans.factory.annotation.Autowired; | ||
20 | import org.springframework.security.authentication.AuthenticationProvider; | 19 | import org.springframework.security.authentication.AuthenticationProvider; |
21 | import org.springframework.security.authentication.BadCredentialsException; | 20 | import org.springframework.security.authentication.BadCredentialsException; |
22 | import org.springframework.security.authentication.CredentialsExpiredException; | 21 | import org.springframework.security.authentication.CredentialsExpiredException; |
@@ -34,11 +33,10 @@ import org.thingsboard.server.common.data.id.EntityId; | @@ -34,11 +33,10 @@ import org.thingsboard.server.common.data.id.EntityId; | ||
34 | import org.thingsboard.server.common.data.id.TenantId; | 33 | import org.thingsboard.server.common.data.id.TenantId; |
35 | import org.thingsboard.server.common.data.id.UserId; | 34 | import org.thingsboard.server.common.data.id.UserId; |
36 | import org.thingsboard.server.common.data.security.Authority; | 35 | import org.thingsboard.server.common.data.security.Authority; |
37 | -import org.thingsboard.server.common.data.yunteng.constant.FastIotConstants; | ||
38 | import org.thingsboard.server.common.data.yunteng.core.utils.AccountProperties; | 36 | import org.thingsboard.server.common.data.yunteng.core.utils.AccountProperties; |
39 | import org.thingsboard.server.common.data.yunteng.dto.UserDTO; | 37 | import org.thingsboard.server.common.data.yunteng.dto.UserDTO; |
40 | import org.thingsboard.server.common.data.yunteng.dto.UserDetailsDTO; | 38 | import org.thingsboard.server.common.data.yunteng.dto.UserDetailsDTO; |
41 | -import org.thingsboard.server.dao.yunteng.service.YtUserService; | 39 | +import org.thingsboard.server.dao.yunteng.service.TkUserService; |
42 | import org.thingsboard.server.service.security.auth.RefreshAuthenticationToken; | 40 | import org.thingsboard.server.service.security.auth.RefreshAuthenticationToken; |
43 | import org.thingsboard.server.service.security.auth.TokenOutdatingService; | 41 | import org.thingsboard.server.service.security.auth.TokenOutdatingService; |
44 | import org.thingsboard.server.service.security.model.SecurityUser; | 42 | import org.thingsboard.server.service.security.model.SecurityUser; |
@@ -59,7 +57,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | @@ -59,7 +57,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | ||
59 | private final UserService userService; | 57 | private final UserService userService; |
60 | private final CustomerService customerService; | 58 | private final CustomerService customerService; |
61 | private final TokenOutdatingService tokenOutdatingService; | 59 | private final TokenOutdatingService tokenOutdatingService; |
62 | - private final YtUserService ytUserService; | 60 | + private final TkUserService tkUserService; |
63 | private final AccountProperties accountProperties; | 61 | private final AccountProperties accountProperties; |
64 | 62 | ||
65 | @Override | 63 | @Override |
@@ -107,7 +105,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | @@ -107,7 +105,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | ||
107 | 105 | ||
108 | UserPrincipal userPrincipal = new UserPrincipal(UserPrincipal.Type.USER_NAME, user.getEmail()); | 106 | UserPrincipal userPrincipal = new UserPrincipal(UserPrincipal.Type.USER_NAME, user.getEmail()); |
109 | String userName = user.getEmail().indexOf("@") != -1 ?user.getEmail().split("@")[0]:user.getEmail(); | 107 | String userName = user.getEmail().indexOf("@") != -1 ?user.getEmail().split("@")[0]:user.getEmail(); |
110 | - List<UserDetailsDTO> userDetailsDTOS = ytUserService.findUserDetailsByUsername(userName, | 108 | + List<UserDetailsDTO> userDetailsDTOS = tkUserService.findUserDetailsByUsername(userName, |
111 | user.getTenantId().getId().toString()); | 109 | user.getTenantId().getId().toString()); |
112 | user.setUserDetailsDTO(null != userDetailsDTOS && userDetailsDTOS.size()>0 ? userDetailsDTOS.get(0):null); | 110 | user.setUserDetailsDTO(null != userDetailsDTOS && userDetailsDTOS.size()>0 ? userDetailsDTOS.get(0):null); |
113 | securityUser = new SecurityUser(user, userCredentials.isEnabled(), userPrincipal); | 111 | securityUser = new SecurityUser(user, userCredentials.isEnabled(), userPrincipal); |
@@ -116,7 +114,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | @@ -116,7 +114,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | ||
116 | } | 114 | } |
117 | 115 | ||
118 | private SecurityUser authenticateByPlatFormUserId(UserId userId){ | 116 | private SecurityUser authenticateByPlatFormUserId(UserId userId){ |
119 | - UserDTO userDTO =ytUserService.findUserInfoById(userId.getId().toString()); | 117 | + UserDTO userDTO = tkUserService.findUserInfoById(userId.getId().toString()); |
120 | if(null != userDTO){ | 118 | if(null != userDTO){ |
121 | String email = userDTO.getUsername() + "@" +accountProperties.getEmailSuffix(); | 119 | String email = userDTO.getUsername() + "@" +accountProperties.getEmailSuffix(); |
122 | UserPrincipal userPrincipal = new UserPrincipal(UserPrincipal.Type.USER_NAME, email); | 120 | UserPrincipal userPrincipal = new UserPrincipal(UserPrincipal.Type.USER_NAME, email); |
@@ -125,7 +123,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | @@ -125,7 +123,7 @@ public class RefreshTokenAuthenticationProvider implements AuthenticationProvide | ||
125 | user.setTenantId(TenantId.fromUUID(EntityId.NULL_UUID)); | 123 | user.setTenantId(TenantId.fromUUID(EntityId.NULL_UUID)); |
126 | user.setId(userId); | 124 | user.setId(userId); |
127 | user.setEmail(email); | 125 | user.setEmail(email); |
128 | - List<UserDetailsDTO> userDetailsDTOS = ytUserService.findUserDetailsByUsername(userDTO.getUsername(), | 126 | + List<UserDetailsDTO> userDetailsDTOS = tkUserService.findUserDetailsByUsername(userDTO.getUsername(), |
129 | user.getTenantId().getId().toString()); | 127 | user.getTenantId().getId().toString()); |
130 | user.setUserDetailsDTO(null != userDetailsDTOS && userDetailsDTOS.size()>0 ? userDetailsDTOS.get(0):null); | 128 | user.setUserDetailsDTO(null != userDetailsDTOS && userDetailsDTOS.size()>0 ? userDetailsDTOS.get(0):null); |
131 | SecurityUser securityUser = new SecurityUser(user, true, userPrincipal); | 129 | SecurityUser securityUser = new SecurityUser(user, true, userPrincipal); |
@@ -49,7 +49,7 @@ import org.thingsboard.server.service.security.model.SecurityUser; | @@ -49,7 +49,7 @@ import org.thingsboard.server.service.security.model.SecurityUser; | ||
49 | import org.thingsboard.server.service.security.model.UserPrincipal; | 49 | import org.thingsboard.server.service.security.model.UserPrincipal; |
50 | import org.thingsboard.server.service.security.system.SystemSecurityService; | 50 | import org.thingsboard.server.service.security.system.SystemSecurityService; |
51 | import org.thingsboard.server.dao.user.UserService; | 51 | import org.thingsboard.server.dao.user.UserService; |
52 | -import org.thingsboard.server.dao.yunteng.service.YtUserService; | 52 | +import org.thingsboard.server.dao.yunteng.service.TkUserService; |
53 | import ua_parser.Client; | 53 | import ua_parser.Client; |
54 | 54 | ||
55 | import java.time.LocalDateTime; | 55 | import java.time.LocalDateTime; |
@@ -279,12 +279,12 @@ public class RestAuthenticationProvider implements AuthenticationProvider { | @@ -279,12 +279,12 @@ public class RestAuthenticationProvider implements AuthenticationProvider { | ||
279 | device); | 279 | device); |
280 | } | 280 | } |
281 | 281 | ||
282 | - @Autowired private YtUserService ytUserService; | 282 | + @Autowired private TkUserService tkUserService; |
283 | @Autowired private CacheUtils cacheUtils; | 283 | @Autowired private CacheUtils cacheUtils; |
284 | @Autowired private PasswordEncoder passwordEncoder; | 284 | @Autowired private PasswordEncoder passwordEncoder; |
285 | 285 | ||
286 | private Optional<UserDetailsDTO> ytUserDetailsByUserName(String username, String password) { | 286 | private Optional<UserDetailsDTO> ytUserDetailsByUserName(String username, String password) { |
287 | - List<UserDetailsDTO> users = ytUserService.findUserDetailsByUsername(username,null); | 287 | + List<UserDetailsDTO> users = tkUserService.findUserDetailsByUsername(username,null); |
288 | 288 | ||
289 | if (users.isEmpty()) { | 289 | if (users.isEmpty()) { |
290 | throw new UsernameNotFoundException("User not found: " + username); | 290 | throw new UsernameNotFoundException("User not found: " + username); |
@@ -304,7 +304,7 @@ public class RestAuthenticationProvider implements AuthenticationProvider { | @@ -304,7 +304,7 @@ public class RestAuthenticationProvider implements AuthenticationProvider { | ||
304 | 304 | ||
305 | private Authentication ytUserDetailsByPhone( | 305 | private Authentication ytUserDetailsByPhone( |
306 | Authentication authentication, UserPrincipal userPrincipal, String phoneNumber, String code) { | 306 | Authentication authentication, UserPrincipal userPrincipal, String phoneNumber, String code) { |
307 | - List<UserDetailsDTO> users = ytUserService.getUserByPhoneNumber(phoneNumber); | 307 | + List<UserDetailsDTO> users = tkUserService.getUserByPhoneNumber(phoneNumber); |
308 | if (users.isEmpty()) { | 308 | if (users.isEmpty()) { |
309 | throw new UsernameNotFoundException("phone number not found: " + phoneNumber); | 309 | throw new UsernameNotFoundException("phone number not found: " + phoneNumber); |
310 | } | 310 | } |
@@ -75,7 +75,7 @@ import org.thingsboard.server.dao.device.provision.ProvisionResponse; | @@ -75,7 +75,7 @@ import org.thingsboard.server.dao.device.provision.ProvisionResponse; | ||
75 | import org.thingsboard.server.dao.ota.OtaPackageService; | 75 | import org.thingsboard.server.dao.ota.OtaPackageService; |
76 | import org.thingsboard.server.dao.relation.RelationService; | 76 | import org.thingsboard.server.dao.relation.RelationService; |
77 | import org.thingsboard.server.dao.tenant.TbTenantProfileCache; | 77 | import org.thingsboard.server.dao.tenant.TbTenantProfileCache; |
78 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceService; | 78 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceService; |
79 | import org.thingsboard.server.gen.transport.TransportProtos; | 79 | import org.thingsboard.server.gen.transport.TransportProtos; |
80 | import org.thingsboard.server.gen.transport.TransportProtos.DeviceInfoProto; | 80 | import org.thingsboard.server.gen.transport.TransportProtos.DeviceInfoProto; |
81 | import org.thingsboard.server.gen.transport.TransportProtos.GetDeviceCredentialsRequestMsg; | 81 | import org.thingsboard.server.gen.transport.TransportProtos.GetDeviceCredentialsRequestMsg; |
@@ -127,7 +127,7 @@ public class DefaultTransportApiService implements TransportApiService { | @@ -127,7 +127,7 @@ public class DefaultTransportApiService implements TransportApiService { | ||
127 | private final TbTenantProfileCache tenantProfileCache; | 127 | private final TbTenantProfileCache tenantProfileCache; |
128 | private final TbApiUsageStateService apiUsageStateService; | 128 | private final TbApiUsageStateService apiUsageStateService; |
129 | private final DeviceService deviceService; | 129 | private final DeviceService deviceService; |
130 | - private final YtDeviceService ytDeviceService; | 130 | + private final TkDeviceService ytDeviceService; |
131 | private final RelationService relationService; | 131 | private final RelationService relationService; |
132 | private final DeviceCredentialsService deviceCredentialsService; | 132 | private final DeviceCredentialsService deviceCredentialsService; |
133 | private final DbCallbackExecutorService dbCallbackExecutorService; | 133 | private final DbCallbackExecutorService dbCallbackExecutorService; |
@@ -5,13 +5,14 @@ import io.swagger.annotations.ApiModel; | @@ -5,13 +5,14 @@ import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | 5 | import io.swagger.annotations.ApiModelProperty; |
6 | import lombok.Data; | 6 | import lombok.Data; |
7 | import lombok.EqualsAndHashCode; | 7 | import lombok.EqualsAndHashCode; |
8 | +import org.thingsboard.server.common.data.yunteng.enums.DeviceEventTypeEnum; | ||
8 | 9 | ||
9 | @EqualsAndHashCode(callSuper = true) | 10 | @EqualsAndHashCode(callSuper = true) |
10 | @Data | 11 | @Data |
11 | @ApiModel("事件模型") | 12 | @ApiModel("事件模型") |
12 | public class EventModelDTO extends BaseModelDTO { | 13 | public class EventModelDTO extends BaseModelDTO { |
13 | - @ApiModelProperty("时间类型:0 信息 1告警 2故障") | ||
14 | - private Integer type; | 14 | + @ApiModelProperty("时间类型:INFO信息 ALERT告警 ERROR故障") |
15 | + private DeviceEventTypeEnum eventType; | ||
15 | 16 | ||
16 | @ApiModelProperty("输出参数") | 17 | @ApiModelProperty("输出参数") |
17 | private JsonNode outputData; | 18 | private JsonNode outputData; |
@@ -5,13 +5,14 @@ import io.swagger.annotations.ApiModel; | @@ -5,13 +5,14 @@ import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | 5 | import io.swagger.annotations.ApiModelProperty; |
6 | import lombok.Data; | 6 | import lombok.Data; |
7 | import lombok.EqualsAndHashCode; | 7 | import lombok.EqualsAndHashCode; |
8 | +import org.thingsboard.server.common.data.yunteng.enums.CallTypeEnum; | ||
8 | 9 | ||
9 | @EqualsAndHashCode(callSuper = true) | 10 | @EqualsAndHashCode(callSuper = true) |
10 | @Data | 11 | @Data |
11 | @ApiModel("服务模型") | 12 | @ApiModel("服务模型") |
12 | public class ServiceModelDTO extends BaseModelDTO { | 13 | public class ServiceModelDTO extends BaseModelDTO { |
13 | - @ApiModelProperty("调用方式:0 同步 1异步") | ||
14 | - private Integer method; | 14 | + @ApiModelProperty("调用方式:sync同步 async异步") |
15 | + private CallTypeEnum callType; | ||
15 | 16 | ||
16 | @ApiModelProperty("输入参数") | 17 | @ApiModelProperty("输入参数") |
17 | private JsonNode inputData; | 18 | private JsonNode inputData; |
common/data/src/main/java/org/thingsboard/server/common/data/yunteng/utils/DateTimeUtils.java
0 → 100644
1 | +package org.thingsboard.server.common.data.yunteng.utils; | ||
2 | + | ||
3 | +import java.time.LocalDateTime; | ||
4 | +import java.time.OffsetDateTime; | ||
5 | +import java.time.format.DateTimeFormatter; | ||
6 | + | ||
7 | +/** | ||
8 | + * @version V1.0 @Description : 1.其它地方抛出异常,交由控制层统一处理 2.服务层注意持久化的事务管理 @Dependency: 依赖包 @Author: | ||
9 | + * junlianglee @Date Created in 2021/12/28$ @Copyright 2016-2018 - Powered By 李唐源研发中心 | ||
10 | + */ | ||
11 | +public class DateTimeUtils { | ||
12 | + public static final String PATTERN_DATE_FORMATE = "yyyy-MM-dd HH:mm:ss"; | ||
13 | + | ||
14 | + public static String format(Long nacosTime) { | ||
15 | + if (nacosTime == null) { | ||
16 | + return null; | ||
17 | + } | ||
18 | + LocalDateTime createTime = | ||
19 | + LocalDateTime.ofEpochSecond(nacosTime / 1000, 0, OffsetDateTime.now().getOffset()); | ||
20 | + return createTime.format(DateTimeFormatter.ofPattern(PATTERN_DATE_FORMATE)); | ||
21 | + } | ||
22 | +} |
common/data/src/main/java/org/thingsboard/server/common/data/yunteng/utils/RequestUtils.java
deleted
100644 → 0
1 | -package org.thingsboard.server.common.data.yunteng.utils; | ||
2 | - | ||
3 | -import javax.servlet.http.HttpServletRequest; | ||
4 | - | ||
5 | -public class RequestUtils { | ||
6 | - public static String getClientIpAddr(HttpServletRequest request) { | ||
7 | - String ip = request.getHeader("X-Forwarded-For"); | ||
8 | - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
9 | - ip = request.getHeader("Proxy-Client-IP"); | ||
10 | - } | ||
11 | - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
12 | - ip = request.getHeader("WL-Proxy-Client-IP"); | ||
13 | - } | ||
14 | - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
15 | - ip = request.getHeader("HTTP_CLIENT_IP"); | ||
16 | - } | ||
17 | - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
18 | - ip = request.getHeader("HTTP_X_FORWARDED_FOR"); | ||
19 | - } | ||
20 | - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
21 | - ip = request.getRemoteAddr(); | ||
22 | - } | ||
23 | - return ip; | ||
24 | - } | ||
25 | -} |
common/data/src/main/java/org/thingsboard/server/common/data/yunteng/utils/YtDateTimeUtils.java
deleted
100644 → 0
1 | -package org.thingsboard.server.common.data.yunteng.utils; | ||
2 | - | ||
3 | -import java.time.LocalDateTime; | ||
4 | -import java.time.OffsetDateTime; | ||
5 | -import java.time.format.DateTimeFormatter; | ||
6 | - | ||
7 | -/** | ||
8 | - * @version V1.0 | ||
9 | - * @Description : | ||
10 | - * 1.其它地方抛出异常,交由控制层统一处理 | ||
11 | - * 2.服务层注意持久化的事务管理 | ||
12 | - * @Dependency: 依赖包 | ||
13 | - * @Author: junlianglee | ||
14 | - * @Date Created in 2021/12/28$ | ||
15 | - * @Copyright 2016-2018 - Powered By 李唐源研发中心 | ||
16 | - */ | ||
17 | -public class YtDateTimeUtils { | ||
18 | - public static final String PATTERN_DATE_FORMATE="yyyy-MM-dd HH:mm:ss"; | ||
19 | - | ||
20 | - public static String formate(Long nacosTime) { | ||
21 | - if(nacosTime == null){ | ||
22 | - return null; | ||
23 | - } | ||
24 | - LocalDateTime createTime = LocalDateTime.ofEpochSecond(nacosTime/1000,0, OffsetDateTime.now().getOffset()); | ||
25 | - return createTime.format(DateTimeFormatter.ofPattern(PATTERN_DATE_FORMATE)); | ||
26 | - } | ||
27 | - | ||
28 | -} |
@@ -45,7 +45,7 @@ import org.thingsboard.server.dao.service.Validator; | @@ -45,7 +45,7 @@ import org.thingsboard.server.dao.service.Validator; | ||
45 | import org.thingsboard.server.dao.usagerecord.ApiUsageStateService; | 45 | import org.thingsboard.server.dao.usagerecord.ApiUsageStateService; |
46 | import org.thingsboard.server.dao.user.UserService; | 46 | import org.thingsboard.server.dao.user.UserService; |
47 | import org.thingsboard.server.dao.widget.WidgetsBundleService; | 47 | import org.thingsboard.server.dao.widget.WidgetsBundleService; |
48 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceProfileService; | 48 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceProfileService; |
49 | 49 | ||
50 | import static org.thingsboard.server.dao.service.Validator.validateId; | 50 | import static org.thingsboard.server.dao.service.Validator.validateId; |
51 | 51 | ||
@@ -104,7 +104,7 @@ public class TenantServiceImpl extends AbstractEntityService implements TenantSe | @@ -104,7 +104,7 @@ public class TenantServiceImpl extends AbstractEntityService implements TenantSe | ||
104 | @Autowired | 104 | @Autowired |
105 | private DataValidator<Tenant> tenantValidator; | 105 | private DataValidator<Tenant> tenantValidator; |
106 | @Autowired | 106 | @Autowired |
107 | - private YtDeviceProfileService ytDeviceProfileService; | 107 | + private TkDeviceProfileService ytDeviceProfileService; |
108 | @Override | 108 | @Override |
109 | public Tenant findTenantById(TenantId tenantId) { | 109 | public Tenant findTenantById(TenantId tenantId) { |
110 | log.trace("Executing findTenantById [{}]", tenantId); | 110 | log.trace("Executing findTenantById [{}]", tenantId); |
@@ -13,7 +13,7 @@ import org.thingsboard.server.common.data.yunteng.enums.StatusEnum; | @@ -13,7 +13,7 @@ import org.thingsboard.server.common.data.yunteng.enums.StatusEnum; | ||
13 | import org.thingsboard.server.common.data.yunteng.utils.SpringBeanUtils; | 13 | import org.thingsboard.server.common.data.yunteng.utils.SpringBeanUtils; |
14 | import org.thingsboard.server.dao.yunteng.entities.SysJobEntity; | 14 | import org.thingsboard.server.dao.yunteng.entities.SysJobEntity; |
15 | import org.thingsboard.server.dao.yunteng.entities.SysJobLogEntity; | 15 | import org.thingsboard.server.dao.yunteng.entities.SysJobLogEntity; |
16 | -import org.thingsboard.server.dao.yunteng.service.YtSysJobLogService; | 16 | +import org.thingsboard.server.dao.yunteng.service.TkSysJobLogService; |
17 | 17 | ||
18 | import java.time.LocalDateTime; | 18 | import java.time.LocalDateTime; |
19 | import java.time.ZoneOffset; | 19 | import java.time.ZoneOffset; |
@@ -74,7 +74,7 @@ public abstract class AbstractQuartzJob implements Job { | @@ -74,7 +74,7 @@ public abstract class AbstractQuartzJob implements Job { | ||
74 | } | 74 | } |
75 | 75 | ||
76 | // 写入数据库当中 | 76 | // 写入数据库当中 |
77 | - SpringBeanUtils.getBean(YtSysJobLogService.class) | 77 | + SpringBeanUtils.getBean(TkSysJobLogService.class) |
78 | .saveOrUpdateSysJobLog(sysJobLog.getDTO(SysJobLogDTO.class)); | 78 | .saveOrUpdateSysJobLog(sysJobLog.getDTO(SysJobLogDTO.class)); |
79 | } | 79 | } |
80 | 80 |
@@ -6,8 +6,8 @@ import org.thingsboard.server.common.data.yunteng.dto.ReportGenerateRecordDTO; | @@ -6,8 +6,8 @@ import org.thingsboard.server.common.data.yunteng.dto.ReportGenerateRecordDTO; | ||
6 | import org.thingsboard.server.common.data.yunteng.enums.JobGroupEnum; | 6 | import org.thingsboard.server.common.data.yunteng.enums.JobGroupEnum; |
7 | import org.thingsboard.server.common.data.yunteng.utils.SpringBeanUtils; | 7 | import org.thingsboard.server.common.data.yunteng.utils.SpringBeanUtils; |
8 | import org.thingsboard.server.dao.yunteng.entities.SysJobEntity; | 8 | import org.thingsboard.server.dao.yunteng.entities.SysJobEntity; |
9 | -import org.thingsboard.server.dao.yunteng.service.YtReportFormConfigService; | ||
10 | -import org.thingsboard.server.dao.yunteng.service.YtReportGenerateRecordService; | 9 | +import org.thingsboard.server.dao.yunteng.service.TkReportFormConfigService; |
10 | +import org.thingsboard.server.dao.yunteng.service.TkReportGenerateRecordService; | ||
11 | 11 | ||
12 | import java.lang.reflect.InvocationTargetException; | 12 | import java.lang.reflect.InvocationTargetException; |
13 | import java.lang.reflect.Method; | 13 | import java.lang.reflect.Method; |
@@ -30,10 +30,10 @@ public class JobInvokeUtil { | @@ -30,10 +30,10 @@ public class JobInvokeUtil { | ||
30 | && sysJob.getJobGroup().equals(JobGroupEnum.REPORT.toString())) { | 30 | && sysJob.getJobGroup().equals(JobGroupEnum.REPORT.toString())) { |
31 | // 写入报表生成记录 | 31 | // 写入报表生成记录 |
32 | ReportFormConfigDTO formConfigDTO = | 32 | ReportFormConfigDTO formConfigDTO = |
33 | - SpringBeanUtils.getBean(YtReportFormConfigService.class) | 33 | + SpringBeanUtils.getBean(TkReportFormConfigService.class) |
34 | .findReportFormConfigById(sysJob.getSourceId(), sysJob.getTenantId()); | 34 | .findReportFormConfigById(sysJob.getSourceId(), sysJob.getTenantId()); |
35 | ReportGenerateRecordDTO dto = | 35 | ReportGenerateRecordDTO dto = |
36 | - SpringBeanUtils.getBean(YtReportGenerateRecordService.class) | 36 | + SpringBeanUtils.getBean(TkReportGenerateRecordService.class) |
37 | .generateReportRecord(formConfigDTO, sysJob.getId()); | 37 | .generateReportRecord(formConfigDTO, sysJob.getId()); |
38 | reportGenerateRecordId = dto.getId(); | 38 | reportGenerateRecordId = dto.getId(); |
39 | } | 39 | } |
@@ -6,17 +6,17 @@ import org.springframework.stereotype.Component; | @@ -6,17 +6,17 @@ import org.springframework.stereotype.Component; | ||
6 | import org.thingsboard.server.common.data.yunteng.constant.FastIotConstants; | 6 | import org.thingsboard.server.common.data.yunteng.constant.FastIotConstants; |
7 | import org.thingsboard.server.common.data.yunteng.dto.ReportFormConfigDTO; | 7 | import org.thingsboard.server.common.data.yunteng.dto.ReportFormConfigDTO; |
8 | import org.thingsboard.server.common.data.yunteng.dto.request.ExecuteAttributesDTO; | 8 | import org.thingsboard.server.common.data.yunteng.dto.request.ExecuteAttributesDTO; |
9 | -import org.thingsboard.server.dao.yunteng.service.YtReportFormConfigService; | ||
10 | -import org.thingsboard.server.dao.yunteng.service.YtReportGenerateRecordService; | 9 | +import org.thingsboard.server.dao.yunteng.service.TkReportFormConfigService; |
10 | +import org.thingsboard.server.dao.yunteng.service.TkReportGenerateRecordService; | ||
11 | import java.util.*; | 11 | import java.util.*; |
12 | 12 | ||
13 | @Component("reportTask") | 13 | @Component("reportTask") |
14 | @RequiredArgsConstructor | 14 | @RequiredArgsConstructor |
15 | @Slf4j | 15 | @Slf4j |
16 | public class ReportTask { | 16 | public class ReportTask { |
17 | - private final YtReportFormConfigService ytReportFormConfigService; | 17 | + private final TkReportFormConfigService tkReportFormConfigService; |
18 | 18 | ||
19 | - private final YtReportGenerateRecordService ytReportGenerateRecordService; | 19 | + private final TkReportGenerateRecordService tkReportGenerateRecordService; |
20 | 20 | ||
21 | public void multipleParams(String s, Boolean b, Long l, Double d, Integer i) { | 21 | public void multipleParams(String s, Boolean b, Long l, Double d, Integer i) { |
22 | System.out.println("执行多参方法: s=" + s + "b=" + b + "l=" + l + "d" + d + "i=" + i); | 22 | System.out.println("执行多参方法: s=" + s + "b=" + b + "l=" + l + "d" + d + "i=" + i); |
@@ -33,7 +33,7 @@ public class ReportTask { | @@ -33,7 +33,7 @@ public class ReportTask { | ||
33 | 33 | ||
34 | public void generateReport(String reportId, String reportGenerateRecordId) { | 34 | public void generateReport(String reportId, String reportGenerateRecordId) { |
35 | ReportFormConfigDTO formConfigDTO = | 35 | ReportFormConfigDTO formConfigDTO = |
36 | - ytReportFormConfigService.findReportFormConfigById(reportId); | 36 | + tkReportFormConfigService.findReportFormConfigById(reportId); |
37 | // 关联设备 | 37 | // 关联设备 |
38 | List<ExecuteAttributesDTO> dtoList = formConfigDTO.getExecuteAttributes(); | 38 | List<ExecuteAttributesDTO> dtoList = formConfigDTO.getExecuteAttributes(); |
39 | if (!dtoList.isEmpty()) { | 39 | if (!dtoList.isEmpty()) { |
@@ -61,7 +61,7 @@ public class ReportTask { | @@ -61,7 +61,7 @@ public class ReportTask { | ||
61 | ExecuteAttributesDTO dto, | 61 | ExecuteAttributesDTO dto, |
62 | String reportGenerateRecordId, | 62 | String reportGenerateRecordId, |
63 | int surplus) { | 63 | int surplus) { |
64 | - ytReportGenerateRecordService.generateExcelUpdateReportRecord( | 64 | + tkReportGenerateRecordService.generateExcelUpdateReportRecord( |
65 | formConfigDTO, dto, reportGenerateRecordId, surplus); | 65 | formConfigDTO, dto, reportGenerateRecordId, surplus); |
66 | } | 66 | } |
67 | } | 67 | } |
@@ -4,13 +4,11 @@ import com.baomidou.mybatisplus.annotation.TableField; | @@ -4,13 +4,11 @@ import com.baomidou.mybatisplus.annotation.TableField; | ||
4 | import com.baomidou.mybatisplus.annotation.TableId; | 4 | import com.baomidou.mybatisplus.annotation.TableId; |
5 | import com.baomidou.mybatisplus.annotation.TableName; | 5 | import com.baomidou.mybatisplus.annotation.TableName; |
6 | import com.fasterxml.jackson.databind.JsonNode; | 6 | import com.fasterxml.jackson.databind.JsonNode; |
7 | -import io.swagger.annotations.ApiModelProperty; | ||
8 | import lombok.Data; | 7 | import lombok.Data; |
9 | import org.thingsboard.server.common.data.alarm.AlarmSeverity; | 8 | import org.thingsboard.server.common.data.alarm.AlarmSeverity; |
10 | import org.thingsboard.server.common.data.alarm.AlarmStatus; | 9 | import org.thingsboard.server.common.data.alarm.AlarmStatus; |
11 | -import org.thingsboard.server.common.data.yunteng.utils.YtDateTimeUtils; | 10 | +import org.thingsboard.server.common.data.yunteng.utils.DateTimeUtils; |
12 | 11 | ||
13 | -import javax.validation.constraints.NotEmpty; | ||
14 | import java.util.UUID; | 12 | import java.util.UUID; |
15 | 13 | ||
16 | import static org.thingsboard.server.dao.model.ModelConstants.ALARM_COLUMN_FAMILY_NAME; | 14 | import static org.thingsboard.server.dao.model.ModelConstants.ALARM_COLUMN_FAMILY_NAME; |
@@ -84,26 +82,26 @@ public class TkAlarmEntity { | @@ -84,26 +82,26 @@ public class TkAlarmEntity { | ||
84 | private String organizationName; | 82 | private String organizationName; |
85 | 83 | ||
86 | public String getStartTs() { | 84 | public String getStartTs() { |
87 | - return YtDateTimeUtils.formate(this.startTs); | 85 | + return DateTimeUtils.format(this.startTs); |
88 | } | 86 | } |
89 | 87 | ||
90 | public String getEndTs() { | 88 | public String getEndTs() { |
91 | - return YtDateTimeUtils.formate(this.endTs); | 89 | + return DateTimeUtils.format(this.endTs); |
92 | } | 90 | } |
93 | 91 | ||
94 | public String getAckTs() { | 92 | public String getAckTs() { |
95 | - return YtDateTimeUtils.formate(this.ackTs); | 93 | + return DateTimeUtils.format(this.ackTs); |
96 | } | 94 | } |
97 | 95 | ||
98 | public String getClearTs() { | 96 | public String getClearTs() { |
99 | - return YtDateTimeUtils.formate(this.clearTs); | 97 | + return DateTimeUtils.format(this.clearTs); |
100 | } | 98 | } |
101 | 99 | ||
102 | public String getCreatedTime() { | 100 | public String getCreatedTime() { |
103 | - return YtDateTimeUtils.formate(this.createdTime); | 101 | + return DateTimeUtils.format(this.createdTime); |
104 | } | 102 | } |
105 | 103 | ||
106 | public String getUpdatedTime() { | 104 | public String getUpdatedTime() { |
107 | - return YtDateTimeUtils.formate(this.updatedTime); | 105 | + return DateTimeUtils.format(this.updatedTime); |
108 | } | 106 | } |
109 | } | 107 | } |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
16 | import org.thingsboard.server.dao.yunteng.entities.SysJobLogEntity; | 16 | import org.thingsboard.server.dao.yunteng.entities.SysJobLogEntity; |
17 | import org.thingsboard.server.dao.yunteng.mapper.SysJobLogMapper; | 17 | import org.thingsboard.server.dao.yunteng.mapper.SysJobLogMapper; |
18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtSysJobLogService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkSysJobLogService; |
20 | import java.util.Map; | 20 | import java.util.Map; |
21 | import java.util.Optional; | 21 | import java.util.Optional; |
22 | 22 | ||
@@ -25,7 +25,7 @@ import java.util.Optional; | @@ -25,7 +25,7 @@ import java.util.Optional; | ||
25 | @RequiredArgsConstructor | 25 | @RequiredArgsConstructor |
26 | @Slf4j | 26 | @Slf4j |
27 | public class SysJobLogServiceImpl extends AbstractBaseService<SysJobLogMapper, SysJobLogEntity> | 27 | public class SysJobLogServiceImpl extends AbstractBaseService<SysJobLogMapper, SysJobLogEntity> |
28 | - implements YtSysJobLogService { | 28 | + implements TkSysJobLogService { |
29 | 29 | ||
30 | @Override | 30 | @Override |
31 | public YtPageData<SysJobLogDTO> sysJobLogPageByJobId(Map<String, Object> queryMap) { | 31 | public YtPageData<SysJobLogDTO> sysJobLogPageByJobId(Map<String, Object> queryMap) { |
@@ -26,7 +26,7 @@ import java.util.*; | @@ -26,7 +26,7 @@ import java.util.*; | ||
26 | @Service | 26 | @Service |
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class SysJobServiceImpl extends AbstractBaseService<SysJobMapper, SysJobEntity> | 28 | public class SysJobServiceImpl extends AbstractBaseService<SysJobMapper, SysJobEntity> |
29 | - implements YtSysJobService { | 29 | + implements TkSysJobService { |
30 | private final Scheduler scheduler; | 30 | private final Scheduler scheduler; |
31 | 31 | ||
32 | /** 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据) */ | 32 | /** 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据) */ |
@@ -11,7 +11,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -11,7 +11,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
11 | import org.thingsboard.server.dao.yunteng.entities.SysLogEntity; | 11 | import org.thingsboard.server.dao.yunteng.entities.SysLogEntity; |
12 | import org.thingsboard.server.dao.yunteng.mapper.SysLogMapper; | 12 | import org.thingsboard.server.dao.yunteng.mapper.SysLogMapper; |
13 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 13 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
14 | -import org.thingsboard.server.dao.yunteng.service.YtSysLogService; | 14 | +import org.thingsboard.server.dao.yunteng.service.TkSysLogService; |
15 | 15 | ||
16 | import java.util.ArrayList; | 16 | import java.util.ArrayList; |
17 | import java.util.List; | 17 | import java.util.List; |
@@ -20,7 +20,7 @@ import java.util.List; | @@ -20,7 +20,7 @@ import java.util.List; | ||
20 | @Service | 20 | @Service |
21 | @RequiredArgsConstructor | 21 | @RequiredArgsConstructor |
22 | public class SysLogServiceImpl extends AbstractBaseService<SysLogMapper, SysLogEntity> | 22 | public class SysLogServiceImpl extends AbstractBaseService<SysLogMapper, SysLogEntity> |
23 | - implements YtSysLogService { | 23 | + implements TkSysLogService { |
24 | 24 | ||
25 | 25 | ||
26 | @Override | 26 | @Override |
@@ -58,7 +58,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.ModelConstants | @@ -58,7 +58,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.ModelConstants | ||
58 | @Slf4j | 58 | @Slf4j |
59 | @RequiredArgsConstructor | 59 | @RequiredArgsConstructor |
60 | public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserEntity> | 60 | public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserEntity> |
61 | - implements YtUserService { | 61 | + implements TkUserService { |
62 | 62 | ||
63 | private final AdminSettingMapper adminSettingMapper; | 63 | private final AdminSettingMapper adminSettingMapper; |
64 | private final ObjectMapper mapper; | 64 | private final ObjectMapper mapper; |
@@ -67,9 +67,9 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | @@ -67,9 +67,9 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | ||
67 | private final UserRoleMapper userRoleMapper; | 67 | private final UserRoleMapper userRoleMapper; |
68 | private final TenantRoleMapper tenantRoleMapper; | 68 | private final TenantRoleMapper tenantRoleMapper; |
69 | 69 | ||
70 | - private final YtSmsService ytSmsService; | ||
71 | - private final YtMessageTemplateService messageTemplateService; | ||
72 | - private final YtOrganizationService organizationService; | 70 | + private final TkSmsService tkSmsService; |
71 | + private final TkMessageTemplateService messageTemplateService; | ||
72 | + private final TkOrganizationService organizationService; | ||
73 | private final UserOrganizationMappingService userOrganizationMappingService; | 73 | private final UserOrganizationMappingService userOrganizationMappingService; |
74 | private final SceneLinkageService sceneLinkageService; | 74 | private final SceneLinkageService sceneLinkageService; |
75 | private final SceneLinkageMapper sceneLinkageMapper; | 75 | private final SceneLinkageMapper sceneLinkageMapper; |
@@ -544,7 +544,7 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | @@ -544,7 +544,7 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | ||
544 | params.put("code", accountProperties.getDefaultPassword()); | 544 | params.put("code", accountProperties.getDefaultPassword()); |
545 | smsReqDTO.setParams(params); | 545 | smsReqDTO.setParams(params); |
546 | smsReqDTO.setTemplatePurpose(messageTemplateDTO.getTemplatePurpose()); | 546 | smsReqDTO.setTemplatePurpose(messageTemplateDTO.getTemplatePurpose()); |
547 | - ytSmsService.sendSms(smsReqDTO); | 547 | + tkSmsService.sendSms(smsReqDTO); |
548 | } | 548 | } |
549 | } | 549 | } |
550 | 550 |
@@ -6,14 +6,13 @@ import com.fasterxml.jackson.databind.JsonNode; | @@ -6,14 +6,13 @@ import com.fasterxml.jackson.databind.JsonNode; | ||
6 | import com.fasterxml.jackson.databind.node.ObjectNode; | 6 | import com.fasterxml.jackson.databind.node.ObjectNode; |
7 | import lombok.RequiredArgsConstructor; | 7 | import lombok.RequiredArgsConstructor; |
8 | import org.apache.commons.lang3.StringUtils; | 8 | import org.apache.commons.lang3.StringUtils; |
9 | +import org.springframework.beans.BeanUtils; | ||
9 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
10 | import org.springframework.transaction.annotation.Transactional; | 11 | import org.springframework.transaction.annotation.Transactional; |
11 | import org.thingsboard.server.common.data.yunteng.constant.FastIotConstants; | 12 | import org.thingsboard.server.common.data.yunteng.constant.FastIotConstants; |
12 | import org.thingsboard.server.common.data.yunteng.core.exception.YtDataValidationException; | 13 | import org.thingsboard.server.common.data.yunteng.core.exception.YtDataValidationException; |
13 | import org.thingsboard.server.common.data.yunteng.core.message.ErrorMessage; | 14 | import org.thingsboard.server.common.data.yunteng.core.message.ErrorMessage; |
14 | -import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | ||
15 | -import org.thingsboard.server.common.data.yunteng.dto.DeviceProfileDTO; | ||
16 | -import org.thingsboard.server.common.data.yunteng.dto.ThingsModelDTO; | 15 | +import org.thingsboard.server.common.data.yunteng.dto.*; |
17 | import org.thingsboard.server.common.data.yunteng.enums.DataTypeEnum; | 16 | import org.thingsboard.server.common.data.yunteng.enums.DataTypeEnum; |
18 | import org.thingsboard.server.common.data.yunteng.enums.DeviceTypeEnum; | 17 | import org.thingsboard.server.common.data.yunteng.enums.DeviceTypeEnum; |
19 | import org.thingsboard.server.common.data.yunteng.enums.FunctionTypeEnum; | 18 | import org.thingsboard.server.common.data.yunteng.enums.FunctionTypeEnum; |
@@ -24,7 +23,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkThingsModelEntity; | @@ -24,7 +23,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkThingsModelEntity; | ||
24 | import org.thingsboard.server.dao.yunteng.mapper.ThingsModelMapper; | 23 | import org.thingsboard.server.dao.yunteng.mapper.ThingsModelMapper; |
25 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 24 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
26 | import org.thingsboard.server.dao.yunteng.service.ThingsModelService; | 25 | import org.thingsboard.server.dao.yunteng.service.ThingsModelService; |
27 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceProfileService; | 26 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceProfileService; |
28 | 27 | ||
29 | import java.util.*; | 28 | import java.util.*; |
30 | import java.util.stream.Collectors; | 29 | import java.util.stream.Collectors; |
@@ -34,7 +33,7 @@ import java.util.stream.Collectors; | @@ -34,7 +33,7 @@ import java.util.stream.Collectors; | ||
34 | public class ThingsModelServiceImpl | 33 | public class ThingsModelServiceImpl |
35 | extends AbstractBaseService<ThingsModelMapper, TkThingsModelEntity> | 34 | extends AbstractBaseService<ThingsModelMapper, TkThingsModelEntity> |
36 | implements ThingsModelService { | 35 | implements ThingsModelService { |
37 | - private final YtDeviceProfileService ytDeviceProfileService; | 36 | + private final TkDeviceProfileService ytDeviceProfileService; |
38 | 37 | ||
39 | @Override | 38 | @Override |
40 | public YtPageData<ThingsModelDTO> page( | 39 | public YtPageData<ThingsModelDTO> page( |
@@ -152,17 +151,44 @@ public class ThingsModelServiceImpl | @@ -152,17 +151,44 @@ public class ThingsModelServiceImpl | ||
152 | @Override | 151 | @Override |
153 | public JsonNode getTingsModelTSL( | 152 | public JsonNode getTingsModelTSL( |
154 | FunctionTypeEnum typeEnum, String tenantId, String deviceProfileId) { | 153 | FunctionTypeEnum typeEnum, String tenantId, String deviceProfileId) { |
155 | - JsonNode jsonNode = null; | 154 | + JsonNode jsonNode; |
156 | DeviceProfileDTO deviceProfileDTO = | 155 | DeviceProfileDTO deviceProfileDTO = |
157 | ytDeviceProfileService.findDeviceProfileById(tenantId, deviceProfileId); | 156 | ytDeviceProfileService.findDeviceProfileById(tenantId, deviceProfileId); |
158 | - | 157 | + if (null == deviceProfileDTO) { |
158 | + throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | ||
159 | + } | ||
159 | List<ThingsModelDTO> thingsModelDTOS = | 160 | List<ThingsModelDTO> thingsModelDTOS = |
160 | selectByDeviceProfileId(typeEnum, tenantId, deviceProfileId); | 161 | selectByDeviceProfileId(typeEnum, tenantId, deviceProfileId); |
162 | + | ||
163 | + DeviceTypeEnum deviceType = deviceProfileDTO.getDeviceType(); | ||
161 | if (typeEnum.equals(FunctionTypeEnum.properties)) { | 164 | if (typeEnum.equals(FunctionTypeEnum.properties)) { |
162 | - DeviceTypeEnum deviceType = deviceProfileDTO.getDeviceType(); | ||
163 | jsonNode = getAttributeTSL(thingsModelDTOS, deviceType); | 165 | jsonNode = getAttributeTSL(thingsModelDTOS, deviceType); |
164 | - } else if (typeEnum.equals(FunctionTypeEnum.services)) { | ||
165 | - // TODO 服务 | 166 | + } else { |
167 | + if (typeEnum.equals(FunctionTypeEnum.services)) { | ||
168 | + List<ServiceModelDTO> serviceList = new ArrayList<>(); | ||
169 | + for (ThingsModelDTO thingsModelDTO : thingsModelDTOS) { | ||
170 | + ServiceModelDTO serviceDTO = new ServiceModelDTO(); | ||
171 | + BeanUtils.copyProperties(thingsModelDTO, serviceDTO); | ||
172 | + JsonNode functionJson = thingsModelDTO.getFunctionJson(); | ||
173 | + if (null != functionJson) { | ||
174 | + serviceDTO.setInputData(functionJson.get("inputData")); | ||
175 | + serviceDTO.setOutputData(functionJson.get("outputData")); | ||
176 | + } | ||
177 | + serviceList.add(serviceDTO); | ||
178 | + } | ||
179 | + jsonNode = JacksonUtil.convertValue(serviceList, JsonNode.class); | ||
180 | + } else { | ||
181 | + List<EventModelDTO> eventList = new ArrayList<>(); | ||
182 | + for (ThingsModelDTO thingsModelDTO : thingsModelDTOS) { | ||
183 | + EventModelDTO eventDTO = new EventModelDTO(); | ||
184 | + BeanUtils.copyProperties(thingsModelDTO, eventDTO); | ||
185 | + JsonNode functionJson = thingsModelDTO.getFunctionJson(); | ||
186 | + if (null != functionJson) { | ||
187 | + eventDTO.setOutputData(functionJson.get("outputData")); | ||
188 | + } | ||
189 | + } | ||
190 | + jsonNode = JacksonUtil.convertValue(eventList, JsonNode.class); | ||
191 | + } | ||
166 | } | 192 | } |
167 | 193 | ||
168 | return jsonNode; | 194 | return jsonNode; |
@@ -20,7 +20,7 @@ import org.thingsboard.server.dao.yunteng.mapper.AlarmContactMapper; | @@ -20,7 +20,7 @@ import org.thingsboard.server.dao.yunteng.mapper.AlarmContactMapper; | ||
20 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; | 20 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; |
21 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 21 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
22 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; | 22 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; |
23 | -import org.thingsboard.server.dao.yunteng.service.YtAlarmContactService; | 23 | +import org.thingsboard.server.dao.yunteng.service.TkAlarmContactService; |
24 | 24 | ||
25 | import java.util.*; | 25 | import java.util.*; |
26 | import java.util.stream.Collectors; | 26 | import java.util.stream.Collectors; |
@@ -31,7 +31,7 @@ import java.util.stream.Collectors; | @@ -31,7 +31,7 @@ import java.util.stream.Collectors; | ||
31 | @Service | 31 | @Service |
32 | @RequiredArgsConstructor | 32 | @RequiredArgsConstructor |
33 | public class TkAlarmContactServiceImpl extends AbstractBaseService<AlarmContactMapper, TkAlarmContactEntity> | 33 | public class TkAlarmContactServiceImpl extends AbstractBaseService<AlarmContactMapper, TkAlarmContactEntity> |
34 | - implements YtAlarmContactService { | 34 | + implements TkAlarmContactService { |
35 | /** mapper注入 自带方法加入,继承的baseMapper */ | 35 | /** mapper注入 自带方法加入,继承的baseMapper */ |
36 | private final AlarmContactMapper alarmContactMapper; | 36 | private final AlarmContactMapper alarmContactMapper; |
37 | 37 |
@@ -21,7 +21,7 @@ import org.thingsboard.server.dao.model.ModelConstants; | @@ -21,7 +21,7 @@ import org.thingsboard.server.dao.model.ModelConstants; | ||
21 | import org.thingsboard.server.dao.yunteng.entities.TkAlarmEntity; | 21 | import org.thingsboard.server.dao.yunteng.entities.TkAlarmEntity; |
22 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; | 22 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; |
23 | import org.thingsboard.server.dao.yunteng.mapper.TkAlarmMapper; | 23 | import org.thingsboard.server.dao.yunteng.mapper.TkAlarmMapper; |
24 | -import org.thingsboard.server.dao.yunteng.service.YtAlarmInfoService; | 24 | +import org.thingsboard.server.dao.yunteng.service.TkAlarmInfoService; |
25 | 25 | ||
26 | import java.util.ArrayList; | 26 | import java.util.ArrayList; |
27 | import java.util.List; | 27 | import java.util.List; |
@@ -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 | @Service | 36 | @Service |
37 | @RequiredArgsConstructor | 37 | @RequiredArgsConstructor |
38 | @Slf4j | 38 | @Slf4j |
39 | -public class TkAlarmInfoServiceImpl implements YtAlarmInfoService { | 39 | +public class TkAlarmInfoServiceImpl implements TkAlarmInfoService { |
40 | 40 | ||
41 | private final TkAlarmMapper ytJpaAarmDao; | 41 | private final TkAlarmMapper ytJpaAarmDao; |
42 | private final OrganizationMapper organizationMapper; | 42 | private final OrganizationMapper organizationMapper; |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
16 | import org.thingsboard.server.dao.yunteng.entities.TkAlarmContactEntity; | 16 | import org.thingsboard.server.dao.yunteng.entities.TkAlarmContactEntity; |
17 | import org.thingsboard.server.dao.yunteng.mapper.AlarmContactMapper; | 17 | import org.thingsboard.server.dao.yunteng.mapper.AlarmContactMapper; |
18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtAlarmService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkAlarmService; |
20 | 20 | ||
21 | import java.util.List; | 21 | import java.util.List; |
22 | import java.util.Map; | 22 | import java.util.Map; |
@@ -30,7 +30,7 @@ import java.util.Set; | @@ -30,7 +30,7 @@ import java.util.Set; | ||
30 | */ | 30 | */ |
31 | @Service | 31 | @Service |
32 | @RequiredArgsConstructor | 32 | @RequiredArgsConstructor |
33 | -public class TkAlarmServiceImpl extends AbstractBaseService<AlarmContactMapper, TkAlarmContactEntity> implements YtAlarmService { | 33 | +public class TkAlarmServiceImpl extends AbstractBaseService<AlarmContactMapper, TkAlarmContactEntity> implements TkAlarmService { |
34 | /** | 34 | /** |
35 | * mapper注入 自带方法加入,继承的baseMapper | 35 | * mapper注入 自带方法加入,继承的baseMapper |
36 | */ | 36 | */ |
@@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationActDTO; | @@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationActDTO; | ||
14 | import org.thingsboard.server.dao.yunteng.entities.TkConfigurationActEntity; | 14 | import org.thingsboard.server.dao.yunteng.entities.TkConfigurationActEntity; |
15 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationActMapper; | 15 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationActMapper; |
16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
17 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationActService; | 17 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationActService; |
18 | 18 | ||
19 | import java.util.List; | 19 | import java.util.List; |
20 | import java.util.stream.Collectors; | 20 | import java.util.stream.Collectors; |
@@ -27,7 +27,7 @@ import java.util.stream.Collectors; | @@ -27,7 +27,7 @@ import java.util.stream.Collectors; | ||
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class TkConfigurationActServiceImpl | 28 | public class TkConfigurationActServiceImpl |
29 | extends AbstractBaseService<ConfigurationActMapper, TkConfigurationActEntity> | 29 | extends AbstractBaseService<ConfigurationActMapper, TkConfigurationActEntity> |
30 | - implements YtConfigurationActService { | 30 | + implements TkConfigurationActService { |
31 | 31 | ||
32 | 32 | ||
33 | @Override | 33 | @Override |
@@ -17,8 +17,8 @@ import org.thingsboard.server.dao.yunteng.mapper.ConfigurationCenterMapper; | @@ -17,8 +17,8 @@ import org.thingsboard.server.dao.yunteng.mapper.ConfigurationCenterMapper; | ||
17 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; | 17 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; |
18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
19 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; | 19 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; |
20 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationCenterService; | ||
21 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationContentService; | 20 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationCenterService; |
21 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationContentService; | ||
22 | import java.util.HashSet; | 22 | import java.util.HashSet; |
23 | import java.util.List; | 23 | import java.util.List; |
24 | import java.util.Map; | 24 | import java.util.Map; |
@@ -29,9 +29,9 @@ import java.util.stream.Collectors; | @@ -29,9 +29,9 @@ import java.util.stream.Collectors; | ||
29 | @RequiredArgsConstructor | 29 | @RequiredArgsConstructor |
30 | public class TkConfigurationCenterServiceImpl | 30 | public class TkConfigurationCenterServiceImpl |
31 | extends AbstractBaseService<ConfigurationCenterMapper, TkConfigurationCenterEntity> | 31 | extends AbstractBaseService<ConfigurationCenterMapper, TkConfigurationCenterEntity> |
32 | - implements YtConfigurationCenterService { | 32 | + implements TkConfigurationCenterService { |
33 | private final OrganizationMapper organizationMapper; | 33 | private final OrganizationMapper organizationMapper; |
34 | - private final YtConfigurationContentService ytConfigurationContentService; | 34 | + private final TkConfigurationContentService ytConfigurationContentService; |
35 | private final UserOrganizationMappingService userOrganizationMappingService; | 35 | private final UserOrganizationMappingService userOrganizationMappingService; |
36 | 36 | ||
37 | @Override | 37 | @Override |
@@ -19,7 +19,7 @@ import org.thingsboard.server.dao.yunteng.mapper.ConfigurationContentMapper; | @@ -19,7 +19,7 @@ import org.thingsboard.server.dao.yunteng.mapper.ConfigurationContentMapper; | ||
19 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationDatasourceMapper; | 19 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationDatasourceMapper; |
20 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationEventMapper; | 20 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationEventMapper; |
21 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 21 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
22 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationContentService; | 22 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationContentService; |
23 | import java.util.List; | 23 | import java.util.List; |
24 | import java.util.Set; | 24 | import java.util.Set; |
25 | 25 | ||
@@ -28,7 +28,7 @@ import java.util.Set; | @@ -28,7 +28,7 @@ import java.util.Set; | ||
28 | @RequiredArgsConstructor | 28 | @RequiredArgsConstructor |
29 | public class TkConfigurationContentServiceImpl | 29 | public class TkConfigurationContentServiceImpl |
30 | extends AbstractBaseService<ConfigurationContentMapper, TkConfigurationContentEntity> | 30 | extends AbstractBaseService<ConfigurationContentMapper, TkConfigurationContentEntity> |
31 | - implements YtConfigurationContentService { | 31 | + implements TkConfigurationContentService { |
32 | private final ConfigurationDatasourceMapper datasourceMapper; | 32 | private final ConfigurationDatasourceMapper datasourceMapper; |
33 | private final ConfigurationEventMapper eventMapper; | 33 | private final ConfigurationEventMapper eventMapper; |
34 | private final ConfigurationActMapper actMapper; | 34 | private final ConfigurationActMapper actMapper; |
@@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationDatasourceDTO | @@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationDatasourceDTO | ||
14 | import org.thingsboard.server.dao.yunteng.entities.TkConfigurationDatasourceEntity; | 14 | import org.thingsboard.server.dao.yunteng.entities.TkConfigurationDatasourceEntity; |
15 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationDatasourceMapper; | 15 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationDatasourceMapper; |
16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
17 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationDatasourceService; | 17 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationDatasourceService; |
18 | 18 | ||
19 | import java.util.List; | 19 | import java.util.List; |
20 | import java.util.stream.Collectors; | 20 | import java.util.stream.Collectors; |
@@ -27,7 +27,7 @@ import java.util.stream.Collectors; | @@ -27,7 +27,7 @@ import java.util.stream.Collectors; | ||
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class TkConfigurationDatasourceServiceImpl | 28 | public class TkConfigurationDatasourceServiceImpl |
29 | extends AbstractBaseService<ConfigurationDatasourceMapper, TkConfigurationDatasourceEntity> | 29 | extends AbstractBaseService<ConfigurationDatasourceMapper, TkConfigurationDatasourceEntity> |
30 | - implements YtConfigurationDatasourceService { | 30 | + implements TkConfigurationDatasourceService { |
31 | 31 | ||
32 | @Override | 32 | @Override |
33 | @Transactional(rollbackFor = Exception.class) | 33 | @Transactional(rollbackFor = Exception.class) |
@@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationEventDTO; | @@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.dto.ConfigurationEventDTO; | ||
14 | import org.thingsboard.server.dao.yunteng.entities.TkConfigurationEventEntity; | 14 | import org.thingsboard.server.dao.yunteng.entities.TkConfigurationEventEntity; |
15 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationEventMapper; | 15 | import org.thingsboard.server.dao.yunteng.mapper.ConfigurationEventMapper; |
16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
17 | -import org.thingsboard.server.dao.yunteng.service.YtConfigurationEventService; | 17 | +import org.thingsboard.server.dao.yunteng.service.TkConfigurationEventService; |
18 | 18 | ||
19 | import java.util.List; | 19 | import java.util.List; |
20 | import java.util.stream.Collectors; | 20 | import java.util.stream.Collectors; |
@@ -27,7 +27,7 @@ import java.util.stream.Collectors; | @@ -27,7 +27,7 @@ import java.util.stream.Collectors; | ||
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class TkConfigurationEventServiceImpl | 28 | public class TkConfigurationEventServiceImpl |
29 | extends AbstractBaseService<ConfigurationEventMapper, TkConfigurationEventEntity> | 29 | extends AbstractBaseService<ConfigurationEventMapper, TkConfigurationEventEntity> |
30 | - implements YtConfigurationEventService { | 30 | + implements TkConfigurationEventService { |
31 | 31 | ||
32 | 32 | ||
33 | @Override | 33 | @Override |
@@ -21,7 +21,7 @@ import org.thingsboard.server.dao.yunteng.mapper.DataComponentMapper; | @@ -21,7 +21,7 @@ import org.thingsboard.server.dao.yunteng.mapper.DataComponentMapper; | ||
21 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; | 21 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; |
22 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 22 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
23 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; | 23 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; |
24 | -import org.thingsboard.server.dao.yunteng.service.YtDataBoardService; | 24 | +import org.thingsboard.server.dao.yunteng.service.TkDataBoardService; |
25 | 25 | ||
26 | import java.util.*; | 26 | import java.util.*; |
27 | import java.util.stream.Collectors; | 27 | import java.util.stream.Collectors; |
@@ -29,7 +29,7 @@ import java.util.stream.Collectors; | @@ -29,7 +29,7 @@ import java.util.stream.Collectors; | ||
29 | @Service | 29 | @Service |
30 | @RequiredArgsConstructor | 30 | @RequiredArgsConstructor |
31 | public class TkDataBoardServiceImpl extends AbstractBaseService<DataBoardMapper, TkDataBoardEntity> | 31 | public class TkDataBoardServiceImpl extends AbstractBaseService<DataBoardMapper, TkDataBoardEntity> |
32 | - implements YtDataBoardService { | 32 | + implements TkDataBoardService { |
33 | private final OrganizationMapper organizationMapper; | 33 | private final OrganizationMapper organizationMapper; |
34 | private final UserOrganizationMappingService userOrganizationMappingService; | 34 | private final UserOrganizationMappingService userOrganizationMappingService; |
35 | private final DataComponentMapper dataComponentMapper; | 35 | private final DataComponentMapper dataComponentMapper; |
@@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.utils.JacksonUtil; | @@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.utils.JacksonUtil; | ||
14 | import org.thingsboard.server.dao.yunteng.entities.TkDataComponentEntity; | 14 | import org.thingsboard.server.dao.yunteng.entities.TkDataComponentEntity; |
15 | import org.thingsboard.server.dao.yunteng.mapper.DataComponentMapper; | 15 | import org.thingsboard.server.dao.yunteng.mapper.DataComponentMapper; |
16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 16 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
17 | -import org.thingsboard.server.dao.yunteng.service.YtDataComponentService; | 17 | +import org.thingsboard.server.dao.yunteng.service.TkDataComponentService; |
18 | 18 | ||
19 | import java.util.ArrayList; | 19 | import java.util.ArrayList; |
20 | import java.util.List; | 20 | import java.util.List; |
@@ -25,7 +25,7 @@ import java.util.stream.Collectors; | @@ -25,7 +25,7 @@ import java.util.stream.Collectors; | ||
25 | @Service | 25 | @Service |
26 | public class TkDataComponentServiceImpl | 26 | public class TkDataComponentServiceImpl |
27 | extends AbstractBaseService<DataComponentMapper, TkDataComponentEntity> | 27 | extends AbstractBaseService<DataComponentMapper, TkDataComponentEntity> |
28 | - implements YtDataComponentService { | 28 | + implements TkDataComponentService { |
29 | @Override | 29 | @Override |
30 | public List<DataComponentDTO> getDataComponentsByBoardId(String tenantId, String boardId) { | 30 | public List<DataComponentDTO> getDataComponentsByBoardId(String tenantId, String boardId) { |
31 | List<TkDataComponentEntity> dataComponentList = | 31 | List<TkDataComponentEntity> dataComponentList = |
@@ -21,7 +21,7 @@ import org.thingsboard.server.dao.yunteng.jpa.dao.YtJpaDeviceProfileDao; | @@ -21,7 +21,7 @@ import org.thingsboard.server.dao.yunteng.jpa.dao.YtJpaDeviceProfileDao; | ||
21 | import org.thingsboard.server.dao.yunteng.mapper.DeviceMapper; | 21 | import org.thingsboard.server.dao.yunteng.mapper.DeviceMapper; |
22 | import org.thingsboard.server.dao.yunteng.mapper.TkDeviceProfileMapper; | 22 | import org.thingsboard.server.dao.yunteng.mapper.TkDeviceProfileMapper; |
23 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 23 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
24 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceProfileService; | 24 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceProfileService; |
25 | 25 | ||
26 | import java.util.*; | 26 | import java.util.*; |
27 | 27 | ||
@@ -30,7 +30,7 @@ import java.util.*; | @@ -30,7 +30,7 @@ import java.util.*; | ||
30 | @Slf4j | 30 | @Slf4j |
31 | public class TkDeviceProfileServiceImpl | 31 | public class TkDeviceProfileServiceImpl |
32 | extends AbstractBaseService<TkDeviceProfileMapper, TkDeviceProfileEntity> | 32 | extends AbstractBaseService<TkDeviceProfileMapper, TkDeviceProfileEntity> |
33 | - implements YtDeviceProfileService { | 33 | + implements TkDeviceProfileService { |
34 | 34 | ||
35 | private final DeviceMapper deviceMapper; | 35 | private final DeviceMapper deviceMapper; |
36 | 36 |
@@ -19,7 +19,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkDeviceScriptEntity; | @@ -19,7 +19,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkDeviceScriptEntity; | ||
19 | import org.thingsboard.server.dao.yunteng.mapper.TkDeviceProfileMapper; | 19 | import org.thingsboard.server.dao.yunteng.mapper.TkDeviceProfileMapper; |
20 | import org.thingsboard.server.dao.yunteng.mapper.TkDeviceScriptMapper; | 20 | import org.thingsboard.server.dao.yunteng.mapper.TkDeviceScriptMapper; |
21 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 21 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
22 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceScriptService; | 22 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceScriptService; |
23 | 23 | ||
24 | import java.util.List; | 24 | import java.util.List; |
25 | import java.util.Optional; | 25 | import java.util.Optional; |
@@ -30,7 +30,7 @@ import java.util.stream.Collectors; | @@ -30,7 +30,7 @@ import java.util.stream.Collectors; | ||
30 | @RequiredArgsConstructor | 30 | @RequiredArgsConstructor |
31 | @Slf4j | 31 | @Slf4j |
32 | public class TkDeviceScriptServiceImpl extends AbstractBaseService<TkDeviceScriptMapper, TkDeviceScriptEntity> | 32 | public class TkDeviceScriptServiceImpl extends AbstractBaseService<TkDeviceScriptMapper, TkDeviceScriptEntity> |
33 | - implements YtDeviceScriptService { | 33 | + implements TkDeviceScriptService { |
34 | 34 | ||
35 | 35 | ||
36 | private final TkDeviceProfileMapper profileMapper; | 36 | private final TkDeviceProfileMapper profileMapper; |
@@ -30,7 +30,7 @@ import org.thingsboard.server.dao.yunteng.entities.*; | @@ -30,7 +30,7 @@ import org.thingsboard.server.dao.yunteng.entities.*; | ||
30 | import org.thingsboard.server.dao.yunteng.mapper.*; | 30 | import org.thingsboard.server.dao.yunteng.mapper.*; |
31 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 31 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
32 | import org.thingsboard.server.dao.yunteng.service.ThingsModelService; | 32 | import org.thingsboard.server.dao.yunteng.service.ThingsModelService; |
33 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceService; | 33 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceService; |
34 | 34 | ||
35 | import java.time.LocalDateTime; | 35 | import java.time.LocalDateTime; |
36 | import java.util.*; | 36 | import java.util.*; |
@@ -40,7 +40,7 @@ import java.util.stream.Collectors; | @@ -40,7 +40,7 @@ import java.util.stream.Collectors; | ||
40 | @RequiredArgsConstructor | 40 | @RequiredArgsConstructor |
41 | @Slf4j | 41 | @Slf4j |
42 | public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDevice> | 42 | public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDevice> |
43 | - implements YtDeviceService { | 43 | + implements TkDeviceService { |
44 | 44 | ||
45 | private final DeviceProfileDao deviceProfileDao; | 45 | private final DeviceProfileDao deviceProfileDao; |
46 | 46 |
@@ -13,13 +13,13 @@ import org.thingsboard.server.common.data.yunteng.utils.tree.TreeUtils; | @@ -13,13 +13,13 @@ import org.thingsboard.server.common.data.yunteng.utils.tree.TreeUtils; | ||
13 | import org.thingsboard.server.dao.yunteng.entities.TkDeviceTypeEntity; | 13 | import org.thingsboard.server.dao.yunteng.entities.TkDeviceTypeEntity; |
14 | import org.thingsboard.server.dao.yunteng.mapper.DeviceTypeMapper; | 14 | import org.thingsboard.server.dao.yunteng.mapper.DeviceTypeMapper; |
15 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 15 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
16 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceTypeService; | 16 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceTypeService; |
17 | 17 | ||
18 | import java.util.List; | 18 | import java.util.List; |
19 | 19 | ||
20 | @Service | 20 | @Service |
21 | public class TkDeviceTypeServiceImpl extends AbstractBaseService<DeviceTypeMapper, TkDeviceTypeEntity> | 21 | public class TkDeviceTypeServiceImpl extends AbstractBaseService<DeviceTypeMapper, TkDeviceTypeEntity> |
22 | - implements YtDeviceTypeService { | 22 | + implements TkDeviceTypeService { |
23 | @Override | 23 | @Override |
24 | public List<DeviceTypeDTO> getDeviceTypeTree(String tenantId) { | 24 | public List<DeviceTypeDTO> getDeviceTypeTree(String tenantId) { |
25 | if (StringUtils.isEmpty(tenantId)) { | 25 | if (StringUtils.isEmpty(tenantId)) { |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
16 | import org.thingsboard.server.dao.yunteng.entities.TkFrpInfoEntity; | 16 | import org.thingsboard.server.dao.yunteng.entities.TkFrpInfoEntity; |
17 | import org.thingsboard.server.dao.yunteng.mapper.FrpInfoMapper; | 17 | import org.thingsboard.server.dao.yunteng.mapper.FrpInfoMapper; |
18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtFrpInfoService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkFrpInfoService; |
20 | 20 | ||
21 | import java.net.UnknownHostException; | 21 | import java.net.UnknownHostException; |
22 | import java.time.LocalDateTime; | 22 | import java.time.LocalDateTime; |
@@ -26,7 +26,7 @@ import java.util.Optional; | @@ -26,7 +26,7 @@ import java.util.Optional; | ||
26 | @Service | 26 | @Service |
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class TkFrpInfoServiceImpl extends AbstractBaseService<FrpInfoMapper, TkFrpInfoEntity> | 28 | public class TkFrpInfoServiceImpl extends AbstractBaseService<FrpInfoMapper, TkFrpInfoEntity> |
29 | - implements YtFrpInfoService { | 29 | + implements TkFrpInfoService { |
30 | 30 | ||
31 | private final FrpServerProperties frpServerProperties; | 31 | private final FrpServerProperties frpServerProperties; |
32 | 32 |
@@ -31,8 +31,8 @@ import org.thingsboard.server.dao.yunteng.mapper.DeviceMapper; | @@ -31,8 +31,8 @@ import org.thingsboard.server.dao.yunteng.mapper.DeviceMapper; | ||
31 | import org.thingsboard.server.dao.yunteng.mapper.UserMapper; | 31 | import org.thingsboard.server.dao.yunteng.mapper.UserMapper; |
32 | import org.thingsboard.server.dao.yunteng.mapper.TkAlarmMapper; | 32 | import org.thingsboard.server.dao.yunteng.mapper.TkAlarmMapper; |
33 | import org.thingsboard.server.dao.yunteng.service.HomePageService; | 33 | import org.thingsboard.server.dao.yunteng.service.HomePageService; |
34 | -import org.thingsboard.server.dao.yunteng.service.YtTenantService; | ||
35 | -import org.thingsboard.server.dao.yunteng.service.YtUserService; | 34 | +import org.thingsboard.server.dao.yunteng.service.TkTenantService; |
35 | +import org.thingsboard.server.dao.yunteng.service.TkUserService; | ||
36 | 36 | ||
37 | import java.time.LocalDate; | 37 | import java.time.LocalDate; |
38 | import java.time.LocalDateTime; | 38 | import java.time.LocalDateTime; |
@@ -50,7 +50,7 @@ public class TkHomePageServiceImpl implements HomePageService { | @@ -50,7 +50,7 @@ public class TkHomePageServiceImpl implements HomePageService { | ||
50 | 50 | ||
51 | private final DeviceMapper deviceMapper; | 51 | private final DeviceMapper deviceMapper; |
52 | 52 | ||
53 | - private final YtTenantService tenantService; | 53 | + private final TkTenantService tenantService; |
54 | 54 | ||
55 | private final UserMapper userMapper; | 55 | private final UserMapper userMapper; |
56 | 56 | ||
@@ -60,7 +60,7 @@ public class TkHomePageServiceImpl implements HomePageService { | @@ -60,7 +60,7 @@ public class TkHomePageServiceImpl implements HomePageService { | ||
60 | 60 | ||
61 | private final TimeseriesService timeseriesService; | 61 | private final TimeseriesService timeseriesService; |
62 | 62 | ||
63 | - private final YtUserService ytUserService; | 63 | + private final TkUserService tkUserService; |
64 | 64 | ||
65 | private final TkAlarmMapper ytJpaAarmDao; | 65 | private final TkAlarmMapper ytJpaAarmDao; |
66 | 66 | ||
@@ -380,7 +380,7 @@ public class TkHomePageServiceImpl implements HomePageService { | @@ -380,7 +380,7 @@ public class TkHomePageServiceImpl implements HomePageService { | ||
380 | tsValueCompletableFuture = tenantService.findTenantsByTs(startTime, endTime, ts); | 380 | tsValueCompletableFuture = tenantService.findTenantsByTs(startTime, endTime, ts); |
381 | } | 381 | } |
382 | if (trend == TrendType.CUSTOMER_TREND) { | 382 | if (trend == TrendType.CUSTOMER_TREND) { |
383 | - tsValueCompletableFuture = ytUserService.findUsersAsyncByTs(startTime, endTime, ts); | 383 | + tsValueCompletableFuture = tkUserService.findUsersAsyncByTs(startTime, endTime, ts); |
384 | } | 384 | } |
385 | } | 385 | } |
386 | futures.add(tsValueCompletableFuture); | 386 | futures.add(tsValueCompletableFuture); |
@@ -11,7 +11,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -11,7 +11,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
11 | import org.thingsboard.server.dao.yunteng.entities.TkMailLogEntity; | 11 | import org.thingsboard.server.dao.yunteng.entities.TkMailLogEntity; |
12 | import org.thingsboard.server.dao.yunteng.mapper.MaiLogMapper; | 12 | import org.thingsboard.server.dao.yunteng.mapper.MaiLogMapper; |
13 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 13 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
14 | -import org.thingsboard.server.dao.yunteng.service.YtMailLogService; | 14 | +import org.thingsboard.server.dao.yunteng.service.TkMailLogService; |
15 | 15 | ||
16 | import java.time.LocalDateTime; | 16 | import java.time.LocalDateTime; |
17 | import java.time.format.DateTimeFormatter; | 17 | import java.time.format.DateTimeFormatter; |
@@ -22,7 +22,7 @@ import java.util.Set; | @@ -22,7 +22,7 @@ import java.util.Set; | ||
22 | @Service | 22 | @Service |
23 | @RequiredArgsConstructor | 23 | @RequiredArgsConstructor |
24 | public class TkMailLogServiceImpl extends AbstractBaseService<MaiLogMapper, TkMailLogEntity> | 24 | public class TkMailLogServiceImpl extends AbstractBaseService<MaiLogMapper, TkMailLogEntity> |
25 | - implements YtMailLogService { | 25 | + implements TkMailLogService { |
26 | @Override | 26 | @Override |
27 | public YtPageData<MailLogDTO> page(String tenantId, Map<String, Object> queryMap) { | 27 | public YtPageData<MailLogDTO> page(String tenantId, Map<String, Object> queryMap) { |
28 | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); | 28 | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
@@ -24,7 +24,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkMessageTemplateEntity; | @@ -24,7 +24,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkMessageTemplateEntity; | ||
24 | import org.thingsboard.server.dao.yunteng.mapper.MaiLogMapper; | 24 | import org.thingsboard.server.dao.yunteng.mapper.MaiLogMapper; |
25 | import org.thingsboard.server.dao.yunteng.mapper.MessageConfigMapper; | 25 | import org.thingsboard.server.dao.yunteng.mapper.MessageConfigMapper; |
26 | import org.thingsboard.server.dao.yunteng.mapper.MessageTemplateMapper; | 26 | import org.thingsboard.server.dao.yunteng.mapper.MessageTemplateMapper; |
27 | -import org.thingsboard.server.dao.yunteng.service.YtMailService; | 27 | +import org.thingsboard.server.dao.yunteng.service.TkMailService; |
28 | 28 | ||
29 | import java.io.File; | 29 | import java.io.File; |
30 | import java.io.IOException; | 30 | import java.io.IOException; |
@@ -35,7 +35,7 @@ import java.util.Properties; | @@ -35,7 +35,7 @@ import java.util.Properties; | ||
35 | @Slf4j | 35 | @Slf4j |
36 | @Service | 36 | @Service |
37 | @RequiredArgsConstructor | 37 | @RequiredArgsConstructor |
38 | -public class TkMailServiceImpl implements YtMailService { | 38 | +public class TkMailServiceImpl implements TkMailService { |
39 | 39 | ||
40 | private final MessageTemplateMapper messageTemplateMapper; | 40 | private final MessageTemplateMapper messageTemplateMapper; |
41 | 41 |
@@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -16,7 +16,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
16 | import org.thingsboard.server.dao.yunteng.entities.TkMessageConfigEntity; | 16 | import org.thingsboard.server.dao.yunteng.entities.TkMessageConfigEntity; |
17 | import org.thingsboard.server.dao.yunteng.mapper.MessageConfigMapper; | 17 | import org.thingsboard.server.dao.yunteng.mapper.MessageConfigMapper; |
18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 18 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
19 | -import org.thingsboard.server.dao.yunteng.service.YtMessageConfigService; | 19 | +import org.thingsboard.server.dao.yunteng.service.TkMessageConfigService; |
20 | 20 | ||
21 | import java.util.List; | 21 | import java.util.List; |
22 | import java.util.Map; | 22 | import java.util.Map; |
@@ -27,7 +27,7 @@ import java.util.Set; | @@ -27,7 +27,7 @@ import java.util.Set; | ||
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class TkMessageConfigServiceImpl | 28 | public class TkMessageConfigServiceImpl |
29 | extends AbstractBaseService<MessageConfigMapper, TkMessageConfigEntity> | 29 | extends AbstractBaseService<MessageConfigMapper, TkMessageConfigEntity> |
30 | - implements YtMessageConfigService { | 30 | + implements TkMessageConfigService { |
31 | 31 | ||
32 | @Override | 32 | @Override |
33 | public YtPageData<MessageConfigDTO> page(String tenantId, Map<String, Object> queryMap) { | 33 | public YtPageData<MessageConfigDTO> page(String tenantId, Map<String, Object> queryMap) { |
@@ -13,7 +13,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -13,7 +13,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
13 | import org.thingsboard.server.dao.yunteng.entities.TkMessageTemplateEntity; | 13 | import org.thingsboard.server.dao.yunteng.entities.TkMessageTemplateEntity; |
14 | import org.thingsboard.server.dao.yunteng.mapper.MessageTemplateMapper; | 14 | import org.thingsboard.server.dao.yunteng.mapper.MessageTemplateMapper; |
15 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 15 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
16 | -import org.thingsboard.server.dao.yunteng.service.YtMessageTemplateService; | 16 | +import org.thingsboard.server.dao.yunteng.service.TkMessageTemplateService; |
17 | 17 | ||
18 | import java.util.List; | 18 | import java.util.List; |
19 | import java.util.Map; | 19 | import java.util.Map; |
@@ -24,7 +24,7 @@ import java.util.Set; | @@ -24,7 +24,7 @@ import java.util.Set; | ||
24 | @RequiredArgsConstructor | 24 | @RequiredArgsConstructor |
25 | public class TkMessageTemplateServiceImpl | 25 | public class TkMessageTemplateServiceImpl |
26 | extends AbstractBaseService<MessageTemplateMapper, TkMessageTemplateEntity> | 26 | extends AbstractBaseService<MessageTemplateMapper, TkMessageTemplateEntity> |
27 | - implements YtMessageTemplateService { | 27 | + implements TkMessageTemplateService { |
28 | @Override | 28 | @Override |
29 | public YtPageData<MessageTemplateDTO> page(Map<String, Object> queryMap) { | 29 | public YtPageData<MessageTemplateDTO> page(Map<String, Object> queryMap) { |
30 | IPage<TkMessageTemplateEntity> configIPage = getPage(queryMap, FastIotConstants.DefaultOrder.CREATE_TIME,false); | 30 | IPage<TkMessageTemplateEntity> configIPage = getPage(queryMap, FastIotConstants.DefaultOrder.CREATE_TIME,false); |
@@ -7,12 +7,12 @@ import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; | @@ -7,12 +7,12 @@ import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; | ||
7 | import org.thingsboard.server.common.data.yunteng.dto.request.EmailReqDTO; | 7 | import org.thingsboard.server.common.data.yunteng.dto.request.EmailReqDTO; |
8 | import org.thingsboard.server.common.data.yunteng.dto.request.SmsReqDTO; | 8 | import org.thingsboard.server.common.data.yunteng.dto.request.SmsReqDTO; |
9 | import org.thingsboard.server.common.data.yunteng.enums.*; | 9 | import org.thingsboard.server.common.data.yunteng.enums.*; |
10 | -import org.thingsboard.server.common.data.yunteng.utils.YtDateTimeUtils; | 10 | +import org.thingsboard.server.common.data.yunteng.utils.DateTimeUtils; |
11 | import org.thingsboard.server.dao.yunteng.entities.*; | 11 | import org.thingsboard.server.dao.yunteng.entities.*; |
12 | import org.thingsboard.server.dao.yunteng.mapper.*; | 12 | import org.thingsboard.server.dao.yunteng.mapper.*; |
13 | -import org.thingsboard.server.dao.yunteng.service.YtMailService; | ||
14 | -import org.thingsboard.server.dao.yunteng.service.YtNoticeService; | ||
15 | -import org.thingsboard.server.dao.yunteng.service.YtSmsService; | 13 | +import org.thingsboard.server.dao.yunteng.service.TkMailService; |
14 | +import org.thingsboard.server.dao.yunteng.service.TkNoticeService; | ||
15 | +import org.thingsboard.server.dao.yunteng.service.TkSmsService; | ||
16 | 16 | ||
17 | import java.util.*; | 17 | import java.util.*; |
18 | import java.util.stream.Collectors; | 18 | import java.util.stream.Collectors; |
@@ -29,7 +29,7 @@ import java.util.stream.Collectors; | @@ -29,7 +29,7 @@ import java.util.stream.Collectors; | ||
29 | */ | 29 | */ |
30 | @Service | 30 | @Service |
31 | @RequiredArgsConstructor | 31 | @RequiredArgsConstructor |
32 | -public class TkNoticeServiceImpl implements YtNoticeService { | 32 | +public class TkNoticeServiceImpl implements TkNoticeService { |
33 | 33 | ||
34 | private final DeviceMapper deviceMapper; | 34 | private final DeviceMapper deviceMapper; |
35 | private final OrganizationMapper organizationMapper; | 35 | private final OrganizationMapper organizationMapper; |
@@ -37,8 +37,8 @@ public class TkNoticeServiceImpl implements YtNoticeService { | @@ -37,8 +37,8 @@ public class TkNoticeServiceImpl implements YtNoticeService { | ||
37 | private final AlarmContactMapper alarmContactMapper; | 37 | private final AlarmContactMapper alarmContactMapper; |
38 | private final MessageTemplateMapper messageTemplateMapper; | 38 | private final MessageTemplateMapper messageTemplateMapper; |
39 | 39 | ||
40 | - private final YtSmsService smsService; | ||
41 | - private final YtMailService mailService; | 40 | + private final TkSmsService smsService; |
41 | + private final TkMailService mailService; | ||
42 | 42 | ||
43 | @Override | 43 | @Override |
44 | public void alert(String profileId, AlarmInfoDTO alarmInfo) { | 44 | public void alert(String profileId, AlarmInfoDTO alarmInfo) { |
@@ -145,7 +145,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | @@ -145,7 +145,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | ||
145 | params.put("device_name", alarmInfo.getDeviceName()); | 145 | params.put("device_name", alarmInfo.getDeviceName()); |
146 | params.put("severity", alarmInfo.getSeverity()); | 146 | params.put("severity", alarmInfo.getSeverity()); |
147 | params.put("organization", organization != null ? organization.getName() : ""); | 147 | params.put("organization", organization != null ? organization.getName() : ""); |
148 | - params.put("createtime", YtDateTimeUtils.formate(alarmInfo.getCreateTs())); | 148 | + params.put("createtime", DateTimeUtils.format(alarmInfo.getCreateTs())); |
149 | info.setParams(params); | 149 | info.setParams(params); |
150 | contacts.stream().parallel().forEach(item -> { | 150 | contacts.stream().parallel().forEach(item -> { |
151 | if (!item.getPhone().isEmpty()) { | 151 | if (!item.getPhone().isEmpty()) { |
@@ -175,7 +175,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | @@ -175,7 +175,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | ||
175 | info.setTo(emailReceivers.toArray(new String[emailReceivers.size()])); | 175 | info.setTo(emailReceivers.toArray(new String[emailReceivers.size()])); |
176 | info.setSubject(String.format("【%s】告警通知", alarmInfo.getDeviceName())); | 176 | info.setSubject(String.format("【%s】告警通知", alarmInfo.getDeviceName())); |
177 | String body = String.format("%s位于【%s】的设备【%s】触发【%s】级的【%s】,请尽快处理!" | 177 | String body = String.format("%s位于【%s】的设备【%s】触发【%s】级的【%s】,请尽快处理!" |
178 | - , YtDateTimeUtils.formate(alarmInfo.getCreateTs()) | 178 | + , DateTimeUtils.format(alarmInfo.getCreateTs()) |
179 | , organization != null ? organization.getName() : "" | 179 | , organization != null ? organization.getName() : "" |
180 | , alarmInfo.getDeviceName() | 180 | , alarmInfo.getDeviceName() |
181 | , alarmInfo.getSeverity() | 181 | , alarmInfo.getSeverity() |
@@ -207,7 +207,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | @@ -207,7 +207,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | ||
207 | params.put("device_name", alarmInfo.getDeviceName()); | 207 | params.put("device_name", alarmInfo.getDeviceName()); |
208 | params.put("severity", alarmInfo.getSeverity()); | 208 | params.put("severity", alarmInfo.getSeverity()); |
209 | params.put("organization", organization != null ? organization.getName() : ""); | 209 | params.put("organization", organization != null ? organization.getName() : ""); |
210 | - params.put("createtime", YtDateTimeUtils.formate(alarmInfo.getCreateTs())); | 210 | + params.put("createtime", DateTimeUtils.format(alarmInfo.getCreateTs())); |
211 | info.setParams(params); | 211 | info.setParams(params); |
212 | info.setTemplatePurpose(MsgTemplatePurposeEnum.FOR_ALARM_NOTICE.name()); | 212 | info.setTemplatePurpose(MsgTemplatePurposeEnum.FOR_ALARM_NOTICE.name()); |
213 | contacts.stream().parallel().forEach(item -> { | 213 | contacts.stream().parallel().forEach(item -> { |
@@ -237,7 +237,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | @@ -237,7 +237,7 @@ public class TkNoticeServiceImpl implements YtNoticeService { | ||
237 | params.put("device_name", alarmInfo.getDeviceName()); | 237 | params.put("device_name", alarmInfo.getDeviceName()); |
238 | params.put("severity", alarmInfo.getSeverity()); | 238 | params.put("severity", alarmInfo.getSeverity()); |
239 | params.put("organization", organization != null ? organization.getName() : ""); | 239 | params.put("organization", organization != null ? organization.getName() : ""); |
240 | - params.put("createtime", YtDateTimeUtils.formate(alarmInfo.getCreateTs())); | 240 | + params.put("createtime", DateTimeUtils.format(alarmInfo.getCreateTs())); |
241 | info.setParams(params); | 241 | info.setParams(params); |
242 | info.setTemplatePurpose(MsgTemplatePurposeEnum.FOR_ALARM_NOTICE.name()); | 242 | info.setTemplatePurpose(MsgTemplatePurposeEnum.FOR_ALARM_NOTICE.name()); |
243 | contacts.stream().parallel().forEach(item -> { | 243 | contacts.stream().parallel().forEach(item -> { |
@@ -23,7 +23,7 @@ import java.util.List; | @@ -23,7 +23,7 @@ import java.util.List; | ||
23 | @Service | 23 | @Service |
24 | @RequiredArgsConstructor | 24 | @RequiredArgsConstructor |
25 | public class TkOpinionServiceImpl extends AbstractBaseService<TkOpinionMapper, TkOpinionEntity> | 25 | public class TkOpinionServiceImpl extends AbstractBaseService<TkOpinionMapper, TkOpinionEntity> |
26 | - implements YtOpinionService { | 26 | + implements TkOpinionService { |
27 | 27 | ||
28 | private final UserOrganizationMappingService userOrganizationMappingService; | 28 | private final UserOrganizationMappingService userOrganizationMappingService; |
29 | 29 |
@@ -18,7 +18,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tree.TreeUtils; | @@ -18,7 +18,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tree.TreeUtils; | ||
18 | import org.thingsboard.server.dao.yunteng.entities.*; | 18 | import org.thingsboard.server.dao.yunteng.entities.*; |
19 | import org.thingsboard.server.dao.yunteng.mapper.*; | 19 | import org.thingsboard.server.dao.yunteng.mapper.*; |
20 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 20 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
21 | -import org.thingsboard.server.dao.yunteng.service.YtOrganizationService; | 21 | +import org.thingsboard.server.dao.yunteng.service.TkOrganizationService; |
22 | 22 | ||
23 | import java.util.*; | 23 | import java.util.*; |
24 | import java.util.stream.Collectors; | 24 | import java.util.stream.Collectors; |
@@ -26,7 +26,7 @@ import java.util.stream.Collectors; | @@ -26,7 +26,7 @@ import java.util.stream.Collectors; | ||
26 | @Service | 26 | @Service |
27 | @RequiredArgsConstructor | 27 | @RequiredArgsConstructor |
28 | public class TkOrganizationServiceImpl extends AbstractBaseService<OrganizationMapper, TkOrganizationEntity> | 28 | public class TkOrganizationServiceImpl extends AbstractBaseService<OrganizationMapper, TkOrganizationEntity> |
29 | - implements YtOrganizationService { | 29 | + implements TkOrganizationService { |
30 | 30 | ||
31 | private final UserOrganizationMappingMapper userOrganizationMappingMapper; | 31 | private final UserOrganizationMappingMapper userOrganizationMappingMapper; |
32 | private final UserMapper userMapper; | 32 | private final UserMapper userMapper; |
@@ -33,10 +33,10 @@ import java.util.stream.Collectors; | @@ -33,10 +33,10 @@ import java.util.stream.Collectors; | ||
33 | @RequiredArgsConstructor | 33 | @RequiredArgsConstructor |
34 | public class TkReportFromConfigServiceImpl | 34 | public class TkReportFromConfigServiceImpl |
35 | extends AbstractBaseService<ReportFormConfigMapper, TkReportFormConfigEntity> | 35 | extends AbstractBaseService<ReportFormConfigMapper, TkReportFormConfigEntity> |
36 | - implements YtReportFormConfigService { | 36 | + implements TkReportFormConfigService { |
37 | private final OrganizationMapper organizationMapper; | 37 | private final OrganizationMapper organizationMapper; |
38 | - private final YtSysJobService ytSysJobService; | ||
39 | - private final YtReportGenerateRecordService ytReportGenerateRecordService; | 38 | + private final TkSysJobService tkSysJobService; |
39 | + private final TkReportGenerateRecordService tkReportGenerateRecordService; | ||
40 | private final UserOrganizationMappingService userOrganizationMappingService; | 40 | private final UserOrganizationMappingService userOrganizationMappingService; |
41 | 41 | ||
42 | @Override | 42 | @Override |
@@ -196,14 +196,14 @@ public class TkReportFromConfigServiceImpl | @@ -196,14 +196,14 @@ public class TkReportFromConfigServiceImpl | ||
196 | Objects.equals(reportFormConfig.getExecuteWay(), FastIotConstants.MagicNumber.ZERO); | 196 | Objects.equals(reportFormConfig.getExecuteWay(), FastIotConstants.MagicNumber.ZERO); |
197 | String cronExpression = reportFormConfig.getExecuteContent(); | 197 | String cronExpression = reportFormConfig.getExecuteContent(); |
198 | // 查看之前是否创建了定时任务 | 198 | // 查看之前是否创建了定时任务 |
199 | - SysJobDTO sysJobDTO = ytSysJobService.findSysJobBySourceId(reportFormConfig.getId()); | 199 | + SysJobDTO sysJobDTO = tkSysJobService.findSysJobBySourceId(reportFormConfig.getId()); |
200 | boolean enableStatus = | 200 | boolean enableStatus = |
201 | Objects.equals(reportFormConfig.getStatus(), StatusEnum.ENABLE.getIndex()); | 201 | Objects.equals(reportFormConfig.getStatus(), StatusEnum.ENABLE.getIndex()); |
202 | if (null != sysJobDTO) { | 202 | if (null != sysJobDTO) { |
203 | // 立即执行 | 203 | // 立即执行 |
204 | if (isNowExecute) { | 204 | if (isNowExecute) { |
205 | // 删除定时任务 | 205 | // 删除定时任务 |
206 | - ytSysJobService.deleteJob(sysJobDTO); | 206 | + tkSysJobService.deleteJob(sysJobDTO); |
207 | if (enableStatus) { | 207 | if (enableStatus) { |
208 | // 立即执行报表生成,并创建一条报表执行记录 | 208 | // 立即执行报表生成,并创建一条报表执行记录 |
209 | // 生成Excel,并更新报表执行记录 | 209 | // 生成Excel,并更新报表执行记录 |
@@ -216,7 +216,7 @@ public class TkReportFromConfigServiceImpl | @@ -216,7 +216,7 @@ public class TkReportFromConfigServiceImpl | ||
216 | reportFormConfig.getStatus() == null | 216 | reportFormConfig.getStatus() == null |
217 | ? StatusEnum.DISABLE.getIndex() | 217 | ? StatusEnum.DISABLE.getIndex() |
218 | : reportFormConfig.getStatus()); | 218 | : reportFormConfig.getStatus()); |
219 | - ytSysJobService.saveOrUpdateJob(sysJobDTO); | 219 | + tkSysJobService.saveOrUpdateJob(sysJobDTO); |
220 | } | 220 | } |
221 | } else { | 221 | } else { |
222 | if (isNowExecute) { | 222 | if (isNowExecute) { |
@@ -236,7 +236,7 @@ public class TkReportFromConfigServiceImpl | @@ -236,7 +236,7 @@ public class TkReportFromConfigServiceImpl | ||
236 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | 236 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); |
237 | } | 237 | } |
238 | // 检查cron表达式是否标准 | 238 | // 检查cron表达式是否标准 |
239 | - if (!ytSysJobService.checkCronExpressionIsValid(cronExpression)) { | 239 | + if (!tkSysJobService.checkCronExpressionIsValid(cronExpression)) { |
240 | throw new YtDataValidationException(ErrorMessage.CRON_INVALID.getMessage()); | 240 | throw new YtDataValidationException(ErrorMessage.CRON_INVALID.getMessage()); |
241 | } | 241 | } |
242 | } | 242 | } |
@@ -259,7 +259,7 @@ public class TkReportFromConfigServiceImpl | @@ -259,7 +259,7 @@ public class TkReportFromConfigServiceImpl | ||
259 | sysJobDTO.setCronExpression(cronExpression); | 259 | sysJobDTO.setCronExpression(cronExpression); |
260 | sysJobDTO.setConcurrent(StatusEnum.ENABLE.getIndex()); | 260 | sysJobDTO.setConcurrent(StatusEnum.ENABLE.getIndex()); |
261 | sysJobDTO.setInvokeTarget("reportTask.generateReport(\"" + reportId + "\")"); | 261 | sysJobDTO.setInvokeTarget("reportTask.generateReport(\"" + reportId + "\")"); |
262 | - ytSysJobService.saveOrUpdateJob(sysJobDTO); | 262 | + tkSysJobService.saveOrUpdateJob(sysJobDTO); |
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
@@ -271,9 +271,9 @@ public class TkReportFromConfigServiceImpl | @@ -271,9 +271,9 @@ public class TkReportFromConfigServiceImpl | ||
271 | private void checkAndDeleteJob(String id) throws SchedulerException { | 271 | private void checkAndDeleteJob(String id) throws SchedulerException { |
272 | TkReportFormConfigEntity config = baseMapper.selectById(id); | 272 | TkReportFormConfigEntity config = baseMapper.selectById(id); |
273 | if (null != config) { | 273 | if (null != config) { |
274 | - SysJobDTO sysJobDTO = ytSysJobService.findSysJobBySourceId(id); | 274 | + SysJobDTO sysJobDTO = tkSysJobService.findSysJobBySourceId(id); |
275 | if (null != sysJobDTO) { | 275 | if (null != sysJobDTO) { |
276 | - ytSysJobService.deleteJob(sysJobDTO); | 276 | + tkSysJobService.deleteJob(sysJobDTO); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | } | 279 | } |
@@ -299,11 +299,11 @@ public class TkReportFromConfigServiceImpl | @@ -299,11 +299,11 @@ public class TkReportFromConfigServiceImpl | ||
299 | } | 299 | } |
300 | // 立即执行报表生成,并创建一条报表执行记录 | 300 | // 立即执行报表生成,并创建一条报表执行记录 |
301 | ReportGenerateRecordDTO recordDTO = | 301 | ReportGenerateRecordDTO recordDTO = |
302 | - ytReportGenerateRecordService.generateReportRecord(reportFormConfigDTO, null); | 302 | + tkReportGenerateRecordService.generateReportRecord(reportFormConfigDTO, null); |
303 | // 生成Excel,并更新报表执行记录 | 303 | // 生成Excel,并更新报表执行记录 |
304 | int surplus = reportFormConfigDTO.getExecuteAttributes().size(); | 304 | int surplus = reportFormConfigDTO.getExecuteAttributes().size(); |
305 | for (ExecuteAttributesDTO dto : reportFormConfigDTO.getExecuteAttributes()) { | 305 | for (ExecuteAttributesDTO dto : reportFormConfigDTO.getExecuteAttributes()) { |
306 | - ytReportGenerateRecordService.generateExcelUpdateReportRecord( | 306 | + tkReportGenerateRecordService.generateExcelUpdateReportRecord( |
307 | reportFormConfigDTO, dto, recordDTO.getId(), surplus); | 307 | reportFormConfigDTO, dto, recordDTO.getId(), surplus); |
308 | surplus--; | 308 | surplus--; |
309 | } | 309 | } |
@@ -38,8 +38,8 @@ import org.thingsboard.server.dao.yunteng.entities.TkReportGenerateRecordEntity; | @@ -38,8 +38,8 @@ import org.thingsboard.server.dao.yunteng.entities.TkReportGenerateRecordEntity; | ||
38 | import org.thingsboard.server.dao.yunteng.mapper.ReportGenerateRecordMapper; | 38 | import org.thingsboard.server.dao.yunteng.mapper.ReportGenerateRecordMapper; |
39 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 39 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
40 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; | 40 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; |
41 | -import org.thingsboard.server.dao.yunteng.service.YtOrganizationService; | ||
42 | -import org.thingsboard.server.dao.yunteng.service.YtReportGenerateRecordService; | 41 | +import org.thingsboard.server.dao.yunteng.service.TkOrganizationService; |
42 | +import org.thingsboard.server.dao.yunteng.service.TkReportGenerateRecordService; | ||
43 | 43 | ||
44 | import java.io.ByteArrayInputStream; | 44 | import java.io.ByteArrayInputStream; |
45 | import java.io.ByteArrayOutputStream; | 45 | import java.io.ByteArrayOutputStream; |
@@ -56,11 +56,11 @@ import java.util.stream.Collectors; | @@ -56,11 +56,11 @@ import java.util.stream.Collectors; | ||
56 | @Slf4j | 56 | @Slf4j |
57 | public class TkReportGenerateRecordServiceImpl | 57 | public class TkReportGenerateRecordServiceImpl |
58 | extends AbstractBaseService<ReportGenerateRecordMapper, TkReportGenerateRecordEntity> | 58 | extends AbstractBaseService<ReportGenerateRecordMapper, TkReportGenerateRecordEntity> |
59 | - implements YtReportGenerateRecordService { | 59 | + implements TkReportGenerateRecordService { |
60 | 60 | ||
61 | private static final String CONTENT_TYPE = | 61 | private static final String CONTENT_TYPE = |
62 | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; | 62 | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; |
63 | - private final YtOrganizationService ytOrganizationService; | 63 | + private final TkOrganizationService tkOrganizationService; |
64 | private final TimeseriesService tsService; | 64 | private final TimeseriesService tsService; |
65 | private final FileStorageService fileStorageService; | 65 | private final FileStorageService fileStorageService; |
66 | private final UserOrganizationMappingService userOrganizationMappingService; | 66 | private final UserOrganizationMappingService userOrganizationMappingService; |
@@ -149,7 +149,7 @@ public class TkReportGenerateRecordServiceImpl | @@ -149,7 +149,7 @@ public class TkReportGenerateRecordServiceImpl | ||
149 | throw new YtDataValidationException(ErrorMessage.EXPORT_CONFIG_NON_EXISTENT.getMessage()); | 149 | throw new YtDataValidationException(ErrorMessage.EXPORT_CONFIG_NON_EXISTENT.getMessage()); |
150 | } | 150 | } |
151 | OrganizationDTO organizationDTO = | 151 | OrganizationDTO organizationDTO = |
152 | - ytOrganizationService.findOrganizationById( | 152 | + tkOrganizationService.findOrganizationById( |
153 | reportFormConfigDTO.getOrganizationId(), reportFormConfigDTO.getTenantId()); | 153 | reportFormConfigDTO.getOrganizationId(), reportFormConfigDTO.getTenantId()); |
154 | // 创建报表生成记录 | 154 | // 创建报表生成记录 |
155 | ReportGenerateRecordDTO dto = new ReportGenerateRecordDTO(); | 155 | ReportGenerateRecordDTO dto = new ReportGenerateRecordDTO(); |
@@ -12,7 +12,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkRpcRecordEntity; | @@ -12,7 +12,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkRpcRecordEntity; | ||
12 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; | 12 | import org.thingsboard.server.dao.yunteng.mapper.OrganizationMapper; |
13 | import org.thingsboard.server.dao.yunteng.mapper.TkRpcRecordMapper; | 13 | import org.thingsboard.server.dao.yunteng.mapper.TkRpcRecordMapper; |
14 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 14 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
15 | -import org.thingsboard.server.dao.yunteng.service.YtRpcRecordService; | 15 | +import org.thingsboard.server.dao.yunteng.service.TkRpcRecordService; |
16 | 16 | ||
17 | import java.util.ArrayList; | 17 | import java.util.ArrayList; |
18 | import java.util.List; | 18 | import java.util.List; |
@@ -25,7 +25,7 @@ import java.util.stream.Collectors; | @@ -25,7 +25,7 @@ import java.util.stream.Collectors; | ||
25 | @Service | 25 | @Service |
26 | @RequiredArgsConstructor | 26 | @RequiredArgsConstructor |
27 | public class TkRpcRecordServiceImpl extends AbstractBaseService<TkRpcRecordMapper, TkRpcRecordEntity> | 27 | public class TkRpcRecordServiceImpl extends AbstractBaseService<TkRpcRecordMapper, TkRpcRecordEntity> |
28 | - implements YtRpcRecordService { | 28 | + implements TkRpcRecordService { |
29 | 29 | ||
30 | 30 | ||
31 | private final OrganizationMapper organizationMapper; | 31 | private final OrganizationMapper organizationMapper; |
@@ -7,7 +7,7 @@ import org.thingsboard.server.common.data.rule.RuleChain; | @@ -7,7 +7,7 @@ import org.thingsboard.server.common.data.rule.RuleChain; | ||
7 | import org.thingsboard.server.common.data.rule.RuleChainType; | 7 | import org.thingsboard.server.common.data.rule.RuleChainType; |
8 | import org.thingsboard.server.dao.service.Validator; | 8 | import org.thingsboard.server.dao.service.Validator; |
9 | import org.thingsboard.server.dao.yunteng.jpa.dao.YtJpaRuleChainDao; | 9 | import org.thingsboard.server.dao.yunteng.jpa.dao.YtJpaRuleChainDao; |
10 | -import org.thingsboard.server.dao.yunteng.service.YtRuleChainService; | 10 | +import org.thingsboard.server.dao.yunteng.service.TkRuleChainService; |
11 | 11 | ||
12 | import java.util.List; | 12 | import java.util.List; |
13 | 13 | ||
@@ -23,7 +23,7 @@ import java.util.List; | @@ -23,7 +23,7 @@ import java.util.List; | ||
23 | */ | 23 | */ |
24 | @Service | 24 | @Service |
25 | @RequiredArgsConstructor | 25 | @RequiredArgsConstructor |
26 | -public class TkRuleChainServiceImpl implements YtRuleChainService { | 26 | +public class TkRuleChainServiceImpl implements TkRuleChainService { |
27 | private final YtJpaRuleChainDao ruleChainDao; | 27 | private final YtJpaRuleChainDao ruleChainDao; |
28 | 28 | ||
29 | 29 |
@@ -31,7 +31,7 @@ import org.thingsboard.server.dao.yunteng.mapper.MessageConfigMapper; | @@ -31,7 +31,7 @@ import org.thingsboard.server.dao.yunteng.mapper.MessageConfigMapper; | ||
31 | import org.thingsboard.server.dao.yunteng.mapper.MessageTemplateMapper; | 31 | import org.thingsboard.server.dao.yunteng.mapper.MessageTemplateMapper; |
32 | import org.thingsboard.server.dao.yunteng.mapper.SmsLogMapper; | 32 | import org.thingsboard.server.dao.yunteng.mapper.SmsLogMapper; |
33 | import org.thingsboard.server.dao.yunteng.mapper.UserMapper; | 33 | import org.thingsboard.server.dao.yunteng.mapper.UserMapper; |
34 | -import org.thingsboard.server.dao.yunteng.service.YtSmsService; | 34 | +import org.thingsboard.server.dao.yunteng.service.TkSmsService; |
35 | 35 | ||
36 | import java.time.LocalDateTime; | 36 | import java.time.LocalDateTime; |
37 | import java.util.LinkedHashMap; | 37 | import java.util.LinkedHashMap; |
@@ -43,7 +43,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.FastIotConstan | @@ -43,7 +43,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.FastIotConstan | ||
43 | @Slf4j | 43 | @Slf4j |
44 | @Service | 44 | @Service |
45 | @RequiredArgsConstructor | 45 | @RequiredArgsConstructor |
46 | -public class TkSmsServiceImpl implements YtSmsService { | 46 | +public class TkSmsServiceImpl implements TkSmsService { |
47 | 47 | ||
48 | private final MessageTemplateMapper messageTemplateMapper; | 48 | private final MessageTemplateMapper messageTemplateMapper; |
49 | 49 |
@@ -30,20 +30,20 @@ import java.util.stream.Collectors; | @@ -30,20 +30,20 @@ import java.util.stream.Collectors; | ||
30 | @Service | 30 | @Service |
31 | @RequiredArgsConstructor | 31 | @RequiredArgsConstructor |
32 | public class TkTenantServiceImpl extends AbstractBaseService<TenantMapper, SysTenantEntity> | 32 | public class TkTenantServiceImpl extends AbstractBaseService<TenantMapper, SysTenantEntity> |
33 | - implements YtTenantService { | 33 | + implements TkTenantService { |
34 | 34 | ||
35 | private final MenuMapper menuMapper; | 35 | private final MenuMapper menuMapper; |
36 | private final RoleMapper roleMapper; | 36 | private final RoleMapper roleMapper; |
37 | private final UserMapper userMapper; | 37 | private final UserMapper userMapper; |
38 | private final TenantMenuMapper tenantMenuMapper; | 38 | private final TenantMenuMapper tenantMenuMapper; |
39 | private final TenantRoleMapper tenantRoleMapper; | 39 | private final TenantRoleMapper tenantRoleMapper; |
40 | - private final YtOrganizationService ytOrganizationService; | ||
41 | - private final YtDeviceService ytDeviceService; | ||
42 | - private final YtMessageTemplateService ytMessageTemplateService; | ||
43 | - private final YtMessageConfigService ytMessageConfigService; | ||
44 | - private final YtMailLogService ytMailLogService; | 40 | + private final TkOrganizationService tkOrganizationService; |
41 | + private final TkDeviceService ytDeviceService; | ||
42 | + private final TkMessageTemplateService tkMessageTemplateService; | ||
43 | + private final TkMessageConfigService ytMessageConfigService; | ||
44 | + private final TkMailLogService ytMailLogService; | ||
45 | private final SmsLogService smsLogService; | 45 | private final SmsLogService smsLogService; |
46 | - private final YtAlarmContactService ytAlarmContactService; | 46 | + private final TkAlarmContactService ytAlarmContactService; |
47 | private final AlarmProfileMapper alarmProfileMapper; | 47 | private final AlarmProfileMapper alarmProfileMapper; |
48 | private final SysNoticeService sysNoticeService; | 48 | private final SysNoticeService sysNoticeService; |
49 | private final SysNoticeUserService sysNoticeUserService; | 49 | private final SysNoticeUserService sysNoticeUserService; |
@@ -137,11 +137,11 @@ public class TkTenantServiceImpl extends AbstractBaseService<TenantMapper, SysTe | @@ -137,11 +137,11 @@ public class TkTenantServiceImpl extends AbstractBaseService<TenantMapper, SysTe | ||
137 | // 5. TELL RULE ENGINE TO STOP TENANT | 137 | // 5. TELL RULE ENGINE TO STOP TENANT |
138 | // 6. DELETE OTHER RESOURCES IF ANY | 138 | // 6. DELETE OTHER RESOURCES IF ANY |
139 | // 7. DELETE ORGANIZATION | 139 | // 7. DELETE ORGANIZATION |
140 | - ytOrganizationService.deleteDataByTenantIds(tenantIds); | 140 | + tkOrganizationService.deleteDataByTenantIds(tenantIds); |
141 | // 8. DELETE DEVICE | 141 | // 8. DELETE DEVICE |
142 | ytDeviceService.deleteDataByTenantIds(tenantIds); | 142 | ytDeviceService.deleteDataByTenantIds(tenantIds); |
143 | // 9. DELETE MESSAGE_TEMPLATE MESSAGE_CONFIG SEND_RECORDS | 143 | // 9. DELETE MESSAGE_TEMPLATE MESSAGE_CONFIG SEND_RECORDS |
144 | - ytMessageTemplateService.deleteDataByTenantIds(tenantIds); | 144 | + tkMessageTemplateService.deleteDataByTenantIds(tenantIds); |
145 | ytMessageConfigService.deleteDataByTenantIds(tenantIds); | 145 | ytMessageConfigService.deleteDataByTenantIds(tenantIds); |
146 | ytMailLogService.deleteDataByTenantIds(tenantIds); | 146 | ytMailLogService.deleteDataByTenantIds(tenantIds); |
147 | smsLogService.deleteDataByTenantIds(tenantIds); | 147 | smsLogService.deleteDataByTenantIds(tenantIds); |
@@ -31,7 +31,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkThirdUserEntity; | @@ -31,7 +31,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkThirdUserEntity; | ||
31 | import org.thingsboard.server.dao.yunteng.mapper.UserMapper; | 31 | import org.thingsboard.server.dao.yunteng.mapper.UserMapper; |
32 | import org.thingsboard.server.dao.yunteng.mapper.TkThirdPlatformMapper; | 32 | import org.thingsboard.server.dao.yunteng.mapper.TkThirdPlatformMapper; |
33 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 33 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
34 | -import org.thingsboard.server.dao.yunteng.service.YtThirdPlatformService; | 34 | +import org.thingsboard.server.dao.yunteng.service.TkThirdPlatformService; |
35 | 35 | ||
36 | import java.util.Objects; | 36 | import java.util.Objects; |
37 | import java.util.Optional; | 37 | import java.util.Optional; |
@@ -43,7 +43,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.FastIotConstan | @@ -43,7 +43,7 @@ import static org.thingsboard.server.common.data.yunteng.constant.FastIotConstan | ||
43 | @Service | 43 | @Service |
44 | @RequiredArgsConstructor | 44 | @RequiredArgsConstructor |
45 | public class TkThirdPlatformServiceImpl extends AbstractBaseService<TkThirdPlatformMapper, TkThirdUserEntity> | 45 | public class TkThirdPlatformServiceImpl extends AbstractBaseService<TkThirdPlatformMapper, TkThirdUserEntity> |
46 | - implements YtThirdPlatformService { | 46 | + implements TkThirdPlatformService { |
47 | 47 | ||
48 | private final UserMapper userMapper; | 48 | private final UserMapper userMapper; |
49 | private final CacheUtils cacheUtils; | 49 | private final CacheUtils cacheUtils; |
@@ -17,8 +17,8 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -17,8 +17,8 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
17 | import org.thingsboard.server.dao.yunteng.entities.TkVideoPlatformEntity; | 17 | import org.thingsboard.server.dao.yunteng.entities.TkVideoPlatformEntity; |
18 | import org.thingsboard.server.dao.yunteng.mapper.TkVideoPlatformMapper; | 18 | import org.thingsboard.server.dao.yunteng.mapper.TkVideoPlatformMapper; |
19 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 19 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
20 | -import org.thingsboard.server.dao.yunteng.service.YtVideoPlatformService; | ||
21 | -import org.thingsboard.server.dao.yunteng.service.YtVideoService; | 20 | +import org.thingsboard.server.dao.yunteng.service.TkVideoPlatformService; |
21 | +import org.thingsboard.server.dao.yunteng.service.TkVideoService; | ||
22 | 22 | ||
23 | import java.util.List; | 23 | import java.util.List; |
24 | import java.util.stream.Collectors; | 24 | import java.util.stream.Collectors; |
@@ -27,9 +27,9 @@ import java.util.stream.Collectors; | @@ -27,9 +27,9 @@ import java.util.stream.Collectors; | ||
27 | @Service | 27 | @Service |
28 | @RequiredArgsConstructor | 28 | @RequiredArgsConstructor |
29 | public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatformMapper, TkVideoPlatformEntity> | 29 | public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatformMapper, TkVideoPlatformEntity> |
30 | - implements YtVideoPlatformService { | 30 | + implements TkVideoPlatformService { |
31 | 31 | ||
32 | - private final YtVideoService ytVideoService; | 32 | + private final TkVideoService tkVideoService; |
33 | 33 | ||
34 | @Override | 34 | @Override |
35 | public YtPageData<TkVideoPlatformDTO> page(IPage<TkVideoPlatformEntity> pageInfo, | 35 | public YtPageData<TkVideoPlatformDTO> page(IPage<TkVideoPlatformEntity> pageInfo, |
@@ -68,7 +68,7 @@ public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatf | @@ -68,7 +68,7 @@ public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatf | ||
68 | @Override | 68 | @Override |
69 | @Transactional(rollbackFor = Exception.class) | 69 | @Transactional(rollbackFor = Exception.class) |
70 | public boolean deleteDataByIds(DeleteDTO deleteDTO) { | 70 | public boolean deleteDataByIds(DeleteDTO deleteDTO) { |
71 | - boolean result = ytVideoService.checkConfigIdsIsUseForVideo(deleteDTO.getIds()); | 71 | + boolean result = tkVideoService.checkConfigIdsIsUseForVideo(deleteDTO.getIds()); |
72 | if(result){ | 72 | if(result){ |
73 | throw new YtDataValidationException(ErrorMessage.VIDEO_PLATFORM_USED.getMessage()); | 73 | throw new YtDataValidationException(ErrorMessage.VIDEO_PLATFORM_USED.getMessage()); |
74 | } | 74 | } |
@@ -21,7 +21,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkVideoEntity; | @@ -21,7 +21,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkVideoEntity; | ||
21 | import org.thingsboard.server.dao.yunteng.mapper.TkVideoMapper; | 21 | import org.thingsboard.server.dao.yunteng.mapper.TkVideoMapper; |
22 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; | 22 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
23 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; | 23 | import org.thingsboard.server.dao.yunteng.service.UserOrganizationMappingService; |
24 | -import org.thingsboard.server.dao.yunteng.service.YtVideoService; | 24 | +import org.thingsboard.server.dao.yunteng.service.TkVideoService; |
25 | 25 | ||
26 | import java.util.List; | 26 | import java.util.List; |
27 | import java.util.Set; | 27 | import java.util.Set; |
@@ -30,7 +30,7 @@ import java.util.Set; | @@ -30,7 +30,7 @@ import java.util.Set; | ||
30 | @Service | 30 | @Service |
31 | @RequiredArgsConstructor | 31 | @RequiredArgsConstructor |
32 | public class TkVideoServiceImpl extends AbstractBaseService<TkVideoMapper, TkVideoEntity> | 32 | public class TkVideoServiceImpl extends AbstractBaseService<TkVideoMapper, TkVideoEntity> |
33 | - implements YtVideoService { | 33 | + implements TkVideoService { |
34 | 34 | ||
35 | private final UserOrganizationMappingService userOrganizationMappingService; | 35 | private final UserOrganizationMappingService userOrganizationMappingService; |
36 | 36 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkAlarmContactService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtAlarmContactService.java
@@ -8,7 +8,7 @@ import java.util.List; | @@ -8,7 +8,7 @@ import java.util.List; | ||
8 | import java.util.Map; | 8 | import java.util.Map; |
9 | 9 | ||
10 | /** @Description 告警联系人的操作方法 @Author cxy @Date 2021/11/2 14:46 */ | 10 | /** @Description 告警联系人的操作方法 @Author cxy @Date 2021/11/2 14:46 */ |
11 | -public interface YtAlarmContactService extends BaseService<TkAlarmContactEntity> { | 11 | +public interface TkAlarmContactService extends BaseService<TkAlarmContactEntity> { |
12 | /** | 12 | /** |
13 | * 查询全部的告警联系人 | 13 | * 查询全部的告警联系人 |
14 | * | 14 | * |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkAlarmInfoService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtAlarmInfoService.java
@@ -16,7 +16,7 @@ import java.util.UUID; | @@ -16,7 +16,7 @@ import java.util.UUID; | ||
16 | /** | 16 | /** |
17 | * @Description 告警中心数据业务层 @Author cxy @Date 2021/11/10 16:51 | 17 | * @Description 告警中心数据业务层 @Author cxy @Date 2021/11/10 16:51 |
18 | */ | 18 | */ |
19 | -public interface YtAlarmInfoService { | 19 | +public interface TkAlarmInfoService { |
20 | 20 | ||
21 | 21 | ||
22 | /** | 22 | /** |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkAlarmService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtAlarmService.java
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkConfigurationActService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtConfigurationActService.java
@@ -7,7 +7,7 @@ import java.util.List; | @@ -7,7 +7,7 @@ import java.util.List; | ||
7 | /** | 7 | /** |
8 | * @author Administrator | 8 | * @author Administrator |
9 | */ | 9 | */ |
10 | -public interface YtConfigurationActService { | 10 | +public interface TkConfigurationActService { |
11 | 11 | ||
12 | /** | 12 | /** |
13 | * 保存节点动画效果信息,每种事件类型只会有1个 | 13 | * 保存节点动画效果信息,每种事件类型只会有1个 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkConfigurationCenterService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtConfigurationCenterService.java
@@ -7,7 +7,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -7,7 +7,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
7 | 7 | ||
8 | import java.util.Map; | 8 | import java.util.Map; |
9 | 9 | ||
10 | -public interface YtConfigurationCenterService { | 10 | +public interface TkConfigurationCenterService { |
11 | YtPageData<ConfigurationCenterDTO> page(Map<String, Object> queryMap,boolean tenantAdmin); | 11 | YtPageData<ConfigurationCenterDTO> page(Map<String, Object> queryMap,boolean tenantAdmin); |
12 | 12 | ||
13 | ConfigurationCenterDTO saveConfiguration(ConfigurationCenterDTO configurationCenterDTO); | 13 | ConfigurationCenterDTO saveConfiguration(ConfigurationCenterDTO configurationCenterDTO); |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkConfigurationContentService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtConfigurationContentService.java
@@ -5,7 +5,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | @@ -5,7 +5,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | ||
5 | 5 | ||
6 | import java.util.Set; | 6 | import java.util.Set; |
7 | 7 | ||
8 | -public interface YtConfigurationContentService { | 8 | +public interface TkConfigurationContentService { |
9 | 9 | ||
10 | ConfigurationContentDTO saveConfigurationContent(ConfigurationContentDTO configurationContentDTO); | 10 | ConfigurationContentDTO saveConfigurationContent(ConfigurationContentDTO configurationContentDTO); |
11 | 11 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkConfigurationDatasourceService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtConfigurationDatasourceService.java
@@ -9,7 +9,7 @@ import java.util.List; | @@ -9,7 +9,7 @@ import java.util.List; | ||
9 | /** | 9 | /** |
10 | * @author Administrator | 10 | * @author Administrator |
11 | */ | 11 | */ |
12 | -public interface YtConfigurationDatasourceService { | 12 | +public interface TkConfigurationDatasourceService { |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * 保存节点数据源,只会有1个 | 15 | * 保存节点数据源,只会有1个 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkConfigurationEventService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtConfigurationEventService.java
@@ -7,7 +7,7 @@ import java.util.List; | @@ -7,7 +7,7 @@ import java.util.List; | ||
7 | /** | 7 | /** |
8 | * @author Administrator | 8 | * @author Administrator |
9 | */ | 9 | */ |
10 | -public interface YtConfigurationEventService { | 10 | +public interface TkConfigurationEventService { |
11 | 11 | ||
12 | /** | 12 | /** |
13 | * 保存节点数据交互信息,每种事件类型只会有1个 | 13 | * 保存节点数据交互信息,每种事件类型只会有1个 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkDataBoardService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtDataBoardService.java
@@ -8,7 +8,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -8,7 +8,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
8 | import java.util.List; | 8 | import java.util.List; |
9 | import java.util.Map; | 9 | import java.util.Map; |
10 | 10 | ||
11 | -public interface YtDataBoardService { | 11 | +public interface TkDataBoardService { |
12 | /** | 12 | /** |
13 | * 数据看板分页 | 13 | * 数据看板分页 |
14 | * | 14 | * |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkDataComponentService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtDataComponentService.java
@@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | @@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; | ||
6 | import java.util.List; | 6 | import java.util.List; |
7 | import java.util.Set; | 7 | import java.util.Set; |
8 | 8 | ||
9 | -public interface YtDataComponentService { | 9 | +public interface TkDataComponentService { |
10 | /** | 10 | /** |
11 | * 查询数据看板下的所有组件 | 11 | * 查询数据看板下的所有组件 |
12 | * @param tenantId 租户id | 12 | * @param tenantId 租户id |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkDeviceProfileService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtDeviceProfileService.java
@@ -8,7 +8,7 @@ import java.util.List; | @@ -8,7 +8,7 @@ import java.util.List; | ||
8 | import java.util.Optional; | 8 | import java.util.Optional; |
9 | import java.util.Set; | 9 | import java.util.Set; |
10 | 10 | ||
11 | -public interface YtDeviceProfileService { | 11 | +public interface TkDeviceProfileService { |
12 | 12 | ||
13 | DeviceProfileDTO insertOrUpdate(DeviceProfileDTO deviceDTO); | 13 | DeviceProfileDTO insertOrUpdate(DeviceProfileDTO deviceDTO); |
14 | 14 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkDeviceScriptService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtDeviceScriptService.java
@@ -9,7 +9,7 @@ import java.util.List; | @@ -9,7 +9,7 @@ import java.util.List; | ||
9 | import java.util.Optional; | 9 | import java.util.Optional; |
10 | import java.util.Set; | 10 | import java.util.Set; |
11 | 11 | ||
12 | -public interface YtDeviceScriptService extends BaseService<TkDeviceScriptEntity>{ | 12 | +public interface TkDeviceScriptService extends BaseService<TkDeviceScriptEntity>{ |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * 查找脚本解析的脚本内容 | 15 | * 查找脚本解析的脚本内容 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkDeviceService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtDeviceService.java
@@ -14,7 +14,7 @@ import java.util.Map; | @@ -14,7 +14,7 @@ import java.util.Map; | ||
14 | import java.util.Optional; | 14 | import java.util.Optional; |
15 | import java.util.Set; | 15 | import java.util.Set; |
16 | 16 | ||
17 | -public interface YtDeviceService extends BaseService<TkDevice> { | 17 | +public interface TkDeviceService extends BaseService<TkDevice> { |
18 | DeviceDTO insertOrUpdate(String tenantId, DeviceDTO deviceDTO); | 18 | DeviceDTO insertOrUpdate(String tenantId, DeviceDTO deviceDTO); |
19 | 19 | ||
20 | void deleteDevices(String tenantId, Set<String> ids); | 20 | void deleteDevices(String tenantId, Set<String> ids); |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkDeviceTypeService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtDeviceTypeService.java
@@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeviceTypeDTO; | @@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.yunteng.dto.DeviceTypeDTO; | ||
6 | 6 | ||
7 | import java.util.List; | 7 | import java.util.List; |
8 | 8 | ||
9 | -public interface YtDeviceTypeService { | 9 | +public interface TkDeviceTypeService { |
10 | /** | 10 | /** |
11 | * 获取当前租户设备类型的树形结构 | 11 | * 获取当前租户设备类型的树形结构 |
12 | * @param tenantId 租户Code | 12 | * @param tenantId 租户Code |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkFrpInfoService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtFrpInfoService.java
@@ -8,7 +8,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -8,7 +8,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
8 | import java.net.UnknownHostException; | 8 | import java.net.UnknownHostException; |
9 | import java.util.Map; | 9 | import java.util.Map; |
10 | 10 | ||
11 | -public interface YtFrpInfoService { | 11 | +public interface TkFrpInfoService { |
12 | 12 | ||
13 | YtPageData<FrpInfoDTO> page(Map<String, Object> queryMap); | 13 | YtPageData<FrpInfoDTO> page(Map<String, Object> queryMap); |
14 | 14 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkMailLogService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtMailLogService.java
@@ -7,7 +7,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkMailLogEntity; | @@ -7,7 +7,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkMailLogEntity; | ||
7 | import java.util.Map; | 7 | import java.util.Map; |
8 | import java.util.Set; | 8 | import java.util.Set; |
9 | 9 | ||
10 | -public interface YtMailLogService extends BaseService<TkMailLogEntity>{ | 10 | +public interface TkMailLogService extends BaseService<TkMailLogEntity>{ |
11 | YtPageData<MailLogDTO> page(String tenantId, Map<String, Object> queryMap); | 11 | YtPageData<MailLogDTO> page(String tenantId, Map<String, Object> queryMap); |
12 | 12 | ||
13 | boolean deleteMailLog(Set<String> ids); | 13 | boolean deleteMailLog(Set<String> ids); |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkMailService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtMailService.java
@@ -2,6 +2,6 @@ package org.thingsboard.server.dao.yunteng.service; | @@ -2,6 +2,6 @@ package org.thingsboard.server.dao.yunteng.service; | ||
2 | 2 | ||
3 | import org.thingsboard.server.common.data.yunteng.dto.request.EmailReqDTO; | 3 | import org.thingsboard.server.common.data.yunteng.dto.request.EmailReqDTO; |
4 | 4 | ||
5 | -public interface YtMailService { | 5 | +public interface TkMailService { |
6 | boolean sendEmail(EmailReqDTO emailReqDTO); | 6 | boolean sendEmail(EmailReqDTO emailReqDTO); |
7 | } | 7 | } |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkMessageConfigService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtMessageConfigService.java
@@ -8,7 +8,7 @@ import java.util.List; | @@ -8,7 +8,7 @@ import java.util.List; | ||
8 | import java.util.Map; | 8 | import java.util.Map; |
9 | import java.util.Set; | 9 | import java.util.Set; |
10 | 10 | ||
11 | -public interface YtMessageConfigService extends BaseService<TkMessageConfigEntity>{ | 11 | +public interface TkMessageConfigService extends BaseService<TkMessageConfigEntity>{ |
12 | 12 | ||
13 | YtPageData<MessageConfigDTO> page(String tenantId, Map<String, Object> queryMap); | 13 | YtPageData<MessageConfigDTO> page(String tenantId, Map<String, Object> queryMap); |
14 | 14 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkMessageTemplateService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtMessageTemplateService.java
@@ -10,7 +10,7 @@ import java.util.List; | @@ -10,7 +10,7 @@ import java.util.List; | ||
10 | import java.util.Map; | 10 | import java.util.Map; |
11 | import java.util.Set; | 11 | import java.util.Set; |
12 | 12 | ||
13 | -public interface YtMessageTemplateService extends BaseService<TkMessageTemplateEntity>{ | 13 | +public interface TkMessageTemplateService extends BaseService<TkMessageTemplateEntity>{ |
14 | 14 | ||
15 | YtPageData<MessageTemplateDTO> page(Map<String, Object> queryMap); | 15 | YtPageData<MessageTemplateDTO> page(Map<String, Object> queryMap); |
16 | 16 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkNoticeService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtNoticeService.java
@@ -12,7 +12,7 @@ import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; | @@ -12,7 +12,7 @@ import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; | ||
12 | * @Date Created in 2021/11/23$ | 12 | * @Date Created in 2021/11/23$ |
13 | * @Copyright 2016-2018 - Powered By 云腾五洲 | 13 | * @Copyright 2016-2018 - Powered By 云腾五洲 |
14 | */ | 14 | */ |
15 | -public interface YtNoticeService { | 15 | +public interface TkNoticeService { |
16 | 16 | ||
17 | /** | 17 | /** |
18 | * 设备告警通知负责人 | 18 | * 设备告警通知负责人 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkOpinionService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtOpinionService.java
@@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.yunteng.dto.TkOpinionDTO; | @@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.yunteng.dto.TkOpinionDTO; | ||
6 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 6 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
7 | import org.thingsboard.server.dao.yunteng.entities.TkOpinionEntity; | 7 | import org.thingsboard.server.dao.yunteng.entities.TkOpinionEntity; |
8 | 8 | ||
9 | -public interface YtOpinionService extends BaseService<TkOpinionEntity> { | 9 | +public interface TkOpinionService extends BaseService<TkOpinionEntity> { |
10 | 10 | ||
11 | /** | 11 | /** |
12 | * @param pageInfrom 分页配置信息 | 12 | * @param pageInfrom 分页配置信息 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkOrganizationService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtOrganizationService.java
@@ -6,7 +6,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkOrganizationEntity; | @@ -6,7 +6,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkOrganizationEntity; | ||
6 | import java.util.List; | 6 | import java.util.List; |
7 | import java.util.Set; | 7 | import java.util.Set; |
8 | 8 | ||
9 | -public interface YtOrganizationService extends BaseService<TkOrganizationEntity>{ | 9 | +public interface TkOrganizationService extends BaseService<TkOrganizationEntity>{ |
10 | OrganizationDTO saveOrganization(OrganizationDTO organizationDTO,String tenantId,boolean isCustomerOrPlatform,String userId); | 10 | OrganizationDTO saveOrganization(OrganizationDTO organizationDTO,String tenantId,boolean isCustomerOrPlatform,String userId); |
11 | 11 | ||
12 | boolean deleteOrganizations(DeleteDTO deleteDTO,String tenantId); | 12 | boolean deleteOrganizations(DeleteDTO deleteDTO,String tenantId); |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkReportFormConfigService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtReportFormConfigService.java
@@ -10,7 +10,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -10,7 +10,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
10 | import java.util.List; | 10 | import java.util.List; |
11 | import java.util.Map; | 11 | import java.util.Map; |
12 | 12 | ||
13 | -public interface YtReportFormConfigService { | 13 | +public interface TkReportFormConfigService { |
14 | YtPageData<ReportFormConfigDTO> page(Map<String, Object> queryMap,boolean tenantAdmin); | 14 | YtPageData<ReportFormConfigDTO> page(Map<String, Object> queryMap,boolean tenantAdmin); |
15 | 15 | ||
16 | ReportFormConfigDTO saveOrUpdateReportFormConfig(ReportFormConfigDTO report) throws SchedulerException; | 16 | ReportFormConfigDTO saveOrUpdateReportFormConfig(ReportFormConfigDTO report) throws SchedulerException; |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkReportGenerateRecordService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtReportGenerateRecordService.java
@@ -9,7 +9,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | @@ -9,7 +9,7 @@ import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | ||
9 | 9 | ||
10 | import java.util.Map; | 10 | import java.util.Map; |
11 | 11 | ||
12 | -public interface YtReportGenerateRecordService { | 12 | +public interface TkReportGenerateRecordService { |
13 | 13 | ||
14 | YtPageData<ReportGenerateRecordDTO> page(Map<String, Object> queryMap,boolean tenantAdmin); | 14 | YtPageData<ReportGenerateRecordDTO> page(Map<String, Object> queryMap,boolean tenantAdmin); |
15 | 15 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkRpcRecordService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtRpcRecordService.java
@@ -11,7 +11,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkRpcRecordEntity; | @@ -11,7 +11,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkRpcRecordEntity; | ||
11 | * 例如:微信小程序、钉钉等。 | 11 | * 例如:微信小程序、钉钉等。 |
12 | * @author Administrator | 12 | * @author Administrator |
13 | */ | 13 | */ |
14 | -public interface YtRpcRecordService extends BaseService<TkRpcRecordEntity> { | 14 | +public interface TkRpcRecordService extends BaseService<TkRpcRecordEntity> { |
15 | 15 | ||
16 | /** | 16 | /** |
17 | * | 17 | * |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkRuleChainService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtRuleChainService.java
@@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.rule.RuleChainType; | @@ -6,7 +6,7 @@ import org.thingsboard.server.common.data.rule.RuleChainType; | ||
6 | 6 | ||
7 | import java.util.List; | 7 | import java.util.List; |
8 | 8 | ||
9 | -public interface YtRuleChainService { | 9 | +public interface TkRuleChainService { |
10 | RuleChain getRootTenantRuleChain(TenantId tenantId); | 10 | RuleChain getRootTenantRuleChain(TenantId tenantId); |
11 | List<RuleChain> findByTenantIdAndType(TenantId tenantId, RuleChainType type); | 11 | List<RuleChain> findByTenantIdAndType(TenantId tenantId, RuleChainType type); |
12 | } | 12 | } |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkSmsService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtSmsService.java
@@ -4,7 +4,7 @@ package org.thingsboard.server.dao.yunteng.service; | @@ -4,7 +4,7 @@ package org.thingsboard.server.dao.yunteng.service; | ||
4 | import org.thingsboard.server.common.data.yunteng.dto.request.SmsReqDTO; | 4 | import org.thingsboard.server.common.data.yunteng.dto.request.SmsReqDTO; |
5 | import org.thingsboard.server.common.data.yunteng.enums.MsgTemplatePurposeEnum; | 5 | import org.thingsboard.server.common.data.yunteng.enums.MsgTemplatePurposeEnum; |
6 | 6 | ||
7 | -public interface YtSmsService { | 7 | +public interface TkSmsService { |
8 | boolean sendSms(SmsReqDTO smsReqDTO); | 8 | boolean sendSms(SmsReqDTO smsReqDTO); |
9 | 9 | ||
10 | /** | 10 | /** |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkSysJobLogService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtSysJobLogService.java
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkSysJobService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtSysJobService.java
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkSysLogService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtSysLogService.java
@@ -7,7 +7,7 @@ import org.thingsboard.server.common.data.yunteng.dto.SysLogDTO; | @@ -7,7 +7,7 @@ import org.thingsboard.server.common.data.yunteng.dto.SysLogDTO; | ||
7 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; | 7 | import org.thingsboard.server.common.data.yunteng.utils.tools.YtPageData; |
8 | import org.thingsboard.server.dao.yunteng.entities.SysLogEntity; | 8 | import org.thingsboard.server.dao.yunteng.entities.SysLogEntity; |
9 | 9 | ||
10 | -public interface YtSysLogService extends BaseService<SysLogEntity> { | 10 | +public interface TkSysLogService extends BaseService<SysLogEntity> { |
11 | 11 | ||
12 | 12 | ||
13 | /** | 13 | /** |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkTenantService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtTenantService.java
@@ -14,7 +14,7 @@ import java.util.Map; | @@ -14,7 +14,7 @@ import java.util.Map; | ||
14 | import java.util.Optional; | 14 | import java.util.Optional; |
15 | import java.util.concurrent.CompletableFuture; | 15 | import java.util.concurrent.CompletableFuture; |
16 | 16 | ||
17 | -public interface YtTenantService { | 17 | +public interface TkTenantService { |
18 | TenantDTO createNewTenant(TenantReqDTO tenantReqDTO); | 18 | TenantDTO createNewTenant(TenantReqDTO tenantReqDTO); |
19 | 19 | ||
20 | TenantDTO updateTenant(TenantDTO tenantDTO); | 20 | TenantDTO updateTenant(TenantDTO tenantDTO); |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkThirdPlatformService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtThirdPlatformService.java
@@ -14,7 +14,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkThirdUserEntity; | @@ -14,7 +14,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkThirdUserEntity; | ||
14 | * | 14 | * |
15 | * @author Administrator | 15 | * @author Administrator |
16 | */ | 16 | */ |
17 | -public interface YtThirdPlatformService extends BaseService<TkThirdUserEntity> { | 17 | +public interface TkThirdPlatformService extends BaseService<TkThirdUserEntity> { |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @param pageInfrom 分页配置信息 | 20 | * @param pageInfrom 分页配置信息 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkUserService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtUserService.java
@@ -18,7 +18,7 @@ import java.util.Optional; | @@ -18,7 +18,7 @@ import java.util.Optional; | ||
18 | import java.util.Set; | 18 | import java.util.Set; |
19 | import java.util.concurrent.CompletableFuture; | 19 | import java.util.concurrent.CompletableFuture; |
20 | 20 | ||
21 | -public interface YtUserService { | 21 | +public interface TkUserService { |
22 | List<UserDetailsDTO> findUserDetailsByUsername(String username,String tenantId); | 22 | List<UserDetailsDTO> findUserDetailsByUsername(String username,String tenantId); |
23 | 23 | ||
24 | UserDTO saveAccount( | 24 | UserDTO saveAccount( |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkVideoPlatformService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtVideoPlatformService.java
@@ -8,7 +8,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkVideoPlatformEntity; | @@ -8,7 +8,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkVideoPlatformEntity; | ||
8 | 8 | ||
9 | import java.util.List; | 9 | import java.util.List; |
10 | 10 | ||
11 | -public interface YtVideoPlatformService extends BaseService<TkVideoPlatformEntity> { | 11 | +public interface TkVideoPlatformService extends BaseService<TkVideoPlatformEntity> { |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * @param pageInfo 分页配置信息 | 14 | * @param pageInfo 分页配置信息 |
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/TkVideoService.java
renamed from
dao/src/main/java/org/thingsboard/server/dao/yunteng/service/YtVideoService.java
@@ -8,7 +8,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkVideoEntity; | @@ -8,7 +8,7 @@ import org.thingsboard.server.dao.yunteng.entities.TkVideoEntity; | ||
8 | 8 | ||
9 | import java.util.Set; | 9 | import java.util.Set; |
10 | 10 | ||
11 | -public interface YtVideoService extends BaseService<TkVideoEntity> { | 11 | +public interface TkVideoService extends BaseService<TkVideoEntity> { |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * @param pageInfrom 分页配置信息 | 14 | * @param pageInfrom 分页配置信息 |
@@ -16,17 +16,14 @@ | @@ -16,17 +16,14 @@ | ||
16 | package org.thingsboard.rule.engine.notice; | 16 | package org.thingsboard.rule.engine.notice; |
17 | 17 | ||
18 | import com.fasterxml.jackson.databind.ObjectMapper; | 18 | import com.fasterxml.jackson.databind.ObjectMapper; |
19 | -import lombok.RequiredArgsConstructor; | ||
20 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
21 | -import org.springframework.beans.BeanUtils; | ||
22 | import org.thingsboard.rule.engine.api.*; | 20 | import org.thingsboard.rule.engine.api.*; |
23 | -import org.thingsboard.rule.engine.api.util.TbNodeUtils; | ||
24 | import org.thingsboard.server.common.data.alarm.Alarm; | 21 | import org.thingsboard.server.common.data.alarm.Alarm; |
25 | import org.thingsboard.server.common.data.plugin.ComponentType; | 22 | import org.thingsboard.server.common.data.plugin.ComponentType; |
26 | import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; | 23 | import org.thingsboard.server.common.data.yunteng.dto.AlarmInfoDTO; |
27 | import org.thingsboard.server.common.data.yunteng.utils.SpringBeanUtils; | 24 | import org.thingsboard.server.common.data.yunteng.utils.SpringBeanUtils; |
28 | import org.thingsboard.server.common.msg.TbMsg; | 25 | import org.thingsboard.server.common.msg.TbMsg; |
29 | -import org.thingsboard.server.dao.yunteng.service.YtNoticeService; | 26 | +import org.thingsboard.server.dao.yunteng.service.TkNoticeService; |
30 | 27 | ||
31 | import java.net.InetAddress; | 28 | import java.net.InetAddress; |
32 | 29 | ||
@@ -39,7 +36,7 @@ import static org.thingsboard.common.util.DonAsynchron.withCallback; | @@ -39,7 +36,7 @@ import static org.thingsboard.common.util.DonAsynchron.withCallback; | ||
39 | public class AlarmNoticeNode implements TbNode { | 36 | public class AlarmNoticeNode implements TbNode { |
40 | 37 | ||
41 | private AlarmNoticeNodeConfiguration config; | 38 | private AlarmNoticeNodeConfiguration config; |
42 | - private YtNoticeService service; | 39 | + private TkNoticeService service; |
43 | 40 | ||
44 | private ObjectMapper objectMapper; | 41 | private ObjectMapper objectMapper; |
45 | 42 | ||
@@ -47,7 +44,7 @@ public class AlarmNoticeNode implements TbNode { | @@ -47,7 +44,7 @@ public class AlarmNoticeNode implements TbNode { | ||
47 | public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException { | 44 | public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException { |
48 | try { | 45 | try { |
49 | // this.config = TbNodeUtils.convert(configuration, AlarmNoticeNodeConfiguration.class); | 46 | // this.config = TbNodeUtils.convert(configuration, AlarmNoticeNodeConfiguration.class); |
50 | - service = SpringBeanUtils.getBean(YtNoticeService.class); | 47 | + service = SpringBeanUtils.getBean(TkNoticeService.class); |
51 | objectMapper = new ObjectMapper(); | 48 | objectMapper = new ObjectMapper(); |
52 | } catch (Exception e) { | 49 | } catch (Exception e) { |
53 | throw new TbNodeException(e); | 50 | throw new TbNodeException(e); |
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/profile/AlarmState.java
@@ -41,7 +41,7 @@ import org.thingsboard.server.common.msg.TbMsg; | @@ -41,7 +41,7 @@ import org.thingsboard.server.common.msg.TbMsg; | ||
41 | import org.thingsboard.server.common.msg.TbMsgMetaData; | 41 | import org.thingsboard.server.common.msg.TbMsgMetaData; |
42 | import org.thingsboard.server.common.msg.queue.ServiceQueue; | 42 | import org.thingsboard.server.common.msg.queue.ServiceQueue; |
43 | import org.thingsboard.server.dao.alarm.AlarmOperationResult; | 43 | import org.thingsboard.server.dao.alarm.AlarmOperationResult; |
44 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceService; | 44 | +import org.thingsboard.server.dao.yunteng.service.TkDeviceService; |
45 | 45 | ||
46 | import java.util.ArrayList; | 46 | import java.util.ArrayList; |
47 | import java.util.Comparator; | 47 | import java.util.Comparator; |
@@ -65,14 +65,14 @@ class AlarmState { | @@ -65,14 +65,14 @@ class AlarmState { | ||
65 | private volatile String lastMsgQueueName; | 65 | private volatile String lastMsgQueueName; |
66 | private volatile DataSnapshot dataSnapshot; | 66 | private volatile DataSnapshot dataSnapshot; |
67 | private final DynamicPredicateValueCtx dynamicPredicateValueCtx; | 67 | private final DynamicPredicateValueCtx dynamicPredicateValueCtx; |
68 | - private YtDeviceService ytDeviceService; | 68 | + private TkDeviceService ytDeviceService; |
69 | 69 | ||
70 | AlarmState(ProfileState deviceProfile, EntityId originator, DeviceProfileAlarm alarmDefinition, PersistedAlarmState alarmState, DynamicPredicateValueCtx dynamicPredicateValueCtx) { | 70 | AlarmState(ProfileState deviceProfile, EntityId originator, DeviceProfileAlarm alarmDefinition, PersistedAlarmState alarmState, DynamicPredicateValueCtx dynamicPredicateValueCtx) { |
71 | this.deviceProfile = deviceProfile; | 71 | this.deviceProfile = deviceProfile; |
72 | this.originator = originator; | 72 | this.originator = originator; |
73 | this.dynamicPredicateValueCtx = dynamicPredicateValueCtx; | 73 | this.dynamicPredicateValueCtx = dynamicPredicateValueCtx; |
74 | this.updateState(alarmDefinition, alarmState); | 74 | this.updateState(alarmDefinition, alarmState); |
75 | - this.ytDeviceService = SpringBeanUtils.getBean(YtDeviceService.class); | 75 | + this.ytDeviceService = SpringBeanUtils.getBean(TkDeviceService.class); |
76 | } | 76 | } |
77 | 77 | ||
78 | public boolean process(TbContext ctx, TbMsg msg, DataSnapshot data, SnapshotUpdate update) throws ExecutionException, InterruptedException { | 78 | public boolean process(TbContext ctx, TbMsg msg, DataSnapshot data, SnapshotUpdate update) throws ExecutionException, InterruptedException { |
@@ -85,8 +85,8 @@ class ReactState { | @@ -85,8 +85,8 @@ class ReactState { | ||
85 | * 【场景联动的执行集合】懒加载 | 85 | * 【场景联动的执行集合】懒加载 |
86 | */ | 86 | */ |
87 | private final List<TkDoActionEntity> actions; | 87 | private final List<TkDoActionEntity> actions; |
88 | - private final YtNoticeService noticeService; | ||
89 | - private YtDeviceService ytDeviceService; | 88 | + private final TkNoticeService noticeService; |
89 | + private TkDeviceService ytDeviceService; | ||
90 | 90 | ||
91 | 91 | ||
92 | ReactState(String reactId, TbContext ctx, TbSceneReactNodeConfig config) { | 92 | ReactState(String reactId, TbContext ctx, TbSceneReactNodeConfig config) { |
@@ -105,8 +105,8 @@ class ReactState { | @@ -105,8 +105,8 @@ class ReactState { | ||
105 | break; | 105 | break; |
106 | } | 106 | } |
107 | } | 107 | } |
108 | - this.noticeService = SpringBeanUtils.getBean(YtNoticeService.class); | ||
109 | - this.ytDeviceService = SpringBeanUtils.getBean(YtDeviceService.class); | 108 | + this.noticeService = SpringBeanUtils.getBean(TkNoticeService.class); |
109 | + this.ytDeviceService = SpringBeanUtils.getBean(TkDeviceService.class); | ||
110 | } | 110 | } |
111 | 111 | ||
112 | 112 |
@@ -15,45 +15,26 @@ | @@ -15,45 +15,26 @@ | ||
15 | */ | 15 | */ |
16 | package org.thingsboard.rule.engine.yunteng.scene; | 16 | package org.thingsboard.rule.engine.yunteng.scene; |
17 | 17 | ||
18 | -import com.fasterxml.jackson.databind.JsonNode; | ||
19 | -import com.fasterxml.jackson.databind.node.ObjectNode; | ||
20 | -import com.google.common.util.concurrent.ListenableFuture; | ||
21 | import com.google.gson.JsonParser; | 18 | import com.google.gson.JsonParser; |
22 | import lombok.Data; | 19 | import lombok.Data; |
23 | import lombok.extern.slf4j.Slf4j; | 20 | import lombok.extern.slf4j.Slf4j; |
24 | -import org.apache.commons.lang3.StringUtils; | ||
25 | -import org.thingsboard.common.util.DonAsynchron; | ||
26 | -import org.thingsboard.common.util.JacksonUtil; | ||
27 | -import org.thingsboard.rule.engine.action.TbAlarmResult; | ||
28 | import org.thingsboard.rule.engine.api.TbContext; | 21 | import org.thingsboard.rule.engine.api.TbContext; |
29 | import org.thingsboard.rule.engine.profile.*; | 22 | import org.thingsboard.rule.engine.profile.*; |
30 | import org.thingsboard.rule.engine.profile.state.PersistedAlarmRuleState; | 23 | import org.thingsboard.rule.engine.profile.state.PersistedAlarmRuleState; |
31 | -import org.thingsboard.rule.engine.profile.state.PersistedAlarmState; | ||
32 | -import org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode; | ||
33 | import org.thingsboard.rule.engine.yunteng.utils.TriggerRuleState; | 24 | import org.thingsboard.rule.engine.yunteng.utils.TriggerRuleState; |
34 | import org.thingsboard.server.common.data.DataConstants; | 25 | import org.thingsboard.server.common.data.DataConstants; |
35 | import org.thingsboard.server.common.data.Device; | 26 | import org.thingsboard.server.common.data.Device; |
36 | import org.thingsboard.server.common.data.alarm.Alarm; | 27 | import org.thingsboard.server.common.data.alarm.Alarm; |
37 | -import org.thingsboard.server.common.data.alarm.AlarmSeverity; | ||
38 | -import org.thingsboard.server.common.data.alarm.AlarmStatus; | ||
39 | import org.thingsboard.server.common.data.device.profile.*; | 28 | import org.thingsboard.server.common.data.device.profile.*; |
40 | -import org.thingsboard.server.common.data.id.DashboardId; | ||
41 | import org.thingsboard.server.common.data.id.DeviceId; | 29 | import org.thingsboard.server.common.data.id.DeviceId; |
42 | -import org.thingsboard.server.common.data.id.EntityId; | ||
43 | import org.thingsboard.server.common.data.kv.AttributeKvEntry; | 30 | import org.thingsboard.server.common.data.kv.AttributeKvEntry; |
44 | import org.thingsboard.server.common.data.kv.KvEntry; | 31 | import org.thingsboard.server.common.data.kv.KvEntry; |
45 | import org.thingsboard.server.common.data.kv.TsKvEntry; | 32 | import org.thingsboard.server.common.data.kv.TsKvEntry; |
46 | -import org.thingsboard.server.common.data.yunteng.dto.TriggerDTO; | ||
47 | -import org.thingsboard.server.common.data.yunteng.utils.SpringBeanUtils; | ||
48 | import org.thingsboard.server.common.msg.TbMsg; | 33 | import org.thingsboard.server.common.msg.TbMsg; |
49 | import org.thingsboard.server.common.msg.TbMsgMetaData; | 34 | import org.thingsboard.server.common.msg.TbMsgMetaData; |
50 | -import org.thingsboard.server.common.msg.queue.ServiceQueue; | ||
51 | import org.thingsboard.server.common.msg.session.SessionMsgType; | 35 | import org.thingsboard.server.common.msg.session.SessionMsgType; |
52 | import org.thingsboard.server.common.transport.adaptor.JsonConverter; | 36 | import org.thingsboard.server.common.transport.adaptor.JsonConverter; |
53 | -import org.thingsboard.server.dao.alarm.AlarmOperationResult; | ||
54 | import org.thingsboard.server.dao.sql.query.EntityKeyMapping; | 37 | import org.thingsboard.server.dao.sql.query.EntityKeyMapping; |
55 | -import org.thingsboard.server.dao.yunteng.service.TriggerService; | ||
56 | -import org.thingsboard.server.dao.yunteng.service.YtDeviceService; | ||
57 | 38 | ||
58 | import java.util.*; | 39 | import java.util.*; |
59 | import java.util.concurrent.ExecutionException; | 40 | import java.util.concurrent.ExecutionException; |