|
@@ -11,6 +11,7 @@
|
|
|
<result property="address" column="address_" />
|
|
|
<result property="isOnline" column="is_online" />
|
|
|
<result property="companyId" column="company_id" />
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
<result property="unlockPassword" column="unlock_password" />
|
|
|
<result property="codeAddress" column="code_address" />
|
|
|
<result property="ipAddress" column="ip_address" />
|
|
@@ -41,8 +42,8 @@
|
|
|
,#{aliasName,jdbcType=VARCHAR}
|
|
|
,#{address,jdbcType=VARCHAR}
|
|
|
,#{isOnline,jdbcType= NUMERIC }
|
|
|
-,#{unlockPassword,jdbcType=VARCHAR}
|
|
|
,#{companyId,jdbcType=VARCHAR}
|
|
|
+,#{unlockPassword,jdbcType=VARCHAR}
|
|
|
,#{codeAddress,jdbcType=VARCHAR}
|
|
|
,#{ipAddress,jdbcType=VARCHAR}
|
|
|
,#{port,jdbcType=VARCHAR}
|
|
@@ -136,21 +137,25 @@ id_, header_,device_no,alias_name,address_,is_online,company_id,unlock_password,
|
|
|
</select>
|
|
|
<select id="search" parameterType="hashmap" resultMap="DeviceInfoMap">
|
|
|
<![CDATA[
|
|
|
- select * from base_device_info
|
|
|
+ select
|
|
|
+ a.*,
|
|
|
+ b.name_ AS company_name
|
|
|
+ from base_device_info a
|
|
|
+ LEFT JOIN base_company_info b ON a.company_id = b.id_
|
|
|
]]>
|
|
|
<where>
|
|
|
- and del_flag=false
|
|
|
+ and a.del_flag=false
|
|
|
<if test="searchParams.aliasName != null">
|
|
|
- and alias_name like #{searchParams.aliasName}
|
|
|
+ and a.alias_name like #{searchParams.aliasName}
|
|
|
</if>
|
|
|
<if test="searchParams.deviceNo != null">
|
|
|
- and device_no like #{searchParams.deviceNo}
|
|
|
+ and a.device_no like #{searchParams.deviceNo}
|
|
|
</if>
|
|
|
<if test="searchParams.address != null">
|
|
|
- and address_ like #{searchParams.address}
|
|
|
+ and a.address_ like #{searchParams.address}
|
|
|
</if>
|
|
|
<if test="searchParams.companyId != null">
|
|
|
- and company_id = #{searchParams.companyId}
|
|
|
+ and a.company_id = #{searchParams.companyId}
|
|
|
</if>
|
|
|
</where>
|
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|