zjk
2026-07-31 8665daa7aa863f96d0d8f27c167edae1efc38022
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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.ruoyi.system.mapper.SysProtocolConfigMapper">
 
    <resultMap type="SysProtocolConfig" id="SysProtocolConfigResult">
        <id     property="protocolId"      column="protocol_id" />
        <result property="protocolType"    column="protocol_type" />
        <result property="protocolName"    column="protocol_name" />
        <result property="protocolContent" column="protocol_content" />
        <result property="enabled"         column="enabled" />
        <result property="delFlag"         column="del_flag" />
        <result property="createBy"        column="create_by" />
        <result property="createTime"      column="create_time" />
        <result property="updateBy"        column="update_by" />
        <result property="updateTime"      column="update_time" />
        <result property="remark"          column="remark" />
    </resultMap>
 
    <sql id="selectProtocolConfigVo">
        select protocol_id,
               protocol_type,
               protocol_name,
               protocol_content,
               enabled,
               del_flag,
               create_by,
               create_time,
               update_by,
               update_time,
               remark
        from t_protocol_config
    </sql>
 
    <select id="selectByProtocolType" parameterType="String" resultMap="SysProtocolConfigResult">
        <include refid="selectProtocolConfigVo" />
        where protocol_type = #{protocolType}
          and del_flag = '0'
        limit 1
    </select>
 
    <insert id="insertConfig" parameterType="SysProtocolConfig" useGeneratedKeys="true" keyProperty="protocolId">
        insert into t_protocol_config (
            protocol_type,
            protocol_name,
            protocol_content,
            enabled,
            create_by,
            create_time,
            remark
        ) values (
            #{protocolType},
            #{protocolName},
            #{protocolContent},
            #{enabled},
            #{createBy},
            sysdate(),
            #{remark}
        )
    </insert>
 
    <update id="updateConfig" parameterType="SysProtocolConfig">
        update t_protocol_config
        set protocol_name = #{protocolName},
            protocol_content = #{protocolContent},
            enabled = #{enabled},
            update_by = #{updateBy},
            update_time = sysdate(),
            remark = #{remark}
        where protocol_id = #{protocolId}
    </update>
</mapper>