123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- package com.slibra.web.controller.business;
- import com.alibaba.fastjson2.JSON;
- import com.slibra.business.domain.CAgent;
- import com.slibra.business.domain.City;
- import com.slibra.business.domain.TCallRecord;
- import com.slibra.business.domain.TPumpingStationNeighbourhoodNumber;
- import com.slibra.business.mapper.*;
- import com.slibra.business.req.AiChatReq;
- import com.slibra.business.req.AiChatRes;
- import com.slibra.business.res.CallRecordCount;
- import com.slibra.business.res.CallUserCountInfo;
- import com.slibra.business.res.HomeCountResp;
- import com.slibra.business.res.PumpAndNumber;
- import com.slibra.business.service.IFrontService;
- import com.slibra.business.service.ITCallRecordService;
- import com.slibra.business.service.ITNeighborhoodService;
- import com.slibra.common.core.controller.BaseController;
- import com.slibra.common.core.domain.AjaxResult;
- import com.slibra.common.core.domain.R;
- import com.slibra.common.core.page.TableDataInfo;
- import com.slibra.common.utils.SecurityUtils;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.HashMap;
- import java.util.List;
- /**
- * 前端用户相关接口
- */
- @RestController
- @RequestMapping("/front")
- @Slf4j
- public class FrontController extends BaseController {
- @Autowired
- private IFrontService frontService;
- @Autowired
- private CityMapper cityMapper;
- @Autowired
- private TCallRecordMapper tCallRecordMapper;
- @Autowired
- private ITCallRecordService itCallRecordService;
- @Autowired
- private CAgentMapper cAgentMapper;
- @Autowired
- private ITCallRecordService tCallRecordService;
- /**
- * 获取全国省市区接口
- * @param city
- * @return
- */
- @GetMapping("/getCities")
- public R<List<City>> getCities(City city){
- log.info("进入了 获取全国省市区接口 接口,请求参数为{}", JSON.toJSONString(city));
- return R.ok(this.cityMapper.selectCityList(city));
- }
- /**
- * 分页获取通话记录
- * @param callRecordReq
- * @return
- */
- @GetMapping("/getCallRecordPageList")
- public TableDataInfo getCallRecordPageList(TCallRecord callRecordReq)
- {
- log.info("进入了 分页获取通话记录 接口");
- startPage();
- return getDataTable(tCallRecordService.selectTCallRecordList(callRecordReq));
- }
- /**
- * 通话统计接口
- * @return
- */
- @GetMapping("/callRecordCountInfo")
- public R<CallRecordCount> callRecordCountInfo(){
- log.info("进入了 通话统计接口 接口");
- return R.ok(this.itCallRecordService.callRecordCountInfo());
- }
- /**
- * 获取某个用户的坐席的outId信息
- * 2024年11月25日17:56:32 配置坐席和用户的逻辑调整,不再放到用户里
- * @return
- */
- @GetMapping("/getSeatsByUserId")
- public R<HashMap<String, Object>> getSeatsByUserId(Long userId){
- log.info("进入了 获取某个用户的坐席的outId信息 接口");
- return R.ok(this.cAgentMapper.getSeatsByUserId(userId));
- }
- /**
- * 人工客服统计 接口
- * @return
- */
- @GetMapping("/userCallCount")
- public R<List<CallUserCountInfo>> userCallCount(){
- log.info("进入了 人工客服统计 接口");
- return R.ok(this.itCallRecordService.userCallCount());
- }
- /**
- * 机器人客服统计 接口
- * @return
- */
- @GetMapping("/robotCallCount")
- public R<List<CallUserCountInfo>> robotCallCount(){
- log.info("进入了 机器人客服统计 接口");
- return R.ok(this.itCallRecordService.robotCallCount());
- }
- //-----------------------------2025年01月16日17:00:52 下面是新增的大屏和统计列表相关接口-----------------------------
- /**
- * 通过起止时间获取通话记录-统计的分页
- * @param callRecordReq
- * @return
- */
- @GetMapping("/callRecordCountPageList")
- public TableDataInfo callRecordCountPageList(TCallRecord callRecordReq)
- {
- log.info("进入了 通过起止时间获取通话记录-统计的分页 接口");
- startPage();
- return getDataTable(tCallRecordService.callRecordCountPageList(callRecordReq));
- }
- /**
- * 首页大屏统计接口
- * @return
- */
- @GetMapping("/homeScreenCount")
- public R<HomeCountResp> homeScreenCount()
- {
- log.info("进入了 首页大屏统计接口 接口");
- return R.ok(tCallRecordService.homeScreenCount());
- }
- // /**
- // * 获取大屏的实时数据 + 统计数据
- // * @return
- // */
- // @GetMapping(value = "/realTimeData")
- // public AjaxResult realTimeData()
- // {
- // log.info("进入了 获取大屏的实时数据 + 统计数据 接口");
- // return AjaxResult.success(frontService.countInfo());
- // }
- //
- //
- // /**
- // * 分页获取大模型的问答记录
- // * @param tXinyiChatRecord
- // * @return
- // */
- // @GetMapping("/bigModel/qa/pageList")
- // public TableDataInfo qaPageList(TXinyiChatRecord tXinyiChatRecord)
- // {
- // log.info("进入了 分页获取大模型的问答记录 接口");
- // //获取登录用户信息
- // Long userId = SecurityUtils.getUserId();
- // tXinyiChatRecord.setUserId(String.valueOf(userId));
- // startPage();
- // return getDataTable(xinyiChatRecordMapper.selectTXinyiChatRecordFirstList(tXinyiChatRecord));
- // }
- }
|