|
@@ -5,45 +5,68 @@
|
|
<mapper namespace="com.ruoyi.post.mapper.PostPublisherMapper">
|
|
<mapper namespace="com.ruoyi.post.mapper.PostPublisherMapper">
|
|
|
|
|
|
<resultMap type="PostPublisher" id="PostPublisherResult">
|
|
<resultMap type="PostPublisher" id="PostPublisherResult">
|
|
- <result property="publisherId" column="publisher_id" />
|
|
|
|
- <result property="publisherName" column="publisher_name" />
|
|
|
|
- <result property="nickName" column="nick_name" />
|
|
|
|
- <result property="publisherEmail" column="publisher_email" />
|
|
|
|
- <result property="publisherPhonenumber" column="publisher_phonenumber" />
|
|
|
|
- <result property="status" column="status" />
|
|
|
|
- <result property="publisherAddress" column="publisher_address" />
|
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
|
- <result property="remark" column="remark" />
|
|
|
|
|
|
+ <result property="publisherId" column="publisher_id"/>
|
|
|
|
+ <result property="publisherImage" column="publisher_image"/>
|
|
|
|
+ <result property="publisherName" column="publisher_name"/>
|
|
|
|
+ <result property="nickName" column="nick_name"/>
|
|
|
|
+ <result property="publisherEmail" column="publisher_email"/>
|
|
|
|
+ <result property="publisherPhonenumber" column="publisher_phonenumber"/>
|
|
|
|
+ <result property="status" column="status"/>
|
|
|
|
+ <result property="publisherAddress" column="publisher_address"/>
|
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
|
+ <result property="remark" column="remark"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectPostPublisherVo">
|
|
<sql id="selectPostPublisherVo">
|
|
- select publisher_id, publisher_name, nick_name, publisher_email, publisher_phonenumber, status, publisher_address, del_flag, create_by, create_time, update_by, update_time, remark from post_publisher
|
|
|
|
|
|
+ select publisher_id,
|
|
|
|
+ publisher_image,
|
|
|
|
+ publisher_name,
|
|
|
|
+ nick_name,
|
|
|
|
+ publisher_email,
|
|
|
|
+ publisher_phonenumber,
|
|
|
|
+ status,
|
|
|
|
+ publisher_address,
|
|
|
|
+ del_flag,
|
|
|
|
+ create_by,
|
|
|
|
+ create_time,
|
|
|
|
+ update_by,
|
|
|
|
+ update_time,
|
|
|
|
+ remark
|
|
|
|
+ from post_publisher
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+ <!--查询发行方列表-->
|
|
<select id="selectPostPublisherList" parameterType="PostPublisher" resultMap="PostPublisherResult">
|
|
<select id="selectPostPublisherList" parameterType="PostPublisher" resultMap="PostPublisherResult">
|
|
<include refid="selectPostPublisherVo"/>
|
|
<include refid="selectPostPublisherVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="publisherName != null and publisherName != ''"> and publisher_name like concat('%', #{publisherName}, '%')</if>
|
|
|
|
- <if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
|
- <if test="publisherEmail != null and publisherEmail != ''"> and publisher_email = #{publisherEmail}</if>
|
|
|
|
- <if test="publisherPhonenumber != null and publisherPhonenumber != ''"> and publisher_phonenumber = #{publisherPhonenumber}</if>
|
|
|
|
- <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
- <if test="publisherAddress != null and publisherAddress != ''"> and publisher_address = #{publisherAddress}</if>
|
|
|
|
|
|
+ <if test="publisherImage != null and publisherImage != ''">and publisher_image = #{publisherImage}</if>
|
|
|
|
+ <if test="publisherName != null and publisherName != ''">and publisher_name like concat('%',
|
|
|
|
+ #{publisherName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nickName != null and nickName != ''">and nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
|
+ <if test="publisherEmail != null and publisherEmail != ''">and publisher_email = #{publisherEmail}</if>
|
|
|
|
+ <if test="publisherPhonenumber != null and publisherPhonenumber != ''">and publisher_phonenumber =
|
|
|
|
+ #{publisherPhonenumber}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null and status != ''">and status = #{status}</if>
|
|
|
|
+ <if test="publisherAddress != null and publisherAddress != ''">and publisher_address =
|
|
|
|
+ #{publisherAddress}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+ <!--查询单个用户-->
|
|
<select id="selectPostPublisherByPublisherId" parameterType="Long" resultMap="PostPublisherResult">
|
|
<select id="selectPostPublisherByPublisherId" parameterType="Long" resultMap="PostPublisherResult">
|
|
<include refid="selectPostPublisherVo"/>
|
|
<include refid="selectPostPublisherVo"/>
|
|
where publisher_id = #{publisherId}
|
|
where publisher_id = #{publisherId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+ <!--插入发行方信息-->
|
|
<insert id="insertPostPublisher" parameterType="PostPublisher" useGeneratedKeys="true" keyProperty="publisherId">
|
|
<insert id="insertPostPublisher" parameterType="PostPublisher" useGeneratedKeys="true" keyProperty="publisherId">
|
|
insert into post_publisher
|
|
insert into post_publisher
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="publisherImage != null">publisher_image,</if>
|
|
<if test="publisherName != null and publisherName != ''">publisher_name,</if>
|
|
<if test="publisherName != null and publisherName != ''">publisher_name,</if>
|
|
<if test="nickName != null and nickName != ''">nick_name,</if>
|
|
<if test="nickName != null and nickName != ''">nick_name,</if>
|
|
<if test="publisherEmail != null">publisher_email,</if>
|
|
<if test="publisherEmail != null">publisher_email,</if>
|
|
@@ -58,6 +81,7 @@
|
|
<if test="remark != null">remark,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="publisherImage != null">#{publisherImage},</if>
|
|
<if test="publisherName != null and publisherName != ''">#{publisherName},</if>
|
|
<if test="publisherName != null and publisherName != ''">#{publisherName},</if>
|
|
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
|
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
|
<if test="publisherEmail != null">#{publisherEmail},</if>
|
|
<if test="publisherEmail != null">#{publisherEmail},</if>
|
|
@@ -72,10 +96,11 @@
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
-
|
|
|
|
|
|
+ <!--修改发行方信息-->
|
|
<update id="updatePostPublisher" parameterType="PostPublisher">
|
|
<update id="updatePostPublisher" parameterType="PostPublisher">
|
|
update post_publisher
|
|
update post_publisher
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="publisherImage != null">publisher_image = #{publisherImage},</if>
|
|
<if test="publisherName != null and publisherName != ''">publisher_name = #{publisherName},</if>
|
|
<if test="publisherName != null and publisherName != ''">publisher_name = #{publisherName},</if>
|
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
|
<if test="publisherEmail != null">publisher_email = #{publisherEmail},</if>
|
|
<if test="publisherEmail != null">publisher_email = #{publisherEmail},</if>
|
|
@@ -91,11 +116,13 @@
|
|
</trim>
|
|
</trim>
|
|
where publisher_id = #{publisherId}
|
|
where publisher_id = #{publisherId}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
|
|
+ <!--发行方ID删除-->
|
|
<delete id="deletePostPublisherByPublisherId" parameterType="Long">
|
|
<delete id="deletePostPublisherByPublisherId" parameterType="Long">
|
|
- delete from post_publisher where publisher_id = #{publisherId}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from post_publisher
|
|
|
|
+ where publisher_id = #{publisherId}
|
|
</delete>
|
|
</delete>
|
|
-
|
|
|
|
|
|
+ <!--批量删除-->
|
|
<delete id="deletePostPublisherByPublisherIds" parameterType="String">
|
|
<delete id="deletePostPublisherByPublisherIds" parameterType="String">
|
|
delete from post_publisher where publisher_id in
|
|
delete from post_publisher where publisher_id in
|
|
<foreach item="publisherId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="publisherId" collection="array" open="(" separator="," close=")">
|