添加查询投诉和屏蔽列表查询

This commit is contained in:
chenshaohua
2026-07-09 19:56:55 +08:00
parent 5f216fa68d
commit b2784c0ac1
8 changed files with 67 additions and 25 deletions

View File

@@ -14,10 +14,13 @@
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="name" column="name"/>
<result property="companyName" column="company_name"/>
</resultMap>
<sql id="selectAppUserBlockCompanyVo">
select id, user_id, company_id, del_flag, create_by, create_time, update_by, update_time, remark from app_user_block_company
select t.id, t.user_id, t.company_id, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time, t.remark, ca.name as company_name,au.name
</sql>
<select id="selectBlockCompanyIdsByUserId" resultType="java.lang.Long">
@@ -36,9 +39,14 @@
<select id="selectListByUserId" resultMap="AppUserBlockCompanyResult">
<include refid="selectAppUserBlockCompanyVo"/>
FROM app_user_block_company
WHERE user_id = #{userId} AND del_flag = '0'
ORDER BY create_time DESC
FROM app_user_block_company t
LEFT JOIN company ca ON t.company_id = ca.company_id
LEFT JOIN app_user au on t.user_id=au.user_id
<where>
t.del_flag = '0'
<if test="userId!=null"> and t.user_id = #{userId}</if>
</where>
ORDER BY t.create_time DESC
</select>
<select id="selectBlockCompanyIdsByUserIdJobs" resultType="java.lang.Long">

View File

@@ -20,6 +20,11 @@
<result column="update_by" property="updateBy"/>
<result column="update_time" property="updateTime"/>
<result column="remark" property="remark"/>
<result column="company_id" property="companyId"/>
<result column="company_name" property="companyName"/>
<result column="job_title" property="jobTitle"/>
<result column="name" property="name"/>
</resultMap>
<sql id="selectAppUserJobComplaintVo">
@@ -29,33 +34,36 @@
from app_user_job_complaint
</sql>
<sql id="selectAppUserInfoJobComplaintVo">
select t.id, t.user_id, t.job_id, t.complaint_type, t.complaint_content, t.evidence_url, t.contact_phone,
t.complaint_status, t.handle_user_id, t.handle_content, t.handle_time, t.del_flag,
t.create_by, t.create_time, t.update_by, t.update_time, t.remark,j.job_title,j.company_name,j.company_id,u.name
from app_user_job_complaint t
LEFT JOIN job j ON t.job_id = j.job_id
LEFT JOIN app_user u ON t.user_id = u.user_id
</sql>
<select id="selectAppUserJobComplaintList" resultMap="AppUserJobComplaintResult">
<include refid="selectAppUserJobComplaintVo"/>
<include refid="selectAppUserInfoJobComplaintVo"/>
<where>
del_flag = '0'
t.del_flag = '0'
<if test="userId != null">
and user_id = #{userId}
and t.and user_id = #{userId}
</if>
<if test="jobId != null">
and job_id = #{jobId}
and t.and job_id = #{jobId}
</if>
<if test="complaintType != null">
and complaint_type = #{complaintType}
and t.complaint_type = #{complaintType}
</if>
<if test="complaintStatus != null">
and complaint_status = #{complaintStatus}
and t.complaint_status = #{complaintStatus}
</if>
<if test="handleUserId != null">
and handle_user_id = #{handleUserId}
</if>
<if test="params.beginTime != null and params.beginTime != ''">
and create_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and params.endTime != ''">
and create_time &lt;= #{params.endTime}
and t.handle_user_id = #{handleUserId}
</if>
</where>
order by create_time desc
order by t.create_time desc
</select>
<select id="selectAppUserJobComplaintById" resultMap="AppUserJobComplaintResult">