|
@@ -19,7 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="price" column="price" />
|
|
|
<result property="cost" column="cost" />
|
|
|
<result property="payment" column="payment" />
|
|
|
- <result property="createTime" column="createtime" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="tel_one" column="tel_one" />
|
|
|
+ <result property="online_statis" column="online_statis" />
|
|
|
+ <result property="electric_quantity" column="electric_quantity" />
|
|
|
+ <result property="offlinetime" column="offlinetime" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTDeviceListVo">
|
|
@@ -27,22 +32,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTDeviceListList" parameterType="TDeviceList" resultMap="TDeviceListResult">
|
|
|
- <include refid="selectTDeviceListVo"/>
|
|
|
+ select a.id, a.device_proper, a.userid, a.factory, a.device_model, a.device_id, a.sim_code, a.serial_number, a.grant_type, a.price, a.cost, a.payment, a.createtime, b.`status`,c.name,c.sfzid,c.tel_one,d.online_statis,d.electric_quantity,d.offlinetime from t_device_list a
|
|
|
+ left join t_facility b on a.device_id=b.code
|
|
|
+ left join t_user_profile c on a.userid=c.id
|
|
|
+ left join t_shouhuan_info d on a.device_id=d.device_id_code
|
|
|
<where>
|
|
|
- <if test="deviceProper != null "> and device_proper = #{deviceProper}</if>
|
|
|
- <if test="userid != null "> and userid = #{userid}</if>
|
|
|
- <if test="sfzid != null and sfzid != ''"> and sfzid = #{sfzid}</if>
|
|
|
- <if test="telno != null and telno != ''"> and telno = #{telno}</if>
|
|
|
- <if test="factory != null "> and factory = #{factory}</if>
|
|
|
- <if test="deviceModel != null "> and device_model = #{deviceModel}</if>
|
|
|
- <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
|
|
- <if test="simCode != null and simCode != ''"> and sim_code = #{simCode}</if>
|
|
|
- <if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
|
|
- <if test="grantType != null "> and grant_type = #{grantType}</if>
|
|
|
- <if test="price != null and price != ''"> and price = #{price}</if>
|
|
|
- <if test="cost != null and cost != ''"> and cost = #{cost}</if>
|
|
|
- <if test="payment != null "> and payment = #{payment}</if>
|
|
|
- <if test="createTime != null "> and createtime = #{createTime}</if>
|
|
|
+ <if test="deviceProper != null "> and a.device_proper = #{deviceProper}</if>
|
|
|
+ <if test="userid != null "> and a.userid = #{userid}</if>
|
|
|
+ <if test="sfzid != null and sfzid != ''"> and a.sfzid = #{sfzid}</if>
|
|
|
+ <if test="telno != null and telno != ''"> and a.telno = #{telno}</if>
|
|
|
+ <if test="factory != null "> and a.factory = #{factory}</if>
|
|
|
+ <if test="deviceModel != null "> and a.device_model = #{deviceModel}</if>
|
|
|
+ <if test="deviceId != null and deviceId != ''"> and a.device_id = #{deviceId}</if>
|
|
|
+ <if test="simCode != null and simCode != ''"> and a.sim_code = #{simCode}</if>
|
|
|
+ <if test="serialNumber != null and serialNumber != ''"> and a.serial_number = #{serialNumber}</if>
|
|
|
+ <if test="grantType != null "> and a.grant_type = #{grantType}</if>
|
|
|
+ <if test="price != null and price != ''"> and a.price = #{price}</if>
|
|
|
+ <if test="cost != null and cost != ''"> and a.cost = #{cost}</if>
|
|
|
+ <if test="payment != null "> and a.payment = #{payment}</if>
|
|
|
+ <if test="createTime != null "> and a.createtime = #{createTime}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|