use of com.ctrip.platform.dal.daogen.entity.UserProject in project dal by ctripcorp.
the class DaoOfUserProject method getMinUserProjectByProjectId.
public UserProject getMinUserProjectByProjectId(int project_id) throws SQLException {
FreeSelectSqlBuilder<UserProject> builder = new FreeSelectSqlBuilder<>(dbCategory);
builder.setTemplate("SELECT id,project_id, user_no FROM user_project WHERE id=(SELECT min(id) FROM user_project WHERE project_id = ?)");
StatementParameters parameters = new StatementParameters();
int i = 1;
parameters.set(i++, "project_id", Types.INTEGER, project_id);
builder.mapWith(userProjectRowMapper).requireFirst().nullable();
DalHints hints = DalHints.createIfAbsent(null).allowPartial();
return queryDao.query(builder, parameters, hints);
}
Aggregations