| | |
| | | public static final RowMapper<Rc_video_user> ROW_MAPPER = new Rc_video_userRowMapper(); |
| | | |
| | | // 主键 |
| | | public static final String USER_ID = "user_id"; |
| | | public static final String ID = "id"; |
| | | // 普通属性 |
| | | public static final String USER_ID = "user_id"; |
| | | public static final String VIDEO_ID = "video_id"; |
| | | public static final String SCORE = "score"; |
| | | public static final String CREATE_TIME = "create_time"; |
| | |
| | | throw new IllegalArgumentException("po参数不允许为空!"); |
| | | } |
| | | //主键 |
| | | if (rc_video_user.isset_id) { |
| | | this.setId(rc_video_user.getId()); |
| | | } |
| | | //普通属性 |
| | | if (rc_video_user.isset_user_id) { |
| | | this.setUser_id(rc_video_user.getUser_id()); |
| | | } |
| | | //普通属性 |
| | | if (rc_video_user.isset_video_id) { |
| | | this.setVideo_id(rc_video_user.getVideo_id()); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public String getPkName_() { |
| | | return USER_ID; |
| | | return ID; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public Object getPkValue_() { |
| | | return this.getUser_id(); |
| | | return this.getId(); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getInsertSql_() { |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(USER_ID, this.getUser_id()); |
| | | ib.set(ID, this.getId()); |
| | | ib.set(USER_ID, this.getUser_id(), this.isset_user_id); |
| | | ib.set(VIDEO_ID, this.getVideo_id(), this.isset_video_id); |
| | | ib.set(SCORE, this.getScore(), this.isset_score); |
| | | ib.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(USER_ID, this.getUser_id(), this.isset_user_id); |
| | | ub.set(VIDEO_ID, this.getVideo_id(), this.isset_video_id); |
| | | ub.set(SCORE, this.getScore(), this.isset_score); |
| | | ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(USER_ID, this.getUser_id(), this.isset_user_id); |
| | | ub.set(VIDEO_ID, this.getVideo_id(), this.isset_video_id); |
| | | ub.set(SCORE, this.getScore(), this.isset_score); |
| | | ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time); |
| | |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(USER_ID, this.getUser_id(), this.isset_user_id); |
| | | ub.set(VIDEO_ID, this.getVideo_id(), this.isset_video_id); |
| | | ub.set(SCORE, this.getScore(), this.isset_score); |
| | | ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time); |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select user_id, video_id, score, create_time from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, user_id, video_id, score, create_time from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select user_id, video_id, score, create_time from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, user_id, video_id, score, create_time from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | Rc_video_user rc_video_user = new Rc_video_user(); |
| | | Integer columnIndex; |
| | | //主键 |
| | | columnIndex = resultSetUtils.findColumn(rs, Rc_video_user_mapper.USER_ID); |
| | | columnIndex = resultSetUtils.findColumn(rs, Rc_video_user_mapper.ID); |
| | | if (columnIndex > 0) { |
| | | rc_video_user.setUser_id(rs.getLong(columnIndex)); |
| | | rc_video_user.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //普通属性 |
| | | columnIndex = resultSetUtils.findColumn(rs, Rc_video_user_mapper.USER_ID); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | rc_video_user.setUser_id(null); |
| | | } else { |
| | | rc_video_user.setUser_id(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, Rc_video_user_mapper.VIDEO_ID); |
| | | if (columnIndex > 0) { |
| | | rc_video_user.setVideo_id(rs.getString(columnIndex)); |