コード例 #1
0
  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * `orderguidereward`
   *
   * @mbggenerated
   */
  public String updateByExampleSelective(Map<String, Object> parameter) {
    FinalOrderGuideReward record = (FinalOrderGuideReward) parameter.get("record");
    FinalOrderGuideRewardCriteria example =
        (FinalOrderGuideRewardCriteria) parameter.get("example");

    SQL sql = new SQL();
    sql.UPDATE("`orderguidereward`");

    if (record.getOrderguiderewardid() != null) {
      sql.SET("orderGuideRewardId = #{record.orderguiderewardid,jdbcType=VARCHAR}");
    }

    if (record.getOrderid() != null) {
      sql.SET("orderId = #{record.orderid,jdbcType=VARCHAR}");
    }

    if (record.getGuideid() != null) {
      sql.SET("guideId = #{record.guideid,jdbcType=INTEGER}");
    }

    if (record.getOrderrewardtype() != null) {
      sql.SET("orderRewardType = #{record.orderrewardtype,jdbcType=INTEGER}");
    }

    if (record.getComment() != null) {
      sql.SET("comment = #{record.comment,jdbcType=VARCHAR}");
    }

    if (record.getReward() != null) {
      sql.SET("reward = #{record.reward,jdbcType=DECIMAL}");
    }

    if (record.getStatus() != null) {
      sql.SET("status = #{record.status,jdbcType=INTEGER}");
    }

    if (record.getUpdatedAt() != null) {
      sql.SET("updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}");
    }

    if (record.getCreatedAt() != null) {
      sql.SET("created_at = #{record.createdAt,jdbcType=TIMESTAMP}");
    }

    applyWhere(sql, example, true);
    return sql.toString();
  }
コード例 #2
0
  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * `orderguidereward`
   *
   * @mbggenerated
   */
  public String insertSelective(FinalOrderGuideReward record) {
    SQL sql = new SQL();
    sql.INSERT_INTO("`orderguidereward`");

    if (record.getOrderguiderewardid() != null) {
      sql.VALUES("orderGuideRewardId", "#{orderguiderewardid,jdbcType=VARCHAR}");
    }

    if (record.getOrderid() != null) {
      sql.VALUES("orderId", "#{orderid,jdbcType=VARCHAR}");
    }

    if (record.getGuideid() != null) {
      sql.VALUES("guideId", "#{guideid,jdbcType=INTEGER}");
    }

    if (record.getOrderrewardtype() != null) {
      sql.VALUES("orderRewardType", "#{orderrewardtype,jdbcType=INTEGER}");
    }

    if (record.getComment() != null) {
      sql.VALUES("comment", "#{comment,jdbcType=VARCHAR}");
    }

    if (record.getReward() != null) {
      sql.VALUES("reward", "#{reward,jdbcType=DECIMAL}");
    }

    if (record.getStatus() != null) {
      sql.VALUES("status", "#{status,jdbcType=INTEGER}");
    }

    if (record.getUpdatedAt() != null) {
      sql.VALUES("updated_at", "#{updatedAt,jdbcType=TIMESTAMP}");
    }

    if (record.getCreatedAt() != null) {
      sql.VALUES("created_at", "#{createdAt,jdbcType=TIMESTAMP}");
    }

    return sql.toString();
  }
コード例 #3
0
  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * `orderguidereward`
   *
   * @mbggenerated
   */
  public String updateByPrimaryKeySelective(FinalOrderGuideReward record) {
    SQL sql = new SQL();
    sql.UPDATE("`orderguidereward`");

    if (record.getOrderid() != null) {
      sql.SET("orderId = #{orderid,jdbcType=VARCHAR}");
    }

    if (record.getGuideid() != null) {
      sql.SET("guideId = #{guideid,jdbcType=INTEGER}");
    }

    if (record.getOrderrewardtype() != null) {
      sql.SET("orderRewardType = #{orderrewardtype,jdbcType=INTEGER}");
    }

    if (record.getComment() != null) {
      sql.SET("comment = #{comment,jdbcType=VARCHAR}");
    }

    if (record.getReward() != null) {
      sql.SET("reward = #{reward,jdbcType=DECIMAL}");
    }

    if (record.getStatus() != null) {
      sql.SET("status = #{status,jdbcType=INTEGER}");
    }

    if (record.getUpdatedAt() != null) {
      sql.SET("updated_at = #{updatedAt,jdbcType=TIMESTAMP}");
    }

    if (record.getCreatedAt() != null) {
      sql.SET("created_at = #{createdAt,jdbcType=TIMESTAMP}");
    }

    sql.WHERE("orderGuideRewardId = #{orderguiderewardid,jdbcType=VARCHAR}");

    return sql.toString();
  }