Commit 65115b82 authored by libin's avatar libin

营地查询

parent 51f94ca6
......@@ -3,7 +3,7 @@
<mapper namespace="com.xxfc.platform.campsite.mapper.CampsiteShopMapper">
<!-- 可根据自己的需求,是否要使用 -->
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.xxfc.platform.campsite.entity.CampsiteShop" id="campsiteShopMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
......@@ -70,7 +70,7 @@
and cst.tag_id=#{typeId}
</if>
<if test="proviceCode != null">
and cs.`province`=#{proviceCode}
and cs.`province`=#{proviceCode}
</if>
<if test="cityCode != null">
and cs.`city`=#{cityCode}
......@@ -101,27 +101,28 @@
<!--根据id查询详情-->
<select id="findCampsiteShopDetailById" resultType="com.xxfc.platform.campsite.dto.CampsiteShopDetailDTO">
select `name` as `name`,`province_name` as `provinceName`,`city_name` as `cityName`,`address` as `address`,`service_phone` as `phone`,`logo` as `logo`,`poster_background` as `posterBackground` ,
`content` as `content`,`configure` as `configure`,`longitude` as `longitude`,`latitude` as `latitude`,`alt`,cs.img_title as `imgTitle`,cs.img_keyword as `imgKeyword`,cs.img_desc as `imgDesc` from `campsite_shop` where `id`=#{id}
`content` as `content`,`configure` as `configure`,`longitude` as `longitude`,`latitude` as `latitude`,`alt`,img_title as `imgTitle`,img_keyword as `imgKeyword`,img_desc as `imgDesc` from `campsite_shop` where `id`=#{id}
</select>
<!--根据查询条件分页查询-->
<select id="findAllCampsiteShops" parameterType="com.xxfc.platform.campsite.dto.CampsiteShopAdminFindDTO" resultType="com.xxfc.platform.campsite.dto.CampsiteShopAdminPageDTO">
SELECT `id`,`name`,`hot`,`crt_time` as `crtTime`,`start_time` as `shopStartTime`,`sale_state` as
<select id="findAllCampsiteShops" parameterType="com.xxfc.platform.campsite.dto.CampsiteShopAdminFindDTO"
resultType="com.xxfc.platform.campsite.dto.CampsiteShopAdminPageDTO">
SELECT `id`,`name`,`hot`,`crt_time` as `crtTime`,`start_time` as `shopStartTime`,`sale_state` as
`saleState` FROM `campsite_shop`
where `is_del`=0
<if test="startTime != null and endTime!=null">
and start_time between #{startTime} and #{endTime}
</if>
where `is_del`=0
<if test="startTime != null and endTime!=null">
and start_time between #{startTime} and #{endTime}
</if>
<if test="startTime != null and endTime==null">
and <![CDATA[ start_time >= #{startTime} ]]>
</if>
<if test="endTime != null and startTime==null">
and <![CDATA[ start_time <= #{endTime} ]]>
</if>
<if test="name != null and name != ''">
and `name` like concat('%',#{name},'%')
</if>
ORDER BY `hot` DESC
<if test="name != null and name != ''">
and `name` like concat('%',#{name},'%')
</if>
ORDER BY `hot` DESC
</select>
<!--根据id更新营地状态-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment