From 4c99ee7028c3fe58a2cd4b8273b22c75c45574fc Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 16 五月 2025 10:27:41 +0800 Subject: [PATCH] 修改文档bug --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/DriverActivityController.java | 26 +++++++++++--------------- 1 files changed, 11 insertions(+), 15 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/DriverActivityController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/DriverActivityController.java index 4ffda7d..8ad9843 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/DriverActivityController.java +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/DriverActivityController.java @@ -4,27 +4,27 @@ import com.baomidou.mybatisplus.plugins.Page; import com.stylefeng.guns.core.base.controller.BaseController; import com.stylefeng.guns.core.common.constant.factory.PageFactory; +import com.stylefeng.guns.core.log.LogObjectHolder; import com.stylefeng.guns.core.shiro.ShiroKit; import com.stylefeng.guns.core.shiro.ShiroUser; import com.stylefeng.guns.core.util.DateUtil; import com.stylefeng.guns.core.util.SinataUtil; import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.*; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.beans.factory.annotation.Autowired; -import com.stylefeng.guns.core.log.LogObjectHolder; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; -import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 控制器 @@ -117,11 +117,10 @@ List<DriverActivityHistory> historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",1).eq("activityId",driverActivityRegistered.getId()).eq("carryOut",2)); Double totalMOney=0d; Double money=0d; - Integer number=0; + Integer number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); for(DriverActivityHistory history:historyList){ totalMOney+=history.getMoney(); money+=history.getMoney(); - number+=1; } map.put("money1",money); map.put("number1",number); @@ -129,11 +128,10 @@ //统计邀请用户注册 historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",2).eq("activityId",driverActivityRegistered.getId()).eq("carryOut",2)); money=0d; - number=0; + number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); for(DriverActivityHistory history:historyList){ totalMOney+=history.getMoney(); money+=history.getMoney(); - number+=1; } map.put("money2",money); map.put("number2",number); @@ -141,11 +139,10 @@ //统计专车在线 historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",3).eq("activityId",driverActivityOnline.getId()).eq("carryOut",2)); money=0d; - number=0; + number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); for(DriverActivityHistory history:historyList){ totalMOney+=history.getMoney(); money+=history.getMoney(); - number+=1; } map.put("money3",money); map.put("number3",number); @@ -177,11 +174,10 @@ //统计订单数 historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",4).eq("activityId",driverActivityOrder.getId()).eq("carryOut",2)); money=0d; - number=0; + number=historyList.stream().map(DriverActivityHistory::getDriverId).collect(Collectors.toSet()).size(); for(DriverActivityHistory history:historyList){ totalMOney+=history.getMoney(); money+=history.getMoney(); - number+=1; } map.put("money6",money); map.put("number6",number); @@ -241,7 +237,7 @@ @ResponseBody public Object add(String staTime, String startTime, String num1, Double num2 , Double num3 - , Integer num4 + , String num4 , Double num5 , Integer num6 , Double num7 @@ -283,7 +279,7 @@ @ResponseBody public Object update(Integer id,String staTime, String startTime, String num1, Double num2 , Double num3 - , Integer num4 + , String num4 , Double num5 , Integer num6 , Double num7 -- Gitblit v1.7.1