Przeglądaj źródła

联系人电话

suochencheng 7 lat temu
rodzic
commit
f40f2bc690

+ 72 - 6
log.txt

@@ -1,9 +1,37 @@
-[2018-06-29 17:03:46] [ERROR] - 
-java.io.IOException: Server returned HTTP response code: 500 for URL: http://211.144.95.51:8001/api/Contract/GetAllContractList
-	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
-	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
-	at com.izouma.awesomeadmin.util.NetUtils.getUrlResponse(NetUtils.java:109)
-	at test.com.izouma.admintemplate.datasource.TMSGenVueServiceTest.test(TMSGenVueServiceTest.java:39)
+[2018-06-26 10:05:10] [ERROR] - getDistrictInfoList
+org.springframework.jdbc.BadSqlGrammarException: 
+### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
+### The error may exist in file [D:\projects\XiangJuWu\target\classes\com\izouma\awesomeadmin\dao\DistrictInfoMapper.xml]
+### The error may involve com.izouma.awesomeadmin.dao.DistrictInfoMapper.queryAllDistrictInfo-Inline
+### The error occurred while setting parameters
+### SQL: select                       id,            del_flag,            full_name,            short_name,            code,            lat,            lng,            remark                  from district_info          WHERE  del_flag = 'N'                                                                                                                                      and `code` LIKE CONCAT(LEFT(?, 4), '%')                 AND `code` != ?;          order by id desc
+### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
+; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
+	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
+	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
+	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
+	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
+	at com.sun.proxy.$Proxy37.selectList(Unknown Source)
+	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
+	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:122)
+	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:64)
+	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
+	at com.sun.proxy.$Proxy50.queryAllDistrictInfo(Unknown Source)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:498)
+	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
+	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
+	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
+	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
+	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
+	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
+	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
+	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
+	at com.sun.proxy.$Proxy51.queryAllDistrictInfo(Unknown Source)
+	at com.izouma.awesomeadmin.service.impl.DistrictInfoServiceImpl.getDistrictInfoList(DistrictInfoServiceImpl.java:30)
+	at test.com.izouma.admintemplate.datasource.DistrictInfoServiceTest.test(DistrictInfoServiceTest.java:42)
 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
@@ -32,3 +60,41 @@ java.io.IOException: Server returned HTTP response code: 500 for URL: http://211
 	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
+Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
+	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
+	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
+	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
+	at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
+	at com.mysql.jdbc.Util.getInstance(Util.java:384)
+	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
+	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
+	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
+	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
+	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2444)
+	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2834)
+	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
+	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
+	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1307)
+	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
+	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:62)
+	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:78)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:498)
+	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
+	at com.sun.proxy.$Proxy103.query(Unknown Source)
+	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
+	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303)
+	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:154)
+	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:102)
+	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:82)
+	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)
+	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:498)
+	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
+	... 49 more

+ 23 - 1
src/main/java/com/izouma/awesomeadmin/dao/HouseInfoMapper.xml

@@ -43,6 +43,7 @@
         <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
         <result column="line_code" property="lineCode" jdbcType="VARCHAR"/>
         <result column="station_code" property="stationCode" jdbcType="VARCHAR"/>
+        <result column="phone" property="phone" jdbcType="VARCHAR"/>
     </resultMap>
     <sql id="Base_Column_List">
             id, del_flag, title, price, pay_mode,
@@ -53,7 +54,7 @@
             street_code, business_circle_code, district_code, city_code,
             lat, lng, remark, rank, hot, recommend_flag, selected_flag,
             address, address_detail,status_flag, build_year, create_time, update_time,
-            line_code, station_code
+            line_code, station_code,phone
 </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
         select
@@ -192,6 +193,9 @@
             <if test="stationCode!= null">
                 station_code,
             </if>
+            <if test="phone!= null">
+                phone,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -317,6 +321,9 @@
             <if test="stationCode != null">
                 #{stationCode,jdbcType=VARCHAR},
             </if>
+            <if test="phone != null">
+                #{phone,jdbcType=VARCHAR},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.HouseInfo">
@@ -445,6 +452,9 @@
             <if test="stationCode != null">
                 station_code= #{stationCode,jdbcType=VARCHAR},
             </if>
+            <if test="phone != null">
+                phone= #{phone,jdbcType=VARCHAR},
+            </if>
         </set>
         where id = #{id,jdbcType=INTEGER}
     </update>
@@ -578,6 +588,9 @@
             <if test="record.stationCode != null and !&quot;&quot;.equals(record.stationCode)">
                 and station_code = #{record.stationCode}
             </if>
+            <if test="record.phone != null and !&quot;&quot;.equals(record.phone)">
+                and phone = #{record.phone}
+            </if>
 
             <if test="record.roomFilter != null and !&quot;&quot;.equals(record.roomFilter)">
                 <if test="record.roomFilter &lt; 4">
@@ -766,6 +779,9 @@
             <if test="stationCode != null and !&quot;&quot;.equals(stationCode)">
                 and station_code = #{stationCode}
             </if>
+            <if test="phone != null and !&quot;&quot;.equals(phone)">
+                and phone = #{phone}
+            </if>
         </where>
         order by id desc
     </select>
@@ -899,6 +915,9 @@
             <if test="stationCode != null and !&quot;&quot;.equals(stationCode)">
                 and station_code = #{stationCode}
             </if>
+            <if test="phone != null and !&quot;&quot;.equals(phone)">
+                and phone = #{phone}
+            </if>
         </where>
         LIMIT 1
     </select>
@@ -1031,6 +1050,9 @@
             <if test="stationCode != null and !&quot;&quot;.equals(stationCode)">
                 and station_code = #{stationCode}
             </if>
+            <if test="phone != null and !&quot;&quot;.equals(phone)">
+                and phone = #{phone}
+            </if>
         </where>
         LIMIT 1
     </select>

+ 10 - 0
src/main/java/com/izouma/awesomeadmin/model/HouseInfo.java

@@ -63,6 +63,8 @@ public class HouseInfo {
     private String lngKey;
     private String latKey;
 
+    private String phone;
+
     private List<HouseFeature> houseFeatures;
     private List<HousePart> houseParts;
     private List<HouseImage> houseImages;
@@ -518,5 +520,13 @@ public class HouseInfo {
     public void setHousingDistrictInfo(HousingDistrict housingDistrictInfo) {
         this.housingDistrictInfo = housingDistrictInfo;
     }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
 }
 

+ 3 - 0
src/main/vue/src/pages/HouseInfo.vue

@@ -86,6 +86,9 @@
                     </el-option>
                 </el-select>
 
+            </el-form-item>
+             <el-form-item prop="phone" label="业务员电话">
+                <el-input v-model="formData.phone"></el-input>
             </el-form-item>
             <el-form-item prop="retrieval" label="检索关键字">
                 <el-input v-model="formData.retrieval"></el-input>

+ 3 - 1
src/main/vue/src/pages/HouseInfos.vue

@@ -76,6 +76,8 @@
             </el-table-column>
             <el-table-column v-if="isColumnShow('housekeeper')" prop="housekeeper" label="管家" min-width="100">
             </el-table-column>
+            <el-table-column prop="phone" label="业务员电话" min-width="100">
+            </el-table-column>
             <el-table-column v-if="isColumnShow('retrieval')" prop="retrieval" label="检索关键字" min-width="100">
             </el-table-column>
             <el-table-column v-if="isColumnShow('housingDistrict')" prop="housingDistrict" label="小区" min-width="100">
@@ -140,7 +142,7 @@ export default {
         this.$http.get({
             url: '/districtInfo/all',
             data: {
-                useFlag : 'Y'
+                useFlag: 'Y'
             }
         }).then(res => {
             if (res.success) {