Skip to content

Commit cdf2124

Browse files
authored
Merge pull request #13 from xianyanglin/hango-master
fix pluginManager enable NPE
2 parents 32387a6 + 8311c41 commit cdf2124

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

common-infra/src/main/java/org/hango/cloud/common/infra/gateway/service/impl/GatewayServiceImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public List<GatewayDto> findByName(String name, long offset, long limit) {
114114
@Override
115115
public GatewayDto getByClusterName(String clusterName) {
116116
HashMap<String,Object> param = Maps.newHashMap();
117+
param.put("gwClusterName",clusterName);
117118
List<Gateway> recordsByField = gatewayDao.getRecordsByField(param);
118119
if (CollectionUtils.isEmpty(recordsByField)) {
119120
return null;

envoy-infra/src/main/java/org/hango/cloud/envoy/infra/pluginmanager/service/impl/PluginManagerServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private PluginOrderDto buildPluginOrder(VirtualGatewayDto virtualGatewayDto) {
232232
*/
233233
public PluginManagerDto toPluginManagerDto(PluginOrderItemDto item) {
234234
PluginManagerDto pluginManagerDto = new PluginManagerDto();
235-
pluginManagerDto.setEnable(item.getEnable());
235+
pluginManagerDto.setEnable(item.getEnable() != null && item.getEnable());
236236
pluginManagerDto.setName(item.getName());
237237
pluginManagerDto.setDisplayName(item.getName());
238238
return pluginManagerDto;

envoy-infra/src/main/resources/schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ CREATE TABLE `hango_service_proxy` (
986986
`version` bigint(20) DEFAULT '0' COMMENT '版本号',
987987
`description` varchar(255) DEFAULT NULL COMMENT '备注',
988988
PRIMARY KEY (`id`)
989-
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='服务发布表';
989+
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='服务发布表';
990990

991991

992992

0 commit comments

Comments
 (0)