@Test public void insertTaskTest() throws SQLException { LoginUser user = LoginUser.builder().id(1L).build(); TaskSql taskSql = TaskSql.builder().id(1L).class_name("name").build(); Assert.assertTrue(selectEntityService.insertTask(taskSql, user) == 1); }
public Long insertTask(TaskSql task, LoginUser user) throws SQLException { task.setPojo_name(task.getClass_name()); task.setUpdate_user_no(user.getUserNo()); task.setMethod_name(task.getClass_name()); task.setParameters(StringUtils.EMPTY); task.setScalarType("List"); task.setPojoType("EntityType"); task.setPagination(false); task.setSql_style("sql_style"); task.setApproved(2); task.setApproveMsg(StringUtils.EMPTY); task.setCrud_type("select"); task.setGenerated(true); task.setVersion(1); task.setHints(StringUtils.EMPTY); return selectEntityDao.insertTask(task); }
SelectEntityService { public Long insertTask(TaskSql task, LoginUser user) throws SQLException { task.setPojo_name(task.getClass_name()); task.setUpdate_user_no(user.getUserNo()); task.setMethod_name(task.getClass_name()); task.setParameters(StringUtils.EMPTY); task.setScalarType("List"); task.setPojoType("EntityType"); task.setPagination(false); task.setSql_style("sql_style"); task.setApproved(2); task.setApproveMsg(StringUtils.EMPTY); task.setCrud_type("select"); task.setGenerated(true); task.setVersion(1); task.setHints(StringUtils.EMPTY); return selectEntityDao.insertTask(task); } }
SelectEntityService { public Long insertTask(TaskSql task, LoginUser user) throws SQLException { task.setPojo_name(task.getClass_name()); task.setUpdate_user_no(user.getUserNo()); task.setMethod_name(task.getClass_name()); task.setParameters(StringUtils.EMPTY); task.setScalarType("List"); task.setPojoType("EntityType"); task.setPagination(false); task.setSql_style("sql_style"); task.setApproved(2); task.setApproveMsg(StringUtils.EMPTY); task.setCrud_type("select"); task.setGenerated(true); task.setVersion(1); task.setHints(StringUtils.EMPTY); return selectEntityDao.insertTask(task); }  }
SelectEntityService { public Long insertTask(TaskSql task, LoginUser user) throws SQLException { task.setPojo_name(task.getClass_name()); task.setUpdate_user_no(user.getUserNo()); task.setMethod_name(task.getClass_name()); task.setParameters(StringUtils.EMPTY); task.setScalarType("List"); task.setPojoType("EntityType"); task.setPagination(false); task.setSql_style("sql_style"); task.setApproved(2); task.setApproveMsg(StringUtils.EMPTY); task.setCrud_type("select"); task.setGenerated(true); task.setVersion(1); task.setHints(StringUtils.EMPTY); return selectEntityDao.insertTask(task); }  ValidatorChain validatePermision(LoginUser user, TaskSql taskSql, Errors errors); ListResult<TaskSqlView> findSelectEntityPageList(Paging<TaskSql> paging); Long insertTask(TaskSql task, LoginUser user); }
SelectEntityService { public Long insertTask(TaskSql task, LoginUser user) throws SQLException { task.setPojo_name(task.getClass_name()); task.setUpdate_user_no(user.getUserNo()); task.setMethod_name(task.getClass_name()); task.setParameters(StringUtils.EMPTY); task.setScalarType("List"); task.setPojoType("EntityType"); task.setPagination(false); task.setSql_style("sql_style"); task.setApproved(2); task.setApproveMsg(StringUtils.EMPTY); task.setCrud_type("select"); task.setGenerated(true); task.setVersion(1); task.setHints(StringUtils.EMPTY); return selectEntityDao.insertTask(task); }  ValidatorChain validatePermision(LoginUser user, TaskSql taskSql, Errors errors); ListResult<TaskSqlView> findSelectEntityPageList(Paging<TaskSql> paging); Long insertTask(TaskSql task, LoginUser user);  }