liujie
2023-07-25 9b1188a004df6585d1836e85e22ee24a91b5fd62
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?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.dsh.course.mapper.TPhoneMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.dsh.guns.modular.system.model.TPhone">
        <id column="id" property="id"/>
        <result column="type" property="type"/>
        <result column="platform" property="platform"/>
        <result column="phone" property="phone"/>
        <result column="companyId" property="companyId"/>
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, type, platform, phone, companyId
    </sql>
    <insert id="addIntegral">
        insert into t_sys_integral(id,
            companyId,
            integral,
            content
            ) value (null ,#{companyId},0,#{json0})
    </insert>
    <insert id="addWait">
        insert into t_sys_driver_wait_over(id,
            companyId,
            content
            ) value (null ,#{companyId},#{json1})
    </insert>
    <insert id="addRegister">
        insert into t_sys_driver_register(id,
        companyId,
        content
        )value (null ,#{companyId},#{json2})
    </insert>
    <insert id="addUserLevel">
        insert into t_sys_driver_user_level(id,
        companyId,
        content
        )value (null ,#{companyId},#{json3})
    </insert>
    <insert id="addMotorPushOrder">
        insert into t_sys_push_order (id,
        companyId,
        pushType,
        content
        ) value (null ,#{companyId},1,#{json4})
    </insert>
    <insert id="addSendOrder">
        insert into t_sys_push_order (id,
        companyId,
        pushType,
        content
        ) value (null ,#{companyId},4,#{json5})
    </insert>
    <insert id="addCancel">
        insert into t_sys_cancle_order (id,
        companyId,
        minuteNum,
        money,
        `type`,
        orderType,
        content
        ) value (null ,#{companyId},null,null,1,1,null)
    </insert>
    <insert id="addYyCancel">
          insert into t_sys_cancle_order (id,
        companyId,
        minuteNum,
        money,
        `type`,
        orderType,
        content
        ) value (null ,#{companyId},null,null,2,1,null)
    </insert>
    <insert id="addPolice">
        insert into t_phone(id,
        `type`,
        platform,
        phone,
        companyId
        ) value (null,1,2,null ,#{companyId})
    </insert>
    <insert id="addTalk">
         insert into t_phone(id,
        `type`,
        platform,
        phone,
        companyId
        ) value (null,2,2,null ,#{companyId})
    </insert>
    <insert id="addMin">
        insert into t_sys_driver_min(id,
companyId,
content
) value (null ,#{companyId},0)
    </insert>
 
 
    <update id="updateWait">
        update t_sys_driver_wait_over set content =#{json1} where companyId=#{companyId}
    </update>
    <update id="updateRegister">
        update  t_sys_driver_register  set content =#{json2} where companyId=#{companyId}
    </update>
    <update id="updateUserLevel">
        update t_sys_driver_user_level set content =#{json3} where companyId=#{companyId}
    </update>
    <update id="updateMotorPushOrder">
        update t_sys_push_order   set content =#{json4} where  companyId=#{companyId} and pushType=1
    </update>
    <update id="updateSendOrder">
        update t_sys_push_order   set content =#{json5} where  companyId=#{companyId} and pushType=4
    </update>
    <update id="updateCancel">
        update t_sys_cancle_order set minuteNum =#{ptCancel1} ,money=#{ptCancel2} where companyId=#{companyId}  and type =1 and orderType =1
    </update>
    <update id="updateYyCancel">
        update t_sys_cancle_order set minuteNum =#{yyCancel1} ,money=#{yyCancel2} where companyId=#{companyId}  and type =2 and orderType =1
    </update>
    <update id="updatePolice">
        update t_phone set phone =#{phone1} where  companyId=#{companyId}  and type =1
    </update>
    <update id="updateTalk">
        update t_phone set phone =#{phone2} where  companyId=#{companyId}  and type =2
    </update>
    <update id="updateMin">
        update t_sys_driver_min set content =#{min} where companyId = #{companyId}
    </update>
    <update id="updateIntegral">
        update t_sys_integral set content =#{json0} where companyId = #{companyId}
    </update>
    <update id="updateMinMoney">
        update t_min_money set money =#{minMoney}
    </update>
 
 
    <select id="getWaitOver" resultType="com.dsh.guns.modular.system.model.TSysSet">
        select * from t_sys_driver_wait_over where companyId = #{companyId}
    </select>
    <select id="getRegister" resultType="com.dsh.guns.modular.system.model.TSysSet">
        select * from t_sys_driver_register where companyId = #{companyId}
    </select>
    <select id="getUserLevel" resultType="com.dsh.guns.modular.system.model.TSysSet">
        select * from t_sys_driver_user_level where companyId = #{companyId}
    </select>
    <select id="getMin" resultType="com.dsh.guns.modular.system.model.TSysSet">
        select * from t_sys_driver_min where companyId = #{companyId}
    </select>
    <select id="getIntegral" resultType="com.dsh.guns.modular.system.model.TSysSet">
        select id,companyId,content from t_sys_integral where companyId = #{companyId}
    </select>
    <select id="getMinMoney" resultType="java.math.BigDecimal">
        select money from t_min_money limit 1
    </select>
 
</mapper>