|
@@ -1,10 +1,11 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.GradTableMapper">
|
|
<mapper namespace="com.ruoyi.system.mapper.GradTableMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="GradTable" id="GradTableResult">
|
|
<resultMap type="GradTable" id="GradTableResult">
|
|
|
|
+ <result property="certType" column="cert_type" />
|
|
<result property="uesrName" column="uesr_name" />
|
|
<result property="uesrName" column="uesr_name" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="certId" column="cert_id" />
|
|
<result property="certId" column="cert_id" />
|
|
@@ -13,23 +14,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="courseName" column="course_name" />
|
|
<result property="courseName" column="course_name" />
|
|
<result property="courseHours" column="course_hours" />
|
|
<result property="courseHours" column="course_hours" />
|
|
<result property="level" column="level" />
|
|
<result property="level" column="level" />
|
|
- <result property="startDate" column="start_date" />
|
|
|
|
- <result property="endDate" column="end_date" />
|
|
|
|
|
|
+ <result property="trainPeriod" column="train_period" />
|
|
<result property="picture" column="picture" />
|
|
<result property="picture" column="picture" />
|
|
<result property="userPhone" column="user_phone" />
|
|
<result property="userPhone" column="user_phone" />
|
|
<result property="userEmail" column="user_email" />
|
|
<result property="userEmail" column="user_email" />
|
|
<result property="updateDate" column="update_date" />
|
|
<result property="updateDate" column="update_date" />
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
- <result property="certType" column="cert_type" />
|
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectGradTableVo">
|
|
<sql id="selectGradTableVo">
|
|
- select uesr_name, user_id, cert_id, issue_date, cert_name, course_name, course_hours, level, start_date, end_date, picture, user_phone, user_email, update_date, id, cert_type from grad_table
|
|
|
|
|
|
+ select cert_type, uesr_name, user_id, cert_id, issue_date, cert_name, course_name, course_hours, level, train_period, picture, user_phone, user_email, update_date, id from grad_table
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectGradTableList" parameterType="GradTable" resultMap="GradTableResult">
|
|
<select id="selectGradTableList" parameterType="GradTable" resultMap="GradTableResult">
|
|
<include refid="selectGradTableVo"/>
|
|
<include refid="selectGradTableVo"/>
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
|
|
+ <if test="certType != null "> and cert_type = #{certType}</if>
|
|
<if test="uesrName != null and uesrName != ''"> and uesr_name like concat('%', #{uesrName}, '%')</if>
|
|
<if test="uesrName != null and uesrName != ''"> and uesr_name like concat('%', #{uesrName}, '%')</if>
|
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
|
<if test="certId != null and certId != ''"> and cert_id = #{certId}</if>
|
|
<if test="certId != null and certId != ''"> and cert_id = #{certId}</if>
|
|
@@ -37,18 +37,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="courseName != null and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
|
|
<if test="courseName != null and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
|
|
<if test="userPhone != null and userPhone != ''"> and user_phone = #{userPhone}</if>
|
|
<if test="userPhone != null and userPhone != ''"> and user_phone = #{userPhone}</if>
|
|
<if test="userEmail != null and userEmail != ''"> and user_email = #{userEmail}</if>
|
|
<if test="userEmail != null and userEmail != ''"> and user_email = #{userEmail}</if>
|
|
- <if test="certType != null "> and cert_type = #{certType}</if>
|
|
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectGradTableById" parameterType="Integer" resultMap="GradTableResult">
|
|
<select id="selectGradTableById" parameterType="Integer" resultMap="GradTableResult">
|
|
<include refid="selectGradTableVo"/>
|
|
<include refid="selectGradTableVo"/>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertGradTable" parameterType="GradTable" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertGradTable" parameterType="GradTable" useGeneratedKeys="true" keyProperty="id">
|
|
insert into grad_table
|
|
insert into grad_table
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="certType != null">cert_type,</if>
|
|
<if test="uesrName != null">uesr_name,</if>
|
|
<if test="uesrName != null">uesr_name,</if>
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="certId != null">cert_id,</if>
|
|
<if test="certId != null">cert_id,</if>
|
|
@@ -57,15 +57,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="courseName != null">course_name,</if>
|
|
<if test="courseName != null">course_name,</if>
|
|
<if test="courseHours != null">course_hours,</if>
|
|
<if test="courseHours != null">course_hours,</if>
|
|
<if test="level != null">level,</if>
|
|
<if test="level != null">level,</if>
|
|
- <if test="startDate != null">start_date,</if>
|
|
|
|
- <if test="endDate != null">end_date,</if>
|
|
|
|
|
|
+ <if test="trainPeriod != null">train_period,</if>
|
|
<if test="picture != null">picture,</if>
|
|
<if test="picture != null">picture,</if>
|
|
<if test="userPhone != null">user_phone,</if>
|
|
<if test="userPhone != null">user_phone,</if>
|
|
<if test="userEmail != null">user_email,</if>
|
|
<if test="userEmail != null">user_email,</if>
|
|
<if test="updateDate != null">update_date,</if>
|
|
<if test="updateDate != null">update_date,</if>
|
|
- <if test="certType != null">cert_type,</if>
|
|
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="certType != null">#{certType},</if>
|
|
<if test="uesrName != null">#{uesrName},</if>
|
|
<if test="uesrName != null">#{uesrName},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="certId != null">#{certId},</if>
|
|
<if test="certId != null">#{certId},</if>
|
|
@@ -74,19 +73,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="courseName != null">#{courseName},</if>
|
|
<if test="courseName != null">#{courseName},</if>
|
|
<if test="courseHours != null">#{courseHours},</if>
|
|
<if test="courseHours != null">#{courseHours},</if>
|
|
<if test="level != null">#{level},</if>
|
|
<if test="level != null">#{level},</if>
|
|
- <if test="startDate != null">#{startDate},</if>
|
|
|
|
- <if test="endDate != null">#{endDate},</if>
|
|
|
|
|
|
+ <if test="trainPeriod != null">#{trainPeriod},</if>
|
|
<if test="picture != null">#{picture},</if>
|
|
<if test="picture != null">#{picture},</if>
|
|
<if test="userPhone != null">#{userPhone},</if>
|
|
<if test="userPhone != null">#{userPhone},</if>
|
|
<if test="userEmail != null">#{userEmail},</if>
|
|
<if test="userEmail != null">#{userEmail},</if>
|
|
<if test="updateDate != null">#{updateDate},</if>
|
|
<if test="updateDate != null">#{updateDate},</if>
|
|
- <if test="certType != null">#{certType},</if>
|
|
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateGradTable" parameterType="GradTable">
|
|
<update id="updateGradTable" parameterType="GradTable">
|
|
update grad_table
|
|
update grad_table
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="certType != null">cert_type = #{certType},</if>
|
|
<if test="uesrName != null">uesr_name = #{uesrName},</if>
|
|
<if test="uesrName != null">uesr_name = #{uesrName},</if>
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="certId != null">cert_id = #{certId},</if>
|
|
<if test="certId != null">cert_id = #{certId},</if>
|
|
@@ -95,13 +93,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="courseName != null">course_name = #{courseName},</if>
|
|
<if test="courseName != null">course_name = #{courseName},</if>
|
|
<if test="courseHours != null">course_hours = #{courseHours},</if>
|
|
<if test="courseHours != null">course_hours = #{courseHours},</if>
|
|
<if test="level != null">level = #{level},</if>
|
|
<if test="level != null">level = #{level},</if>
|
|
- <if test="startDate != null">start_date = #{startDate},</if>
|
|
|
|
- <if test="endDate != null">end_date = #{endDate},</if>
|
|
|
|
|
|
+ <if test="trainPeriod != null">train_period = #{trainPeriod},</if>
|
|
<if test="picture != null">picture = #{picture},</if>
|
|
<if test="picture != null">picture = #{picture},</if>
|
|
<if test="userPhone != null">user_phone = #{userPhone},</if>
|
|
<if test="userPhone != null">user_phone = #{userPhone},</if>
|
|
<if test="userEmail != null">user_email = #{userEmail},</if>
|
|
<if test="userEmail != null">user_email = #{userEmail},</if>
|
|
<if test="updateDate != null">update_date = #{updateDate},</if>
|
|
<if test="updateDate != null">update_date = #{updateDate},</if>
|
|
- <if test="certType != null">cert_type = #{certType},</if>
|
|
|
|
</trim>
|
|
</trim>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
@@ -111,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteGradTableByIds" parameterType="String">
|
|
<delete id="deleteGradTableByIds" parameterType="String">
|
|
- delete from grad_table where id in
|
|
|
|
|
|
+ delete from grad_table where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|