Explorar el Código

优化预约目录查询时间

Your Name hace 3 años
padre
commit
53139f95c5

+ 82 - 86
java110-db/src/main/resources/mapper/store/ReserveCatalogV1ServiceDaoImplMapper.xml

@@ -5,111 +5,107 @@
 <mapper namespace="reserveCatalogV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存预约目录信息 add by wuxw 2018-07-03 -->
     <insert id="saveReserveCatalogInfo" parameterType="Map">
         insert into reserve_catalog(
-catalog_id,name,sort,state,community_id,type
-) values (
-#{catalogId},#{name},#{sort},#{state},#{communityId},#{type}
-)
+        catalog_id,name,sort,state,community_id,type
+        ) values (
+        #{catalogId},#{name},#{sort},#{state},#{communityId},#{type}
+        )
     </insert>
 
 
-
     <!-- 查询预约目录信息 add by wuxw 2018-07-03 -->
     <select id="getReserveCatalogInfo" parameterType="Map" resultType="Map">
-        select  t.catalog_id,t.catalog_id catalogId,t.name,t.status_cd,t.status_cd statusCd,t.sort,t.state,t.community_id,t.community_id communityId,t.type 
-from reserve_catalog t 
-where 1 =1 
-<if test="catalogId !=null and catalogId != ''">
-   and t.catalog_id= #{catalogId}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="sort !=null and sort != ''">
-   and t.sort= #{sort}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="type !=null and type != ''">
-   and t.type= #{type}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.catalog_id,t.catalog_id catalogId,t.name,t.status_cd,t.status_cd
+        statusCd,t.sort,t.state,t.community_id,t.community_id communityId,t.type,t.create_time createTime
+        from reserve_catalog t
+        where 1 =1
+        <if test="catalogId !=null and catalogId != ''">
+            and t.catalog_id= #{catalogId}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="sort !=null and sort != ''">
+            and t.sort= #{sort}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="type !=null and type != ''">
+            and t.type= #{type}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改预约目录信息 add by wuxw 2018-07-03 -->
     <update id="updateReserveCatalogInfo" parameterType="Map">
-        update  reserve_catalog t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="name !=null and name != ''">
-, t.name= #{name}
-</if> 
-<if test="sort !=null and sort != ''">
-, t.sort= #{sort}
-</if> 
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="type !=null and type != ''">
-, t.type= #{type}
-</if> 
- where 1=1 <if test="catalogId !=null and catalogId != ''">
-and t.catalog_id= #{catalogId}
-</if> 
+        update reserve_catalog t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="name !=null and name != ''">
+            , t.name= #{name}
+        </if>
+        <if test="sort !=null and sort != ''">
+            , t.sort= #{sort}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="type !=null and type != ''">
+            , t.type= #{type}
+        </if>
+        where 1=1
+        <if test="catalogId !=null and catalogId != ''">
+            and t.catalog_id= #{catalogId}
+        </if>
 
     </update>
 
     <!-- 查询预约目录数量 add by wuxw 2018-07-03 -->
-     <select id="queryReserveCatalogsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from reserve_catalog t 
-where 1 =1 
-<if test="catalogId !=null and catalogId != ''">
-   and t.catalog_id= #{catalogId}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="sort !=null and sort != ''">
-   and t.sort= #{sort}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="type !=null and type != ''">
-   and t.type= #{type}
-</if> 
+    <select id="queryReserveCatalogsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from reserve_catalog t
+        where 1 =1
+        <if test="catalogId !=null and catalogId != ''">
+            and t.catalog_id= #{catalogId}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="sort !=null and sort != ''">
+            and t.sort= #{sort}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="type !=null and type != ''">
+            and t.type= #{type}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 147 - 149
java110-db/src/main/resources/mapper/store/ReserveGoodsV1ServiceDaoImplMapper.xml

@@ -5,174 +5,172 @@
 <mapper namespace="reserveGoodsV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存预约商品信息 add by wuxw 2018-07-03 -->
     <insert id="saveReserveGoodsInfo" parameterType="Map">
         insert into reserve_goods(
-end_date,goods_id,sort,type,img_url,catalog_id,params_id,price,state,community_id,goods_name,start_date,goods_desc
-) values (
-#{endDate},#{goodsId},#{sort},#{type},#{imgUrl},#{catalogId},#{paramsId},#{price},#{state},#{communityId},#{goodsName},#{startDate},#{goodsDesc}
-)
+        end_date,goods_id,sort,type,img_url,catalog_id,params_id,price,state,community_id,goods_name,start_date,goods_desc
+        ) values (
+        #{endDate},#{goodsId},#{sort},#{type},#{imgUrl},#{catalogId},#{paramsId},#{price},#{state},#{communityId},#{goodsName},#{startDate},#{goodsDesc}
+        )
     </insert>
 
 
-
     <!-- 查询预约商品信息 add by wuxw 2018-07-03 -->
     <select id="getReserveGoodsInfo" parameterType="Map" resultType="Map">
-        select  t.end_date,t.end_date endDate,t.goods_id,t.goods_id goodsId,t.status_cd,t.status_cd statusCd,t.sort,t.type,t.img_url,t.img_url imgUrl,t.catalog_id,t.catalog_id catalogId,t.params_id,t.params_id paramsId,t.price,t.state,t.community_id,t.community_id communityId,t.goods_name,t.goods_name goodsName,t.start_date,t.start_date startDate,t.goods_desc,t.goods_desc goodsDesc 
-from reserve_goods t 
-where 1 =1 
-<if test="endDate !=null and endDate != ''">
-   and t.end_date= #{endDate}
-</if> 
-<if test="goodsId !=null and goodsId != ''">
-   and t.goods_id= #{goodsId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="sort !=null and sort != ''">
-   and t.sort= #{sort}
-</if> 
-<if test="type !=null and type != ''">
-   and t.type= #{type}
-</if> 
-<if test="imgUrl !=null and imgUrl != ''">
-   and t.img_url= #{imgUrl}
-</if> 
-<if test="catalogId !=null and catalogId != ''">
-   and t.catalog_id= #{catalogId}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-   and t.params_id= #{paramsId}
-</if> 
-<if test="price !=null and price != ''">
-   and t.price= #{price}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="goodsName !=null and goodsName != ''">
-   and t.goods_name= #{goodsName}
-</if> 
-<if test="startDate !=null and startDate != ''">
-   and t.start_date= #{startDate}
-</if> 
-<if test="goodsDesc !=null and goodsDesc != ''">
-   and t.goods_desc= #{goodsDesc}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.end_date,t.end_date endDate,t.goods_id,t.goods_id goodsId,t.status_cd,t.status_cd
+        statusCd,t.sort,t.type,t.img_url,t.img_url imgUrl,t.catalog_id,t.catalog_id catalogId,t.params_id,t.params_id
+        paramsId,t.price,t.state,t.community_id,t.community_id communityId,t.goods_name,t.goods_name
+        goodsName,t.start_date,t.start_date startDate,t.goods_desc,t.goods_desc goodsDesc,t.create_time createTime
+        from reserve_goods t
+        where 1 =1
+        <if test="endDate !=null and endDate != ''">
+            and t.end_date= #{endDate}
+        </if>
+        <if test="goodsId !=null and goodsId != ''">
+            and t.goods_id= #{goodsId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="sort !=null and sort != ''">
+            and t.sort= #{sort}
+        </if>
+        <if test="type !=null and type != ''">
+            and t.type= #{type}
+        </if>
+        <if test="imgUrl !=null and imgUrl != ''">
+            and t.img_url= #{imgUrl}
+        </if>
+        <if test="catalogId !=null and catalogId != ''">
+            and t.catalog_id= #{catalogId}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            and t.params_id= #{paramsId}
+        </if>
+        <if test="price !=null and price != ''">
+            and t.price= #{price}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="goodsName !=null and goodsName != ''">
+            and t.goods_name= #{goodsName}
+        </if>
+        <if test="startDate !=null and startDate != ''">
+            and t.start_date= #{startDate}
+        </if>
+        <if test="goodsDesc !=null and goodsDesc != ''">
+            and t.goods_desc= #{goodsDesc}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改预约商品信息 add by wuxw 2018-07-03 -->
     <update id="updateReserveGoodsInfo" parameterType="Map">
-        update  reserve_goods t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="endDate !=null and endDate != ''">
-, t.end_date= #{endDate}
-</if> 
-<if test="sort !=null and sort != ''">
-, t.sort= #{sort}
-</if> 
-<if test="type !=null and type != ''">
-, t.type= #{type}
-</if> 
-<if test="imgUrl !=null and imgUrl != ''">
-, t.img_url= #{imgUrl}
-</if> 
-<if test="catalogId !=null and catalogId != ''">
-, t.catalog_id= #{catalogId}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-, t.params_id= #{paramsId}
-</if> 
-<if test="price !=null and price != ''">
-, t.price= #{price}
-</if> 
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="goodsName !=null and goodsName != ''">
-, t.goods_name= #{goodsName}
-</if> 
-<if test="startDate !=null and startDate != ''">
-, t.start_date= #{startDate}
-</if> 
-<if test="goodsDesc !=null and goodsDesc != ''">
-, t.goods_desc= #{goodsDesc}
-</if> 
- where 1=1 <if test="goodsId !=null and goodsId != ''">
-and t.goods_id= #{goodsId}
-</if> 
+        update reserve_goods t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="endDate !=null and endDate != ''">
+            , t.end_date= #{endDate}
+        </if>
+        <if test="sort !=null and sort != ''">
+            , t.sort= #{sort}
+        </if>
+        <if test="type !=null and type != ''">
+            , t.type= #{type}
+        </if>
+        <if test="imgUrl !=null and imgUrl != ''">
+            , t.img_url= #{imgUrl}
+        </if>
+        <if test="catalogId !=null and catalogId != ''">
+            , t.catalog_id= #{catalogId}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            , t.params_id= #{paramsId}
+        </if>
+        <if test="price !=null and price != ''">
+            , t.price= #{price}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="goodsName !=null and goodsName != ''">
+            , t.goods_name= #{goodsName}
+        </if>
+        <if test="startDate !=null and startDate != ''">
+            , t.start_date= #{startDate}
+        </if>
+        <if test="goodsDesc !=null and goodsDesc != ''">
+            , t.goods_desc= #{goodsDesc}
+        </if>
+        where 1=1
+        <if test="goodsId !=null and goodsId != ''">
+            and t.goods_id= #{goodsId}
+        </if>
 
     </update>
 
     <!-- 查询预约商品数量 add by wuxw 2018-07-03 -->
-     <select id="queryReserveGoodssCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from reserve_goods t 
-where 1 =1 
-<if test="endDate !=null and endDate != ''">
-   and t.end_date= #{endDate}
-</if> 
-<if test="goodsId !=null and goodsId != ''">
-   and t.goods_id= #{goodsId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="sort !=null and sort != ''">
-   and t.sort= #{sort}
-</if> 
-<if test="type !=null and type != ''">
-   and t.type= #{type}
-</if> 
-<if test="imgUrl !=null and imgUrl != ''">
-   and t.img_url= #{imgUrl}
-</if> 
-<if test="catalogId !=null and catalogId != ''">
-   and t.catalog_id= #{catalogId}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-   and t.params_id= #{paramsId}
-</if> 
-<if test="price !=null and price != ''">
-   and t.price= #{price}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="goodsName !=null and goodsName != ''">
-   and t.goods_name= #{goodsName}
-</if> 
-<if test="startDate !=null and startDate != ''">
-   and t.start_date= #{startDate}
-</if> 
-<if test="goodsDesc !=null and goodsDesc != ''">
-   and t.goods_desc= #{goodsDesc}
-</if> 
+    <select id="queryReserveGoodssCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from reserve_goods t
+        where 1 =1
+        <if test="endDate !=null and endDate != ''">
+            and t.end_date= #{endDate}
+        </if>
+        <if test="goodsId !=null and goodsId != ''">
+            and t.goods_id= #{goodsId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="sort !=null and sort != ''">
+            and t.sort= #{sort}
+        </if>
+        <if test="type !=null and type != ''">
+            and t.type= #{type}
+        </if>
+        <if test="imgUrl !=null and imgUrl != ''">
+            and t.img_url= #{imgUrl}
+        </if>
+        <if test="catalogId !=null and catalogId != ''">
+            and t.catalog_id= #{catalogId}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            and t.params_id= #{paramsId}
+        </if>
+        <if test="price !=null and price != ''">
+            and t.price= #{price}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="goodsName !=null and goodsName != ''">
+            and t.goods_name= #{goodsName}
+        </if>
+        <if test="startDate !=null and startDate != ''">
+            and t.start_date= #{startDate}
+        </if>
+        <if test="goodsDesc !=null and goodsDesc != ''">
+            and t.goods_desc= #{goodsDesc}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 73 - 77
java110-db/src/main/resources/mapper/store/ReserveParamsOpenTimeV1ServiceDaoImplMapper.xml

@@ -5,102 +5,98 @@
 <mapper namespace="reserveParamsOpenTimeV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存预约时间信息 add by wuxw 2018-07-03 -->
     <insert id="saveReserveParamsOpenTimeInfo" parameterType="Map">
         insert into reserve_params_open_time(
-hours,params_id,is_open,time_id,community_id
-) values (
-#{hours},#{paramsId},#{isOpen},#{timeId},#{communityId}
-)
+        hours,params_id,is_open,time_id,community_id
+        ) values (
+        #{hours},#{paramsId},#{isOpen},#{timeId},#{communityId}
+        )
     </insert>
 
 
-
     <!-- 查询预约时间信息 add by wuxw 2018-07-03 -->
     <select id="getReserveParamsOpenTimeInfo" parameterType="Map" resultType="Map">
-        select  t.hours,t.params_id,t.params_id paramsId,t.is_open,t.is_open isOpen,t.time_id,t.time_id timeId,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId 
-from reserve_params_open_time t 
-where 1 =1 
-<if test="hours !=null and hours != ''">
-   and t.hours= #{hours}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-   and t.params_id= #{paramsId}
-</if> 
-<if test="isOpen !=null and isOpen != ''">
-   and t.is_open= #{isOpen}
-</if> 
-<if test="timeId !=null and timeId != ''">
-   and t.time_id= #{timeId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.hours,t.params_id,t.params_id paramsId,t.is_open,t.is_open isOpen,t.time_id,t.time_id
+        timeId,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.create_time createTime
+        from reserve_params_open_time t
+        where 1 =1
+        <if test="hours !=null and hours != ''">
+            and t.hours= #{hours}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            and t.params_id= #{paramsId}
+        </if>
+        <if test="isOpen !=null and isOpen != ''">
+            and t.is_open= #{isOpen}
+        </if>
+        <if test="timeId !=null and timeId != ''">
+            and t.time_id= #{timeId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改预约时间信息 add by wuxw 2018-07-03 -->
     <update id="updateReserveParamsOpenTimeInfo" parameterType="Map">
-        update  reserve_params_open_time t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="hours !=null and hours != ''">
-, t.hours= #{hours}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-, t.params_id= #{paramsId}
-</if> 
-<if test="isOpen !=null and isOpen != ''">
-, t.is_open= #{isOpen}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
- where 1=1 <if test="timeId !=null and timeId != ''">
-and t.time_id= #{timeId}
-</if> 
+        update reserve_params_open_time t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="hours !=null and hours != ''">
+            , t.hours= #{hours}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            , t.params_id= #{paramsId}
+        </if>
+        <if test="isOpen !=null and isOpen != ''">
+            , t.is_open= #{isOpen}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        where 1=1
+        <if test="timeId !=null and timeId != ''">
+            and t.time_id= #{timeId}
+        </if>
 
     </update>
 
     <!-- 查询预约时间数量 add by wuxw 2018-07-03 -->
-     <select id="queryReserveParamsOpenTimesCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from reserve_params_open_time t 
-where 1 =1 
-<if test="hours !=null and hours != ''">
-   and t.hours= #{hours}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-   and t.params_id= #{paramsId}
-</if> 
-<if test="isOpen !=null and isOpen != ''">
-   and t.is_open= #{isOpen}
-</if> 
-<if test="timeId !=null and timeId != ''">
-   and t.time_id= #{timeId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
+    <select id="queryReserveParamsOpenTimesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from reserve_params_open_time t
+        where 1 =1
+        <if test="hours !=null and hours != ''">
+            and t.hours= #{hours}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            and t.params_id= #{paramsId}
+        </if>
+        <if test="isOpen !=null and isOpen != ''">
+            and t.is_open= #{isOpen}
+        </if>
+        <if test="timeId !=null and timeId != ''">
+            and t.time_id= #{timeId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 102 - 104
java110-db/src/main/resources/mapper/store/ReserveParamsV1ServiceDaoImplMapper.xml

@@ -5,129 +5,127 @@
 <mapper namespace="reserveParamsV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存预约参数信息 add by wuxw 2018-07-03 -->
     <insert id="saveReserveParamsInfo" parameterType="Map">
         insert into reserve_params(
-param_way,params_id,max_quantity,name,param_way_text,start_time,community_id,hours_max_quantity
-) values (
-#{paramWay},#{paramsId},#{maxQuantity},#{name},#{paramWayText},#{startTime},#{communityId},#{hoursMaxQuantity}
-)
+        param_way,params_id,max_quantity,name,param_way_text,start_time,community_id,hours_max_quantity
+        ) values (
+        #{paramWay},#{paramsId},#{maxQuantity},#{name},#{paramWayText},#{startTime},#{communityId},#{hoursMaxQuantity}
+        )
     </insert>
 
 
-
     <!-- 查询预约参数信息 add by wuxw 2018-07-03 -->
     <select id="getReserveParamsInfo" parameterType="Map" resultType="Map">
-        select  t.param_way,t.param_way paramWay,t.params_id,t.params_id paramsId,t.max_quantity,t.max_quantity maxQuantity,t.name,t.param_way_text,t.param_way_text paramWayText,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.hours_max_quantity,t.hours_max_quantity hoursMaxQuantity 
-from reserve_params t 
-where 1 =1 
-<if test="paramWay !=null and paramWay != ''">
-   and t.param_way= #{paramWay}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-   and t.params_id= #{paramsId}
-</if> 
-<if test="maxQuantity !=null and maxQuantity != ''">
-   and t.max_quantity= #{maxQuantity}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="paramWayText !=null and paramWayText != ''">
-   and t.param_way_text= #{paramWayText}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="hoursMaxQuantity !=null and hoursMaxQuantity != ''">
-   and t.hours_max_quantity= #{hoursMaxQuantity}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.param_way,t.param_way paramWay,t.params_id,t.params_id paramsId,t.max_quantity,t.max_quantity
+        maxQuantity,t.name,t.param_way_text,t.param_way_text paramWayText,t.start_time,t.start_time
+        startTime,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id
+        communityId,t.hours_max_quantity,t.hours_max_quantity hoursMaxQuantity,t.create_time createTime
+        from reserve_params t
+        where 1 =1
+        <if test="paramWay !=null and paramWay != ''">
+            and t.param_way= #{paramWay}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            and t.params_id= #{paramsId}
+        </if>
+        <if test="maxQuantity !=null and maxQuantity != ''">
+            and t.max_quantity= #{maxQuantity}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="paramWayText !=null and paramWayText != ''">
+            and t.param_way_text= #{paramWayText}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="hoursMaxQuantity !=null and hoursMaxQuantity != ''">
+            and t.hours_max_quantity= #{hoursMaxQuantity}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改预约参数信息 add by wuxw 2018-07-03 -->
     <update id="updateReserveParamsInfo" parameterType="Map">
-        update  reserve_params t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="paramWay !=null and paramWay != ''">
-, t.param_way= #{paramWay}
-</if> 
-<if test="maxQuantity !=null and maxQuantity != ''">
-, t.max_quantity= #{maxQuantity}
-</if> 
-<if test="name !=null and name != ''">
-, t.name= #{name}
-</if> 
-<if test="paramWayText !=null and paramWayText != ''">
-, t.param_way_text= #{paramWayText}
-</if> 
-<if test="startTime !=null and startTime != ''">
-, t.start_time= #{startTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="hoursMaxQuantity !=null and hoursMaxQuantity != ''">
-, t.hours_max_quantity= #{hoursMaxQuantity}
-</if> 
- where 1=1 <if test="paramsId !=null and paramsId != ''">
-and t.params_id= #{paramsId}
-</if> 
+        update reserve_params t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="paramWay !=null and paramWay != ''">
+            , t.param_way= #{paramWay}
+        </if>
+        <if test="maxQuantity !=null and maxQuantity != ''">
+            , t.max_quantity= #{maxQuantity}
+        </if>
+        <if test="name !=null and name != ''">
+            , t.name= #{name}
+        </if>
+        <if test="paramWayText !=null and paramWayText != ''">
+            , t.param_way_text= #{paramWayText}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            , t.start_time= #{startTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="hoursMaxQuantity !=null and hoursMaxQuantity != ''">
+            , t.hours_max_quantity= #{hoursMaxQuantity}
+        </if>
+        where 1=1
+        <if test="paramsId !=null and paramsId != ''">
+            and t.params_id= #{paramsId}
+        </if>
 
     </update>
 
     <!-- 查询预约参数数量 add by wuxw 2018-07-03 -->
-     <select id="queryReserveParamssCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from reserve_params t 
-where 1 =1 
-<if test="paramWay !=null and paramWay != ''">
-   and t.param_way= #{paramWay}
-</if> 
-<if test="paramsId !=null and paramsId != ''">
-   and t.params_id= #{paramsId}
-</if> 
-<if test="maxQuantity !=null and maxQuantity != ''">
-   and t.max_quantity= #{maxQuantity}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="paramWayText !=null and paramWayText != ''">
-   and t.param_way_text= #{paramWayText}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="hoursMaxQuantity !=null and hoursMaxQuantity != ''">
-   and t.hours_max_quantity= #{hoursMaxQuantity}
-</if> 
+    <select id="queryReserveParamssCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from reserve_params t
+        where 1 =1
+        <if test="paramWay !=null and paramWay != ''">
+            and t.param_way= #{paramWay}
+        </if>
+        <if test="paramsId !=null and paramsId != ''">
+            and t.params_id= #{paramsId}
+        </if>
+        <if test="maxQuantity !=null and maxQuantity != ''">
+            and t.max_quantity= #{maxQuantity}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="paramWayText !=null and paramWayText != ''">
+            and t.param_way_text= #{paramWayText}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="hoursMaxQuantity !=null and hoursMaxQuantity != ''">
+            and t.hours_max_quantity= #{hoursMaxQuantity}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>