Parcourir la source

debug 运维项目

master
PoffyZhang il y a 1 an
Parent
révision
d839ca1cb4
3 fichiers modifiés avec 36 ajouts et 7 suppressions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java
  2. +5
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java
  3. +29
    -0
      pmapi/src/test/java/com/ningdatech/pmapi/cpu/CPUTest.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java Voir le fichier

@@ -113,7 +113,7 @@ public class GovProjectCollectionController {

@GetMapping("/operation/draft-detail/{draftId}")
@ApiOperation("运维项目归集草稿箱详情")
public GovBizProjectDetailVO operationDraftDetail(@PathVariable Long draftId) {
public GovOperationProjectDetailVO operationDraftDetail(@PathVariable Long draftId) {
return collectionManage.operationDraftDetail(draftId);
}

@@ -127,7 +127,7 @@ public class GovProjectCollectionController {
@PostMapping("/operation/draft")
@ApiOperation("运维项目归集暂存草稿箱")
@WebLog("运维项目归集暂存草稿箱")
public String operationDraft(@Valid @RequestBody GovBizProjectSaveDTO saveDTO) {
public String operationDraft(@Valid @RequestBody GovOperationProjectSaveDTO saveDTO) {
return collectionManage.operationDraft(saveDTO,null);
}



+ 5
- 5
pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java Voir le fichier

@@ -569,8 +569,8 @@ public class GovProjectCollectionManage {
}


public GovBizProjectDetailVO operationDraftDetail(Long draftId) {
GovBizProjectDetailVO res = new GovBizProjectDetailVO();
public GovOperationProjectDetailVO operationDraftDetail(Long draftId) {
GovOperationProjectDetailVO res = new GovOperationProjectDetailVO();
//查询草稿表
GovOperationProjectDraft draft = operationProjectDraftService.getById(draftId);

@@ -582,7 +582,7 @@ public class GovProjectCollectionManage {
//1.基本信息
res.setBaseProjId(draft.getBaseProjId());
res.setBaseProjName(draft.getBaseProjName());
res.setBaseinfo(BeanUtil.copyProperties(draft, GovBizProjectBaseinfoVO.class));
res.setBaseinfo(BeanUtil.copyProperties(draft, GovOperationProjectBaseinfoVO.class));

//2.申报信息
res.setApply(BeanUtil.copyProperties(draft, GovBizProjectApplyVO.class));
@@ -1163,7 +1163,7 @@ public class GovProjectCollectionManage {
return BizConst.SAVE_SUCCESS;
}

public String operationDraft(GovBizProjectSaveDTO saveDTO, UserInfoDetails user) {
public String operationDraft(GovOperationProjectSaveDTO saveDTO, UserInfoDetails user) {
if(Objects.isNull(user)){
user = LoginUserUtil.loginUserDetail();
}
@@ -1184,7 +1184,7 @@ public class GovProjectCollectionManage {
}

//1.保存基本信息
GovBizProjectBaseinfoDTO base = saveDTO.getBaseinfo();
GovOperationProjectBaseinfoDTO base = saveDTO.getBaseinfo();
String baseProjId = base.getBaseProjId();
String baseProjName = base.getBaseProjName();
//要生成 草稿的项目编号


+ 29
- 0
pmapi/src/test/java/com/ningdatech/pmapi/cpu/CPUTest.java Voir le fichier

@@ -0,0 +1,29 @@
package com.ningdatech.pmapi.cpu;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class CPUTest {
public static ExecutorService executorService = Executors.newFixedThreadPool(10);

public static void main(String[] args) {
for(int i = 0;i < 10;i++){
executorService.execute(() -> {
while (true) {
// 一个复杂的计算任务
long x = 123456789123456789L;
for (int j = 0; j < 10000; j++) {
x = (x * 123456789123456789L) % 123456789;
}
}
});
}

try{
Thread.sleep(10000);
executorService.shutdownNow();
}catch (Exception e){
e.printStackTrace();
}
}
}

Chargement…
Annuler
Enregistrer