Преглед на файлове

工作台数据 debug

tags/24080901
PoffyZhang преди 1 година
родител
ревизия
981ec97b70
променени са 2 файла, в които са добавени 20 реда и са изтрити 8 реда
  1. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/po/TodoCenterStatisticsPO.java
  2. +16
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/StatisticsServiceImpl.java

+ 4
- 4
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/po/TodoCenterStatisticsPO.java Целия файл

@@ -16,12 +16,12 @@ import java.util.List;
public class TodoCenterStatisticsPO {

@ApiModelProperty("待处理数")
private Integer todoNum;
private Integer todoNum = 0;
@ApiModelProperty("已处理数")
private Integer idoNum;
private Integer idoNum = 0;
@ApiModelProperty("我发起数")
private Integer mysubmitNum;
private Integer mysubmitNum = 0;
@ApiModelProperty("抄送我数")
private Integer ccmeNum;
private Integer ccmeNum = 0;

}

+ 16
- 4
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/StatisticsServiceImpl.java Целия файл

@@ -6,6 +6,8 @@ import com.ningdatech.pmapi.todocenter.service.StatisticsService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
* @Classname StatisticsService
* @Description
@@ -21,13 +23,23 @@ public class StatisticsServiceImpl implements StatisticsService {
@Override
public TodoCenterStatisticsPO getStatistics(Long userId) {
TodoCenterStatisticsPO res = new TodoCenterStatisticsPO();

TodoCenterStatisticsPO todoOrIdo = mapper.getTodoOrIdo(userId);
res.setTodoNum(todoOrIdo.getTodoNum());
res.setIdoNum(todoOrIdo.getIdoNum());
if(Objects.nonNull(todoOrIdo)){
res.setTodoNum(todoOrIdo.getTodoNum());
res.setIdoNum(todoOrIdo.getIdoNum());
}

TodoCenterStatisticsPO submit = mapper.mysubmitNum(userId);
res.setMysubmitNum(submit.getMysubmitNum());
if(Objects.nonNull(submit)){
res.setMysubmitNum(submit.getMysubmitNum());
}

TodoCenterStatisticsPO ccMe = mapper.ccNums(userId);
res.setCcmeNum(ccMe.getCcmeNum());
if(Objects.nonNull(ccMe)){
res.setCcmeNum(ccMe.getCcmeNum());
}

return res;
}
}

Loading…
Отказ
Запис