admin
2018-12-25 4cb15e222cd7d099d533ccbeb7f9a8cd99bf180c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?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="com.yeshi.fanli.dao.mybatis.GoodsClassMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.clazz.GoodsClass">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="name" property="name" jdbcType="VARCHAR"/>
        <result column="picture" property="picture" jdbcType="VARCHAR"/>
        <result column="orderby" property="orderby" jdbcType="INTEGER"/>
        <result column="createtime" property="createtime" jdbcType="TIMESTAMP"/>
        <result column="url" property="url" jdbcType="VARCHAR"/>
        <result column="key" property="key" jdbcType="VARCHAR"/>
        <result column="ios_click" property="iosClick" jdbcType="BIGINT"/>
        <result column="android_click" property="androidClick" jdbcType="BIGINT"/>
     </resultMap>
      
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsClass">
      update yeshi_ec_class
    <set>
      <if test="iosClick != null">ios_click=#{iosClick,jdbcType=BIGINT},</if>
      <if test="androidClick != null">android_click=#{androidClick,jdbcType=BIGINT},</if>
    </set> where id = #{id,jdbcType=BIGINT}
  </update>
    <select id="getKwById" resultType="String">
        SELECT ec.`key` FROM `yeshi_ec_class` ec WHERE ec.`id` = #{id};
    </select>
    
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
        select * from yeshi_ec_class where id = #{id,jdbcType=BIGINT}
      </select>
    
    
</mapper>