public String insertSelective(StudentLogAssign record) {
    BEGIN();
    INSERT_INTO("student_log_assign");

    if (record.getAssignId() != null) {
      VALUES("assign_id", "#{assignId,jdbcType=BIGINT}");
    }

    if (record.getStudentId() != null) {
      VALUES("student_id", "#{studentId,jdbcType=BIGINT}");
    }

    if (record.getDepartCode() != null) {
      VALUES("depart_code", "#{departCode,jdbcType=CHAR}");
    }

    if (record.getDepartName() != null) {
      VALUES("depart_name", "#{departName,jdbcType=VARCHAR}");
    }

    if (record.getJobCode() != null) {
      VALUES("job_code", "#{jobCode,jdbcType=CHAR}");
    }

    if (record.getJobName() != null) {
      VALUES("job_name", "#{jobName,jdbcType=VARCHAR}");
    }

    if (record.getJobDays() != null) {
      VALUES("job_days", "#{jobDays,jdbcType=INTEGER}");
    }

    if (record.getJobDeadline() != null) {
      VALUES("job_deadline", "#{jobDeadline,jdbcType=DATE}");
    }

    if (record.getAssignedTo() != null) {
      VALUES("assigned_to", "#{assignedTo,jdbcType=VARCHAR}");
    }

    if (record.getCreateTime() != null) {
      VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
    }

    if (record.getCreateUser() != null) {
      VALUES("create_user", "#{createUser,jdbcType=VARCHAR}");
    }

    return SQL();
  }
Exemplo n.º 2
0
  /**
   * 获取插入语句 <功能详细描述>
   *
   * @return [参数说明]
   * @return String [返回类型说明]
   * @exception throws [异常类型] [异常说明]
   * @see [类、类#方法、类#成员]
   */
  public String insertSql() {
    // 开始构建sql
    SqlBuilder.BEGIN();
    SqlBuilder.INSERT_INTO(this.tableName);
    for (Entry<String, String> entryTemp : getter2columnNameMapping.entrySet()) {
      SqlBuilder.VALUES(entryTemp.getValue(), "?");
    }
    for (Entry<String, String> entryTemp : otherColumn2expressionMapping.entrySet()) {
      SqlBuilder.VALUES(entryTemp.getKey(), entryTemp.getValue());
    }

    String insertSql = SqlBuilder.SQL();
    SqlBuilder.RESET();

    return insertSql;
  }
 /**
  * This method was generated by MyBatis Generator. This method corresponds to the database table
  * voltage_rank_classify
  *
  * @mbggenerated Wed Jan 13 12:15:38 CST 2016
  */
 public String insertSelective(VoltageRankClassify record) {
   BEGIN();
   INSERT_INTO("voltage_rank_classify");
   if (record.getId() != null) {
     VALUES("id", "#{id,jdbcType=INTEGER}");
   }
   if (record.getName() != null) {
     VALUES("name", "#{name,jdbcType=VARCHAR}");
   }
   if (record.getValue() != null) {
     VALUES("value", "#{value,jdbcType=INTEGER}");
   }
   if (record.getBigequipment() != null) {
     VALUES("bigEquipment", "#{bigequipment,jdbcType=INTEGER}");
   }
   return SQL();
 }
Exemplo n.º 4
0
  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * STAR
   *
   * @mbggenerated
   */
  public String insertSelective(Star record) {
    BEGIN();
    INSERT_INTO("STAR");

    if (record.getId() != null) {
      VALUES("ID", "#{id,jdbcType=INTEGER}");
    }

    if (record.getFirstname() != null) {
      VALUES("FIRSTNAME", "#{firstname,jdbcType=VARCHAR}");
    }

    if (record.getLastname() != null) {
      VALUES("LASTNAME", "#{lastname,jdbcType=VARCHAR}");
    }

    return SQL();
  }
Exemplo n.º 5
0
  public String insertSelective(News record) {
    BEGIN();
    INSERT_INTO("news");

    if (record.getId() != null) {
      VALUES("id", "#{id,jdbcType=BIGINT}");
    }

    if (record.getHost() != null) {
      VALUES("host", "#{host,jdbcType=VARCHAR}");
    }

    if (record.getTitle() != null) {
      VALUES("title", "#{title,jdbcType=VARCHAR}");
    }

    if (record.getUrl() != null) {
      VALUES("url", "#{url,jdbcType=VARCHAR}");
    }

    return SQL();
  }