CCertificateStudentMapper.xml
1.7 KB
<?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">
<mapper namespace="com.example.client.mapper.CCertificateStudentMapper">
<resultMap type="com.example.client.domain.CCertificateStudent" id="CCertificateStudentResult">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="studentName" column="student_name"/>
<result property="certificateName" column="certificate_name"/>
<result property="idnumber" column="idnumber"/>
<result property="certificateNumber" column="certificate_number"/>
<result property="certificateType" column="certificate_type"/>
<result property="issuingAgency" column="Issuing_agency"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="certificatePath" column="certificate_path"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="classify" column="classify"/>
</resultMap>
<select id="getAllFruits" resultMap="CCertificateStudentResult">
SELECT * FROM c_certificate_student WHERE user_id=#{uid};
</select>
<select id="openFruit" resultType="integer">
SELECT DISTINCT c_certificate_student.classify FROM c_certificate_student WHERE user_id=#{uid};
</select>
<select id="count" resultType="integer">
SELECT COUNT(DISTINCT c_certificate_student.classify) FROM c_certificate_student WHERE user_id=#{uid};
</select>
</mapper>