feat:bug修改
parent
b69a3ae3d4
commit
8aef4a505a
|
|
@ -10,7 +10,7 @@ WORKDIR /app
|
|||
COPY target/*.jar app.jar
|
||||
|
||||
# 暴露应用端口
|
||||
EXPOSE 8112
|
||||
EXPOSE 8113
|
||||
|
||||
# 启动应用
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
services:
|
||||
app:
|
||||
build: .
|
||||
image: nex-be:1.0.3
|
||||
image: nex-be:1.0.0
|
||||
container_name: nex-be
|
||||
ports:
|
||||
- "8113:8113"
|
||||
- "50051:50051"
|
||||
volumes:
|
||||
- /var/lib/vdi/:/var/lib/vdi/
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ public class NetworkManageReq {
|
|||
/**
|
||||
* DHCP启用状态
|
||||
*/
|
||||
@ApiModelProperty(value = "DHCP启用状态")
|
||||
@JsonProperty("dhcp_enabled:1 启用 0 不启用")
|
||||
@ApiModelProperty(value = "DHCP启用状态:1 启用 0 不启用")
|
||||
@JsonProperty("dhcp_enabled")
|
||||
private Short dhcpEnabled;
|
||||
|
||||
/**
|
||||
|
|
@ -100,8 +100,8 @@ public class NetworkManageReq {
|
|||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态,新增时不传")
|
||||
@JsonProperty("status:1,活跃,0,非活跃")
|
||||
@ApiModelProperty(value = "状态,新增时不传:1,活跃,0,非活跃")
|
||||
@JsonProperty("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,6 +31,20 @@ public class StoragePoolReq {
|
|||
@JsonProperty("pool_name")
|
||||
private String poolName;
|
||||
|
||||
@ApiModelProperty("名称,用于传给虚拟机的时候用的")
|
||||
@JsonProperty("storage_pool_name")
|
||||
private String storagePoolName;
|
||||
|
||||
|
||||
public String getStoragePoolName() {
|
||||
return this.poolName;
|
||||
}
|
||||
|
||||
public void setPoolName(String poolName) {
|
||||
this.poolName = poolName;
|
||||
this.storagePoolName = poolName; // 同步值
|
||||
}
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
@Size(max = 16, message = "类型长度不能超过16个字符")
|
||||
@JsonProperty("type")
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class NetworkManageServiceImpl extends ServiceImpl<NetworkManageMapper, N
|
|||
public NetworkManage addNetworkManage(NetworkManageReq networkManageReq) {
|
||||
// 检查名称是否重复
|
||||
QueryWrapper<NetworkManage> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("name", networkManageReq.getNetworkName());
|
||||
queryWrapper.eq("network_name", networkManageReq.getNetworkName());
|
||||
if (this.count(queryWrapper) > 0) {
|
||||
throw new BusinessException("网络名称'" + networkManageReq.getNetworkName() + "'已存在,请使用其他名称");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ package com.unisinsight.project.service.impl;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.unisinsight.project.entity.dao.NetworkManage;
|
||||
import com.unisinsight.project.entity.dao.StoragePool;
|
||||
import com.unisinsight.project.entity.dto.*;
|
||||
import com.unisinsight.project.entity.dto.ApiResponse;
|
||||
import com.unisinsight.project.entity.dto.StoragePoolData;
|
||||
import com.unisinsight.project.entity.dto.VmStoragePool;
|
||||
import com.unisinsight.project.entity.req.StoragePoolReq;
|
||||
import com.unisinsight.project.entity.res.PageResult;
|
||||
import com.unisinsight.project.exception.BusinessException;
|
||||
|
|
@ -16,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -46,7 +46,7 @@ public class StoragePoolServiceImpl extends ServiceImpl<StoragePoolMapper, Stora
|
|||
public StoragePool addStoragePool(StoragePoolReq storagePoolReq) {
|
||||
// 检查名称是否重复
|
||||
QueryWrapper<StoragePool> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("name", storagePoolReq.getPoolName());
|
||||
queryWrapper.eq("pool_name", storagePoolReq.getPoolName());
|
||||
if (this.count(queryWrapper) > 0) {
|
||||
throw new BusinessException("存储池名称'" + storagePoolReq.getPoolName() + "'已存在,请使用其他名称");
|
||||
}
|
||||
|
|
@ -265,7 +265,7 @@ public class StoragePoolServiceImpl extends ServiceImpl<StoragePoolMapper, Stora
|
|||
log.info("删除 {} 条存储池数据", toRemoveNames.size());
|
||||
sb.append("删除 ").append(toRemoveNames.size()).append(" 条存储池数据\n");
|
||||
}
|
||||
return sb.toString() ;
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,4 +73,4 @@ logging:
|
|||
com.unisinsight.project.feign.ExternalApiClient: debug
|
||||
external:
|
||||
api:
|
||||
url: http://10.100.51.118:8000
|
||||
url: http://10.100.51.178:8000
|
||||
Loading…
Reference in New Issue