xin
2025-10-17 ab0637e981ab4c85120ccde35ee24ec4abbe3e24
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
<?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.oying.mapper.PayConfigMapper">
    <resultMap id="BaseResultMap" type="com.oying.domain.PayConfig">
        <id column="config_id" property="configId"/>
        <result column="config_name" property="configName"/>
        <result column="config_type" property="configType"/>
        <result column="mch_id" property="mchId"/>
        <result column="enabled" property="enabled"/>
        <result column="create_by" property="createBy"/>
        <result column="create_time" property="createTime"/>
        <result column="update_by" property="updateBy"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        config_id, config_name, config_type, mch_id, enabled, create_by, create_time, update_by, update_time
    </sql>
    <update id="disabled">
        update tool_pay_config set enabled = false where config_id != #{configId}
    </update>
    <update id="using">
        update tool_pay_config set enabled = true where config_id = #{configId}
    </update>
 
    <select id="findAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from tool_pay_config
        order by config_id desc
    </select>
    <select id="findInfo" resultType="com.oying.domain.PayConfig">
        select * from tool_pay_config where enabled = true and oying = #{oying} limit 1
    </select>
</mapper>