From 35e3e1fa2ac7eb8f40f32098755f1d756f2851af Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Sat, 25 May 2024 12:02:02 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E7=BC=B4?= =?UTF-8?q?=E7=BA=B3=E8=BF=87=E6=8A=BC=E9=87=91=E6=8E=A5=E5=8F=A3=202.?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BF=90=E8=90=A5=E5=8C=BA=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=94=B6=E8=B4=B9=E6=96=B9=E5=BC=8F=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/app/AppController.java | 9 ++++----- .../web/controller/app/AppVerifyController.java | 10 ++++++++++ .../main/java/com/ruoyi/system/domain/EtFeeRule.java | 8 ++++++++ .../com/ruoyi/system/mapper/EtFeeRuleMapper.java | 9 +++++++++ .../com/ruoyi/system/service/IEtFeeRuleService.java | 9 +++++++++ .../system/service/impl/EtFeeRuleServiceImpl.java | 12 ++++++++++++ .../main/resources/mapper/system/EtFeeRuleMapper.xml | 11 +++++++++++ 7 files changed, 63 insertions(+), 5 deletions(-) diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppController.java index 747c4d7..4b84093 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppController.java @@ -129,14 +129,13 @@ public class AppController extends BaseController /** - * 查询收费方式列表 + * 根据运营区获取收费方式列表 */ @GetMapping("/fee/list") - public TableDataInfo feeList(EtFeeRule etFeeRule) + public AjaxResult feeList(EtFeeRule etFeeRule) { - startPage(); - List list = etFeeRuleService.selectEtFeeRuleList(etFeeRule); - return getDataTable(list); + List list = etFeeRuleService.selectEtFeeRuleListByAreaId(etFeeRule.getAreaId()); + return success(list); } /** 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 825429a..9a9b4ed 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 @@ -638,4 +638,14 @@ public class AppVerifyController extends BaseController } } + /** + * 是否缴纳过押金 + */ + @GetMapping(value = "/checkIsDeposit") + public AjaxResult checkIsDeposit(Long userId) + { + Boolean aBoolean = asUserService.checkIsDeposit(userId); + return AjaxResult.success("操作成功",aBoolean); + } + } diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/EtFeeRule.java b/electripper-system/src/main/java/com/ruoyi/system/domain/EtFeeRule.java index 02c21b4..671daea 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/domain/EtFeeRule.java +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/EtFeeRule.java @@ -24,6 +24,10 @@ public class EtFeeRule extends BaseEntity @Excel(name = "套餐名称") private String name; + /** 运营区id */ + @Excel(name = "运营区id") + private Long areaId; + /** 说明 */ @Excel(name = "说明") private String explain; @@ -141,4 +145,8 @@ public class EtFeeRule extends BaseEntity /** 骑行价格说明*/ @Excel(name = "骑行价格说明") private BigDecimal instructions; + + /** 是否缴纳过押金*/ + @Excel(name = "是否缴纳过押金") + private Boolean isDeposit; } diff --git a/electripper-system/src/main/java/com/ruoyi/system/mapper/EtFeeRuleMapper.java b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtFeeRuleMapper.java index 89435cf..ae38448 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/mapper/EtFeeRuleMapper.java +++ b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtFeeRuleMapper.java @@ -68,6 +68,15 @@ public interface EtFeeRuleMapper */ public List selectRuleListByAreaId(Long areaId); + /** + * 根据区域ID获取收费方式列表 + * + * @param areaId 用户ID + * @return 选中收费方式ID列表 + */ + public List selectRuleInfoListByAreaId(Long areaId); + + /** * 根据区域ID获取收费方式名称选择框列表 * diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/IEtFeeRuleService.java b/electripper-system/src/main/java/com/ruoyi/system/service/IEtFeeRuleService.java index efd34f4..6035d25 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/IEtFeeRuleService.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/IEtFeeRuleService.java @@ -28,6 +28,15 @@ public interface IEtFeeRuleService */ public List selectEtFeeRuleList(EtFeeRule etFeeRule); + /** + * 根据运营区获取收费方式列表 + * + * @param areaId 运营区id + * @return 收费方式集合 + */ + public List selectEtFeeRuleListByAreaId(Long areaId); + + /** * 新增收费方式 * diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtFeeRuleServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtFeeRuleServiceImpl.java index 79f572b..9ef52c5 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtFeeRuleServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtFeeRuleServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.system.service.IAsUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.EtFeeRuleMapper; @@ -44,6 +45,17 @@ public class EtFeeRuleServiceImpl implements IEtFeeRuleService return etFeeRuleMapper.selectEtFeeRuleList(etFeeRule); } + /** + * 根据运营区获取收费方式列表 + * + * @param areaId 运营区id + * @return 结果 + */ + @Override + public List selectEtFeeRuleListByAreaId(Long areaId) { + return etFeeRuleMapper.selectRuleInfoListByAreaId(areaId); + } + /** * 新增收费方式 * diff --git a/electripper-system/src/main/resources/mapper/system/EtFeeRuleMapper.xml b/electripper-system/src/main/resources/mapper/system/EtFeeRuleMapper.xml index 308c06d..01b48c8 100644 --- a/electripper-system/src/main/resources/mapper/system/EtFeeRuleMapper.xml +++ b/electripper-system/src/main/resources/mapper/system/EtFeeRuleMapper.xml @@ -52,6 +52,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where a.area_id = #{areaId} + +