1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?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.operation.ReviewConfigMapper" >
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.operation.ReviewConfig" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="tag_name" property="tagName" jdbcType="VARCHAR" />
- <result column="recharge_amount" property="rechargeAmount" jdbcType="INTEGER" />
- <result column="status" property="status" jdbcType="INTEGER" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="system_id" property="system" jdbcType="INTEGER" />
- <result column="versions" property="versions" jdbcType="VARCHAR" />
- <result column="channel" property="channel" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, tag_name, recharge_amount, status, create_time, system_id, versions, channel
- </sql>
- <select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from review_config
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="getReviewConfigList" resultMap="BaseResultMap">
- select rc.id, rc.tag_name , rc.recharge_amount , rc.status, rc.create_time , rc.system_id, rc.versions, rc.channel
- from review_config rc
- where 1 = 1
- <if test="tagName != null and tagName !=''">
- and rc.tag_name LIKE CONCAT('%',#{tagName},'%')
- </if>
- <if test="channel != null and channel !=''">
- and rc.channel = #{channel}
- </if>
- <if test="system != null and system !=''">
- and rc.system_id = #{system}
- </if>
- order by rc.create_time desc
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.operation.ReviewConfig" useGeneratedKeys="true" keyProperty="id" >
- insert into review_config (tag_name, recharge_amount, status,
- create_time, system_id, versions,
- channel)
- values (#{tagName,jdbcType=VARCHAR}, #{rechargeAmount,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
- #{createTime,jdbcType=TIMESTAMP}, #{system,jdbcType=INTEGER}, #{versions,jdbcType=VARCHAR},
- #{channel,jdbcType=VARCHAR})
- </insert>
- <update id="updateById" parameterType="com.juxiao.xchat.module.xbd.domain.operation.ReviewConfig">
- update review_config
- set
- tag_name = #{tagName,jdbcType=VARCHAR},
- recharge_amount = #{rechargeAmount,jdbcType=INTEGER},
- status = #{status,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- system_id = #{system,jdbcType=INTEGER},
- versions = #{versions,jdbcType=VARCHAR},
- channel = #{channel,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <delete id="deleteById" parameterType="java.lang.Integer" >
- delete from review_config
- where id = #{id,jdbcType=INTEGER}
- </delete>
- </mapper>
|