|
|
@ -14,6 +14,7 @@
|
|
|
|
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
|
|
|
|
<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="three_name" jdbcType="VARCHAR" property="threeName" />
|
|
|
|
|
|
|
|
<result column="count" jdbcType="INTEGER" property="count" />
|
|
|
|
<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>
|
|
|
@ -35,8 +36,7 @@
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
and ${criterion.condition}
|
|
|
|
and ${criterion.condition}
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
separator=",">
|
|
|
|
|
|
|
|
#{listItem}
|
|
|
|
#{listItem}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
@ -65,8 +65,7 @@
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
and ${criterion.condition}
|
|
|
|
and ${criterion.condition}
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
separator=",">
|
|
|
|
|
|
|
|
#{listItem}
|
|
|
|
#{listItem}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
@ -78,12 +77,10 @@
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
resource_id
|
|
|
|
resource_id, resource_name, url, picture_url, resource_type, source, one_tag, one_name,
|
|
|
|
, resource_name, url, picture_url, resource_type, source, one_tag, one_name,
|
|
|
|
two_tag, two_name, three_tag, three_name, count, 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"
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample" resultMap="BaseResultMap">
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
<if test="distinct">
|
|
|
|
distinct
|
|
|
|
distinct
|
|
|
@ -104,8 +101,7 @@
|
|
|
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
|
|
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
delete
|
|
|
|
delete from sys_resource
|
|
|
|
from sys_resource
|
|
|
|
|
|
|
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
|
|
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample">
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample">
|
|
|
@ -119,12 +115,14 @@
|
|
|
|
picture_url, resource_type, source,
|
|
|
|
picture_url, resource_type, source,
|
|
|
|
one_tag, one_name, two_tag,
|
|
|
|
one_tag, one_name, two_tag,
|
|
|
|
two_name, three_tag, three_name,
|
|
|
|
two_name, three_tag, three_name,
|
|
|
|
status, create_time)
|
|
|
|
count, 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},
|
|
|
|
#{oneTag,jdbcType=VARCHAR}, #{oneName,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR},
|
|
|
|
#{oneTag,jdbcType=VARCHAR}, #{oneName,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR},
|
|
|
|
#{twoName,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR},
|
|
|
|
#{twoName,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR},
|
|
|
|
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
|
#{count,jdbcType=INTEGER}, #{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">
|
|
|
|
insert into sys_resource
|
|
|
|
insert into sys_resource
|
|
|
@ -165,6 +163,9 @@
|
|
|
|
<if test="threeName != null">
|
|
|
|
<if test="threeName != null">
|
|
|
|
three_name,
|
|
|
|
three_name,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="count != null">
|
|
|
|
|
|
|
|
count,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
status,
|
|
|
|
status,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -209,6 +210,9 @@
|
|
|
|
<if test="threeName != null">
|
|
|
|
<if test="threeName != null">
|
|
|
|
#{threeName,jdbcType=VARCHAR},
|
|
|
|
#{threeName,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="count != null">
|
|
|
|
|
|
|
|
#{count,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -217,8 +221,7 @@
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample"
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample" resultType="java.lang.Long">
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
|
|
|
|
select count(*) from sys_resource
|
|
|
|
select count(*) from sys_resource
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
@ -263,6 +266,9 @@
|
|
|
|
<if test="record.threeName != null">
|
|
|
|
<if test="record.threeName != null">
|
|
|
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
|
|
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="record.count != null">
|
|
|
|
|
|
|
|
count = #{record.count,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="record.status != null">
|
|
|
|
<if test="record.status != null">
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -288,6 +294,7 @@
|
|
|
|
two_name = #{record.twoName,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},
|
|
|
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
count = #{record.count,jdbcType=INTEGER},
|
|
|
|
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">
|
|
|
@ -330,6 +337,9 @@
|
|
|
|
<if test="threeName != null">
|
|
|
|
<if test="threeName != null">
|
|
|
|
three_name = #{threeName,jdbcType=VARCHAR},
|
|
|
|
three_name = #{threeName,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="count != null">
|
|
|
|
|
|
|
|
count = #{count,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -352,6 +362,7 @@
|
|
|
|
two_name = #{twoName,jdbcType=VARCHAR},
|
|
|
|
two_name = #{twoName,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
|
|
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
|
|
|
three_name = #{threeName,jdbcType=VARCHAR},
|
|
|
|
three_name = #{threeName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
count = #{count,jdbcType=INTEGER},
|
|
|
|
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}
|
|
|
@ -426,7 +437,7 @@
|
|
|
|
SELECT resource_type, count(*) as count
|
|
|
|
SELECT resource_type, count(*) as count
|
|
|
|
FROM sys_resource
|
|
|
|
FROM sys_resource
|
|
|
|
WHERE resource_id IN
|
|
|
|
WHERE resource_id IN
|
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
AND source = #{schoolId}
|
|
|
|
AND source = #{schoolId}
|
|
|
|