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
159
160
161
162
163
164
| <?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.TSystemPriceMapper">
|
| <!-- 通用查询映射结果 -->
| <resultMap id="BaseResultMap" type="com.dsh.guns.modular.system.model.TSystemPrice">
| <id column="id" property="id" />
| <result column="type" property="type" />
| <result column="companyId" property="companyId" />
| <result column="serverCarModelId" property="serverCarModelId" />
| <result column="userType" property="userType" />
| <result column="content" property="content" />
| <result column="fareTypeNote" property="fareTypeNote"/>
| <result column="state" property="state"/>
| </resultMap>
|
| <!-- 通用查询结果列 -->
| <sql id="Base_Column_List">
| id, type, companyId, serverCarModelId, content
| </sql>
| <insert id="saveService">
| insert into t_system_price_check(id,
| userType,
| orderType,
| companyId,
| serverCarModelId,
| openCityId,
| type,
| content,
| insertTime,
| state,code,userId,remark
| ) value (null ,#{type},4,#{c},null,#{openCityId},#{type1},#{json2},now(),1,#{code},#{userId},#{remark})
| </insert>
| <insert id="saveMotoService">
| insert into t_system_price_check(id,
| userType,
| orderType,
| companyId,
| serverCarModelId,
| openCityId,
| type,
| content,
| insertTime,
| state,code,userId,remark
| ) value (null ,#{type},1,#{c},#{serverCarModelId},#{openCityId},#{i},#{json1},now(),1,#{code},#{userId},null)
| </insert>
| <update id="updateCheck">
| update t_system_price_check set state=#{check} where code =#{id}
| </update>
|
| <!--查询专车价格设置-->
| <select id="getSpecialPriceList" resultType="map" parameterType="com.baomidou.mybatisplus.extension.plugins.pagination.Page">
| SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,
| <if test="language == 1">
| sc.`name` as name,
| </if>
| <if test="language == 2">
| sc.`ename` as name,
| </if>
| <if test="language == 3">
| sc.`yname` as name,
| </if>
| sc.img,sp.state ,sp.orderType ,tc.chineseName city ,sp.userType userType,sp.cityId,sp.openCityId from t_system_price as sp
| LEFT JOIN t_server_carmodel as sc on sc.id = sp.serverCarModelId left join t_city tc on tc.id = sp.cityId ) as o
| <where>
| o.type = 1 and o.state != 3 and o.companyId = #{companyId} and o.orderType = 1
| <if test="name != null and name != ''">
| and o.name LIKE CONCAT('%',#{name},'%')
| </if>
| <if test="state != null and state != ''">
| and o.state = #{state}
| </if>
| </where>
| group by o.openCityId,o.`name`,o.userType
| order by o.id desc
| </select>
| <select id="getServicePriceList" resultType="java.util.Map">
| select t1.*,CONCAT(t2.areaName,t2.cityName) as chineseName ,
| t3.avatar,
| t3.account,
| t3.password,
| t3.salt,
| t3.name,
| t3.birthday,
| t3.sex,
| t3.email,
| t3.phone,
| t3.roleid,
| t3.deptid,
| t3.status,
| t3.createtime,
| t3.version,
| t3.roleType,
| t3.objectId,
| t3.passWordUpdate
| from t_system_price_check t1 left join t_open_city t2 on t1.cityId = t2.id
| left join sys_user t3 on t1.userId = t3.id
|
|
| where t1.state!=4
| <if test="sTime !=null">
| and t1.insertTime between #{sTime} and #{eTime}
| </if>
| <if test="phone!=null and phone!=''">
| and t3.phone like concat("%",#{phone},"%")
| </if>
| <if test="account!=null and account!=''">
| and t3.account like concat("%",#{account},"%")
| </if>
| <if test="state!=null and state!=''">
| and t1.state =#{state}
| </if>
| group by t1.code
| order by t1.insertTime desc
| </select>
|
| <select id="getServicePriceList1" resultType="java.util.Map">
| select t1.*,t2.chineseName chineseName ,
| t3.avatar,
| t3.account,
| t3.password,
| t3.salt,
| t3.name,
| t3.birthday,
| t3.sex,
| t3.email,
| t3.phone,
| t3.roleid,
| t3.deptid,
| t3.status,
| t3.createtime,
| t3.version,
| t3.roleType,
| t3.objectId,
| t3.passWordUpdate
|
| from t_system_price_check t1
| left join t_city t2 on t1.cityId = t2.id
| left join sys_user t3 on t1.userId = t3.id
|
|
| where t1.state!=4
| <if test="sTime !=null">
| and t1.insertTime between #{sTime} and #{eTime}
| </if>
| <if test="phone!=null and phone!=''">
| and t3.phone like concat("%",#{phone},"%")
| </if>
| <if test="account!=null and account!=''">
| and t3.account like concat("%",#{account},"%")
| </if>
| <if test="state!=null and state!=''">
| and t1.state =#{state}
| </if>
| and t1.companyId in
| <foreach collection="cid" separator="," open="(" item="id" index="index" close=")">#{id}</foreach>
| group by t1.code
| order by t1.insertTime desc
| </select>
| <select id="getService" resultType="com.dsh.guns.modular.system.model.TSystemPriceService">
| select * from t_system_price_check where code=#{tSystemPriceId}
| </select>
|
| </mapper>
|
|