Search in sources :

Example 1 with TestProjectAccessHistoryVo

use of com.ngtesting.platform.vo.TestProjectAccessHistoryVo in project ngtesting-platform by aaronchen2k.

the class ProjectServiceImpl method genHistoryVos.

@Override
public List<TestProjectAccessHistoryVo> genHistoryVos(List<TestProjectAccessHistory> pos) {
    List<TestProjectAccessHistoryVo> voList = new LinkedList<TestProjectAccessHistoryVo>();
    for (TestProjectAccessHistory po : pos) {
        TestProjectAccessHistoryVo vo = genHistoryVo(po);
        voList.add(vo);
    }
    return voList;
}
Also used : TestProjectAccessHistoryVo(com.ngtesting.platform.vo.TestProjectAccessHistoryVo) TestProjectAccessHistory(com.ngtesting.platform.entity.TestProjectAccessHistory) LinkedList(java.util.LinkedList)

Example 2 with TestProjectAccessHistoryVo

use of com.ngtesting.platform.vo.TestProjectAccessHistoryVo in project ngtesting-platform by aaronchen2k.

the class OrgServiceImpl method setDefaultPers.

@Override
public void setDefaultPers(Long orgId, UserVo userVo) {
    TestUser user = (TestUser) get(TestUser.class, userVo.getId());
    user.setDefaultOrgId(orgId);
    List<TestProjectAccessHistoryVo> recentProjects = projectService.listRecentProjectVo(orgId, userVo.getId());
    user.setDefaultPrjId(recentProjects.get(0).getProjectId());
    saveOrUpdate(user);
    userVo.setDefaultOrgId(user.getDefaultOrgId());
    userVo.setDefaultPrjId(recentProjects.get(0).getProjectId());
}
Also used : TestProjectAccessHistoryVo(com.ngtesting.platform.vo.TestProjectAccessHistoryVo) TestUser(com.ngtesting.platform.entity.TestUser)

Example 3 with TestProjectAccessHistoryVo

use of com.ngtesting.platform.vo.TestProjectAccessHistoryVo in project ngtesting-platform by aaronchen2k.

the class ProjectServiceImpl method genHistoryVo.

@Override
public TestProjectAccessHistoryVo genHistoryVo(TestProjectAccessHistory po) {
    if (po == null) {
        return null;
    }
    TestProjectAccessHistoryVo vo = new TestProjectAccessHistoryVo();
    BeanUtilEx.copyProperties(vo, po);
    vo.setProjectName(po.getProjectName());
    return vo;
}
Also used : TestProjectAccessHistoryVo(com.ngtesting.platform.vo.TestProjectAccessHistoryVo)

Aggregations

TestProjectAccessHistoryVo (com.ngtesting.platform.vo.TestProjectAccessHistoryVo)3 TestProjectAccessHistory (com.ngtesting.platform.entity.TestProjectAccessHistory)1 TestUser (com.ngtesting.platform.entity.TestUser)1 LinkedList (java.util.LinkedList)1