Browse Source

外呼明细

anderx 1 year ago
parent
commit
09771e3fc5

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

@@ -47,26 +47,22 @@
             <if test="teamId != null">
                 and team_id = #{teamId}
             </if>
-            <if test="teamName != null and teamName != ''">
-                and team_name = #{teamName}
-            </if>
-            <if test="callSum != null">
-                and call_sum = #{callSum}
+        <if test="quantityType !=null">
+            <if test="quantityType==1">
+                and valid_sum &lt; 10
             </if>
-            <if test="connectSum != null">
-                and connect_sum = #{connectSum}
-            </if>
-            <if test="validSum != null">
-                and valid_sum = #{validSum}
+            <if test="quantityType==2">
+                and valid_sum &gt;= 10 and valid_sum &lt; 20
             </if>
-            <if test="callDurationSum != null">
-                and call_duration_sum = #{callDurationSum}
+            <if test="quantityType==3">
+                and valid_sum &gt;= 20 and valid_sum &lt; 50
             </if>
-            <if test="dayDate != null">
-                and day_date = #{dayDate}
+            <if test="quantityType==4">
+                and valid_sum &gt;= 50
             </if>
-            <if test="createTime != null">
-                and create_time = #{createTime}
+        </if>
+            <if test="startTime != null and endTime != null">
+                and day_date BETWEEN #{startTime} and  #{endTime}
             </if>
         </where>
         <if test="page_sql != null">
@@ -91,26 +87,8 @@
             <if test="teamId != null">
                 and team_id = #{teamId}
             </if>
-            <if test="teamName != null and teamName != ''">
-                and team_name = #{teamName}
-            </if>
-            <if test="callSum != null">
-                and call_sum = #{callSum}
-            </if>
-            <if test="connectSum != null">
-                and connect_sum = #{connectSum}
-            </if>
-            <if test="validSum != null">
-                and valid_sum = #{validSum}
-            </if>
-            <if test="callDurationSum != null">
-                and call_duration_sum = #{callDurationSum}
-            </if>
-            <if test="dayDate != null">
-                and day_date = #{dayDate}
-            </if>
-            <if test="createTime != null">
-                and create_time = #{createTime}
+            <if test="startTime != null and endTime != null">
+                and day_date BETWEEN #{startTime} and  #{endTime}
             </if>
         </where>
     </select>
@@ -246,5 +224,6 @@
           and day_date BETWEEN #{startTime} and  #{endTime}
         group by aid
     </select>
+
 </mapper>
 

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

@@ -0,0 +1,77 @@
+package com.goafanti.customer.bo;
+
+public class InputListCallDayBo {
+
+    private Integer pageSize;
+    private Integer pageNo;
+    /**
+     * 姓名
+     */
+    private String name;
+    /**
+     * 团队名称
+     */
+    private Integer teamId;
+    /**
+     * 有效次数 0=10次以下;1=10-20;2=20-50;3=50以上
+     */
+    private String  quantityType;
+    private String startTime;
+    private String endTime;
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getTeamId() {
+        return teamId;
+    }
+
+    public void setTeamId(Integer teamId) {
+        this.teamId = teamId;
+    }
+
+    public String getQuantityType() {
+        return quantityType;
+    }
+
+    public void setQuantityType(String quantityType) {
+        this.quantityType = quantityType;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+}

+ 14 - 0
src/main/java/com/goafanti/customer/controller/UserOutboundApiController.java

@@ -4,9 +4,12 @@ import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.AdminCallDay;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.*;
 import com.goafanti.customer.service.UserOutboundService;
+import com.goafanti.customer.service.impl.AdminCallDayService;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -22,6 +25,8 @@ public class UserOutboundApiController  extends BaseApiController {
 
     @Resource
     private UserOutboundService userOutboundService;
+    private AdminCallDayService adminCallDayService;
+
     /**
      * 客户外呼查询
      *
@@ -119,4 +124,13 @@ public class UserOutboundApiController  extends BaseApiController {
         SseMap.sseEmitterMap.put(TokenManager.getAdminId(), new SseResult(TokenManager.getAdminId(), System.currentTimeMillis(), sseEmitter));
         return sseEmitter;
     }
+
+    /**
+     * 外呼明细
+     *
+     */
+    @GetMapping("/listCallDay")
+    public Result<Pagination<AdminCallDay>> listCallDay(InputListCallDayBo in) {
+        return new Result<>().data(this.adminCallDayService.listCallDay(in));
+    }
 }

+ 1 - 0
src/main/java/com/goafanti/customer/service/UserOutboundService.java

@@ -19,4 +19,5 @@ public interface UserOutboundService {
     Object getDefaultMobile(String uid);
 
     Object userCallList(InputUserCallList in);
+
 }

+ 7 - 0
src/main/java/com/goafanti/customer/service/impl/AdminCallDayService.java

@@ -0,0 +1,7 @@
+package com.goafanti.customer.service.impl;
+
+import com.goafanti.customer.bo.InputListCallDayBo;
+
+public interface AdminCallDayService {
+    Object listCallDay(InputListCallDayBo in);
+}

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

@@ -0,0 +1,13 @@
+package com.goafanti.customer.service.impl;
+
+import com.goafanti.common.dao.AdminCallDayMapper;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.customer.bo.InputListCallDayBo;
+
+public class AdminCallDayServiceImpl extends BaseMybatisDao<AdminCallDayMapper> implements AdminCallDayService{
+    @Override
+    public Object listCallDay(InputListCallDayBo in) {
+
+        return findPage("findAdminCallDayList", "findAdminCallDayCount", in);
+    }
+}

+ 2 - 0
src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java

@@ -287,4 +287,6 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<CallLogMapper> imple
         res.put("sum",sumMap);
         return res;
     }
+
+
 }