Browse Source

外呼明细接口新增多部门查询

anderx 1 year ago
parent
commit
d25304f548

+ 15 - 39
src/main/java/com/goafanti/common/mapper/AdminCallDayMapper.xml

@@ -32,48 +32,13 @@
     <select id="findAdminCallDayList" resultMap="AdminCallDayMap">
         select
         <include refid="AdminCallDayAllSql"/>
-
         from admin_call_day
-        <where>
-            <if test="id != null">
-                and id = #{id}
-            </if>
-            <if test="name != null and name != ''">
-                and name  like concat('%',#{name},'%')
-            </if>
-            <if test="aid != null and aid != ''">
-                and aid = #{aid}
-            </if>
-            <if test="teamId != null">
-                and team_id = #{teamId}
-            </if>
-        <if test="quantityType !=null">
-            <if test="quantityType==1">
-                and valid_sum &lt; 10
-            </if>
-            <if test="quantityType==2">
-                and valid_sum &gt;= 10 and valid_sum &lt; 20
-            </if>
-            <if test="quantityType==3">
-                and valid_sum &gt;= 20 and valid_sum &lt; 50
-            </if>
-            <if test="quantityType==4">
-                and valid_sum &gt;= 50
-            </if>
-        </if>
-            <if test="startTime != null and endTime != null">
-                and day_date BETWEEN #{startTime} and  #{endTime}
-            </if>
-        </where>
+        <include refid="AdminCallDayListSql"/>
         <if test="page_sql != null">
             ${page_sql}
         </if>
     </select>
-
-    <!--统计总行数-->
-    <select id="findAdminCallDayCount" resultType="java.lang.Integer">
-        select count(1)
-        from admin_call_day
+    <sql id="AdminCallDayListSql">
         <where>
             <if test="id != null">
                 and id = #{id}
@@ -84,8 +49,11 @@
             <if test="aid != null and aid != ''">
                 and aid = #{aid}
             </if>
-            <if test="teamId != null">
-                and team_id = #{teamId}
+            <if test="teamIdList != null">
+                and team_id in
+                <foreach collection="teamIdList" item="teamId" open="(" close=")" separator=",">
+                    #{teamId}
+                </foreach>
             </if>
             <if test="quantityType !=null">
                 <if test="quantityType==1">
@@ -105,6 +73,14 @@
                 and day_date BETWEEN #{startTime} and  #{endTime}
             </if>
         </where>
+    </sql>
+
+
+    <!--统计总行数-->
+    <select id="findAdminCallDayCount" resultType="java.lang.Integer">
+        select count(1)
+        from admin_call_day
+        <include refid="AdminCallDayListSql"/>
     </select>
 
 

+ 4 - 4
src/main/java/com/goafanti/customer/bo/InputListCallDayBo.java

@@ -9,9 +9,9 @@ public class InputListCallDayBo {
      */
     private String name;
     /**
-     * 团队名称
+     * 团队编号
      */
-    private Integer teamId;
+    private String teamId;
     /**
      * 有效次数 0=10次以下;1=10-20;2=20-50;3=50以上
      */
@@ -43,11 +43,11 @@ public class InputListCallDayBo {
         this.name = name;
     }
 
-    public Integer getTeamId() {
+    public String getTeamId() {
         return teamId;
     }
 
-    public void setTeamId(Integer teamId) {
+    public void setTeamId(String teamId) {
         this.teamId = teamId;
     }
 

+ 13 - 1
src/main/java/com/goafanti/customer/service/impl/AdminCallDayServiceImpl.java

@@ -1,14 +1,26 @@
 package com.goafanti.customer.service.impl;
 
 import com.goafanti.common.dao.AdminCallDayMapper;
+import com.goafanti.common.utils.ArrayUtils;
+import com.goafanti.common.utils.BeanUtilsExt;
+import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.customer.bo.InputListCallDayBo;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+import java.util.Map;
+
 @Service
 public class AdminCallDayServiceImpl extends BaseMybatisDao<AdminCallDayMapper> implements AdminCallDayService{
     @Override
     public Object listCallDay(InputListCallDayBo in) {
-        return findPage("findAdminCallDayList", "findAdminCallDayCount", in);
+        Map<String, Object> map = BeanUtilsExt.pushMap(in);
+        if (StringUtils.isNotBlank(in.getTeamId())){
+            String[] split = in.getTeamId().split(",");
+            List<String> strings = ArrayUtils.removeBlank(split);
+            map.put("teamIdList",strings);
+        }
+        return findPage("findAdminCallDayList", "findAdminCallDayCount", map, in.getPageNo(), in.getPageSize());
     }
 }

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -1,8 +1,8 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
 
-#static.host=//static.jishutao.com/1.3.32
-static.host=//172.16.1.187/1.3.32
+static.host=//static.jishutao.com/1.3.32
+#static.host=//172.16.1.187/1.3.32
 
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20241122?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false