|
@@ -15,10 +15,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
+ <result property="orderNum" column="order_num" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTBranchPublicizeVo">
|
|
|
- select u.publicize_id, u.publicize_title, u.publicize_content, u.is_pinned, u.dept_id, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time from t_branch_publicize u left join sys_dept d on u.dept_id = d.dept_id
|
|
|
+ select u.publicize_id, u.order_num, u.publicize_title, u.publicize_content, u.is_pinned, u.dept_id, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time
|
|
|
+ from t_branch_publicize u
|
|
|
+ left join sys_dept d on u.dept_id = d.dept_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTBranchPublicizeList" parameterType="TBranchPublicize" resultMap="TBranchPublicizeResult">
|
|
@@ -29,11 +32,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="publicizeContent != null and publicizeContent != ''"> and u.publicize_content like concat(concat('%', #{publicizeContent}), '%')</if>
|
|
|
<if test="isPinned != null and isPinned != ''"> and u.is_pinned = #{isPinned}</if>
|
|
|
<if test="deptId != null "> and u.dept_id = #{deptId}</if>
|
|
|
+ <if test="orderNum != null "> and u.order_num = #{orderNum}</if>
|
|
|
and u.del_flag = 0
|
|
|
</where>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
${params.dataScope}
|
|
|
- order by IS_PINNED desc
|
|
|
+ order by u.IS_PINNED desc, u.order_num asc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTBranchPublicizeByPublicizeId" parameterType="Long" resultMap="TBranchPublicizeResult">
|
|
@@ -58,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="orderNum != null">order_num,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="publicizeId != null">#{publicizeId},</if>
|
|
@@ -70,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="orderNum != null">#{orderNum},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -85,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="orderNum != null">order_num = #{orderNum},</if>
|
|
|
</trim>
|
|
|
where publicize_id = #{publicizeId}
|
|
|
</update>
|