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