| | |
| | | |
| | | <sql id="selectPostVo"> |
| | | select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark |
| | | from sys_post |
| | | from sys_post p |
| | | </sql> |
| | | |
| | | <select id="selectPostList" parameterType="com.ruoyi.project.system.domain.SysPost" resultMap="SysPostResult"> |
| | |
| | | <if test="postName != null and postName != ''"> |
| | | AND post_name like concat('%', #{postName}, '%') |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <include refid="selectPostVo"/> |
| | | where post_code=#{postCode} limit 1 |
| | | </select> |
| | | |
| | | <update id="updatePost" parameterType="com.ruoyi.project.system.domain.SysPost"> |
| | | <select id="selectPostByTenantId" resultType="com.ruoyi.project.system.domain.SysPost"> |
| | | <include refid="selectPostVo"/> |
| | | <where> |
| | | AND p.tenant_id = #{tenantId} |
| | | </where> |
| | | </select> |
| | | |
| | | <update id="updatePost" parameterType="com.ruoyi.project.system.domain.SysPost"> |
| | | update sys_post |
| | | <set> |
| | | <if test="postCode != null and postCode != ''">post_code = #{postCode},</if> |
| | |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="tenantId != null and tenantId != ''">tenant_id,</if> |
| | | create_time |
| | | )values( |
| | | <if test="postId != null and postId != 0">#{postId},</if> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="tenantId != null and tenantId != ''">#{tenantId},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |