|
|
|
@ -10,7 +10,8 @@
|
|
|
|
|
<result column="source" jdbcType="VARCHAR" property="source"/>
|
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.resource_center.entity.admin.AdminCaseWithBLOBs">
|
|
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
|
|
|
|
|
type="com.sztzjy.resource_center.entity.admin.AdminCaseWithBLOBs">
|
|
|
|
|
<result column="content" jdbcType="LONGVARCHAR" property="content"/>
|
|
|
|
|
<result column="catalog" jdbcType="LONGVARCHAR" property="catalog"/>
|
|
|
|
|
</resultMap>
|
|
|
|
@ -32,7 +33,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -61,7 +63,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -73,12 +76,15 @@
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
id, name, label_id, picture_url, status, source, create_time
|
|
|
|
|
id
|
|
|
|
|
, name, label_id, picture_url, status, source, create_time
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
|
content, catalog
|
|
|
|
|
content
|
|
|
|
|
, catalog
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseExample" resultMap="ResultMapWithBLOBs">
|
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseExample"
|
|
|
|
|
resultMap="ResultMapWithBLOBs">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
@ -94,7 +100,8 @@
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseExample" resultMap="BaseResultMap">
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseExample"
|
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
@ -117,7 +124,8 @@
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
delete from admin_case
|
|
|
|
|
delete
|
|
|
|
|
from admin_case
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseExample">
|
|
|
|
@ -129,12 +137,10 @@
|
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseWithBLOBs">
|
|
|
|
|
insert into admin_case (id, name, label_id,
|
|
|
|
|
picture_url, status, source,
|
|
|
|
|
create_time, content, catalog
|
|
|
|
|
)
|
|
|
|
|
create_time, content, catalog)
|
|
|
|
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{labelId,jdbcType=VARCHAR},
|
|
|
|
|
#{pictureUrl,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR},
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}, #{catalog,jdbcType=LONGVARCHAR}
|
|
|
|
|
)
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}, #{catalog,jdbcType=LONGVARCHAR})
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseWithBLOBs">
|
|
|
|
|
insert into admin_case
|
|
|
|
@ -197,7 +203,8 @@
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseExample" resultType="java.lang.Long">
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.admin.AdminCaseExample"
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
|
select count(*) from admin_case
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
@ -320,7 +327,6 @@
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="dtoMap" type="com.sztzjy.resource_center.entity.admin.AdminCaseReturnDto">
|
|
|
|
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
|
@ -366,7 +372,7 @@
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="source !=null and source !=''">
|
|
|
|
|
and a.source !='管理员'
|
|
|
|
|
and a.source in (#{source},'管理员')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by a.create_time desc
|
|
|
|
|