IntelligentRemindServiceCarSeriesMapper.xml 4.01 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.weapp.mapper.IntelligentRemindServiceCarSeriesMapper" >
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.weapp.model.IntelligentRemindServiceCarSeries" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="car_brand_logo" property="carBrandLogo" jdbcType="VARCHAR" />
    <result column="car_brand_id" property="carBrandId" jdbcType="INTEGER" />
    <result column="car_brand" property="carBrand" jdbcType="VARCHAR" />
    <result column="car_childs_brand_id" property="carChildsBrandId" jdbcType="INTEGER" />
    <result column="car_childs_brand_name" property="carChildsBrandName" jdbcType="VARCHAR" />
    <result column="car_series_id" property="carSeriesId" jdbcType="INTEGER" />
    <result column="car_series_name" property="carSeriesName" jdbcType="VARCHAR" />
    <result column="intelligent_remind_service_id" property="intelligentRemindServiceId" jdbcType="INTEGER" />
    <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
    <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
    <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
    <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
    <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
  </resultMap>

  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, car_brand_logo, car_brand_id, car_brand, car_childs_brand_id, car_childs_brand_name, 
    car_series_id, car_series_name, intelligent_remind_service_id, created_by, created_date, 
    updated_by, updated_date, deleted_flag
  </sql>

  <select id="getById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from dj_weapp_intelligent_remind_service_car_series
    where intelligent_remind_service_id = #{serviceId} and deleted_flag = 'N'
  </select>

  <update id="update" parameterType="cn.com.glsx.dj.weapp.model.IntelligentRemindServiceCarSeries" >
    update dj_weapp_intelligent_remind_service_car_series
    <set >
      <if test="record.carBrandLogo != null" >
        car_brand_logo = #{record.carBrandLogo,jdbcType=VARCHAR},
      </if>
      <if test="record.carBrandId != null" >
        car_brand_id = #{record.carBrandId,jdbcType=INTEGER},
      </if>
      <if test="record.carBrand != null" >
        car_brand = #{record.carBrand,jdbcType=VARCHAR},
      </if>
      <if test="record.carChildsBrandId != null" >
        car_childs_brand_id = #{record.carChildsBrandId,jdbcType=INTEGER},
      </if>
      <if test="record.carChildsBrandName != null" >
        car_childs_brand_name = #{record.carChildsBrandName,jdbcType=VARCHAR},
      </if>
      <if test="record.carSeriesId != null" >
        car_series_id = #{record.carSeriesId,jdbcType=INTEGER},
      </if>
      <if test="record.carSeriesName != null" >
        car_series_name = #{record.carSeriesName,jdbcType=VARCHAR},
      </if>
      <if test="record.createdBy != null" >
        created_by = #{record.createdBy,jdbcType=VARCHAR},
      </if>
      <if test="record.createdDate != null" >
        created_date = #{record.createdDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updatedBy != null" >
        updated_by = #{record.updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="record.updatedDate != null" >
        updated_date = #{record.updatedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.deletedFlag != null" >
        deleted_flag = #{record.deletedFlag,jdbcType=CHAR},
      </if>
    </set>
    where intelligent_remind_service_id = #{record.intelligentRemindServiceId,jdbcType=INTEGER}
  </update>

  <update id="deleteById" parameterType="java.lang.Integer">
    update dj_weapp_intelligent_remind_service_car_series
    set deleted_flag = 'D'
    where id = #{id}
  </update>

</mapper>