From 4706a4e524ee919b2234f789a497b16279ea1296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Tue, 30 Jul 2024 17:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ss/abnormal/mapper/AbnormalMapper.xml | 2 +- .../ss/device/service/DeviceService.java | 9 ++++- .../service/impl/DeviceServiceImpl.java | 4 ++- .../domain/TransactionBillQuery.java | 9 +++++ .../mapper/TransactionBillMapper.xml | 8 +++++ .../controller/mch/MchDeviceController.java | 36 +++++++++++++++++++ .../web/controller/mch/MchSuitController.java | 33 +++++++++++++++++ 7 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 smart-switch-web/src/main/java/com/ruoyi/web/controller/mch/MchDeviceController.java create mode 100644 smart-switch-web/src/main/java/com/ruoyi/web/controller/mch/MchSuitController.java diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/abnormal/mapper/AbnormalMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/abnormal/mapper/AbnormalMapper.xml index a38c3ca3..1e593b71 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/abnormal/mapper/AbnormalMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/abnormal/mapper/AbnormalMapper.xml @@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sa.name like concat('%', #{keyword}, '%') or sa.mobile like concat('%', #{keyword}, '%') or sa.address like concat('%', #{keyword}, '%') or - sa.device_no like concat('%', #{keyword}, '%') + sd.device_no like concat('%', #{keyword}, '%') ) diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/DeviceService.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/DeviceService.java index 89dc840d..1b22cc7c 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/DeviceService.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/DeviceService.java @@ -152,7 +152,14 @@ public interface DeviceService /** * ids查询列表 */ - List selectListByIds(List ids); + default List selectListByIds(List ids) { + return selectListByIds(ids, null); + } + + /** + * ids查询列表 + */ + List selectListByIds(List ids, Long userId); /** * 查询各店铺的设备数量,并分组 diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java index 1d9584a6..e2dc5285 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java @@ -765,14 +765,16 @@ public class DeviceServiceImpl implements DeviceService * ids查询列表 * * @param ids + * @param userId */ @Override - public List selectListByIds(List ids) { + public List selectListByIds(List ids, Long userId) { if (CollectionUtils.isEmptyElement(ids)) { return Collections.emptyList(); } DeviceQuery dto = new DeviceQuery(); dto.setDeviceIds(ids); + dto.setUserId(userId); return selectSmDeviceList(dto); } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBillQuery.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBillQuery.java index 5f0edfae..80e2f729 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBillQuery.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBillQuery.java @@ -90,4 +90,13 @@ public class TransactionBillQuery extends TransactionBill { @ApiModelProperty("搜索关键词") private String keyword; + + @ApiModelProperty("创建日期范围") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private List createDateRange; + + @ApiModelProperty("支付日期范围") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private List payDateRange; + } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml index d1772fd1..8898b5ca 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml @@ -82,6 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and stb.suit_id = #{query.suitId} and stb.store_id = #{query.storeId} and stb.suit_end_time >= #{query.endSuitEndTime} + and stb.channel_id = #{query.channelId} + and stb.withdraw_type = #{query.withdrawType} and sd.device_no like concat('%', #{query.deviceNo}, '%') and su.phonenumber like concat('%', #{query.userMobile}, '%') @@ -130,6 +132,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item} + + and stb.create_time >= #{query.createDateRange[0]} and stb.create_time <= #{query.createDateRange[1]} + + + and stb.pay_time >= #{query.payDateRange[0]} and stb.pay_time <= #{query.payDateRange[1]} +