From d2085a46985917ff62a3b4c369758db8adb4abeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Tue, 22 Oct 2024 08:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=97=E9=A4=90=E6=98=BE=E7=A4=BA=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/ss/suit/domain/SuitQuery.java | 2 ++ .../src/main/java/com/ruoyi/ss/suit/domain/SuitVO.java | 3 +++ .../src/main/java/com/ruoyi/ss/suit/mapper/SuitMapper.xml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitQuery.java b/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitQuery.java index ad01349d..2b816179 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitQuery.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitQuery.java @@ -25,4 +25,6 @@ public class SuitQuery extends Suit { @ApiModelProperty("设备ID") private Long deviceId; + @ApiModelProperty("手机号或用户名") + private String mobileOrUserName; } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitVO.java b/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitVO.java index 19033a62..4fd8140f 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitVO.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/suit/domain/SuitVO.java @@ -23,4 +23,7 @@ public class SuitVO extends Suit { @ApiModelProperty("应用的设备列表") @JsonView(JsonViewProfile.AppMch.class) private List deviceList; + + @ApiModelProperty("手机号或用户名") + private String mobileOrUserName; } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/suit/mapper/SuitMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/suit/mapper/SuitMapper.xml index 45307278..bb4ac0fc 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/suit/mapper/SuitMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/suit/mapper/SuitMapper.xml @@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ss.low_power, ss.enabled_voice, ss.voice_minutes, + if(su.phonenumber is not null, su.phonenumber, su.user_name) as mobile_or_user_name, su.user_name as user_name from @@ -47,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ss.suit_id = #{suitId} and ss.name like concat('%', #{name}, '%') + + and if(su.phonenumber is not null, su.phonenumber, su.user_name) like concat('%', #{mobileOrUserName}, '%') + and ss.`value` = #{value} and ss.price = #{price} and ss.description = #{description}