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

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

@@ -61,9 +61,9 @@ public class CmsUserBlockCompanyController extends BaseController {
* 获取当前用户屏蔽企业列表
*/
@ApiOperation("获取当前用户屏蔽企业列表")
@PreAuthorize("@ss.hasPermi('cms:blockCompany:list')")
@GetMapping("/list")
public TableDataInfo list(AppUserBlockCompany appUserBlockCompany){
@PreAuthorize("@ss.hasPermi('cms:blockCompany:listByUserId')")
@GetMapping("/listByUserId")
public TableDataInfo listByUserId(AppUserBlockCompany appUserBlockCompany){
if(!SecurityUtils.isLogin()){
return getDataTable(new ArrayList<>());
}
@@ -75,6 +75,18 @@ public class CmsUserBlockCompanyController extends BaseController {
return getDataTable(list);
}
/**
* 获取当前用户屏蔽企业列表
*/
@ApiOperation("获取屏蔽企业列表")
@PreAuthorize("@ss.hasPermi('cms:blockCompany:list')")
@GetMapping("/list")
public TableDataInfo list(AppUserBlockCompany appUserBlockCompany){
startPage();
List<AppUserBlockCompany> list=blockCompanyService.selectListByUserId(appUserBlockCompany);
return getDataTable(list);
}
/**
* 查询当前用户屏蔽的企业ID集合用于过滤职位
*/

View File

@@ -22,4 +22,9 @@ public class AppUserBlockCompany extends BaseEntity {
/** 被屏蔽企业ID */
private Long companyId;
@TableField(exist = false)
private String companyName;
@TableField(exist = false)
private String name;
}

View File

@@ -65,4 +65,13 @@ public class AppUserJobComplaint extends BaseEntity {
/** 处理时间 */
@ApiModelProperty("处理时间")
private LocalDateTime handleTime;
@TableField(exist = false)
private Long companyId;
@TableField(exist = false)
private String companyName;
@TableField(exist = false)
private String jobTitle;
@TableField(exist = false)
private String name;
}

View File

@@ -21,7 +21,7 @@ public interface AppUserBlockCompanyMapper extends BaseMapper<AppUserBlockCompan
/**
* 根据用户ID查询全部屏蔽记录
*/
List<AppUserBlockCompany> selectListByUserId(@Param("userId") Long userId);
List<AppUserBlockCompany> selectListByUserId(AppUserBlockCompany appUserBlockCompany);
/**
* 根据用户id查询屏蔽的企业及企业的岗位

View File

@@ -34,5 +34,5 @@ public interface AppUserBlockCompanyService extends IService<AppUserBlockCompany
int batchCancelBlock(Long userId,List<Long> companyIdList);
List<AppUserBlockCompany> selectListByUserId(Long userId);
List<AppUserBlockCompany> selectListByUserId(AppUserBlockCompany appUserBlockCompany);
}

View File

@@ -64,7 +64,7 @@ public class AppUserBlockCompanyServiceImpl extends ServiceImpl<AppUserBlockComp
return baseMapper.update(updateEntity, wrapper);
}
public List<AppUserBlockCompany> selectListByUserId(Long userId){
return appUserBlockCompanyMapper.selectListByUserId(userId);
public List<AppUserBlockCompany> selectListByUserId(AppUserBlockCompany appUserBlockCompany){
return appUserBlockCompanyMapper.selectListByUserId(appUserBlockCompany);
}
}

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">