Commit 62e29baa2d30e29ffbfc53897b578e2b7153c8c7

Authored by 云中非
1 parent 685de4e2

fix: 脚本启用禁用问题修复

... ... @@ -96,13 +96,12 @@ public class TkDeviceScriptController extends BaseController {
96 96 }
97 97 String convertJs = YtScriptFactory.INCLUD_ORIGINAL_DATA;
98 98
99   - if(1 == scriptDTO.getStatus()){
  99 + if(1 == status){
100 100 if(scriptDTO.isSaveOriginalData()){
101 101 convertJs += scriptDTO.getConvertJs();
102 102 }else{
103 103 convertJs = scriptDTO.getConvertJs();
104 104 }
105   -
106 105 }
107 106 List<DeviceProfileDTO> usedProfiles = ytDeviceProfileService.findDeviceProfile(tenantId, id);
108 107 for (DeviceProfileDTO profile : usedProfiles) {
... ...
... ... @@ -83,7 +83,7 @@ public class TkDeviceScriptServiceImpl
83 83 @Override
84 84 @Transactional
85 85 public boolean updateScriptStatus(String tenantId, String id, Integer status) {
86   - if (StringUtils.isEmpty(tenantId) || StringUtils.isEmpty(id) || null != status) {
  86 + if (StringUtils.isEmpty(tenantId) || StringUtils.isEmpty(id) || null == status) {
87 87 throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage());
88 88 }
89 89 TkDeviceScriptEntity entity = baseMapper.selectById(id);
... ...