Explorar el Código

工作台数据 debug

master
PoffyZhang hace 1 año
padre
commit
981ec97b70
Se han modificado 2 ficheros con 20 adiciones y 8 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -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;
}
}

Cargando…
Cancelar
Guardar