123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <?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.juxiao.xchat.module.xbd.mapper.home.AppActivityMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.home.AppActivity" >
- <id column="act_id" property="actId" jdbcType="INTEGER" />
- <result column="act_name" property="actName" jdbcType="VARCHAR" />
- <result column="act_status" property="actStatus" jdbcType="TINYINT" />
- <result column="act_alert_version" property="actAlertVersion" jdbcType="VARCHAR" />
- <result column="alert_win" property="alertWin" jdbcType="BIT" />
- <result column="alert_win_pic" property="alertWinPic" jdbcType="VARCHAR" />
- <result column="alert_win_loc" property="alertWinLoc" jdbcType="TINYINT" />
- <result column="skip_type" property="skipType" jdbcType="TINYINT" />
- <result column="skip_url" property="skipUrl" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- act_id, act_name, act_status, act_alert_version, alert_win, alert_win_pic, alert_win_loc,
- skip_type, skip_url, create_time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from app_activity
- where act_id = #{actId,jdbcType=INTEGER}
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.home.AppActivity" >
- <selectKey resultType="java.lang.Integer" keyProperty="actId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into app_activity (act_name, act_status, act_alert_version,
- alert_win, alert_win_pic, alert_win_loc,
- skip_type, skip_url, create_time
- )
- values (#{actName,jdbcType=VARCHAR}, #{actStatus,jdbcType=TINYINT}, #{actAlertVersion,jdbcType=VARCHAR},
- #{alertWin,jdbcType=BIT}, #{alertWinPic,jdbcType=VARCHAR}, #{alertWinLoc,jdbcType=TINYINT},
- #{skipType,jdbcType=TINYINT}, #{skipUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.home.AppActivity" >
- <selectKey resultType="java.lang.Integer" keyProperty="actId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into app_activity
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="actName != null" >
- act_name,
- </if>
- <if test="actStatus != null" >
- act_status,
- </if>
- <if test="actAlertVersion != null" >
- act_alert_version,
- </if>
- <if test="alertWin != null" >
- alert_win,
- </if>
- <if test="alertWinPic != null" >
- alert_win_pic,
- </if>
- <if test="alertWinLoc != null" >
- alert_win_loc,
- </if>
- <if test="skipType != null" >
- skip_type,
- </if>
- <if test="skipUrl != null" >
- skip_url,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="actName != null" >
- #{actName,jdbcType=VARCHAR},
- </if>
- <if test="actStatus != null" >
- #{actStatus,jdbcType=TINYINT},
- </if>
- <if test="actAlertVersion != null" >
- #{actAlertVersion,jdbcType=VARCHAR},
- </if>
- <if test="alertWin != null" >
- #{alertWin,jdbcType=BIT},
- </if>
- <if test="alertWinPic != null" >
- #{alertWinPic,jdbcType=VARCHAR},
- </if>
- <if test="alertWinLoc != null" >
- #{alertWinLoc,jdbcType=TINYINT},
- </if>
- <if test="skipType != null" >
- #{skipType,jdbcType=TINYINT},
- </if>
- <if test="skipUrl != null" >
- #{skipUrl,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.home.AppActivity" >
- update app_activity
- <set >
- <if test="actName != null" >
- act_name = #{actName,jdbcType=VARCHAR},
- </if>
- <if test="actStatus != null" >
- act_status = #{actStatus,jdbcType=TINYINT},
- </if>
- <if test="actAlertVersion != null" >
- act_alert_version = #{actAlertVersion,jdbcType=VARCHAR},
- </if>
- <if test="alertWin != null" >
- alert_win = #{alertWin,jdbcType=BIT},
- </if>
- <if test="alertWinPic != null" >
- alert_win_pic = #{alertWinPic,jdbcType=VARCHAR},
- </if>
- <if test="alertWinLoc != null" >
- alert_win_loc = #{alertWinLoc,jdbcType=TINYINT},
- </if>
- <if test="skipType != null" >
- skip_type = #{skipType,jdbcType=TINYINT},
- </if>
- <if test="skipUrl != null" >
- skip_url = #{skipUrl,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where act_id = #{actId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.home.AppActivity" >
- update app_activity
- set act_name = #{actName,jdbcType=VARCHAR},
- act_status = #{actStatus,jdbcType=TINYINT},
- act_alert_version = #{actAlertVersion,jdbcType=VARCHAR},
- alert_win = #{alertWin,jdbcType=BIT},
- alert_win_pic = #{alertWinPic,jdbcType=VARCHAR},
- alert_win_loc = #{alertWinLoc,jdbcType=TINYINT},
- skip_type = #{skipType,jdbcType=TINYINT},
- skip_url = #{skipUrl,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP}
- where act_id = #{actId,jdbcType=INTEGER}
- </update>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from app_activity
- where act_id = #{actId,jdbcType=INTEGER}
- </delete>
- <select id="selectAppActivityByList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from app_activity
- where 1 = 1
- <if test="actStatus != null">
- and act_status = #{actStatus}
- </if>
- <if test="alertWinLoc != null ">
- and alert_win_loc = #{alertWinLoc}
- </if>
- <if test="skipType != null">
- and skip_type = #{skipType}
- </if>
- order by create_time desc
- </select>
- </mapper>
|