134 lines
5.6 KiB
XML
134 lines
5.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.gxwebsoft.oa.mapper.AssetsMapper">
|
|
|
|
<!-- 关联查询sql -->
|
|
<sql id="selectSql">
|
|
SELECT a.*,
|
|
b.user_id,b.company_name,b.avatar,b.nickname
|
|
FROM oa_assets a
|
|
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
|
<where>
|
|
<if test="param.assetsId != null">
|
|
AND a.assets_id = #{param.assetsId}
|
|
</if>
|
|
<if test="param.name != null">
|
|
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
|
</if>
|
|
<if test="param.code != null">
|
|
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
|
</if>
|
|
<if test="param.type != null">
|
|
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
|
</if>
|
|
<if test="param.brand != null">
|
|
AND a.brand LIKE CONCAT('%', #{param.brand}, '%')
|
|
</if>
|
|
<if test="param.configuration != null">
|
|
AND a.configuration LIKE CONCAT('%', #{param.configuration}, '%')
|
|
</if>
|
|
<if test="param.account != null">
|
|
AND a.account LIKE CONCAT('%', #{param.account}, '%')
|
|
</if>
|
|
<if test="param.password != null">
|
|
AND a.password LIKE CONCAT('%', #{param.password}, '%')
|
|
</if>
|
|
<if test="param.brandAccount != null">
|
|
AND a.brand_account LIKE CONCAT('%', #{param.brandAccount}, '%')
|
|
</if>
|
|
<if test="param.brandPassword != null">
|
|
AND a.brand_password LIKE CONCAT('%', #{param.brandPassword}, '%')
|
|
</if>
|
|
<if test="param.panel != null">
|
|
AND a.panel LIKE CONCAT('%', #{param.panel}, '%')
|
|
</if>
|
|
<if test="param.panelAccount != null">
|
|
AND a.panel_account LIKE CONCAT('%', #{param.panelAccount}, '%')
|
|
</if>
|
|
<if test="param.panelPassword != null">
|
|
AND a.panel_password LIKE CONCAT('%', #{param.panelPassword}, '%')
|
|
</if>
|
|
<if test="param.financeAmount != null">
|
|
AND a.finance_amount = #{param.financeAmount}
|
|
</if>
|
|
<if test="param.financeYears != null">
|
|
AND a.finance_years = #{param.financeYears}
|
|
</if>
|
|
<if test="param.financeRenew != null">
|
|
AND a.finance_renew = #{param.financeRenew}
|
|
</if>
|
|
<if test="param.financeCustomerName != null">
|
|
AND a.finance_customer_name LIKE CONCAT('%', #{param.financeCustomerName}, '%')
|
|
</if>
|
|
<if test="param.financeCustomerContact != null">
|
|
AND a.finance_customer_contact LIKE CONCAT('%', #{param.financeCustomerContact}, '%')
|
|
</if>
|
|
<if test="param.financeCustomerPhone != null">
|
|
AND a.finance_customer_phone LIKE CONCAT('%', #{param.financeCustomerPhone}, '%')
|
|
</if>
|
|
<if test="param.customerId != null">
|
|
AND a.customer_id = #{param.customerId}
|
|
</if>
|
|
<if test="param.customerName != null">
|
|
AND a.customer_name LIKE CONCAT('%', #{param.customerName}, '%')
|
|
</if>
|
|
<if test="param.openPort != null">
|
|
AND a.open_port LIKE CONCAT('%', #{param.openPort}, '%')
|
|
</if>
|
|
<if test="param.content != null">
|
|
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
|
</if>
|
|
<if test="param.startTime != null">
|
|
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
|
</if>
|
|
<if test="param.endTime != null">
|
|
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
|
|
</if>
|
|
<if test="param.isTop != null">
|
|
AND a.is_top LIKE CONCAT('%', #{param.isTop}, '%')
|
|
</if>
|
|
<if test="param.visibility != null">
|
|
AND a.visibility LIKE CONCAT('%', #{param.visibility}, '%')
|
|
</if>
|
|
<if test="param.sortNumber != null">
|
|
AND a.sort_number = #{param.sortNumber}
|
|
</if>
|
|
<if test="param.comments != null">
|
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
|
</if>
|
|
<if test="param.userId != null">
|
|
AND a.user_id = #{param.userId}
|
|
</if>
|
|
<if test="param.organizationId != null">
|
|
AND a.organization_id = #{param.organizationId}
|
|
</if>
|
|
<if test="param.status != null">
|
|
AND a.status LIKE CONCAT('%', #{param.status}, '%')
|
|
</if>
|
|
<if test="param.deleted != null">
|
|
AND a.deleted = #{param.deleted}
|
|
</if>
|
|
<if test="param.deleted == null">
|
|
AND a.deleted = 0
|
|
</if>
|
|
<if test="param.createTimeStart != null">
|
|
AND a.create_time >= #{param.createTimeStart}
|
|
</if>
|
|
<if test="param.createTimeEnd != null">
|
|
AND a.create_time <= #{param.createTimeEnd}
|
|
</if>
|
|
</where>
|
|
</sql>
|
|
|
|
<!-- 分页查询 -->
|
|
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.Assets">
|
|
<include refid="selectSql"></include>
|
|
</select>
|
|
|
|
<!-- 查询全部 -->
|
|
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.Assets">
|
|
<include refid="selectSql"></include>
|
|
</select>
|
|
|
|
</mapper>
|