From 23e1e52aa20bda049a0d023fe3b4a0e7cf769d07 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期四, 28 七月 2022 15:21:29 +0800
Subject: [PATCH] 优化
---
dao/src/main/resources/mapper/ClientMapper.xml | 9 +++++++--
dao/src/main/java/com/sandu/ximon/dao/domain/Client.java | 6 ++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dao/src/main/java/com/sandu/ximon/dao/domain/Client.java b/dao/src/main/java/com/sandu/ximon/dao/domain/Client.java
index 6611ce0..df6f95b 100644
--- a/dao/src/main/java/com/sandu/ximon/dao/domain/Client.java
+++ b/dao/src/main/java/com/sandu/ximon/dao/domain/Client.java
@@ -55,6 +55,12 @@
@JsonIgnore
private String password;
+ /**
+ * 鏃犻渶璐﹀彿瀵嗙爜鐧诲綍鎵�浣跨敤鐨刱ey
+ */
+ @JsonIgnore
+ private String userKey;
+
/*鐏潌鏁伴噺*/
private Integer countLight;
diff --git a/dao/src/main/resources/mapper/ClientMapper.xml b/dao/src/main/resources/mapper/ClientMapper.xml
index 50ded3b..13da95b 100644
--- a/dao/src/main/resources/mapper/ClientMapper.xml
+++ b/dao/src/main/resources/mapper/ClientMapper.xml
@@ -12,16 +12,21 @@
<result property="mobile" column="mobile" jdbcType="VARCHAR"/>
<result property="icon" column="icon" jdbcType="VARCHAR"/>
<result property="password" column="password" jdbcType="VARCHAR"/>
+ <result property="userKey" column="user_key" jdbcType="VARCHAR"/>
<result property="countLight" column="count_light" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="loginTime" column="login_time" jdbcType="TIMESTAMP"/>
</resultMap>
<select id="clientList" resultType="com.sandu.ximon.dao.domain.Client">
- select * from client where superiorId=#{userId}
+ select *
+ from client
+ where superiorId = #{userId}
</select>
<select id="findClientIdByName" resultType="java.lang.Long">
- select id from client where client_name=#{belongsClient}
+ select id
+ from client
+ where client_name = #{belongsClient}
</select>
--
Gitblit v1.9.3