Browse Source

运营后台BUG处理

guq 7 years ago
parent
commit
9abb301d4e

+ 4 - 3
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/AccountMapper.java

@@ -3,16 +3,17 @@ package com.usoftchina.saas.operation.mapper;
 import com.usoftchina.saas.operation.dto.AccountDTO;
 import com.usoftchina.saas.operation.dto.CompanyAnalyzeDTO;
 import com.usoftchina.saas.operation.dto.LoginDTO;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
 public interface AccountMapper {
 
-    List<AccountDTO> findAccountByCondition(String con);
+    List<AccountDTO> findAccountByCondition(@Param("con") String con);
 
-    List<LoginDTO> getLogin(String con);
+    List<LoginDTO> getLogin(@Param("con") String con);
 
-    List<CompanyAnalyzeDTO> getConpanyAnalyze(String con);
+    List<CompanyAnalyzeDTO> getConpanyAnalyze(@Param("con") String con);
 
     void analyzeCompany();
 }

+ 2 - 1
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/CompanyMapper.java

@@ -3,6 +3,7 @@ package com.usoftchina.saas.operation.mapper;
 import com.usoftchina.saas.operation.dto.CompanyAnalyzeDTO;
 import com.usoftchina.saas.operation.dto.CompanyAnalyzedetailDTO;
 import com.usoftchina.saas.operation.dto.CompanyDTO;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -13,7 +14,7 @@ import java.util.Map;
  **/
 public interface CompanyMapper {
 
-    List<CompanyDTO> findCompanyByCondition(String con);
+    List<CompanyDTO> findCompanyByCondition(@Param("con") String con);
 
     CompanyAnalyzeDTO selectCompanyAnalyze(Long id);
 

+ 2 - 1
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/CustomerfeedbackMapper.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.operation.mapper;
 
 import com.usoftchina.saas.operation.po.CustomerFeedBack;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -17,5 +18,5 @@ public interface CustomerfeedbackMapper {
 
     int updateByPrimaryKey(CustomerFeedBack record);
 
-    List<CustomerFeedBack> selectByCondition(String con);
+    List<CustomerFeedBack> selectByCondition(@Param("con") String con);
 }

+ 4 - 1
applications/operation/operation-server/src/main/resources/config/application-dev.yml

@@ -10,4 +10,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+logging:
+  level:
+    com.usoftchina.saas.operation.mapper : debug

+ 17 - 3
applications/operation/operation-server/src/main/resources/mapper/AccoutMapper.xml

@@ -38,15 +38,29 @@
     </resultMap>
 
     <select id="findAccountByCondition" parameterType="string" resultMap="BaseResultMap">
-        select * from saas_account.ac_account  where #{con}
+        select * from saas_account.ac_account  <where>
+        <if test="con != null">
+            ${con}
+        </if>
+    </where>
     </select>
     <select id="getLogin" parameterType="string" resultMap="loginMap">
         SELECT * FROM (select account_id  ,count(account_id) login_num,max(ac_account.realname) username,max(login_time) lastesttime, max(ac_account.mobile) mobile from au_authorize_log left join saas_account.ac_account on account_id= ac_account.id  where login_time >  date_sub(now(),interval 3 MONTH) GROUP BY account_id order by lastesttime desc
-        )login_info where #{con}
+        )login_info
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+        </where>
     </select>
 
     <select id="getConpanyAnalyze" parameterType="string" resultMap="companymap">
-        select  *  from company_analyze  where #{con} order by ca_createtime desc
+        select  *  from company_analyze  <where>
+        <if test="con != null">
+            ${con}
+        </if>
+    </where>
+        order by ca_createtime desc
     </select>
 
     <select id="analyzeCompany"  statementType="CALLABLE">

+ 6 - 1
applications/operation/operation-server/src/main/resources/mapper/CompanyMapper.xml

@@ -15,7 +15,12 @@
 
     <select id="findCompanyByCondition" parameterType="string" resultMap="baseMap">
          select name,business_code,address,tel,fax,realname,mobile,ac_company.create_time,ac_company.uu from saas_account.ac_company
-        left join saas_account.ac_account on ac_account.id = ac_company.creator_id where #{con}
+        left join saas_account.ac_account on ac_account.id = ac_company.creator_id
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+        </where>
     </select>
 
 

+ 6 - 1
applications/operation/operation-server/src/main/resources/mapper/CustomerfeedbackMapper.xml

@@ -165,6 +165,11 @@
     where cf_id = #{cf_id,jdbcType=INTEGER}
   </update>
   <select id="selectByCondition" parameterType="string" resultMap="BaseResultMap">
-      select * from saas_manage.customerfeedback where #{con} order by cf_creatime desc
+      select * from saas_manage.customerfeedback
+    <where>
+    <if test="con != null">
+      ${con}
+    </if>
+  </where> order by cf_creatime desc
   </select>
 </mapper>