|
|
@@ -12,6 +12,8 @@
|
|
|
<result property="phone" column="phone"/>
|
|
|
<result property="auditTime" column="audit_time"/>
|
|
|
<result property="accountId" column="account_id"/>
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
+ <result property="deptName" column="dept_name"/>
|
|
|
<result property="state" column="state"/>
|
|
|
<result property="status" column="status"/>
|
|
|
<result property="businessRecord" column="business_record"/>
|
|
|
@@ -30,6 +32,8 @@
|
|
|
contacts,
|
|
|
phone,
|
|
|
account_id,
|
|
|
+ dept_id,
|
|
|
+ dept_name,
|
|
|
audit_time,
|
|
|
state,
|
|
|
status,
|
|
|
@@ -49,6 +53,8 @@
|
|
|
t.contacts,
|
|
|
t.phone,
|
|
|
t.account_id,
|
|
|
+ t.dept_id,
|
|
|
+ t.dept_name,
|
|
|
t.audit_time,
|
|
|
t.state,
|
|
|
t.status,
|
|
|
@@ -60,37 +66,43 @@
|
|
|
t.update_by,
|
|
|
t.create_time
|
|
|
from qp_supplier as t
|
|
|
+ LEFT JOIN sys_dept d on t.dept_id=d.dept_id
|
|
|
+ LEFT JOIN sys_user u on t.user_id=u.user_id
|
|
|
</sql>
|
|
|
<select id="selectQpSupplierList" parameterType="com.zd.airbottle.domain.QpSupplier" resultMap="QpSupplierResult">
|
|
|
- <include refid="selectQpSupplierVo"/>
|
|
|
+ <include refid="selectQpSupplierListVo"/>
|
|
|
<where>
|
|
|
- <if test="companyName != null and companyName != ''">and company_name like concat('%', #{companyName},
|
|
|
+ <if test="companyName != null and companyName != ''">and t.company_name like concat('%', #{companyName},
|
|
|
'%')
|
|
|
</if>
|
|
|
- <if test="companyShort != null and companyShort != ''">and company_short = #{companyShort}</if>
|
|
|
- <if test="contacts != null and contacts != ''">and contacts = #{contacts}</if>
|
|
|
- <if test="state != null ">and state = #{state}</if>
|
|
|
- <if test="status != null ">and status = #{status}</if>
|
|
|
- <if test="accountId != null ">and account_id = #{accountId}</if>
|
|
|
- <if test="auditTime != null ">and audit_time = #{auditTime}</if>
|
|
|
- <if test="phone != null and phone != ''">and phone = #{phone}</if>
|
|
|
- <if test="businessRecord != null and businessRecord != ''">and business_record = #{businessRecord}</if>
|
|
|
- <if test="businessAddress != null and businessAddress != ''">and business_address = #{businessAddress}</if>
|
|
|
- <if test="userId != null ">and user_id = #{userId}</if>
|
|
|
+ <if test="companyShort != null and companyShort != ''">and t.company_short = #{companyShort}</if>
|
|
|
+ <if test="contacts != null and contacts != ''">and t.contacts = #{contacts}</if>
|
|
|
+ <if test="state != null ">and t.state = #{state}</if>
|
|
|
+ <if test="status != null ">and t.status = #{status}</if>
|
|
|
+ <if test="accountId != null ">and t.account_id = #{accountId}</if>
|
|
|
+ <if test="deptId != null ">and t.dept_id = #{deptId}</if>
|
|
|
+ <if test="deptName != null ">and t.dept_name = #{deptName}</if>
|
|
|
+ <if test="auditTime != null ">and t.audit_time = #{auditTime}</if>
|
|
|
+ <if test="phone != null and phone != ''">and t.phone = #{phone}</if>
|
|
|
+ <if test="businessRecord != null and businessRecord != ''">and t.business_record = #{businessRecord}</if>
|
|
|
+ <if test="businessAddress != null and businessAddress != ''">and t.business_address = #{businessAddress}</if>
|
|
|
+ <if test="userId != null ">and t.user_id = #{userId}</if>
|
|
|
<if test="searchValue !=null and searchValue!=''">
|
|
|
- and (company_name like concat('%', #{searchValue},
|
|
|
+ and (t.company_name like concat('%', #{searchValue},
|
|
|
'%')
|
|
|
- or contacts like concat('%', #{searchValue},
|
|
|
+ or t.contacts like concat('%', #{searchValue},
|
|
|
'%')
|
|
|
- or phone like concat('%', #{searchValue},
|
|
|
+ or t.phone like concat('%', #{searchValue},
|
|
|
'%'))
|
|
|
</if>
|
|
|
<if test="ids !=null and ids.size>0">
|
|
|
- and id in
|
|
|
+ and t.id in
|
|
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -141,6 +153,8 @@
|
|
|
<if test="contacts != null">contacts,</if>
|
|
|
<if test="phone != null">phone,</if>
|
|
|
<if test="accountId != null">account_id,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
<if test="auditTime != null">audit_time,</if>
|
|
|
<if test="state != null">state,</if>
|
|
|
<if test="status != null">status,</if>
|
|
|
@@ -158,6 +172,8 @@
|
|
|
<if test="contacts != null">#{contacts},</if>
|
|
|
<if test="phone != null">#{phone},</if>
|
|
|
<if test="accountId != null">#{accountId},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
<if test="auditTime != null">#{auditTime},</if>
|
|
|
<if test="state != null">#{state},</if>
|
|
|
<if test="status != null">#{status},</if>
|
|
|
@@ -205,4 +221,4 @@
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|