123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?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.game.business.mapper.AppGameMapper">
-
- <resultMap type="com.game.business.domain.AppGame" id="AppGameResult">
- <result property="id" column="id" />
- <result property="name" column="name" />
- <result property="code" column="code" />
- <result property="classifyId" column="classify_id" />
- <result property="gameDate" column="game_date" />
- <result property="gameTime" column="game_time" />
- <result property="upItem" column="up_item" />
- <result property="logoUrl" column="logo_url" />
- <result property="liveImgUrl" column="live_img_url" />
- <result property="myImgUrl" column="my_img_url" />
- <result property="gamePath" column="game_path" />
- <result property="status" column="status" />
- <result property="createTime" column="create_time" />
- <result property="orderno" column="orderno" />
- <result property="enable" column="enable" />
- <result property="bettingCount" column="betting_count" />
- <result property="gameExpand1" column="game_expand1" />
- <result property="gameExpand2" column="game_expand2" />
- <result property="gameExpand3" column="game_expand3" />
- <result property="gameExpand4" column="game_expand4" />
- </resultMap>
- <sql id="selectAppGameVo">
- select id, name, code, classify_id, game_date, game_time, up_item, logo_url, live_img_url, my_img_url, game_path, status, create_time, orderno, enable, betting_count, game_expand1, game_expand2, game_expand3, game_expand4 from app_game
- </sql>
- <select id="selectAppGameList" parameterType="com.game.business.domain.AppGame" resultMap="AppGameResult">
- <include refid="selectAppGameVo"/>
- <where>
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
- <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
- <if test="gameDate != null and gameDate != ''"> and game_date like concat('%', #{gameDate}, '%')</if>
- <if test="classifyId != null "> and classify_id = #{classifyId}</if>
- <if test="upItem != null and upItem != ''"> and up_item = #{upItem}</if>
- <if test="logoUrl != null and logoUrl != ''"> and logo_url = #{logoUrl}</if>
- <if test="liveImgUrl != null and liveImgUrl != ''"> and live_img_url = #{liveImgUrl}</if>
- <if test="myImgUrl != null and myImgUrl != ''"> and my_img_url = #{myImgUrl}</if>
- <if test="gamePath != null and gamePath != ''"> and game_path = #{gamePath}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="orderno != null "> and orderno = #{orderno}</if>
- <if test="enable != null "> and enable = #{enable}</if>
- <if test="bettingCount != null "> and betting_count = #{bettingCount}</if>
- <if test="gameExpand1 != null and gameExpand1 != ''"> and game_expand1 = #{gameExpand1}</if>
- <if test="gameExpand2 != null and gameExpand2 != ''"> and game_expand2 = #{gameExpand2}</if>
- <if test="gameExpand3 != null and gameExpand3 != ''"> and game_expand3 = #{gameExpand3}</if>
- <if test="gameExpand4 != null and gameExpand4 != ''"> and game_expand4 = #{gameExpand4}</if>
- </where>
- </select>
-
- <select id="selectAppGameById" parameterType="Long" resultMap="AppGameResult">
- <include refid="selectAppGameVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertAppGame" parameterType="com.game.business.domain.AppGame">
- insert into app_game
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="name != null">name,</if>
- <if test="code != null">code,</if>
- <if test="classifyId != null">classify_id,</if>
- <if test="gameDate != null">game_date,</if>
- <if test="gameTime != null">game_time,</if>
- <if test="upItem != null">up_item,</if>
- <if test="logoUrl != null">logo_url,</if>
- <if test="liveImgUrl != null">live_img_url,</if>
- <if test="myImgUrl != null">my_img_url,</if>
- <if test="gamePath != null">game_path,</if>
- <if test="status != null">status,</if>
- <if test="createTime != null">create_time,</if>
- <if test="orderno != null">orderno,</if>
- <if test="enable != null">enable,</if>
- <if test="bettingCount != null">betting_count,</if>
- <if test="gameExpand1 != null">game_expand1,</if>
- <if test="gameExpand2 != null">game_expand2,</if>
- <if test="gameExpand3 != null">game_expand3,</if>
- <if test="gameExpand4 != null">game_expand4,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="name != null">#{name},</if>
- <if test="code != null">#{code},</if>
- <if test="classifyId != null">#{classifyId},</if>
- <if test="gameDate != null">#{gameDate},</if>
- <if test="gameTime != null">#{gameTime},</if>
- <if test="upItem != null">#{upItem},</if>
- <if test="logoUrl != null">#{logoUrl},</if>
- <if test="liveImgUrl != null">#{liveImgUrl},</if>
- <if test="myImgUrl != null">#{myImgUrl},</if>
- <if test="gamePath != null">#{gamePath},</if>
- <if test="status != null">#{status},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="orderno != null">#{orderno},</if>
- <if test="enable != null">#{enable},</if>
- <if test="bettingCount != null">#{bettingCount},</if>
- <if test="gameExpand1 != null">#{gameExpand1},</if>
- <if test="gameExpand2 != null">#{gameExpand2},</if>
- <if test="gameExpand3 != null">#{gameExpand3},</if>
- <if test="gameExpand4 != null">#{gameExpand4},</if>
- </trim>
- </insert>
- <update id="updateAppGame" parameterType="com.game.business.domain.AppGame">
- update app_game
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null">name = #{name},</if>
- <if test="code != null">code = #{code},</if>
- <if test="classifyId != null">classify_id = #{classifyId},</if>
- <if test="gameDate != null">game_date = #{gameDate},</if>
- <if test="gameTime != null">game_time = #{gameTime},</if>
- <if test="upItem != null">up_item = #{upItem},</if>
- <if test="logoUrl != null">logo_url = #{logoUrl},</if>
- <if test="liveImgUrl != null">live_img_url = #{liveImgUrl},</if>
- <if test="myImgUrl != null">my_img_url = #{myImgUrl},</if>
- <if test="gamePath != null">game_path = #{gamePath},</if>
- <if test="status != null">status = #{status},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="orderno != null">orderno = #{orderno},</if>
- <if test="enable != null">enable = #{enable},</if>
- <if test="bettingCount != null">betting_count = #{bettingCount},</if>
- <if test="gameExpand1 != null">game_expand1 = #{gameExpand1},</if>
- <if test="gameExpand2 != null">game_expand2 = #{gameExpand2},</if>
- <if test="gameExpand3 != null">game_expand3 = #{gameExpand3},</if>
- <if test="gameExpand4 != null">game_expand4 = #{gameExpand4},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteAppGameById" parameterType="Long">
- delete from app_game where id = #{id}
- </delete>
- <delete id="deleteAppGameByIds" parameterType="String">
- delete from app_game where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|