From d2d6e44f8c8996586e8a2265f46e0f6f9446edaf Mon Sep 17 00:00:00 2001 From: luo <2855143437@qq.com> Date: 星期三, 31 一月 2024 14:25:06 +0800 Subject: [PATCH] 1.31 --- DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java | 33 ++++++++++++++++++++++++++++++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java index febd52d..93fc960 100644 --- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java +++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java @@ -423,12 +423,17 @@ @ApiImplicitParam(value = "保险到期时间(yyyy-MM-dd)", name = "commercialInsuranceTime", required = false, dataType = "string"), @ApiImplicitParam(value = "人车合一照片", name = "peopleAndCarsPhone", required = false, dataType = "string"), @ApiImplicitParam(value = "司机id", name = "uid", required = true, dataType = "int"), - @ApiImplicitParam(value = "车辆id", name = "carId", required = false, dataType = "int") + @ApiImplicitParam(value = "车辆id", name = "carId", required = false, dataType = "int"), + @ApiImplicitParam(value = "其他品牌", name = "otherBrand", required = false, dataType = "string"), + @ApiImplicitParam(value = "其他型号", name = "otherModel", required = false, dataType = "string") }) public ResultUtil addDriverCar(Integer modelId, String color, String licensePlate, Date time, String drivingLicenseNumber, String drivingLicensePhoto, String drivingLicenseEndTime, - String carPhoto, String insurancePhoto, String commercialInsuranceTime, Integer uid, Integer carId, String peopleAndCarsPhone, Integer language){ + String carPhoto, String insurancePhoto, String commercialInsuranceTime, Integer uid, Integer carId, String peopleAndCarsPhone, Integer language + ,String otherBrand,String otherModel){ try { - return carService.addCar(modelId, color, licensePlate, time, drivingLicenseNumber, drivingLicensePhoto, drivingLicenseEndTime, carPhoto, insurancePhoto, commercialInsuranceTime, uid,carId, peopleAndCarsPhone, language); + return carService.addCar(modelId, color, licensePlate, + time, drivingLicenseNumber, drivingLicensePhoto, + drivingLicenseEndTime, carPhoto, insurancePhoto, commercialInsuranceTime, uid,carId, peopleAndCarsPhone, language,otherBrand,otherModel); }catch (Exception e){ e.printStackTrace(); return ResultUtil.runErr(); @@ -1115,6 +1120,27 @@ } + @ResponseBody + @PostMapping("/api/driver/getSum") + @ApiOperation(value = "获取收入明细总额", tags = {"司机端-个人中心"}, notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") + }) + public ResultUtil getSum(HttpServletRequest request) throws Exception { + Integer uid = driverService.getUserIdFormRedis(request); + if(null == uid){ + return ResultUtil.tokenErr(); + } + List<Income> objectId = incomeService.selectList(new EntityWrapper<Income>().eq("objectId", uid)); + double sum = 0; + for (Income income : objectId) { + Double money = income.getMoney(); + sum = sum+money; + } + return ResultUtil.success(sum); + } + + /** * 获取收入明细 * @param pageNum @@ -1137,6 +1163,7 @@ return ResultUtil.tokenErr(); } List<Map<String, Object>> list = driverService.queryTotalRevenue(language, uid, pageNum, size); + List<BaseWarpper> data = new ArrayList<>(); for(Map<String, Object> map : list){ BaseWarpper baseWarpper = new BaseWarpper(); -- Gitblit v1.7.1