소스 검색

上传文件

夏文涛 2 년 전
부모
커밋
87828dcca6

+ 5 - 0
src/main/resources/mapper/template/SmartAttendanceMapper.xml

@@ -0,0 +1,5 @@
+<?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.template.mapper.SmartAttendanceMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/template/SmartClassMapper.xml

@@ -0,0 +1,5 @@
+<?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.template.mapper.SmartClassMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/template/SmartDutiesMapper.xml

@@ -0,0 +1,5 @@
+<?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.template.mapper.SmartDutiesMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/template/SmartGradeMapper.xml

@@ -0,0 +1,5 @@
+<?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.template.mapper.SmartGradeMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/template/SmartMenuMapper.xml

@@ -0,0 +1,5 @@
+<?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.template.mapper.SmartMenuMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/template/SmartQrcodeMapper.xml

@@ -0,0 +1,5 @@
+<?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.template.mapper.SmartQrcodeMapper">
+
+</mapper>

+ 84 - 0
src/main/resources/mapper/template/SmartScoreMapper.xml

@@ -0,0 +1,84 @@
+<?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.template.mapper.SmartScoreMapper">
+
+
+    <resultMap type="com.template.model.vo.ScorePageVo" id="smartScorePageMap">
+        <result property="id" column="id"/>
+        <result property="semester" column="semester"/>
+        <result property="grade" column="grade"/>
+        <result property="gradeId" column="grade_id"/>
+        <result property="schoolClass" column="school_class"/>
+        <result property="schoolClassId" column="school_class_id"/>
+        <result property="subjectId" column="subject_id"/>
+        <result property="examType" column="exam_type"/>
+        <result property="name" column="name"/>
+        <result property="userId" column="user_id"/>
+        <result property="cardNo" column="card_no"/>
+        <result property="score" column="score"/>
+    </resultMap>
+    <select id="querySmartScorePage" resultType="com.template.model.vo.ScorePageVo" resultMap="smartScorePageMap">
+        select ss.user_id,ss.id,ss.semester,ss.grade_id,ss.school_class_id,ss.grade,ss.school_class,ss.subject_id,ss.exam_type,su.name,ss.card_no,ss.score from
+        smart_score ss
+        left join smart_user su on su.deleted = 0 and su.id = ss.user_id
+        where ss.deleted = 0
+        <if test="name != null and name != ''">
+            and (ss.name like '%' #{name} '%' or ss.card_no like '%' #{name} '%')
+        </if>
+        <if test="semester != null and semester != ''">
+            and ss.semester like '%' #{semester} '%'
+        </if>
+        <if test="grade != null and grade != ''">
+            and ss.grade like '%' #{grade} '%'
+        </if>
+        <if test="schoolClass != null and schoolClass != ''">
+            and ss.school_class like '%' #{schoolClass} '%'
+        </if>
+        <if test="subject != null and subject != ''">
+            and ss.subject_id = #{subject}
+        </if>
+        <if test="examType != null and examType != ''">
+            and ss.exam_type = #{examType}
+        </if>
+        <if test="MinScore != null and MinScore != ''">
+            and ss.score >= #{MinScore}
+        </if>
+        <if test="MaxScore != null and MaxScore != ''">
+            and ss.score &lt;= #{MaxScore}
+        </if>
+    </select>
+
+
+    <select id="querySmartScores" resultType="com.template.model.vo.ScorePageVo" resultMap="smartScorePageMap">
+        select ss.id,ss.semester,ss.grade,ss.school_class,ss.subject_id,ss.exam_type,su.name,ss.card_no,ss.score from
+        smart_score ss
+        left join smart_user su on su.deleted = 0 and su.id = ss.user_id
+        where ss.deleted = 0
+        <if test="name != null and name != ''">
+            and (ss.name like '%' #{name} '%' or ss.card_no like '%' #{name} '%')
+        </if>
+        <if test="semester != null and semester != ''">
+            and ss.semester like '%' #{semester} '%'
+        </if>
+        <if test="grade != null and grade != ''">
+            and ss.grade like '%' #{grade} '%'
+        </if>
+        <if test="schoolClass != null and schoolClass != ''">
+            and ss.school_class like '%' #{schoolClass} '%'
+        </if>
+        <if test="subject != null and subject != ''">
+            and ss.subject_id = #{subject}
+        </if>
+        <if test="examType != null and examType != ''">
+            and ss.exam_type = #{examType}
+        </if>
+        <if test="MinScore != null and MinScore != ''">
+            and ss.score >= #{MinScore}
+        </if>
+        <if test="MaxScore != null and MaxScore != ''">
+            and ss.score &lt;= #{MaxScore}
+        </if>
+    </select>
+
+
+</mapper>

+ 8 - 0
src/main/resources/mapper/template/SmartSubjectManageMapper.xml

@@ -0,0 +1,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">
+<mapper namespace="com.template.mapper.SmartSubjectManageMapper">
+
+    <select id="getMaxTerm" resultType="String" >
+        select max(term) as term from `smart_subject_manage`
+    </select>
+</mapper>