Commit 2a046d3a by Jony.L

算力资源配置增加电源、网卡字段,订单功能相应添加

parent a9b6ed47
...@@ -36,6 +36,14 @@ public class ResourceSpuRespVO { ...@@ -36,6 +36,14 @@ public class ResourceSpuRespVO {
@ExcelProperty("存储配置") @ExcelProperty("存储配置")
private String storage; private String storage;
@Schema(description = "电源配置", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("电源配置")
private String powerSupply;
@Schema(description = "网卡配置", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("网卡配置")
private String nic;
@Schema(description = "服务器ip", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "服务器ip", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("服务器ip") @ExcelProperty("服务器ip")
private String ip; private String ip;
......
...@@ -64,6 +64,12 @@ public class AppResourceOrderRespVO { ...@@ -64,6 +64,12 @@ public class AppResourceOrderRespVO {
@Schema(description = "存储配置", example = "2TB NVMe SSD") @Schema(description = "存储配置", example = "2TB NVMe SSD")
private String storage; private String storage;
@Schema(description = "电源配置", example = "3500W")
private String powerSupply;
@Schema(description = "网卡配置", example = "2Gbps")
private String nic;
@Schema(description = "服务器IP", example = "192.168.1.100") @Schema(description = "服务器IP", example = "192.168.1.100")
private String ip; private String ip;
......
...@@ -88,6 +88,8 @@ public class AppResourceSkuController { ...@@ -88,6 +88,8 @@ public class AppResourceSkuController {
respVO.setGpu(spu.getGpu()); respVO.setGpu(spu.getGpu());
respVO.setRam(spu.getRam()); respVO.setRam(spu.getRam());
respVO.setStorage(spu.getStorage()); respVO.setStorage(spu.getStorage());
respVO.setPowerSupply(spu.getPowerSupply());
respVO.setNic(spu.getNic());
respVO.setLocation(spu.getLocation()); respVO.setLocation(spu.getLocation());
return respVO; return respVO;
......
...@@ -35,6 +35,11 @@ public class AppResourceSkuRespVO { ...@@ -35,6 +35,11 @@ public class AppResourceSkuRespVO {
@Schema(description = "存储配置", example = "2TB NVMe SSD") @Schema(description = "存储配置", example = "2TB NVMe SSD")
private String storage; private String storage;
@Schema(description = "电源配置", example = "3500W")
private String powerSupply;
@Schema(description = "网卡配置", example = "2Gbps")
private String nic;
@Schema(description = "服务器所在地", example = "深圳") @Schema(description = "服务器所在地", example = "深圳")
private String location; private String location;
......
...@@ -48,6 +48,14 @@ public class ResourceSpuDO extends BaseDO { ...@@ -48,6 +48,14 @@ public class ResourceSpuDO extends BaseDO {
*/ */
private String storage; private String storage;
/** /**
* 电源配置
*/
private String powerSupply;
/**
* 网卡配置
*/
private String nic;
/**
* 服务器ip * 服务器ip
*/ */
private String ip; private String ip;
......
...@@ -36,7 +36,8 @@ public class ResourceConfigServiceImpl implements ResourceConfigService { ...@@ -36,7 +36,8 @@ public class ResourceConfigServiceImpl implements ResourceConfigService {
if (ObjectUtil.isEmpty(category)) { if (ObjectUtil.isEmpty(category)) {
queryVo.setConfigCategory(null); queryVo.setConfigCategory(null);
} else { } else {
queryVo.setConfigCategory(category); //power_supply是驼峰命名,需要转换
queryVo.setConfigCategory(category.replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase());
} }
queryVo.setStatus(ENABLE.getValue()); queryVo.setStatus(ENABLE.getValue());
List<ResourceConfigDO> list = resourceConfigMapper.selectPage(queryVo).getList(); List<ResourceConfigDO> list = resourceConfigMapper.selectPage(queryVo).getList();
......
...@@ -380,6 +380,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService { ...@@ -380,6 +380,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
respVO.setGpu(spu.getGpu()); respVO.setGpu(spu.getGpu());
respVO.setRam(spu.getRam()); respVO.setRam(spu.getRam());
respVO.setStorage(spu.getStorage()); respVO.setStorage(spu.getStorage());
respVO.setPowerSupply(spu.getPowerSupply());
respVO.setNic(spu.getNic());
respVO.setIp(spu.getIp()); respVO.setIp(spu.getIp());
respVO.setLocation(spu.getLocation()); respVO.setLocation(spu.getLocation());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment