“djh”
9 小时以前 22308ccdd532d105598663f90a39285697f723e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?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.gkhy.exam.system.mapper.ExpectContentMapper">
    <insert id="insertBatch">
        INSERT INTO `expect_content` (`expect_discren_id`, `stakeholder`, `expectation`, `solutions`, `review`)
        VALUES
            <foreach collection="expectContents" item="item" separator=",">
                ( #{item.expectDiscrenId}, #{item.stakeholder}, #{item.expectation}, #{item.solutions}, #{item.review})
            </foreach>
 
 
    </insert>
    <insert id="insertContentMess">
        INSERT INTO `expect_content_mess` ( `expect_content_id`, `expectation`, `solutions`, `review` )
        VALUES
            <foreach collection="expectContentMesseslist" separator="," item="item">
                ( #{item.expectContentId}, #{item.expectation}, #{item.solutions}, #{item.review} )
            </foreach>
    </insert>
    <update id="updateContentMessById">
        <foreach collection="expectContentMess" item="item" index="index" separator=";">
            update expect_content_mess set review = #{item.review} where id = #{item.id}
        </foreach>
    </update>
    <delete id="deletedByDiscrenId">
        delete  from expect_content where expect_discren_id = #{id}
    </delete>
    <delete id="deletedByConentId">
        delete  from expect_content_mess where expect_content_id = #{id}
    </delete>
 
    <select id="selectByDiscrenId" resultType="com.gkhy.exam.system.domain.ExpectContent">
        SELECT
            `id`,
            `expect_discren_id`,
            `stakeholder`,
            `expectation`,
            `solutions`,
            `review`
        FROM
            `expect_content`
        WHERE expect_discren_id  =#{id}
    </select>
    <select id="selectByContentId" resultType="com.gkhy.exam.system.domain.ExpectContentMess">
        SELECT
            `id`,
            `expect_content_id`,
            `expectation`,
            `solutions`,
            `review`
        FROM
            `expect_content_mess`
        WHERE expect_content_id  =#{id}
    </select>
</mapper>