Search in sources :

Example 1 with AgentInfoRecord

use of com.code.server.constant.db.AgentInfoRecord in project summer by foxsugar.

the class IChargeDaoTest method test.

@Test
public void test() {
    List<AgentUser> list = (List<AgentUser>) agentUserDao.findAll();
    for (AgentUser agentUser : list) {
        AgentInfo agentInfo = new AgentInfo();
        AgentInfoRecord agentInfoRecord = new AgentInfoRecord();
        agentUser.setAgentInfo(agentInfo);
        agentUser.setAgentInfoRecord(agentInfoRecord);
        agentUserDao.save(agentUser);
    }
}
Also used : List(java.util.List) AgentInfo(com.code.server.constant.db.AgentInfo) AgentInfoRecord(com.code.server.constant.db.AgentInfoRecord) AgentUser(com.code.server.db.model.AgentUser) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 2 with AgentInfoRecord

use of com.code.server.constant.db.AgentInfoRecord in project summer by foxsugar.

the class DemoAction method updateAF.

@RequestMapping("/upateAgentInfo")
public void updateAF() {
    List<AgentUser> list = (List<AgentUser>) agentUserDao.findAll();
    for (AgentUser agentUser : list) {
        AgentInfo agentInfo = new AgentInfo();
        AgentInfoRecord agentInfoRecord = new AgentInfoRecord();
        agentUser.setAgentInfo(agentInfo);
        agentUser.setAgentInfoRecord(agentInfoRecord);
        agentUserDao.save(agentUser);
    }
}
Also used : AgentInfo(com.code.server.constant.db.AgentInfo) AgentInfoRecord(com.code.server.constant.db.AgentInfoRecord) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

AgentInfo (com.code.server.constant.db.AgentInfo)2 AgentInfoRecord (com.code.server.constant.db.AgentInfoRecord)2 AgentUser (com.code.server.db.model.AgentUser)1 List (java.util.List)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1