|
@@ -10,6 +10,10 @@
|
|
|
<result column="id_" property="id" />
|
|
|
<result column="name_" property="name" />
|
|
|
<result column="url_" property="url" />
|
|
|
+ <result column="order_" property="order" />
|
|
|
+ <result column="subject_id_" property="subjectId" />
|
|
|
+ <result column="level_" property="level" />
|
|
|
+ <result column="parent_id_" property="parentId" />
|
|
|
<result column="del_flag_" property="delFlag" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
@@ -23,8 +27,8 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ResourceRespository" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO resource_respository (id_,name_,url_,del_flag_,create_time_,update_time_)
|
|
|
- VALUES(#{id},#{name},#{url},#{delFlag},now(),now())
|
|
|
+ INSERT INTO resource_respository (id_,name_,url_,order_,subject_id_,level_,parent_id_,del_flag_,create_time_,update_time_)
|
|
|
+ VALUES(#{id},#{name},#{url},#{order},#{subjectId},#{level},#{parentId},#{delFlag},now(),now())
|
|
|
</insert>
|
|
|
|
|
|
|
|
@@ -51,4 +55,19 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+ <select id="findList" resultMap="ResourceRespository">
|
|
|
+ SELECT * FROM resource_respository
|
|
|
+ <where>
|
|
|
+ <if test="delFlag != null">
|
|
|
+ AND del_flag_ = #{delFlag}
|
|
|
+ </if>
|
|
|
+ <if test="parentId != null">
|
|
|
+ AND parent_id_ = #{parentId}
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null">
|
|
|
+ AND subject_id_ = #{subjectId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY order_ DESC
|
|
|
+ </select>
|
|
|
</mapper>
|