|
|
@ -8,9 +8,12 @@
|
|
|
|
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
|
|
|
|
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
|
|
|
|
<result column="resource_type" jdbcType="VARCHAR" property="resourceType" />
|
|
|
|
<result column="resource_type" jdbcType="VARCHAR" property="resourceType" />
|
|
|
|
<result column="source" jdbcType="VARCHAR" property="source" />
|
|
|
|
<result column="source" jdbcType="VARCHAR" property="source" />
|
|
|
|
<result column="ont_tag" jdbcType="VARCHAR" property="ontTag" />
|
|
|
|
<result column="one_tag" jdbcType="VARCHAR" property="oneTag" />
|
|
|
|
|
|
|
|
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
|
|
|
|
<result column="two_tag" jdbcType="VARCHAR" property="twoTag" />
|
|
|
|
<result column="two_tag" jdbcType="VARCHAR" property="twoTag" />
|
|
|
|
|
|
|
|
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
|
|
|
|
<result column="three_tag" jdbcType="VARCHAR" property="threeTag" />
|
|
|
|
<result column="three_tag" jdbcType="VARCHAR" property="threeTag" />
|
|
|
|
|
|
|
|
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
|
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
@ -73,8 +76,8 @@
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
resource_id, resource_name, url, picture_url, resource_type, source, ont_tag, two_tag,
|
|
|
|
resource_id, resource_name, url, picture_url, resource_type, source, one_tag, one_name,
|
|
|
|
three_tag, status, create_time
|
|
|
|
two_tag, two_name, three_tag, three_name, status, create_time
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample" resultMap="BaseResultMap">
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample" resultMap="BaseResultMap">
|
|
|
|
select
|
|
|
|
select
|
|
|
@ -109,11 +112,13 @@
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
|
|
|
insert into sys_resource (resource_id, resource_name, url,
|
|
|
|
insert into sys_resource (resource_id, resource_name, url,
|
|
|
|
picture_url, resource_type, source,
|
|
|
|
picture_url, resource_type, source,
|
|
|
|
ont_tag, two_tag, three_tag,
|
|
|
|
one_tag, one_name, two_tag,
|
|
|
|
|
|
|
|
two_name, three_tag, three_name,
|
|
|
|
status, create_time)
|
|
|
|
status, create_time)
|
|
|
|
values (#{resourceId,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
|
|
|
|
values (#{resourceId,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
|
|
|
|
#{pictureUrl,jdbcType=VARCHAR}, #{resourceType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
|
|
|
|
#{pictureUrl,jdbcType=VARCHAR}, #{resourceType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
|
|
|
|
#{ontTag,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR},
|
|
|
|
#{oneTag,jdbcType=VARCHAR}, #{oneName,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{twoName,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR},
|
|
|
|
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
|
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
|
|
@ -137,15 +142,24 @@
|
|
|
|
<if test="source != null">
|
|
|
|
<if test="source != null">
|
|
|
|
source,
|
|
|
|
source,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="ontTag != null">
|
|
|
|
<if test="oneTag != null">
|
|
|
|
ont_tag,
|
|
|
|
one_tag,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="oneName != null">
|
|
|
|
|
|
|
|
one_name,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="twoTag != null">
|
|
|
|
<if test="twoTag != null">
|
|
|
|
two_tag,
|
|
|
|
two_tag,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="twoName != null">
|
|
|
|
|
|
|
|
two_name,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="threeTag != null">
|
|
|
|
<if test="threeTag != null">
|
|
|
|
three_tag,
|
|
|
|
three_tag,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="threeName != null">
|
|
|
|
|
|
|
|
three_name,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
status,
|
|
|
|
status,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -172,15 +186,24 @@
|
|
|
|
<if test="source != null">
|
|
|
|
<if test="source != null">
|
|
|
|
#{source,jdbcType=VARCHAR},
|
|
|
|
#{source,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="ontTag != null">
|
|
|
|
<if test="oneTag != null">
|
|
|
|
#{ontTag,jdbcType=VARCHAR},
|
|
|
|
#{oneTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="oneName != null">
|
|
|
|
|
|
|
|
#{oneName,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="twoTag != null">
|
|
|
|
<if test="twoTag != null">
|
|
|
|
#{twoTag,jdbcType=VARCHAR},
|
|
|
|
#{twoTag,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="twoName != null">
|
|
|
|
|
|
|
|
#{twoName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="threeTag != null">
|
|
|
|
<if test="threeTag != null">
|
|
|
|
#{threeTag,jdbcType=VARCHAR},
|
|
|
|
#{threeTag,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="threeName != null">
|
|
|
|
|
|
|
|
#{threeName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -216,15 +239,24 @@
|
|
|
|
<if test="record.source != null">
|
|
|
|
<if test="record.source != null">
|
|
|
|
source = #{record.source,jdbcType=VARCHAR},
|
|
|
|
source = #{record.source,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="record.ontTag != null">
|
|
|
|
<if test="record.oneTag != null">
|
|
|
|
ont_tag = #{record.ontTag,jdbcType=VARCHAR},
|
|
|
|
one_tag = #{record.oneTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="record.oneName != null">
|
|
|
|
|
|
|
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="record.twoTag != null">
|
|
|
|
<if test="record.twoTag != null">
|
|
|
|
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
|
|
|
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="record.twoName != null">
|
|
|
|
|
|
|
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="record.threeTag != null">
|
|
|
|
<if test="record.threeTag != null">
|
|
|
|
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="record.threeName != null">
|
|
|
|
|
|
|
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="record.status != null">
|
|
|
|
<if test="record.status != null">
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -244,9 +276,12 @@
|
|
|
|
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
|
|
|
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
|
|
|
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
|
|
|
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
|
|
|
source = #{record.source,jdbcType=VARCHAR},
|
|
|
|
source = #{record.source,jdbcType=VARCHAR},
|
|
|
|
ont_tag = #{record.ontTag,jdbcType=VARCHAR},
|
|
|
|
one_tag = #{record.oneTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
|
|
|
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
|
|
|
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<if test="_parameter != null">
|
|
|
@ -271,15 +306,24 @@
|
|
|
|
<if test="source != null">
|
|
|
|
<if test="source != null">
|
|
|
|
source = #{source,jdbcType=VARCHAR},
|
|
|
|
source = #{source,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="ontTag != null">
|
|
|
|
<if test="oneTag != null">
|
|
|
|
ont_tag = #{ontTag,jdbcType=VARCHAR},
|
|
|
|
one_tag = #{oneTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="oneName != null">
|
|
|
|
|
|
|
|
one_name = #{oneName,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="twoTag != null">
|
|
|
|
<if test="twoTag != null">
|
|
|
|
two_tag = #{twoTag,jdbcType=VARCHAR},
|
|
|
|
two_tag = #{twoTag,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="twoName != null">
|
|
|
|
|
|
|
|
two_name = #{twoName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="threeTag != null">
|
|
|
|
<if test="threeTag != null">
|
|
|
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="threeName != null">
|
|
|
|
|
|
|
|
three_name = #{threeName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -296,38 +340,21 @@
|
|
|
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
|
resource_type = #{resourceType,jdbcType=VARCHAR},
|
|
|
|
resource_type = #{resourceType,jdbcType=VARCHAR},
|
|
|
|
source = #{source,jdbcType=VARCHAR},
|
|
|
|
source = #{source,jdbcType=VARCHAR},
|
|
|
|
ont_tag = #{ontTag,jdbcType=VARCHAR},
|
|
|
|
one_tag = #{oneTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
one_name = #{oneName,jdbcType=VARCHAR},
|
|
|
|
two_tag = #{twoTag,jdbcType=VARCHAR},
|
|
|
|
two_tag = #{twoTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
two_name = #{twoName,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
three_name = #{threeName,jdbcType=VARCHAR},
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
|
|
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <select id="selectResource" parameterType="java.lang.String" resultMap="SelectResourceMap">-->
|
|
|
|
|
|
|
|
<!-- SELECT sr.resource_id,sr.resource_name,sr.resource_type,sra.one_name,sra.two_name,sra.three_name-->
|
|
|
|
|
|
|
|
<!-- FROM sys_resource sr-->
|
|
|
|
|
|
|
|
<!-- JOIN sys_resource_and_course sra ON sr.resource_id = sra.resource_id-->
|
|
|
|
|
|
|
|
<!-- <where>-->
|
|
|
|
|
|
|
|
<!-- <if test="oneId != null and oneId != ''">-->
|
|
|
|
|
|
|
|
<!-- sra.one_id = #{oneId}-->
|
|
|
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
|
|
|
<!-- <if test="twoId != null and twoId != ''">-->
|
|
|
|
|
|
|
|
<!-- and sra.two_id = #{twoId}-->
|
|
|
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
|
|
|
<!-- <if test="threeId != null and threeId != ''">-->
|
|
|
|
|
|
|
|
<!-- and sra.three_id = #{threeId}-->
|
|
|
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
|
|
|
<!-- <if test="resourceName != null and resourceName != ''">-->
|
|
|
|
|
|
|
|
<!-- and sr.resource_name = #{resourceName}-->
|
|
|
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
|
|
|
<!-- </where>-->
|
|
|
|
|
|
|
|
<!-- order by sr.create_time-->
|
|
|
|
|
|
|
|
<!-- </select>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectResource" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
<select id="selectResource" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
SELECT *
|
|
|
|
SELECT *
|
|
|
|
FROM sys_resource
|
|
|
|
FROM sys_resource
|
|
|
|
|
|
|
|
join
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="oneId != null and oneId != ''">
|
|
|
|
<if test="oneId != null and oneId != ''">
|
|
|
|
ont_tag = #{oneId}
|
|
|
|
ont_tag = #{oneId}
|
|
|
|