新增三方接口
parent
643fa12b28
commit
d12d97df5c
@ -1,431 +1,466 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.sztzjy.resource_center.mapper.SysObjectiveQuestionsMapper">
|
<mapper namespace="com.sztzjy.resource_center.mapper.SysObjectiveQuestionsMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
||||||
<id column="objective_id" jdbcType="VARCHAR" property="objectiveId" />
|
<id column="objective_id" jdbcType="VARCHAR" property="objectiveId"/>
|
||||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
<result column="content" jdbcType="VARCHAR" property="content"/>
|
||||||
<result column="question_a" jdbcType="VARCHAR" property="questionA" />
|
<result column="question_a" jdbcType="VARCHAR" property="questionA"/>
|
||||||
<result column="question_b" jdbcType="VARCHAR" property="questionB" />
|
<result column="question_b" jdbcType="VARCHAR" property="questionB"/>
|
||||||
<result column="question_c" jdbcType="VARCHAR" property="questionC" />
|
<result column="question_c" jdbcType="VARCHAR" property="questionC"/>
|
||||||
<result column="question_d" jdbcType="VARCHAR" property="questionD" />
|
<result column="question_d" jdbcType="VARCHAR" property="questionD"/>
|
||||||
<result column="question_e" jdbcType="VARCHAR" property="questionE" />
|
<result column="question_e" jdbcType="VARCHAR" property="questionE"/>
|
||||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
<result column="score" jdbcType="DECIMAL" property="score"/>
|
||||||
<result column="answer" jdbcType="VARCHAR" property="answer" />
|
<result column="answer" jdbcType="VARCHAR" property="answer"/>
|
||||||
<result column="analysis" jdbcType="VARCHAR" property="analysis" />
|
<result column="analysis" jdbcType="VARCHAR" property="analysis"/>
|
||||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
<result column="is_delete" jdbcType="BIT" property="isDelete" />
|
<result column="is_delete" jdbcType="BIT" property="isDelete"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
<if test="criteria.valid">
|
<if test="criteria.valid">
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.noValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.listValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
#{listItem}
|
separator=",">
|
||||||
</foreach>
|
#{listItem}
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
</if>
|
</sql>
|
||||||
</foreach>
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
</where>
|
<where>
|
||||||
</sql>
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
<sql id="Update_By_Example_Where_Clause">
|
<if test="criteria.valid">
|
||||||
<where>
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<if test="criteria.valid">
|
<choose>
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<when test="criterion.noValue">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
and ${criterion.condition}
|
||||||
<choose>
|
</when>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition}
|
||||||
</when>
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
<when test="criterion.listValue">
|
separator=",">
|
||||||
and ${criterion.condition}
|
#{listItem}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
</foreach>
|
||||||
#{listItem}
|
</when>
|
||||||
</foreach>
|
</choose>
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
</if>
|
</sql>
|
||||||
</foreach>
|
<sql id="Base_Column_List">
|
||||||
</where>
|
objective_id
|
||||||
</sql>
|
, source, content, question_a, question_b, question_c, question_d, question_e,
|
||||||
<sql id="Base_Column_List">
|
|
||||||
objective_id, source, content, question_a, question_b, question_c, question_d, question_e,
|
|
||||||
score, answer, analysis, type, create_time, update_time, is_delete
|
score, answer, analysis, type, create_time, update_time, is_delete
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample"
|
||||||
select
|
resultMap="BaseResultMap">
|
||||||
<if test="distinct">
|
select
|
||||||
distinct
|
<if test="distinct">
|
||||||
</if>
|
distinct
|
||||||
<include refid="Base_Column_List" />
|
</if>
|
||||||
from sys_objective_questions
|
<include refid="Base_Column_List"/>
|
||||||
<if test="_parameter != null">
|
from sys_objective_questions
|
||||||
<include refid="Example_Where_Clause" />
|
<if test="_parameter != null">
|
||||||
</if>
|
<include refid="Example_Where_Clause"/>
|
||||||
<if test="orderByClause != null">
|
</if>
|
||||||
order by ${orderByClause}
|
<if test="orderByClause != null">
|
||||||
</if>
|
order by ${orderByClause}
|
||||||
</select>
|
</if>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
</select>
|
||||||
select
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
<include refid="Base_Column_List" />
|
select
|
||||||
from sys_objective_questions
|
<include refid="Base_Column_List"/>
|
||||||
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
from sys_objective_questions
|
||||||
</select>
|
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
</select>
|
||||||
delete from sys_objective_questions
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
delete
|
||||||
</delete>
|
from sys_objective_questions
|
||||||
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample">
|
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
||||||
delete from sys_objective_questions
|
</delete>
|
||||||
<if test="_parameter != null">
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample">
|
||||||
<include refid="Example_Where_Clause" />
|
delete from sys_objective_questions
|
||||||
</if>
|
<if test="_parameter != null">
|
||||||
</delete>
|
<include refid="Example_Where_Clause"/>
|
||||||
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
</if>
|
||||||
insert into sys_objective_questions (objective_id, source, content,
|
</delete>
|
||||||
question_a, question_b, question_c,
|
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
||||||
question_d, question_e, score,
|
insert into sys_objective_questions (objective_id, source, content,
|
||||||
answer, analysis, type,
|
question_a, question_b, question_c,
|
||||||
create_time, update_time, is_delete
|
question_d, question_e, score,
|
||||||
)
|
answer, analysis, type,
|
||||||
values (#{objectiveId,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
|
create_time, update_time, is_delete)
|
||||||
#{questionA,jdbcType=VARCHAR}, #{questionB,jdbcType=VARCHAR}, #{questionC,jdbcType=VARCHAR},
|
values (#{objectiveId,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
|
||||||
#{questionD,jdbcType=VARCHAR}, #{questionE,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL},
|
#{questionA,jdbcType=VARCHAR}, #{questionB,jdbcType=VARCHAR}, #{questionC,jdbcType=VARCHAR},
|
||||||
#{answer,jdbcType=VARCHAR}, #{analysis,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
#{questionD,jdbcType=VARCHAR}, #{questionE,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL},
|
||||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=BIT}
|
#{answer,jdbcType=VARCHAR}, #{analysis,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||||
)
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=BIT})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
||||||
insert into sys_objective_questions
|
insert into sys_objective_questions
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="objectiveId != null">
|
<if test="objectiveId != null">
|
||||||
objective_id,
|
objective_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="source != null">
|
<if test="source != null">
|
||||||
source,
|
source,
|
||||||
</if>
|
</if>
|
||||||
<if test="content != null">
|
<if test="content != null">
|
||||||
content,
|
content,
|
||||||
</if>
|
</if>
|
||||||
<if test="questionA != null">
|
<if test="questionA != null">
|
||||||
question_a,
|
question_a,
|
||||||
</if>
|
</if>
|
||||||
<if test="questionB != null">
|
<if test="questionB != null">
|
||||||
question_b,
|
question_b,
|
||||||
</if>
|
</if>
|
||||||
<if test="questionC != null">
|
<if test="questionC != null">
|
||||||
question_c,
|
question_c,
|
||||||
</if>
|
</if>
|
||||||
<if test="questionD != null">
|
<if test="questionD != null">
|
||||||
question_d,
|
question_d,
|
||||||
</if>
|
</if>
|
||||||
<if test="questionE != null">
|
<if test="questionE != null">
|
||||||
question_e,
|
question_e,
|
||||||
</if>
|
</if>
|
||||||
<if test="score != null">
|
<if test="score != null">
|
||||||
score,
|
score,
|
||||||
</if>
|
</if>
|
||||||
<if test="answer != null">
|
<if test="answer != null">
|
||||||
answer,
|
answer,
|
||||||
</if>
|
</if>
|
||||||
<if test="analysis != null">
|
<if test="analysis != null">
|
||||||
analysis,
|
analysis,
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
type,
|
type,
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time,
|
create_time,
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time,
|
update_time,
|
||||||
</if>
|
</if>
|
||||||
<if test="isDelete != null">
|
<if test="isDelete != null">
|
||||||
is_delete,
|
is_delete,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="objectiveId != null">
|
<if test="objectiveId != null">
|
||||||
#{objectiveId,jdbcType=VARCHAR},
|
#{objectiveId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="source != null">
|
<if test="source != null">
|
||||||
#{source,jdbcType=VARCHAR},
|
#{source,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="content != null">
|
<if test="content != null">
|
||||||
#{content,jdbcType=VARCHAR},
|
#{content,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="questionA != null">
|
<if test="questionA != null">
|
||||||
#{questionA,jdbcType=VARCHAR},
|
#{questionA,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="questionB != null">
|
<if test="questionB != null">
|
||||||
#{questionB,jdbcType=VARCHAR},
|
#{questionB,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="questionC != null">
|
<if test="questionC != null">
|
||||||
#{questionC,jdbcType=VARCHAR},
|
#{questionC,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="questionD != null">
|
<if test="questionD != null">
|
||||||
#{questionD,jdbcType=VARCHAR},
|
#{questionD,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="questionE != null">
|
<if test="questionE != null">
|
||||||
#{questionE,jdbcType=VARCHAR},
|
#{questionE,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="score != null">
|
<if test="score != null">
|
||||||
#{score,jdbcType=DECIMAL},
|
#{score,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
<if test="answer != null">
|
<if test="answer != null">
|
||||||
#{answer,jdbcType=VARCHAR},
|
#{answer,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="analysis != null">
|
<if test="analysis != null">
|
||||||
#{analysis,jdbcType=VARCHAR},
|
#{analysis,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
#{type,jdbcType=VARCHAR},
|
#{type,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
<if test="isDelete != null">
|
<if test="isDelete != null">
|
||||||
#{isDelete,jdbcType=BIT},
|
#{isDelete,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample"
|
||||||
select count(*) from sys_objective_questions
|
resultType="java.lang.Long">
|
||||||
<if test="_parameter != null">
|
select count(*) from sys_objective_questions
|
||||||
<include refid="Example_Where_Clause" />
|
<if test="_parameter != null">
|
||||||
</if>
|
<include refid="Example_Where_Clause"/>
|
||||||
</select>
|
</if>
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
</select>
|
||||||
update sys_objective_questions
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
<set>
|
update sys_objective_questions
|
||||||
<if test="record.objectiveId != null">
|
<set>
|
||||||
objective_id = #{record.objectiveId,jdbcType=VARCHAR},
|
<if test="record.objectiveId != null">
|
||||||
</if>
|
objective_id = #{record.objectiveId,jdbcType=VARCHAR},
|
||||||
<if test="record.source != null">
|
</if>
|
||||||
|
<if test="record.source != null">
|
||||||
|
source = #{record.source,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.content != null">
|
||||||
|
content = #{record.content,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.questionA != null">
|
||||||
|
question_a = #{record.questionA,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.questionB != null">
|
||||||
|
question_b = #{record.questionB,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.questionC != null">
|
||||||
|
question_c = #{record.questionC,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.questionD != null">
|
||||||
|
question_d = #{record.questionD,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.questionE != null">
|
||||||
|
question_e = #{record.questionE,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.score != null">
|
||||||
|
score = #{record.score,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="record.answer != null">
|
||||||
|
answer = #{record.answer,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.analysis != null">
|
||||||
|
analysis = #{record.analysis,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.type != null">
|
||||||
|
type = #{record.type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.isDelete != null">
|
||||||
|
is_delete = #{record.isDelete,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update sys_objective_questions
|
||||||
|
set objective_id = #{record.objectiveId,jdbcType=VARCHAR},
|
||||||
source = #{record.source,jdbcType=VARCHAR},
|
source = #{record.source,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.content != null">
|
|
||||||
content = #{record.content,jdbcType=VARCHAR},
|
content = #{record.content,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.questionA != null">
|
|
||||||
question_a = #{record.questionA,jdbcType=VARCHAR},
|
question_a = #{record.questionA,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.questionB != null">
|
|
||||||
question_b = #{record.questionB,jdbcType=VARCHAR},
|
question_b = #{record.questionB,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.questionC != null">
|
|
||||||
question_c = #{record.questionC,jdbcType=VARCHAR},
|
question_c = #{record.questionC,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.questionD != null">
|
|
||||||
question_d = #{record.questionD,jdbcType=VARCHAR},
|
question_d = #{record.questionD,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.questionE != null">
|
|
||||||
question_e = #{record.questionE,jdbcType=VARCHAR},
|
question_e = #{record.questionE,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.score != null">
|
|
||||||
score = #{record.score,jdbcType=DECIMAL},
|
score = #{record.score,jdbcType=DECIMAL},
|
||||||
</if>
|
|
||||||
<if test="record.answer != null">
|
|
||||||
answer = #{record.answer,jdbcType=VARCHAR},
|
answer = #{record.answer,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.analysis != null">
|
|
||||||
analysis = #{record.analysis,jdbcType=VARCHAR},
|
analysis = #{record.analysis,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
type = #{record.type,jdbcType=VARCHAR},
|
type = #{record.type,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
is_delete = #{record.isDelete,jdbcType=BIT}
|
||||||
<if test="record.isDelete != null">
|
<if test="_parameter != null">
|
||||||
is_delete = #{record.isDelete,jdbcType=BIT},
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</update>
|
||||||
<if test="_parameter != null">
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
update sys_objective_questions
|
||||||
</if>
|
<set>
|
||||||
</update>
|
<if test="source != null">
|
||||||
<update id="updateByExample" parameterType="map">
|
source = #{source,jdbcType=VARCHAR},
|
||||||
update sys_objective_questions
|
</if>
|
||||||
set objective_id = #{record.objectiveId,jdbcType=VARCHAR},
|
<if test="content != null">
|
||||||
source = #{record.source,jdbcType=VARCHAR},
|
content = #{content,jdbcType=VARCHAR},
|
||||||
content = #{record.content,jdbcType=VARCHAR},
|
</if>
|
||||||
question_a = #{record.questionA,jdbcType=VARCHAR},
|
<if test="questionA != null">
|
||||||
question_b = #{record.questionB,jdbcType=VARCHAR},
|
question_a = #{questionA,jdbcType=VARCHAR},
|
||||||
question_c = #{record.questionC,jdbcType=VARCHAR},
|
</if>
|
||||||
question_d = #{record.questionD,jdbcType=VARCHAR},
|
<if test="questionB != null">
|
||||||
question_e = #{record.questionE,jdbcType=VARCHAR},
|
question_b = #{questionB,jdbcType=VARCHAR},
|
||||||
score = #{record.score,jdbcType=DECIMAL},
|
</if>
|
||||||
answer = #{record.answer,jdbcType=VARCHAR},
|
<if test="questionC != null">
|
||||||
analysis = #{record.analysis,jdbcType=VARCHAR},
|
question_c = #{questionC,jdbcType=VARCHAR},
|
||||||
type = #{record.type,jdbcType=VARCHAR},
|
</if>
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
<if test="questionD != null">
|
||||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
question_d = #{questionD,jdbcType=VARCHAR},
|
||||||
is_delete = #{record.isDelete,jdbcType=BIT}
|
</if>
|
||||||
<if test="_parameter != null">
|
<if test="questionE != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
question_e = #{questionE,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</update>
|
<if test="score != null">
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
score = #{score,jdbcType=DECIMAL},
|
||||||
update sys_objective_questions
|
</if>
|
||||||
<set>
|
<if test="answer != null">
|
||||||
<if test="source != null">
|
answer = #{answer,jdbcType=VARCHAR},
|
||||||
source = #{source,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="analysis != null">
|
||||||
<if test="content != null">
|
analysis = #{analysis,jdbcType=VARCHAR},
|
||||||
content = #{content,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="type != null">
|
||||||
<if test="questionA != null">
|
type = #{type,jdbcType=VARCHAR},
|
||||||
question_a = #{questionA,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="createTime != null">
|
||||||
<if test="questionB != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
question_b = #{questionB,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="updateTime != null">
|
||||||
<if test="questionC != null">
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
question_c = #{questionC,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="isDelete != null">
|
||||||
<if test="questionD != null">
|
is_delete = #{isDelete,jdbcType=BIT},
|
||||||
question_d = #{questionD,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
</set>
|
||||||
<if test="questionE != null">
|
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
||||||
question_e = #{questionE,jdbcType=VARCHAR},
|
</update>
|
||||||
</if>
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
||||||
<if test="score != null">
|
update sys_objective_questions
|
||||||
score = #{score,jdbcType=DECIMAL},
|
set source = #{source,jdbcType=VARCHAR},
|
||||||
</if>
|
content = #{content,jdbcType=VARCHAR},
|
||||||
<if test="answer != null">
|
question_a = #{questionA,jdbcType=VARCHAR},
|
||||||
answer = #{answer,jdbcType=VARCHAR},
|
question_b = #{questionB,jdbcType=VARCHAR},
|
||||||
</if>
|
question_c = #{questionC,jdbcType=VARCHAR},
|
||||||
<if test="analysis != null">
|
question_d = #{questionD,jdbcType=VARCHAR},
|
||||||
analysis = #{analysis,jdbcType=VARCHAR},
|
question_e = #{questionE,jdbcType=VARCHAR},
|
||||||
</if>
|
score = #{score,jdbcType=DECIMAL},
|
||||||
<if test="type != null">
|
answer = #{answer,jdbcType=VARCHAR},
|
||||||
type = #{type,jdbcType=VARCHAR},
|
analysis = #{analysis,jdbcType=VARCHAR},
|
||||||
</if>
|
type = #{type,jdbcType=VARCHAR},
|
||||||
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
is_delete = #{isDelete,jdbcType=BIT}
|
||||||
<if test="updateTime != null">
|
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</update>
|
||||||
</if>
|
|
||||||
<if test="isDelete != null">
|
<resultMap id="DtoMap" type="com.sztzjy.resource_center.entity.dto.SysObjectiveQuestionsDto">
|
||||||
is_delete = #{isDelete,jdbcType=BIT},
|
<id column="objective_id" jdbcType="VARCHAR" property="objectiveId"/>
|
||||||
</if>
|
<id column="id" jdbcType="VARCHAR" property="topicAndCourseId"/>
|
||||||
</set>
|
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||||
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
<result column="content" jdbcType="VARCHAR" property="content"/>
|
||||||
</update>
|
<result column="question_a" jdbcType="VARCHAR" property="questionA"/>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysObjectiveQuestions">
|
<result column="question_b" jdbcType="VARCHAR" property="questionB"/>
|
||||||
update sys_objective_questions
|
<result column="question_c" jdbcType="VARCHAR" property="questionC"/>
|
||||||
set source = #{source,jdbcType=VARCHAR},
|
<result column="question_d" jdbcType="VARCHAR" property="questionD"/>
|
||||||
content = #{content,jdbcType=VARCHAR},
|
<result column="question_e" jdbcType="VARCHAR" property="questionE"/>
|
||||||
question_a = #{questionA,jdbcType=VARCHAR},
|
<result column="score" jdbcType="DECIMAL" property="score"/>
|
||||||
question_b = #{questionB,jdbcType=VARCHAR},
|
<result column="answer" jdbcType="VARCHAR" property="answer"/>
|
||||||
question_c = #{questionC,jdbcType=VARCHAR},
|
<result column="analysis" jdbcType="VARCHAR" property="analysis"/>
|
||||||
question_d = #{questionD,jdbcType=VARCHAR},
|
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||||
question_e = #{questionE,jdbcType=VARCHAR},
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
score = #{score,jdbcType=DECIMAL},
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
answer = #{answer,jdbcType=VARCHAR},
|
<result column="one_id" jdbcType="VARCHAR" property="oneID"/>
|
||||||
analysis = #{analysis,jdbcType=VARCHAR},
|
<result column="two_id" jdbcType="VARCHAR" property="twoID"/>
|
||||||
type = #{type,jdbcType=VARCHAR},
|
<result column="three_id" jdbcType="VARCHAR" property="threeID"/>
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
<result column="one_name" jdbcType="VARCHAR" property="oneName"/>
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
<result column="two_name" jdbcType="VARCHAR" property="twoName"/>
|
||||||
is_delete = #{isDelete,jdbcType=BIT}
|
<result column="three_name" jdbcType="VARCHAR" property="threeName"/>
|
||||||
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
</resultMap>
|
||||||
</update>
|
|
||||||
|
<!-- 条件查询-->
|
||||||
|
<select id="selectTopicByConditions" parameterType="java.lang.String" resultMap="DtoMap">
|
||||||
|
SELECT sb.*,st.one_id,st.two_id,st.three_id,st.id,st.one_name,st.two_name,st.three_name
|
||||||
|
FROM sys_objective_questions sb
|
||||||
|
left JOIN sys_topic_and_course st
|
||||||
|
on sb.objective_id = st.topic_id
|
||||||
|
<where>
|
||||||
|
<!-- <if test="oneID != null and oneID != ''">-->
|
||||||
|
<!-- st.one_id = #{oneID}-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- <if test="twoID != null and twoID != ''">-->
|
||||||
|
<!-- and st.two_id = #{twoID}-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- <if test="threeID != null and threeID != '' ">-->
|
||||||
|
<!-- and st.three_id = #{threeID}-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<if test="type != null and type != '' ">
|
||||||
|
and sb.type = #{type}
|
||||||
|
</if>
|
||||||
|
<if test="content != null and content != ''">
|
||||||
|
and sb.content = #{content}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by sb.create_time
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<resultMap id="DtoMap" type="com.sztzjy.resource_center.entity.dto.SysObjectiveQuestionsDto">
|
<!-- 条件查询-->
|
||||||
<id column="objective_id" jdbcType="VARCHAR" property="objectiveId" />
|
<select id="getTopicByConfig" parameterType="java.lang.String" resultMap="DtoMap">
|
||||||
<id column="id" jdbcType="VARCHAR" property="topicAndCourseId" />
|
SELECT sb.*,st.one_id,st.two_id,st.three_id,st.id,st.one_name,st.two_name,st.three_name
|
||||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
FROM sys_topic_and_course st
|
||||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
JOIN sys_objective_questions sb
|
||||||
<result column="question_a" jdbcType="VARCHAR" property="questionA" />
|
on sb.objective_id = st.topic_id
|
||||||
<result column="question_b" jdbcType="VARCHAR" property="questionB" />
|
<where>
|
||||||
<result column="question_c" jdbcType="VARCHAR" property="questionC" />
|
<if test="oneID != null and oneID != ''">
|
||||||
<result column="question_d" jdbcType="VARCHAR" property="questionD" />
|
st.one_id = #{oneID}
|
||||||
<result column="question_e" jdbcType="VARCHAR" property="questionE" />
|
</if>
|
||||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
<if test="twoID != null and twoID != ''">
|
||||||
<result column="answer" jdbcType="VARCHAR" property="answer" />
|
and st.two_id = #{twoID}
|
||||||
<result column="analysis" jdbcType="VARCHAR" property="analysis" />
|
</if>
|
||||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
<if test="threeID != null and threeID != '' ">
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
and st.three_id = #{threeID}
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
</if>
|
||||||
<result column="one_id" jdbcType="VARCHAR" property="oneID" />
|
<if test="type != null and type != '' ">
|
||||||
<result column="two_id" jdbcType="VARCHAR" property="twoID" />
|
and sb.type = #{type}
|
||||||
<result column="three_id" jdbcType="VARCHAR" property="threeId" />
|
</if>
|
||||||
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
|
<if test="content != null and content != ''">
|
||||||
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
|
and sb.content = #{content}
|
||||||
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
|
</if>
|
||||||
</resultMap>
|
</where>
|
||||||
|
order by sb.create_time
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 条件查询-->
|
|
||||||
<select id="selectTopicByConditions" parameterType="java.lang.String" resultMap="DtoMap">
|
|
||||||
SELECT sb.*,st.one_id,st.two_id,st.three_id,st.id,st.one_name,st.two_name,st.three_name
|
|
||||||
FROM sys_objective_questions sb
|
|
||||||
JOIN sys_topic_and_course st
|
|
||||||
on sb.objective_id = st.topic_id
|
|
||||||
<where>
|
|
||||||
<if test="oneID != null and oneID != ''">
|
|
||||||
st.one_id = #{oneID}
|
|
||||||
</if>
|
|
||||||
<if test="twoID != null and twoID != ''">
|
|
||||||
and st.two_id = #{twoID}
|
|
||||||
</if>
|
|
||||||
<if test="threeID != null and threeID != '' ">
|
|
||||||
and st.three_id = #{threeID}
|
|
||||||
</if>
|
|
||||||
<if test="type != null and type != '' ">
|
|
||||||
and sb.type = #{type}
|
|
||||||
</if>
|
|
||||||
<if test="content != null and content != ''">
|
|
||||||
and sb.content = #{content}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by sb.create_time
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertBatch" parameterType="java.util.List">
|
<insert id="insertBatch" parameterType="java.util.List">
|
||||||
INSERT INTO sys_objective_questions (
|
INSERT INTO sys_objective_questions (
|
||||||
objective_id, source, content, question_a, question_b, question_c, question_d, question_e, score, answer, analysis, type, create_time, update_time, is_delete
|
objective_id, source, content, question_a, question_b, question_c, question_d, question_e, score, answer,
|
||||||
) VALUES
|
analysis, type, create_time, update_time, is_delete
|
||||||
<foreach collection="objectiveQuestionList" item="item" index="index" separator=",">
|
) VALUES
|
||||||
(
|
<foreach collection="objectiveQuestionList" item="item" index="index" separator=",">
|
||||||
#{item.objectiveId}, #{item.source}, #{item.content}, #{item.questionA}, #{item.questionB}, #{item.questionC}, #{item.questionD}, #{item.questionE}, #{item.score}, #{item.answer}, #{item.analysis}, #{item.type}, #{item.createTime}, #{item.updateTime}, #{item.isDelete}
|
(
|
||||||
)
|
#{item.objectiveId}, #{item.source}, #{item.content}, #{item.questionA}, #{item.questionB},
|
||||||
</foreach>
|
#{item.questionC}, #{item.questionD}, #{item.questionE}, #{item.score}, #{item.answer}, #{item.analysis},
|
||||||
</insert>
|
#{item.type}, #{item.createTime}, #{item.updateTime}, #{item.isDelete}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
@ -1,373 +1,415 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.sztzjy.resource_center.mapper.SysResourceMapper">
|
<mapper namespace="com.sztzjy.resource_center.mapper.SysResourceMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysResource">
|
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysResource">
|
||||||
<id column="resource_id" jdbcType="VARCHAR" property="resourceId" />
|
<id column="resource_id" jdbcType="VARCHAR" property="resourceId"/>
|
||||||
<result column="resource_name" jdbcType="VARCHAR" property="resourceName" />
|
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
|
||||||
<result column="url" jdbcType="VARCHAR" property="url" />
|
<result column="url" jdbcType="VARCHAR" property="url"/>
|
||||||
<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="one_tag" jdbcType="VARCHAR" property="oneTag" />
|
<result column="one_tag" jdbcType="VARCHAR" property="oneTag"/>
|
||||||
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
|
<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="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="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>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
<if test="criteria.valid">
|
<if test="criteria.valid">
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.noValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.listValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
#{listItem}
|
separator=",">
|
||||||
</foreach>
|
#{listItem}
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
</if>
|
</sql>
|
||||||
</foreach>
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
</where>
|
<where>
|
||||||
</sql>
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
<sql id="Update_By_Example_Where_Clause">
|
<if test="criteria.valid">
|
||||||
<where>
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<if test="criteria.valid">
|
<choose>
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<when test="criterion.noValue">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
and ${criterion.condition}
|
||||||
<choose>
|
</when>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition}
|
||||||
</when>
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
<when test="criterion.listValue">
|
separator=",">
|
||||||
and ${criterion.condition}
|
#{listItem}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
</foreach>
|
||||||
#{listItem}
|
</when>
|
||||||
</foreach>
|
</choose>
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
</if>
|
</sql>
|
||||||
</foreach>
|
<sql id="Base_Column_List">
|
||||||
</where>
|
resource_id
|
||||||
</sql>
|
, resource_name, url, picture_url, resource_type, source, one_tag, one_name,
|
||||||
<sql id="Base_Column_List">
|
|
||||||
resource_id, resource_name, url, picture_url, resource_type, source, one_tag, one_name,
|
|
||||||
two_tag, two_name, three_tag, three_name, 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"
|
||||||
select
|
resultMap="BaseResultMap">
|
||||||
<if test="distinct">
|
select
|
||||||
distinct
|
<if test="distinct">
|
||||||
</if>
|
distinct
|
||||||
<include refid="Base_Column_List" />
|
</if>
|
||||||
from sys_resource
|
<include refid="Base_Column_List"/>
|
||||||
<if test="_parameter != null">
|
from sys_resource
|
||||||
<include refid="Example_Where_Clause" />
|
<if test="_parameter != null">
|
||||||
</if>
|
<include refid="Example_Where_Clause"/>
|
||||||
<if test="orderByClause != null">
|
</if>
|
||||||
order by ${orderByClause}
|
<if test="orderByClause != null">
|
||||||
</if>
|
order by ${orderByClause}
|
||||||
</select>
|
</if>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
</select>
|
||||||
select
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
<include refid="Base_Column_List" />
|
select
|
||||||
from sys_resource
|
<include refid="Base_Column_List"/>
|
||||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
from sys_resource
|
||||||
</select>
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
</select>
|
||||||
delete from sys_resource
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
delete
|
||||||
</delete>
|
from sys_resource
|
||||||
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample">
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||||
delete from sys_resource
|
</delete>
|
||||||
<if test="_parameter != null">
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample">
|
||||||
<include refid="Example_Where_Clause" />
|
delete from sys_resource
|
||||||
</if>
|
<if test="_parameter != null">
|
||||||
</delete>
|
<include refid="Example_Where_Clause"/>
|
||||||
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
</if>
|
||||||
insert into sys_resource (resource_id, resource_name, url,
|
</delete>
|
||||||
picture_url, resource_type, source,
|
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||||
one_tag, one_name, two_tag,
|
insert into sys_resource (resource_id, resource_name, url,
|
||||||
two_name, three_tag, three_name,
|
picture_url, resource_type, source,
|
||||||
status, create_time)
|
one_tag, one_name, two_tag,
|
||||||
values (#{resourceId,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
|
two_name, three_tag, three_name,
|
||||||
#{pictureUrl,jdbcType=VARCHAR}, #{resourceType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
|
status, create_time)
|
||||||
#{oneTag,jdbcType=VARCHAR}, #{oneName,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR},
|
values (#{resourceId,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
|
||||||
#{twoName,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR},
|
#{pictureUrl,jdbcType=VARCHAR}, #{resourceType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
|
||||||
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
#{oneTag,jdbcType=VARCHAR}, #{oneName,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR},
|
||||||
</insert>
|
#{twoName,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR},
|
||||||
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
||||||
insert into sys_resource
|
</insert>
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||||
<if test="resourceId != null">
|
insert into sys_resource
|
||||||
resource_id,
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
</if>
|
<if test="resourceId != null">
|
||||||
<if test="resourceName != null">
|
resource_id,
|
||||||
resource_name,
|
</if>
|
||||||
</if>
|
<if test="resourceName != null">
|
||||||
<if test="url != null">
|
resource_name,
|
||||||
url,
|
</if>
|
||||||
</if>
|
<if test="url != null">
|
||||||
<if test="pictureUrl != null">
|
url,
|
||||||
picture_url,
|
</if>
|
||||||
</if>
|
<if test="pictureUrl != null">
|
||||||
<if test="resourceType != null">
|
picture_url,
|
||||||
resource_type,
|
</if>
|
||||||
</if>
|
<if test="resourceType != null">
|
||||||
<if test="source != null">
|
resource_type,
|
||||||
source,
|
</if>
|
||||||
</if>
|
<if test="source != null">
|
||||||
<if test="oneTag != null">
|
source,
|
||||||
one_tag,
|
</if>
|
||||||
</if>
|
<if test="oneTag != null">
|
||||||
<if test="oneName != null">
|
one_tag,
|
||||||
one_name,
|
</if>
|
||||||
</if>
|
<if test="oneName != null">
|
||||||
<if test="twoTag != null">
|
one_name,
|
||||||
two_tag,
|
</if>
|
||||||
</if>
|
<if test="twoTag != null">
|
||||||
<if test="twoName != null">
|
two_tag,
|
||||||
two_name,
|
</if>
|
||||||
</if>
|
<if test="twoName != null">
|
||||||
<if test="threeTag != null">
|
two_name,
|
||||||
three_tag,
|
</if>
|
||||||
</if>
|
<if test="threeTag != null">
|
||||||
<if test="threeName != null">
|
three_tag,
|
||||||
three_name,
|
</if>
|
||||||
</if>
|
<if test="threeName != null">
|
||||||
<if test="status != null">
|
three_name,
|
||||||
status,
|
</if>
|
||||||
</if>
|
<if test="status != null">
|
||||||
<if test="createTime != null">
|
status,
|
||||||
create_time,
|
</if>
|
||||||
</if>
|
<if test="createTime != null">
|
||||||
</trim>
|
create_time,
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
</if>
|
||||||
<if test="resourceId != null">
|
</trim>
|
||||||
#{resourceId,jdbcType=VARCHAR},
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
</if>
|
<if test="resourceId != null">
|
||||||
<if test="resourceName != null">
|
#{resourceId,jdbcType=VARCHAR},
|
||||||
#{resourceName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="resourceName != null">
|
||||||
<if test="url != null">
|
#{resourceName,jdbcType=VARCHAR},
|
||||||
#{url,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="url != null">
|
||||||
<if test="pictureUrl != null">
|
#{url,jdbcType=VARCHAR},
|
||||||
#{pictureUrl,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="pictureUrl != null">
|
||||||
<if test="resourceType != null">
|
#{pictureUrl,jdbcType=VARCHAR},
|
||||||
#{resourceType,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="resourceType != null">
|
||||||
<if test="source != null">
|
#{resourceType,jdbcType=VARCHAR},
|
||||||
#{source,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="source != null">
|
||||||
<if test="oneTag != null">
|
#{source,jdbcType=VARCHAR},
|
||||||
#{oneTag,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="oneTag != null">
|
||||||
<if test="oneName != null">
|
#{oneTag,jdbcType=VARCHAR},
|
||||||
#{oneName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="oneName != null">
|
||||||
<if test="twoTag != null">
|
#{oneName,jdbcType=VARCHAR},
|
||||||
#{twoTag,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="twoTag != null">
|
||||||
<if test="twoName != null">
|
#{twoTag,jdbcType=VARCHAR},
|
||||||
#{twoName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="twoName != null">
|
||||||
<if test="threeTag != null">
|
#{twoName,jdbcType=VARCHAR},
|
||||||
#{threeTag,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="threeTag != null">
|
||||||
<if test="threeName != null">
|
#{threeTag,jdbcType=VARCHAR},
|
||||||
#{threeName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="threeName != null">
|
||||||
<if test="status != null">
|
#{threeName,jdbcType=VARCHAR},
|
||||||
#{status,jdbcType=INTEGER},
|
</if>
|
||||||
</if>
|
<if test="status != null">
|
||||||
<if test="createTime != null">
|
#{status,jdbcType=INTEGER},
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
||||||
</if>
|
<if test="createTime != null">
|
||||||
</trim>
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
</insert>
|
</if>
|
||||||
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample" resultType="java.lang.Long">
|
</trim>
|
||||||
select count(*) from sys_resource
|
</insert>
|
||||||
<if test="_parameter != null">
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample"
|
||||||
<include refid="Example_Where_Clause" />
|
resultType="java.lang.Long">
|
||||||
</if>
|
select count(*) from sys_resource
|
||||||
</select>
|
<if test="_parameter != null">
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
<include refid="Example_Where_Clause"/>
|
||||||
update sys_resource
|
</if>
|
||||||
<set>
|
</select>
|
||||||
<if test="record.resourceId != null">
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
update sys_resource
|
||||||
</if>
|
<set>
|
||||||
<if test="record.resourceName != null">
|
<if test="record.resourceId != null">
|
||||||
|
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.resourceName != null">
|
||||||
|
resource_name = #{record.resourceName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.url != null">
|
||||||
|
url = #{record.url,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.pictureUrl != null">
|
||||||
|
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.resourceType != null">
|
||||||
|
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.source != null">
|
||||||
|
source = #{record.source,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.oneTag != null">
|
||||||
|
one_tag = #{record.oneTag,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.oneName != null">
|
||||||
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.twoTag != null">
|
||||||
|
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.twoName != null">
|
||||||
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.threeTag != null">
|
||||||
|
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.threeName != null">
|
||||||
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.status != null">
|
||||||
|
status = #{record.status,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update sys_resource
|
||||||
|
set resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||||
resource_name = #{record.resourceName,jdbcType=VARCHAR},
|
resource_name = #{record.resourceName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.url != null">
|
|
||||||
url = #{record.url,jdbcType=VARCHAR},
|
url = #{record.url,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.pictureUrl != null">
|
|
||||||
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.resourceType != null">
|
|
||||||
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.source != null">
|
|
||||||
source = #{record.source,jdbcType=VARCHAR},
|
source = #{record.source,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.oneTag != null">
|
|
||||||
one_tag = #{record.oneTag,jdbcType=VARCHAR},
|
one_tag = #{record.oneTag,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.oneName != null">
|
|
||||||
one_name = #{record.oneName,jdbcType=VARCHAR},
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.twoTag != null">
|
|
||||||
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.twoName != null">
|
|
||||||
two_name = #{record.twoName,jdbcType=VARCHAR},
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.threeTag != null">
|
|
||||||
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.threeName != null">
|
|
||||||
three_name = #{record.threeName,jdbcType=VARCHAR},
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.status != null">
|
|
||||||
status = #{record.status,jdbcType=INTEGER},
|
status = #{record.status,jdbcType=INTEGER},
|
||||||
</if>
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||||
<if test="record.createTime != null">
|
<if test="_parameter != null">
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</update>
|
||||||
<if test="_parameter != null">
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
update sys_resource
|
||||||
</if>
|
<set>
|
||||||
</update>
|
<if test="resourceName != null">
|
||||||
<update id="updateByExample" parameterType="map">
|
resource_name = #{resourceName,jdbcType=VARCHAR},
|
||||||
update sys_resource
|
</if>
|
||||||
set resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
<if test="url != null">
|
||||||
resource_name = #{record.resourceName,jdbcType=VARCHAR},
|
url = #{url,jdbcType=VARCHAR},
|
||||||
url = #{record.url,jdbcType=VARCHAR},
|
</if>
|
||||||
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
<if test="pictureUrl != null">
|
||||||
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
||||||
source = #{record.source,jdbcType=VARCHAR},
|
</if>
|
||||||
one_tag = #{record.oneTag,jdbcType=VARCHAR},
|
<if test="resourceType != null">
|
||||||
one_name = #{record.oneName,jdbcType=VARCHAR},
|
resource_type = #{resourceType,jdbcType=VARCHAR},
|
||||||
two_tag = #{record.twoTag,jdbcType=VARCHAR},
|
</if>
|
||||||
two_name = #{record.twoName,jdbcType=VARCHAR},
|
<if test="source != null">
|
||||||
three_tag = #{record.threeTag,jdbcType=VARCHAR},
|
source = #{source,jdbcType=VARCHAR},
|
||||||
three_name = #{record.threeName,jdbcType=VARCHAR},
|
</if>
|
||||||
status = #{record.status,jdbcType=INTEGER},
|
<if test="oneTag != null">
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
one_tag = #{oneTag,jdbcType=VARCHAR},
|
||||||
<if test="_parameter != null">
|
</if>
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<if test="oneName != null">
|
||||||
</if>
|
one_name = #{oneName,jdbcType=VARCHAR},
|
||||||
</update>
|
</if>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
<if test="twoTag != null">
|
||||||
update sys_resource
|
two_tag = #{twoTag,jdbcType=VARCHAR},
|
||||||
<set>
|
</if>
|
||||||
<if test="resourceName != null">
|
<if test="twoName != null">
|
||||||
resource_name = #{resourceName,jdbcType=VARCHAR},
|
two_name = #{twoName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="url != null">
|
<if test="threeTag != null">
|
||||||
url = #{url,jdbcType=VARCHAR},
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="pictureUrl != null">
|
<if test="threeName != null">
|
||||||
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
three_name = #{threeName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="resourceType != null">
|
<if test="status != null">
|
||||||
resource_type = #{resourceType,jdbcType=VARCHAR},
|
status = #{status,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="source != null">
|
<if test="createTime != null">
|
||||||
source = #{source,jdbcType=VARCHAR},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
<if test="oneTag != null">
|
</set>
|
||||||
one_tag = #{oneTag,jdbcType=VARCHAR},
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||||
</if>
|
</update>
|
||||||
<if test="oneName != null">
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||||
one_name = #{oneName,jdbcType=VARCHAR},
|
update sys_resource
|
||||||
</if>
|
set resource_name = #{resourceName,jdbcType=VARCHAR},
|
||||||
<if test="twoTag != null">
|
url = #{url,jdbcType=VARCHAR},
|
||||||
two_tag = #{twoTag,jdbcType=VARCHAR},
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
||||||
</if>
|
resource_type = #{resourceType,jdbcType=VARCHAR},
|
||||||
<if test="twoName != null">
|
source = #{source,jdbcType=VARCHAR},
|
||||||
two_name = #{twoName,jdbcType=VARCHAR},
|
one_tag = #{oneTag,jdbcType=VARCHAR},
|
||||||
</if>
|
one_name = #{oneName,jdbcType=VARCHAR},
|
||||||
<if test="threeTag != null">
|
two_tag = #{twoTag,jdbcType=VARCHAR},
|
||||||
three_tag = #{threeTag,jdbcType=VARCHAR},
|
two_name = #{twoName,jdbcType=VARCHAR},
|
||||||
</if>
|
three_tag = #{threeTag,jdbcType=VARCHAR},
|
||||||
<if test="threeName != null">
|
three_name = #{threeName,jdbcType=VARCHAR},
|
||||||
three_name = #{threeName,jdbcType=VARCHAR},
|
status = #{status,jdbcType=INTEGER},
|
||||||
</if>
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||||
<if test="status != null">
|
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||||
status = #{status,jdbcType=INTEGER},
|
</update>
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<resultMap id="DtoMap" type="com.sztzjy.resource_center.entity.SysResource">
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
<id column="resource_id" jdbcType="VARCHAR" property="resourceId"/>
|
||||||
</if>
|
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
|
||||||
</set>
|
<result column="url" jdbcType="VARCHAR" property="url"/>
|
||||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl"/>
|
||||||
</update>
|
<result column="resource_type" jdbcType="VARCHAR" property="resourceType"/>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||||
update sys_resource
|
<result column="one_id" jdbcType="VARCHAR" property="oneTag"/>
|
||||||
set resource_name = #{resourceName,jdbcType=VARCHAR},
|
<result column="one_name" jdbcType="VARCHAR" property="oneName"/>
|
||||||
url = #{url,jdbcType=VARCHAR},
|
<result column="two_id" jdbcType="VARCHAR" property="twoTag"/>
|
||||||
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
<result column="two_name" jdbcType="VARCHAR" property="twoName"/>
|
||||||
resource_type = #{resourceType,jdbcType=VARCHAR},
|
<result column="three_id" jdbcType="VARCHAR" property="threeTag"/>
|
||||||
source = #{source,jdbcType=VARCHAR},
|
<result column="three_name" jdbcType="VARCHAR" property="threeName"/>
|
||||||
one_tag = #{oneTag,jdbcType=VARCHAR},
|
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||||
one_name = #{oneName,jdbcType=VARCHAR},
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
two_tag = #{twoTag,jdbcType=VARCHAR},
|
</resultMap>
|
||||||
two_name = #{twoName,jdbcType=VARCHAR},
|
|
||||||
three_tag = #{threeTag,jdbcType=VARCHAR},
|
<!--重复 join-->
|
||||||
three_name = #{threeName,jdbcType=VARCHAR},
|
<select id="selectResourceByRepeat" parameterType="java.lang.String" resultMap="DtoMap">
|
||||||
status = #{status,jdbcType=INTEGER},
|
SELECT sc.*,sr.resource_name,sr.url,sr.picture_url,sr.resource_type,sr.source,sr.status,sr.create_time
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
FROM sys_resource sr
|
||||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
JOIN
|
||||||
</update>
|
sys_resource_and_course sc
|
||||||
|
on sr.resource_id =sc.resource_id
|
||||||
|
<where>
|
||||||
|
<if test="oneId != null and oneId != ''">
|
||||||
|
sc.one_id = #{oneId}
|
||||||
|
</if>
|
||||||
|
<if test="twoId != null and twoId != ''">
|
||||||
|
and sc.two_id = #{twoId}
|
||||||
|
</if>
|
||||||
|
<if test="threeId != null and threeId != ''">
|
||||||
|
and sc.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">
|
<!--不重复 leftjoin-->
|
||||||
SELECT *
|
<select id="selectResource" parameterType="java.lang.String" resultMap="DtoMap">
|
||||||
FROM sys_resource
|
SELECT sc.*,sr.resource_name,sr.url,sr.picture_url,sr.resource_type,sr.source,sr.status,sr.create_time
|
||||||
<where>
|
FROM sys_resource sr
|
||||||
<if test="oneId != null and oneId != ''">
|
left JOIN
|
||||||
one_tag = #{oneId}
|
sys_resource_and_course sc
|
||||||
</if>
|
on sr.resource_id =sc.resource_id
|
||||||
<if test="twoId != null and twoId != ''">
|
<where>
|
||||||
and two_tag = #{twoId}
|
sc.one_id = #{oneId}
|
||||||
</if>
|
and sc.two_id = #{twoId}
|
||||||
<if test="threeId != null and threeId != ''">
|
and sc.three_id = #{threeId}
|
||||||
and three_tag = #{threeId}
|
</where>
|
||||||
</if>
|
order by sr.create_time
|
||||||
<if test="resourceName != null and resourceName != ''">
|
</select>
|
||||||
and resource_name = #{resourceName}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by create_time
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue