PickUpCity.xml
1.34 KB
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
<?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.diligrp.website.dao.impl.PickUpCityDaoImpl">
<resultMap id="pickUpCity" type="com.diligrp.website.domain.PickUpCity">
<result property="pickId" column="packup_id" />
<result property="cityId" column="city_id" />
</resultMap>
<select id="SELECT-PICK-UP-CITY-INFO" parameterType="Long"
resultMap="pickUpCity">
<![CDATA[
select packup_id, city_id from t_pickup_relation_city where packup_id=#{pk}
]]>
</select>
<select id="SELECT-All-CITY-INFO"
resultMap="pickUpCity">
<![CDATA[
select packup_id, city_id from t_pickup_relation_city
]]>
</select>
<select id="SELECT-PICKID-BY-CITYID"
resultMap="pickUpCity" parameterType="Long">
<![CDATA[
select DISTINCT packup_id, city_id from t_pickup_relation_city where city_id = #{cityId}
]]>
</select>
<insert id="INSERT-PICKUP-CITY-INFO" parameterType="com.diligrp.website.domain.PickUpCity">
insert into
t_pickup_relation_city(packup_id,city_id)
values(#{pickId},#{cityId})
</insert>
<delete id="DELETE-PICKUP-CITY-BY-PICKID" parameterType="Long">
delete from t_pickup_relation_city where packup_id=#{pickId}
</delete>
</mapper>