郑永安
2023-09-19 69185134fcfaf913ea45f1255677225a2cc311a4
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
<?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.gk.hotwork.specialWork.repository.WorkApplyOperatorInfoRepository" >
    <resultMap id="WorkApplyInfo" type="com.gk.hotwork.specialWork.entity.WorkApplyOperatorInfo" >
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="operator_uid" property="operatorUid" jdbcType="BIGINT"/>
        <result column="work_apply_id" property="workApplyId" jdbcType="BIGINT"/>
        <result column="operator_uname" property="operatorUname" jdbcType="VARCHAR"/>
        <result column="operator_certificate" property="operatorCertificate" jdbcType="VARCHAR"/>
        <result column="operator_phone" property="operatorPhone" jdbcType="VARCHAR"/>
        <result column="operator_identify" property="operatorIdentify" jdbcType="VARCHAR"/>
    </resultMap>
    <insert id="insertBatchOperator">
        insert
        into work_apply_operator
        <trim prefix="(" suffix=") values" suffixOverrides="," >
            id,
            operator_uid,
            work_apply_id,
            operator_uname,
            operator_certificate,
            operator_phone,
            operator_identify,
        </trim>
        <foreach collection="list" item="item" separator=",">
            <trim prefix="(" suffix=")" suffixOverrides=",">
                #{item.id},
                #{item.operatorUid},
                #{item.workApplyId},
                #{item.operatorUname},
                #{item.operatorCertificate},
                #{item.operatorPhone},
                #{item.operatorIdentify},
            </trim>
        </foreach>
 
    </insert>
    <select id="listWorkOperatorByWorkApplyId"
            parameterType="long"
            resultMap="WorkApplyInfo">
        select
        operator.id,
        operator.operator_uid,
        operator.work_apply_id,
        operator.operator_uname,
        operator.operator_certificate,
        operator.operator_phone,
        operator.operator_identify
        from work_apply_operator as operator
        where operator.work_apply_id = #{workApplyId}
    </select>
 
 
</mapper>