| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <?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.ydtech.modules.fnc.dao.FncBookMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.fnc.model.FncBook">
- <id column="book_code" jdbcType="VARCHAR" property="bookCode"/>
- <result column="book_name" jdbcType="VARCHAR" property="bookName"/>
- <result column="city" jdbcType="VARCHAR" property="city"/>
- <result column="currency" jdbcType="VARCHAR" property="currency"/>
- <result column="status" jdbcType="VARCHAR" property="status"/>
- <result column="createtime" jdbcType="DATE" property="createtime"/>
- <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
- <result column="shop_id" jdbcType="VARCHAR" property="shopId"/>
- <result column="feerate" jdbcType="DOUBLE" property="feerate"/>
- </resultMap>
- <sql id="Base_Column_List">
- book_code, book_name, city, currency, status, createtime, create_by, shop_id, feerate
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from fnc_book
- where book_code = #{bookCode,jdbcType=VARCHAR}
- </select>
- <select id="selectByBookName" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from fnc_book
- where book_name = #{bookName,jdbcType=VARCHAR}
- </select>
- <select id="selectByBookNameIsExits" resultType="java.lang.Integer">
- select count(1)
- from fnc_book
- where book_name = #{bookName,jdbcType=VARCHAR}
- AND book_code != #{bookCode,jdbcType=VARCHAR}
- </select>
- <select id="select" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from fnc_book
- where 1=1
- <if test="bookCode != null and bookCode != '' ">
- and book_code = #{bookCode,jdbcType=VARCHAR}
- </if>
- <if test="bookName != null and bookName != ''">
- and book_name like concat('%', #{bookName,jdbcType=VARCHAR},'%')
- </if>
- <if test="city != null and city != ''">
- and city = #{city,jdbcType=VARCHAR}
- </if>
- <if test="currency != null and currency != ''">
- and currency = #{currency,jdbcType=VARCHAR}
- </if>
- <if test="status != null and status != ''">
- and status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="createtime != null">
- and createtime = #{createtime,jdbcType=DATE}
- </if>
- <if test="createBy != null and createBy != ''">
- and create_by = #{createBy,jdbcType=VARCHAR}
- </if>
- <if test="shopId != null and shopId != ''">
- and shop_id = #{shopId,jdbcType=VARCHAR}
- </if>
- <if test="feerate != null and feerate != ''">
- and feerate = #{feerate,jdbcType=VARCHAR}
- </if>
- order by book_code
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete
- from fnc_book
- where book_code = #{bookCode,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.ydtech.modules.fnc.model.FncBook">
- insert into fnc_book (book_code, book_name, city,
- currency, status, createtime,
- create_by, shop_id, feerate)
- values (#{bookCode,jdbcType=VARCHAR}, #{bookName,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR},
- #{currency,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createtime,jdbcType=DATE},
- #{createBy,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{feerate,jdbcType=DOUBLE})
- </insert>
- <insert id="insertSelective" parameterType="com.ydtech.modules.fnc.model.FncBook">
- insert into fnc_book
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="bookCode != null">
- book_code,
- </if>
- <if test="bookName != null">
- book_name,
- </if>
- <if test="city != null">
- city,
- </if>
- <if test="currency != null">
- currency,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="createtime != null">
- createtime,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="shopId != null">
- shop_id,
- </if>
- <if test="feerate != null">
- feerate,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="bookCode != null">
- #{bookCode,jdbcType=VARCHAR},
- </if>
- <if test="bookName != null">
- #{bookName,jdbcType=VARCHAR},
- </if>
- <if test="city != null">
- #{city,jdbcType=VARCHAR},
- </if>
- <if test="currency != null">
- #{currency,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- #{createtime,jdbcType=DATE},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="shopId != null">
- #{shopId,jdbcType=VARCHAR},
- </if>
- <if test="feerate != null">
- #{feerate,jdbcType=DOUBLE},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.ydtech.modules.fnc.model.FncBook">
- update fnc_book
- <set>
- <if test="bookName != null">
- book_name = #{bookName,jdbcType=VARCHAR},
- </if>
- <if test="city != null">
- city = #{city,jdbcType=VARCHAR},
- </if>
- <if test="currency != null">
- currency = #{currency,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- createtime = #{createtime,jdbcType=DATE},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="shopId != null">
- shop_id = #{shopId,jdbcType=VARCHAR},
- </if>
- <if test="feerate != null">
- feerate = #{feerate,jdbcType=DOUBLE},
- </if>
- </set>
- where book_code = #{bookCode,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.ydtech.modules.fnc.model.FncBook">
- update fnc_book
- set book_name = #{bookName,jdbcType=VARCHAR},
- city = #{city,jdbcType=VARCHAR},
- currency = #{currency,jdbcType=VARCHAR},
- status = #{status,jdbcType=VARCHAR},
- createtime = #{createtime,jdbcType=DATE},
- create_by = #{createBy,jdbcType=VARCHAR},
- shop_id = #{shopId,jdbcType=VARCHAR},
- feerate = #{feerate,jdbcType=DOUBLE}
- where book_code = #{bookCode,jdbcType=VARCHAR}
- </update>
- </mapper>
|