From 47a458ca867f700ad8dfe8bccdbb6bf59ca2d301 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 11 May 2021 15:54:02 +0800
Subject: [PATCH] APP接口调整

---
 blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml |   73 ++++++++++++++++++++++--------------
 1 files changed, 45 insertions(+), 28 deletions(-)

diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml
index 8332563..6417ba0 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml
@@ -20,16 +20,17 @@
         <result column="coordinate" property="coordinate"/>
         <result column="jd" property="jd"/>
         <result column="wd" property="wd"/>
-        <result column="addvcd" property="addvcd"/>
+        <result column="district" property="district"/>
+        <result column="province" property="province"/>
+        <result column="city" property="city"/>
         <result column="rName" property="rName"/>
         <result column="handletype" property="handletype"/>
     </resultMap>
 
-
     <select id="selectJingdanPage" resultMap="jingdanResultMap">
         SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
-        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,
-        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+        j.handleP,j.handleTime,j.handName,j.level,j.jd,j.wd,j.district,j.rName,j.czTime,j.bz,
+        j.province,j.city FROM sys_jingdan j  where 1=1
         <if test="jingdan.waringType!=null and jingdan.waringType!=''">
             and j.waringType=#{jingdan.waringType}
         </if>
@@ -39,8 +40,14 @@
         <if test="jingdan.endTime!=null and jingdan.endTime!=''">
             and j.galarmTime &lt;=#{jingdan.endTime}
         </if>
-        <if test="jingdan.addvcd!=null and jingdan.addvcd!=''">
-            and j.addvcd=#{jingdan.addvcd}
+        <if test="jingdan.district!=null">
+            and j.district like concat('%',#{jingdan.district},'%')
+        </if>
+        <if test="jingdan.province!=null">
+            and j.province like concat('%',#{jingdan.province},'%')
+        </if>
+        <if test="jingdan.city!=null">
+            and j.city like concat('%',#{jingdan.city},'%')
         </if>
         <if test="jingdan.type!=null and jingdan.type!=''">
             and j.type=#{jingdan.type}
@@ -50,8 +57,8 @@
 
     <select id="selectList" resultMap="jingdanResultMap">
         SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
-        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,
-        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.district,j.rName,
+        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.district where 1=1
         <if test="waringType!=null and waringType!=''">
             and j.waringType=#{waringType}
         </if>
@@ -61,8 +68,8 @@
         <if test="endTime!=null and endTime!=''">
             and j.galarmTime &lt;=#{endTime}
         </if>
-        <if test="addvcd!=null and addvcd!=''">
-            and j.addvcd=#{addvcd}
+        <if test="district!=null and district!=''">
+            and j.district=#{district}
         </if>
         <if test="type!=null and type!=''">
             and j.type=#{type}
@@ -71,8 +78,8 @@
 
     <select id="selectdInfo" resultMap="jingdanResultMap">
         SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
-        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,j.handletype,
-        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.district,j.rName,j.handletype,
+        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.district where 1=1
         <if test="deviceNumber!=null and deviceNumber!=''">
             and j.deviceNumber=#{deviceNumber}
         </if>
@@ -84,8 +91,8 @@
     <!--APP警单列表-->
     <select id="selectLists" resultMap="jingdanResultMap">
         SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
-        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,j.handletype,
-        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.district,j.rName,j.handletype,
+        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.district where 1=1
         <if test="handleP!=null and handleP!=''">
             and j.handleP=#{handleP}
         </if>
@@ -96,10 +103,10 @@
 
 <!--    <insert id="insert">-->
 <!--        insert into sys_jingdan(galarmPeople,phoneNumber,place,content,galarmTime,waringType,deviceNumber,type,-->
-<!--        handleP,handleTime,handName,level,coordinate,jd,wd,addvcd)-->
+<!--        handleP,handleTime,handName,level,coordinate,jd,wd,district)-->
 <!--        values (#{galarmPeople},#{phoneNumber},#{place},#{content},#{galarmTime}-->
 <!--        ,#{waringType},#{deviceNumber},#{type},#{handleP},#{handleTime},-->
-<!--        #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{addvcd})-->
+<!--        #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{district})-->
 <!--    </insert>-->
 
 
@@ -141,17 +148,20 @@
             <if test="level!=null and level!=''">
                 level,
             </if>
-            <if test="coordinate=null and coordinate=''">
-                coordinate,
-            </if>
             <if test="jd!=null and jd!=''">
                 jd,
             </if>
             <if test="wd!=null and wd!=''">
                 wd,
             </if>
-            <if test="addvcd!=null and addvcd!=''">
-                addvcd,
+            <if test="district!=null and district!=''">
+                district,
+            </if>
+            <if test="city!=null and city!=''">
+                city,
+            </if>
+            <if test="province!=null and province!=''">
+                province,
             </if>
             <if test="rName!=null and rName!=''">
                 rName,
@@ -202,9 +212,6 @@
             <if test="level!=null and level!=''">
                 #{level},
             </if>
-            <if test="coordinate=null and coordinate=''">
-                coordinate,
-            </if>
             <if test="jd!=null and wd!=null">
                 POINT(#{jd},#{wd}),
             </if>
@@ -214,8 +221,14 @@
             <if test="wd!=null and wd!=''">
                 #{wd},
             </if>
-            <if test="addvcd!=null and addvcd!=''">
-                #{addvcd},
+            <if test="district!=null and district!=''">
+                #{district},
+            </if>
+            <if test="province!=null and province!=''">
+                #{province},
+            </if>
+            <if test="city!=null and city!=''">
+                #{city},
             </if>
             <if test="rName!=null and rName!=''">
                 #{rName},
@@ -228,7 +241,7 @@
             </if>
         </trim>
     </sql>
-    <insert id="insert">
+    <insert id="inserts">
         insert into sys_jingdan(<include refid="key"/>) values(<include refid="value"/>)
     </insert>
 
@@ -239,6 +252,10 @@
 
     <update id="updateInfo" >
    UPDATE  sys_jingdan SET handleP=#{handleP},handName=#{handName},handletype=#{handletype},type=#{type} WHERE id=#{id}
-</update>
+    </update>
+
+    <insert id="submitReId" useGeneratedKeys="true" keyProperty="id" >
+        insert into sys_jingdan(galarmPeople) values("nihao")
+    </insert>
 
 </mapper>

--
Gitblit v1.9.3