|
@@ -8,6 +8,7 @@
|
|
<result property="id" column="id"/>
|
|
<result property="id" column="id"/>
|
|
<result property="advertiserName" column="advertiser_name"/>
|
|
<result property="advertiserName" column="advertiser_name"/>
|
|
<result property="userId" column="user_id"/>
|
|
<result property="userId" column="user_id"/>
|
|
|
|
+ <result property="userName" column="userName"/>
|
|
<result property="mobile" column="mobile"/>
|
|
<result property="mobile" column="mobile"/>
|
|
<result property="email" column="email"/>
|
|
<result property="email" column="email"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createBy" column="create_by"/>
|
|
@@ -17,37 +18,42 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectKuaishouAdvertiserVo">
|
|
<sql id="selectKuaishouAdvertiserVo">
|
|
- select id,
|
|
|
|
- advertiser_name,
|
|
|
|
- user_id,
|
|
|
|
- mobile,
|
|
|
|
- email,
|
|
|
|
- create_by,
|
|
|
|
- create_time,
|
|
|
|
- update_by,
|
|
|
|
- update_time
|
|
|
|
- from Kuaishou_advertiser
|
|
|
|
|
|
+ select t1.id,
|
|
|
|
+ t1.advertiser_name,
|
|
|
|
+ t1.user_id,
|
|
|
|
+ t2.nick_name as 'userName',
|
|
|
|
+ t1.mobile,
|
|
|
|
+ t1.mobile,
|
|
|
|
+ t1.email,
|
|
|
|
+ t1.create_by,
|
|
|
|
+ t1.create_time,
|
|
|
|
+ t1.update_by,
|
|
|
|
+ t1.update_time
|
|
|
|
+ from kuaishou_advertiser t1
|
|
|
|
+ LEFT JOIN sys_user t2 ON t2.user_id = t1.user_id
|
|
|
|
+
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <select id="selectKuaishouAdvertiserList" parameterType="com.ruixuan.jinniu.entity.KuaishouAdvertiser" resultMap="KuaishouAdvertiserResult">
|
|
|
|
|
|
+ <select id="selectKuaishouAdvertiserList" parameterType="com.ruixuan.jinniu.entity.KuaishouAdvertiser"
|
|
|
|
+ resultMap="KuaishouAdvertiserResult">
|
|
<include refid="selectKuaishouAdvertiserVo"/>
|
|
<include refid="selectKuaishouAdvertiserVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="advertiserName != null and advertiserName != ''">and advertiser_name like concat('%',
|
|
|
|
|
|
+ <if test="advertiserName != null and advertiserName != ''">and t1.advertiser_name like concat('%',
|
|
#{advertiserName}, '%')
|
|
#{advertiserName}, '%')
|
|
</if>
|
|
</if>
|
|
- <if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
|
|
|
- <if test="mobile != null and mobile != ''">and mobile = #{mobile}</if>
|
|
|
|
- <if test="email != null and email != ''">and email = #{email}</if>
|
|
|
|
|
|
+ <if test="userId != null and userId != ''">and t1.user_id = #{userId}</if>
|
|
|
|
+ <if test="mobile != null and mobile != ''">and t1.mobile = #{mobile}</if>
|
|
|
|
+ <if test="email != null and email != ''">and t1.email = #{email}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectKuaishouAdvertiserById" parameterType="Long" resultMap="KuaishouAdvertiserResult">
|
|
<select id="selectKuaishouAdvertiserById" parameterType="Long" resultMap="KuaishouAdvertiserResult">
|
|
<include refid="selectKuaishouAdvertiserVo"/>
|
|
<include refid="selectKuaishouAdvertiserVo"/>
|
|
- where id = #{id}
|
|
|
|
|
|
+ where t1.id = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="insertKuaishouAdvertiser" parameterType="com.ruixuan.jinniu.entity.KuaishouAdvertiser">
|
|
<insert id="insertKuaishouAdvertiser" parameterType="com.ruixuan.jinniu.entity.KuaishouAdvertiser">
|
|
- insert into Kuaishou_advertiser
|
|
|
|
|
|
+ insert into kuaishou_advertiser
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="id != null">id,</if>
|
|
<if test="advertiserName != null and advertiserName != ''">advertiser_name,</if>
|
|
<if test="advertiserName != null and advertiserName != ''">advertiser_name,</if>
|
|
@@ -73,7 +79,7 @@
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateKuaishouAdvertiser" parameterType="com.ruixuan.jinniu.entity.KuaishouAdvertiser">
|
|
<update id="updateKuaishouAdvertiser" parameterType="com.ruixuan.jinniu.entity.KuaishouAdvertiser">
|
|
- update Kuaishou_advertiser
|
|
|
|
|
|
+ update kuaishou_advertiser
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="advertiserName != null and advertiserName != ''">advertiser_name = #{advertiserName},</if>
|
|
<if test="advertiserName != null and advertiserName != ''">advertiser_name = #{advertiserName},</if>
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
@@ -89,7 +95,7 @@
|
|
|
|
|
|
<delete id="deleteKuaishouAdvertiserById" parameterType="Long">
|
|
<delete id="deleteKuaishouAdvertiserById" parameterType="Long">
|
|
delete
|
|
delete
|
|
- from Kuaishou_advertiser
|
|
|
|
|
|
+ from kuaishou_advertiser
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
|