From b18cd3cceb905c7ef5ad568591b368af5712717d Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Sat, 20 Jul 2024 18:34:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=AE=A1=E7=90=86=E5=91=98=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=202.=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E8=BF=98?= =?UTF-8?q?=E6=9C=89=E6=AD=A3=E5=9C=A8=E8=BF=9B=E8=A1=8C=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=89=8D=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndexController/IndexController.java | 8 +- .../controller/app/AppVerifyController.java | 1 + .../system/AsArticleClassifyController.java | 18 ++- .../framework/config/SecurityConfig.java | 2 +- .../java/com/ruoyi/system/domain/EtOrder.java | 5 + .../ruoyi/system/domain/vo/IndexAdminVo.java | 15 ++- .../ruoyi/system/mapper/SysOperLogMapper.java | 23 +++- .../ruoyi/system/service/IEtOrderService.java | 5 + .../system/service/ISysOperLogService.java | 22 ++- .../service/impl/EtOrderServiceImpl.java | 101 +++++++++----- .../service/impl/SysOperLogServiceImpl.java | 31 ++++- .../system/service/impl/WxPayService.java | 6 +- .../resources/mapper/system/EtOrderMapper.xml | 127 +++++++++++++----- .../mapper/system/SysOperLogMapper.xml | 22 +++ 14 files changed, 296 insertions(+), 90 deletions(-) diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/IndexController/IndexController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/IndexController/IndexController.java index 1ee2e5f..e5cdff9 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/IndexController/IndexController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/IndexController/IndexController.java @@ -40,7 +40,13 @@ public class IndexController extends BaseController @GetMapping("/getAreaList") public AjaxResult getAreaList() { - List longs = etOperatingAreaService.selectAreaListByDeptId2(getDeptId()); + Long deptId; + if(getUserId() == 1){ + deptId = null; + }else{ + deptId = getDeptId(); + } + List longs = etOperatingAreaService.selectAreaListByDeptId2(deptId); logger.info("根据token获取运营区列表:【{}】", JSON.toJSON(longs)); return success(longs); } diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java index 50c3056..e27afa5 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java @@ -945,6 +945,7 @@ public class AppVerifyController extends BaseController if(!ServiceConstants.ORDER_TYPE_RIDING.equals(etOrder1.getType())){ throw new ServiceException("保存视频失败,类型必须是骑行订单"); } + etOrder.setUploadTime(DateUtils.getNowDate()); return toAjax(etOrderService.updateEtOrderByOrderNo(etOrder)); } diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/system/AsArticleClassifyController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/system/AsArticleClassifyController.java index 1c66ed2..68c7781 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/system/AsArticleClassifyController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/system/AsArticleClassifyController.java @@ -4,9 +4,9 @@ import com.ruoyi.common.annotation.Log; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.AsArticleClassify; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.core.domain.entity.AsArticleClassify; import com.ruoyi.system.service.IAsArticleClassifyService; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -51,6 +51,22 @@ public class AsArticleClassifyController extends BaseController return success(articleClassifies); } + /** + * 查询分类列表(排除节点) + */ + @PreAuthorize("@ss.hasPermi('system:articleClassify:list')") + @GetMapping("/list/excludes/{classifyIds}") + public AjaxResult excludeChild(@PathVariable(value = "classifyIds", required = false) List classifyIds) + { + List articleClassifies = asArticleClassifyService.selectClassifyListWithIsolate(new AsArticleClassify()); + if (classifyIds != null && !classifyIds.isEmpty()) { + for (Long classifyId:classifyIds) { + articleClassifies.removeIf(d -> d.getClassifyId().intValue() == classifyId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), classifyId + "")); + } + } + return success(articleClassifies); + } + /** * 根据分类编号获取详细信息 */ diff --git a/electripper-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/electripper-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index b1ab75c..5a7fe54 100644 --- a/electripper-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/electripper-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -119,7 +119,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter "/appCaptcha", "/appCodeLogin", "/app/**", -// "/appVerify/**", + "/appVerify/**", "/common/upload", "/common/receive", "/payment/callback/**", diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/EtOrder.java b/electripper-system/src/main/java/com/ruoyi/system/domain/EtOrder.java index 6b42da8..b509fee 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/domain/EtOrder.java +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/EtOrder.java @@ -239,6 +239,11 @@ public class EtOrder extends BaseEntity @Excel(name = "还车视频") private String videoUrl; + /** 视频上传时间 */ + @Excel(name = "视频上传时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date uploadTime; + /** 扣除金额 */ @Excel(name = "扣除金额") private String deductionAmount; diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/vo/IndexAdminVo.java b/electripper-system/src/main/java/com/ruoyi/system/domain/vo/IndexAdminVo.java index 7c5fe42..bf91d5b 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/domain/vo/IndexAdminVo.java +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/vo/IndexAdminVo.java @@ -134,22 +134,25 @@ public class IndexAdminVo { @Data public static class OperationVo { /** 4g解锁失败 */ - private Integer failedUnlockCount; + private Integer failedUnlockCount=0; + + /** 4g解锁次数 */ + private Integer unlockCount=0; /** 蓝牙解锁数 */ - private Integer bluetoothUnlockCount; + private Integer bluetoothUnlockCount=0; /** 设备离线率 */ private BigDecimal deviceOfflineRate; - /** 异常排查车辆 */ - private Integer faultOrderCount; + /** 异常排查车辆 */ + private Integer faultOrderCount=0; /** 待换电 */ - private Integer replacementOrderCount; + private Integer replacementOrderCount=0; /** 待维修 */ - private Integer repairCount; + private Integer repairCount=0; } diff --git a/electripper-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java b/electripper-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java index 2ae6457..498ae74 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java +++ b/electripper-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java @@ -2,24 +2,25 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysOperLog; +import org.apache.ibatis.annotations.Param; /** * 操作日志 数据层 - * + * * @author ruoyi */ public interface SysOperLogMapper { /** * 新增操作日志 - * + * * @param operLog 操作日志对象 */ public void insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 - * + * * @param operLog 操作日志对象 * @return 操作日志集合 */ @@ -27,7 +28,7 @@ public interface SysOperLogMapper /** * 批量删除系统操作日志 - * + * * @param operIds 需要删除的操作日志ID * @return 结果 */ @@ -35,7 +36,7 @@ public interface SysOperLogMapper /** * 查询操作日志详细 - * + * * @param operId 操作ID * @return 操作日志对象 */ @@ -45,4 +46,16 @@ public interface SysOperLogMapper * 清空操作日志 */ public void cleanOperLog(); + + /** + * 4g解锁失败 + * @return + */ + Integer getUnlockCount(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("status") String status); + + /** + * 蓝牙解锁数 + * @return + */ + Integer getBluetoothUnlockCount(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd , @Param("status") String status); } diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java b/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java index d1ee7fc..8094667 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java @@ -175,6 +175,11 @@ public interface IEtOrderService */ EtOrder getCurrentOrder(String sn); + /** + * 根据userId获取当前正在骑行中的订单 + */ + EtOrder getCurrentOrderByUserId(Long userId); + /** * 删除订单信息 diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java b/electripper-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java index 4fd8e5a..0e21f9a 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java @@ -5,21 +5,21 @@ import com.ruoyi.system.domain.SysOperLog; /** * 操作日志 服务层 - * + * * @author ruoyi */ public interface ISysOperLogService { /** * 新增操作日志 - * + * * @param operLog 操作日志对象 */ public void insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 - * + * * @param operLog 操作日志对象 * @return 操作日志集合 */ @@ -27,7 +27,7 @@ public interface ISysOperLogService /** * 批量删除系统操作日志 - * + * * @param operIds 需要删除的操作日志ID * @return 结果 */ @@ -35,7 +35,7 @@ public interface ISysOperLogService /** * 查询操作日志详细 - * + * * @param operId 操作ID * @return 操作日志对象 */ @@ -45,4 +45,16 @@ public interface ISysOperLogService * 清空操作日志 */ public void cleanOperLog(); + + /** + * 4g解锁失败 + * @return + */ + Integer getUnlockCount(String timeStart,String timeEnd,String status); + + /** + * 蓝牙解锁数 + * @return + */ + Integer getBluetoothUnlockCount(String todayStartDateStr, String todayEndDateStr,String status); } diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java index bf3ce23..2323782 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java @@ -3,19 +3,17 @@ package com.ruoyi.system.service.impl; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson2.JSON; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.IotConstants; import com.ruoyi.common.constant.ServiceConstants; import com.ruoyi.common.core.domain.entity.AsUser; import com.ruoyi.common.core.domain.entity.SysDept; -import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.enums.BusinessStatus; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.CommonUtil; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.PageUtils; -import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.onenet.ResponseVo; import com.ruoyi.common.utils.onenet.Token; import com.ruoyi.common.utils.uuid.IdUtils; @@ -111,12 +109,15 @@ public class EtOrderServiceImpl implements IEtOrderService @Resource private EtFaultMapper etFaultMapper; - @Autowired + @Resource private EtAdminOrderMapper etAdminOrderMapper; - @Autowired + @Resource private EtCapitalFlowMapper etCapitalFlowMapper; + @Autowired + private ISysOperLogService operLogService; + /** * 查询订单 * @@ -357,6 +358,23 @@ public class EtOrderServiceImpl implements IEtOrderService return null; } + /** + * 根据userId获取当前正在骑行中的订单 + * @param userId + * @return + */ + @Override + public EtOrder getCurrentOrderByUserId(Long userId) { + EtOrder etOrder = new EtOrder(); + etOrder.setUserId(userId); + etOrder.setStatus(ServiceConstants.ORDER_STATUS_RIDING); + List etOrders = etOrderMapper.selectEtOrderList(etOrder); + if(ObjectUtil.isNotEmpty(etOrders)){ + return etOrders.get(0); + } + return null; + } + /** * 删除订单信息 * @@ -463,29 +481,36 @@ public class EtOrderServiceImpl implements IEtOrderService if(updateEtOrder == 0){ throw new ServiceException("还车审核失败,更新订单失败"); } - /** 2.退押金*/ - EtOrder depositOrder = getDepositOrder(etOrder.getUserId()); - BigDecimal deposit = depositOrder.getTotalFee(); - Refund refund = wxPayService.refund(depositOrder, "还车审核通过后退押金",deposit,IdUtils.getOrderNo("ref")); - /** 3.记录退款表 创建退款对象*/ - depositOrder.setReason("还车审核通过后退押金"); - EtRefund refund1= createRefund(depositOrder, deposit, null, null, null, null, refund.getOutRefundNo(),ServiceConstants.REFUND_TYPE_DEPOSIT); - int i = etRefundService.insertEtRefund(refund1); - if(i == 0){ - log.info("【还车审核通过】保存退款对象失败"); - throw new ServiceException("【还车审核通过】,保存退款对象失败"); - } - /** 4.更新用户余额*/ - AsUser asUser = asUserService.selectUserById(depositOrder.getUserId()); - if(asUser!=null){ - // 更新用户并更新缓存 - asUser.setBalance(BigDecimal.ZERO); - if (asUserService.updateUserProfile(asUser) > 0) - { - log.info("【还车审核通过】更新用户信息成功:"+ JSON.toJSON(asUser)); - }else{ - throw new ServiceException("【还车审核通过】,更新用户信息失败"); + // 当前还有正在骑行中的订单,不退押金,只有用户没有正在骑行中的订单时才发起退款 + EtOrder currentOrder = etOrderService.getCurrentOrderByUserId(etOrder.getUserId()); + if(ObjectUtil.isNull(currentOrder)){ + log.info("【还车审核通过】当前用户没有正在骑行的订单,开始退押金"); + /** 2.退押金*/ + EtOrder depositOrder = getDepositOrder(etOrder.getUserId()); + BigDecimal deposit = depositOrder.getTotalFee(); + Refund refund = wxPayService.refund(depositOrder, "还车审核通过后退押金",deposit,IdUtils.getOrderNo("ref")); + /** 3.记录退款表 创建退款对象*/ + depositOrder.setReason("还车审核通过后退押金"); + EtRefund refund1= createRefund(depositOrder, deposit, null, null, null, null, refund.getOutRefundNo(),ServiceConstants.REFUND_TYPE_DEPOSIT); + int i = etRefundService.insertEtRefund(refund1); + if(i == 0){ + log.info("【还车审核通过】保存退款对象失败"); + throw new ServiceException("【还车审核通过】,保存退款对象失败"); } + /** 4.更新用户余额*/ + AsUser asUser = asUserService.selectUserById(depositOrder.getUserId()); + if(asUser!=null){ + // 更新用户并更新缓存 + asUser.setBalance(BigDecimal.ZERO); + if (asUserService.updateUserProfile(asUser) > 0) + { + log.info("【还车审核通过】更新用户信息成功:"+ JSON.toJSON(asUser)); + }else{ + throw new ServiceException("【还车审核通过】,更新用户信息失败"); + } + } + }else{ + log.info("【还车审核通过】当前用户还有正在骑行的订单------不退押金"); } return true; } @@ -692,9 +717,17 @@ public class EtOrderServiceImpl implements IEtOrderService indexAdminVo.setVehicleVo(vehicleVo); /** 运维统计*/ + String formattedDate = dateFormat.format(calendar.getTime()); + String todayStartDateStr = formattedDate + " " + Constants.DATE_FORMAT_START_PEREND; + String todayEndDateStr = formattedDate + " " + Constants.DATE_FORMAT_END_PEREND; + IndexAdminVo.OperationVo operationVo = new IndexAdminVo.OperationVo(); - operationVo.setReplacementOrderCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPLACEMENT,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_UNDER_WAY,null)); - operationVo.setRepairCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPAIR,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_REPAIR,null)); + operationVo.setReplacementOrderCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPLACEMENT,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_UNDER_WAY,null));//待换电 + operationVo.setRepairCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPAIR,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_REPAIR,null));//待维修 + operationVo.setFailedUnlockCount(operLogService.getUnlockCount(todayStartDateStr, todayEndDateStr,BusinessStatus.FAIL.name()));// 4g解锁失败 + operationVo.setUnlockCount(operLogService.getUnlockCount(todayStartDateStr, todayEndDateStr,BusinessStatus.SUCCESS.name()));//4g解锁次数 + operationVo.setDeviceOfflineRate(new BigDecimal(deviceNumVo.getOfflineNum()).divide(new BigDecimal(deviceNumVo.getInOperation()), 2, RoundingMode.HALF_UP));//设备离线率 + operationVo.setBluetoothUnlockCount(operLogService.getBluetoothUnlockCount(todayStartDateStr, todayEndDateStr,BusinessStatus.SUCCESS.name()));//蓝牙解锁数 indexAdminVo.setOperationVo(operationVo); log.info("【首页统计-总管理】indexAdminVo==={}",JSON.toJSON(indexAdminVo)); @@ -724,8 +757,8 @@ public class EtOrderServiceImpl implements IEtOrderService indexAdminVo.setTodayOrderCount(etOrderMapper.getOrderNum(startDateStr, endDateStr, null));//今日订单数 indexAdminVo.setTodayOrderFee(etOrderMapper.getPayFee(startDateStr, endDateStr, null, null));//今日订单金额 - indexAdminVo.setTodayOrderCount(etOrderMapper.getOrderNum(null, null, null));//总订单数 - indexAdminVo.setTodayOrderFee(etOrderMapper.getPayFee(null, null, null, null));//总订单金额 + indexAdminVo.setTotalOrderCount(etOrderMapper.getOrderNum(null, null, null));//总订单数 + indexAdminVo.setTotalOrderFee(etOrderMapper.getPayFee(null, null, null, null));//总订单金额 indexAdminVo.setTodayRefundFee(new BigDecimal(etOrderMapper.getTotalRefund(startDateStr,endDateStr,null)));// 今日退款金额 indexAdminVo.setTodayRefundFee(new BigDecimal(etOrderMapper.getTotalRefund(null,null,null)));// 总退款金额 @@ -934,7 +967,11 @@ public class EtOrderServiceImpl implements IEtOrderService etOrder.setAppointmentStartTime(DateUtils.getNowDate());//预约开始时间 }else if(order.getType().equals("4")){//押金,创建初始订单,根据计费规则,结算费用, etOrder.setType(ServiceConstants.ORDER_TYPE_DEPOSIT); - EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(user.getAreaId()); + if(ObjectUtil.isNull(order.getAreaId())){ + log.info("【预下单-创建订单】支付场景为:押金支付--order.getAreaId()"+order.getAreaId()); + throw new ServiceException("【预下单-创建订单】支付场景为:押金支付--order.getAreaId()"+order.getAreaId()); + } + EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(order.getAreaId()); BigDecimal deposit = new BigDecimal(area.getDeposit()); etOrder.setTotalFee(deposit); etOrder.setPayFee(deposit); diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java index 5489815..08574ff 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service.impl; import java.util.List; + +import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.domain.SysOperLog; @@ -9,7 +11,7 @@ import com.ruoyi.system.service.ISysOperLogService; /** * 操作日志 服务层处理 - * + * * @author ruoyi */ @Service @@ -20,7 +22,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService /** * 新增操作日志 - * + * * @param operLog 操作日志对象 */ @Override @@ -31,7 +33,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService /** * 查询系统操作日志集合 - * + * * @param operLog 操作日志对象 * @return 操作日志集合 */ @@ -43,7 +45,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService /** * 批量删除系统操作日志 - * + * * @param operIds 需要删除的操作日志ID * @return 结果 */ @@ -55,7 +57,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService /** * 查询操作日志详细 - * + * * @param operId 操作ID * @return 操作日志对象 */ @@ -73,4 +75,23 @@ public class SysOperLogServiceImpl implements ISysOperLogService { operLogMapper.cleanOperLog(); } + + /** + * 4g解锁失败 + * @return + */ + @Override + public Integer getUnlockCount(String timeStart,String timeEnd,String status) { + return operLogMapper.getUnlockCount(timeStart, timeEnd,status); + } + + /** + * 蓝牙解锁数 + * @return + */ + @Override + public Integer getBluetoothUnlockCount(String timeStart,String timeEnd,String status) { + return operLogMapper.getBluetoothUnlockCount(timeStart, timeEnd,status); + } + } diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/WxPayService.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/WxPayService.java index c770240..98a847e 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/WxPayService.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/WxPayService.java @@ -117,9 +117,9 @@ public class WxPayService implements IWxPayService { request.setMchid(sysDept.getMerchantId()); String type = order.getType(); String description = type.equals(ServiceConstants.ORDER_TYPE_RIDING) ? "骑行订单-"+billNo : "押金充值-"+billNo; - LoginUser loginUser = SecurityUtils.getLoginUser(); - log.info("【预下单】获取登录用户信息:"+JSON.toJSONString(loginUser)); - request.setAttach(JSON.toJSONString(new AttachVo(payType,user.getUserId(), loginUser.getToken()))); +// LoginUser loginUser = SecurityUtils.getLoginUser(); +// log.info("【预下单】获取登录用户信息:"+JSON.toJSONString(loginUser)); + request.setAttach(JSON.toJSONString(new AttachVo(payType,user.getUserId(), ""))); request.setDescription(description); request.setNotifyUrl(sysDept.getNotifyUrl()); request.setPayer(getPayer(user.getWxopenid())); diff --git a/electripper-system/src/main/resources/mapper/system/EtOrderMapper.xml b/electripper-system/src/main/resources/mapper/system/EtOrderMapper.xml index 1eab852..662db26 100644 --- a/electripper-system/src/main/resources/mapper/system/EtOrderMapper.xml +++ b/electripper-system/src/main/resources/mapper/system/EtOrderMapper.xml @@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -52,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" device_mac, sn, pay_time, paid, pay_type, type, total_fee, pay_fee, dispatch_fee, manage_fee, riding_fee, appointment_fee, mark, duration, distance, status, create_time, appointment_start_time, appointment_end_time,appointment_timeout, unlock_time,return_time, - rule_end_time, return_type, AsText(trip_route) trip_route,trip_route_str,cycle,deposit_deduction,video_url,deduction_amount,audio_files,used_sn,change_reason from et_order + rule_end_time, return_type, AsText(trip_route) trip_route,trip_route_str,cycle,deposit_deduction,video_url,upload_time,deduction_amount,audio_files,used_sn,change_reason from et_order select COALESCE(SUM(total_fee), 0) from et_order where status = 4 and type = 1 - AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d') - AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d') + + AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d') + + + AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d') + and area_id = #{areaId} @@ -236,90 +243,142 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -371,8 +430,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -632,6 +695,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" cycle = #{cycle}, deposit_deduction = #{depositDeduction}, video_url = #{videoUrl}, + upload_time = #{uploadTime}, deduction_amount = #{deductionAmount}, audio_files = #{audioFiles}, used_sn = #{usedSn}, @@ -675,6 +739,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" cycle = #{cycle}, deposit_deduction = #{depositDeduction}, video_url = #{videoUrl}, + upload_time = #{uploadTime}, deduction_amount = #{deductionAmount}, audio_files = #{audioFiles}, used_sn = #{usedSn}, diff --git a/electripper-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/electripper-system/src/main/resources/mapper/system/SysOperLogMapper.xml index 9a31535..e6b89fc 100644 --- a/electripper-system/src/main/resources/mapper/system/SysOperLogMapper.xml +++ b/electripper-system/src/main/resources/mapper/system/SysOperLogMapper.xml @@ -80,6 +80,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where oper_id = #{operId} + + + + truncate table sys_oper_log