|
|
@@ -112,11 +112,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where id in <foreach item="id" collection="array" open="(" separator="," close=")">#{id}</foreach>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectMajorCodesByIds" parameterType="String" resultType="String">
|
|
|
- SELECT distinct m1.code majorCode
|
|
|
+ <select id="selectMajorCodesByIds" parameterType="String" resultMap="AMarjorPlanResult"> <!-- and m1.`exam_type` = p.examineeType -->
|
|
|
+ SELECT distinct p.majorGroup majorGroup, m1.code majorCode
|
|
|
FROM `a_marjor_plan` p
|
|
|
- JOIN `sy_major` m1 ON m1.`name` = p.`majorName` and m1.`exam_type` = p.examineeType
|
|
|
- where p.id in <foreach item="id" collection="array" open="(" separator="," close=")">#{id}</foreach>
|
|
|
+ JOIN `sy_major` m1 ON m1.`name` = p.`majorName`
|
|
|
+ where p.year = #{year} and p.id in <foreach item="id" collection="ids" open="(" separator="," close=")">#{id}</foreach>
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertAMarjorPlan" parameterType="AMarjorPlan" useGeneratedKeys="true" keyProperty="id">
|