1、新增文档分类管理
2、新增资源管理开发
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
<?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.rzdata.web.mapper.DocumentCategoryMapper">
|
||||
|
||||
<resultMap type="DocumentCategory" id="DocumentCategoryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="categoryDescription" column="category_description" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createById" column="create_by_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateById" column="update_by_id" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="types" column="types" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDocumentCategoryVo">
|
||||
select id, category_name, category_description, parent_id, create_by, create_by_id, create_time,
|
||||
update_by, update_by_id, update_time, types from t_document_category
|
||||
</sql>
|
||||
|
||||
<select id="selectDocumentCategoryList" parameterType="DocumentCategory" resultMap="DocumentCategoryResult">
|
||||
<include refid="selectDocumentCategoryVo"/>
|
||||
<where>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
||||
<if test="categoryDescription != null and categoryDescription != ''"> and category_description = #{categoryDescription}</if>
|
||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
||||
<if test="createById != null and createById != ''"> and create_by_id = #{createById}</if>
|
||||
<if test="updateById != null and updateById != ''"> and update_by_id = #{updateById}</if>
|
||||
<if test="types != null and types != ''"> and types = #{types}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDocumentCategoryById" parameterType="String" resultMap="DocumentCategoryResult">
|
||||
<include refid="selectDocumentCategoryVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDocumentCategory" parameterType="DocumentCategory">
|
||||
insert into t_document_category
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="categoryName != null and categoryName != ''">category_name,</if>
|
||||
<if test="categoryDescription != null">category_description,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createById != null and createById != ''">create_by_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateById != null">update_by_id,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="types != null">types,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="categoryName != null and categoryName != ''">#{categoryName},</if>
|
||||
<if test="categoryDescription != null">#{categoryDescription},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createById != null and createById != ''">#{createById},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateById != null">#{updateById},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="types != null">#{types},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDocumentCategory" parameterType="DocumentCategory">
|
||||
update t_document_category
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
|
||||
<if test="categoryDescription != null">category_description = #{categoryDescription},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createById != null and createById != ''">create_by_id = #{createById},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateById != null">update_by_id = #{updateById},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="types != null">types = #{types},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDocumentCategoryById" parameterType="String">
|
||||
delete from t_document_category where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDocumentCategoryByIds" parameterType="String">
|
||||
delete from t_document_category where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -18,10 +18,14 @@
|
||||
<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="docCategoryId" column="doc_category_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDocumentVo">
|
||||
select doc_id, doc_code, doc_name, doc_type, doc_principals, doc_resp_dept, doc_source, doc_status, doc_url, create_by, create_time, update_by, update_time from t_document
|
||||
select doc_id, doc_code, doc_name, doc_type, doc_principals, doc_resp_dept,
|
||||
doc_source, doc_status, doc_url, create_by, create_time,
|
||||
update_by, update_time, remark, doc_category_id from t_document
|
||||
</sql>
|
||||
|
||||
<select id="selectDocumentList" parameterType="Document" resultMap="DocumentResult">
|
||||
@@ -34,6 +38,7 @@
|
||||
<if test="docRespDept != null and docRespDept != ''"> and doc_resp_dept = #{docRespDept}</if>
|
||||
<if test="docSource != null and docSource != ''"> and doc_source = #{docSource}</if>
|
||||
<if test="docStatus != null and docStatus != ''"> and doc_status = #{docStatus}</if>
|
||||
<if test="docCategoryId != null and docCategoryId != ''"> and doc_category_id = #{docCategoryId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -58,6 +63,8 @@
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="docCategoryId != null">doc_category_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="docId != null">#{docId},</if>
|
||||
@@ -73,6 +80,8 @@
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="docCategoryId != null">#{doc_category_id},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -91,6 +100,8 @@
|
||||
<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="remark != null">remark = #{remark},</if>
|
||||
<if test="docCategoryId != null">docCategoryId = #{doc_category_id},</if>
|
||||
</trim>
|
||||
where doc_id = #{docId}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user