xiaoyong931011
2021-07-21 1d03a9e224dc0ce11d47bede74da9db2189d663c
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?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.xzx.gc.user.mapper.ConfigMapper">
    <resultMap id="ConfigInfoMap" type="com.xzx.gc.model.system.ConfigInfoVo">
        <result column="config_type_code" jdbcType="VARCHAR" property="configTypeCode"/>
        <result column="config_type_name" jdbcType="VARCHAR" property="configTypeName"/>
        <result column="config_value" jdbcType="VARCHAR" property="configValue"/>
        <result column="config_value_name" jdbcType="VARCHAR" property="configValueName"/>
    </resultMap>
 
    <select id="queryByCondtion" resultType="com.xzx.gc.model.order.SysConfigDto">
        select *
        from xzx_sys_config_info a
        where
            a.config_type_code = 'OVERDRAW_PRICE' or
            a.config_type_code = 'RECHARGE_PRICE' or
            a.config_type_code = 'AGENT_PRICE' or
            a.config_type_code = 'INTERVAL_TIME' or
            a.config_type_code = 'START_TIME' or
            a.config_type_code = 'END_TIME' or
            a.config_type_code = 'ORDERTOTAL' or
            a.config_type_code = 'WAREHOUSING_PRICE' or
            a.config_type_code = 'ORDER_VIEW_TOTAL' or
            config_type_code = 'ORDERTIMEOUT'
    </select>
 
    <update id="updateAgentPrice">
        update xzx_sys_config_info
        set config_value = #{agentPrice}
        where config_type_code = 'AGENT_PRICE'
    </update>
 
    <update id="updateTimeInterval">
        update xzx_sys_config_info
        set config_value = #{timeInterval}
        where config_type_code = 'INTERVAL_TIME'
    </update>
 
    <update id="updateStratTime">
        update xzx_sys_config_info
        set config_value = #{startTime}
        where config_type_code = 'START_TIME'
    </update>
 
    <update id="updateEndTime">
        update xzx_sys_config_info
        set config_value = #{endTime}
        where config_type_code = 'END_TIME'
    </update>
 
    <update id="updateOverdrawPrice">
        update xzx_sys_config_info
        set config_value = #{overdrawPrice}
        where config_type_code = 'OVERDRAW_PRICE'
    </update>
 
    <update id="updateRechargePrice">
        update xzx_sys_config_info
        set config_value = #{rechargePrice}
        where config_type_code = 'RECHARGE_PRICE'
    </update>
 
    <update id="updateOrderTotal">
        update xzx_sys_config_info
        set config_value = #{orderTotal}
        where config_type_code = 'ORDERTOTAL'
    </update>
 
    <update id="updateOrderTimeout">
        update xzx_sys_config_info
        set config_value = #{orderTimeout}
        where config_type_code = 'ORDERTIMEOUT'
    </update>
 
    <update id="updateWarehousingPrice">
        update xzx_sys_config_info
        set config_value = #{warehousingPrice}
        where config_type_code = 'WAREHOUSING_PRICE'
    </update>
 
    <delete id="updateOrderViewNum">
        update xzx_sys_config_info
        set config_value = #{orderViewNum}
        where config_type_code = 'ORDER_VIEW_TOTAL'
    </delete>
 
 
 
    <select id="queryOverdrawPrice" resultType="java.util.Map">
        select config_value as configValue
        from xzx_sys_config_info
        where config_type_code = 'OVERDRAW_PRICE'
    </select>
 
    <select id="queryWarehousingPrice" resultType="java.util.Map">
        select config_value as configValue
        from xzx_sys_config_info
        where config_type_code = 'WAREHOUSING_PRICE'
    </select>
 
    <select id="queryOrderTotal" resultType="java.util.Map">
        select config_value as configValue
        from xzx_sys_config_info
        where config_type_code = 'ORDERTOTAL'
    </select>
</mapper>