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

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

View File

@@ -22,4 +22,9 @@ public class AppUserBlockCompany extends BaseEntity {
/** 被屏蔽企业ID */ /** 被屏蔽企业ID */
private Long companyId; 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("处理时间") @ApiModelProperty("处理时间")
private LocalDateTime handleTime; 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查询全部屏蔽记录 * 根据用户ID查询全部屏蔽记录
*/ */
List<AppUserBlockCompany> selectListByUserId(@Param("userId") Long userId); List<AppUserBlockCompany> selectListByUserId(AppUserBlockCompany appUserBlockCompany);
/** /**
* 根据用户id查询屏蔽的企业及企业的岗位 * 根据用户id查询屏蔽的企业及企业的岗位

View File

@@ -34,5 +34,5 @@ public interface AppUserBlockCompanyService extends IService<AppUserBlockCompany
int batchCancelBlock(Long userId,List<Long> companyIdList); 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); return baseMapper.update(updateEntity, wrapper);
} }
public List<AppUserBlockCompany> selectListByUserId(Long userId){ public List<AppUserBlockCompany> selectListByUserId(AppUserBlockCompany appUserBlockCompany){
return appUserBlockCompanyMapper.selectListByUserId(userId); return appUserBlockCompanyMapper.selectListByUserId(appUserBlockCompany);
} }
} }

View File

@@ -14,10 +14,13 @@
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="name" column="name"/>
<result property="companyName" column="company_name"/>
</resultMap> </resultMap>
<sql id="selectAppUserBlockCompanyVo"> <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> </sql>
<select id="selectBlockCompanyIdsByUserId" resultType="java.lang.Long"> <select id="selectBlockCompanyIdsByUserId" resultType="java.lang.Long">
@@ -36,9 +39,14 @@
<select id="selectListByUserId" resultMap="AppUserBlockCompanyResult"> <select id="selectListByUserId" resultMap="AppUserBlockCompanyResult">
<include refid="selectAppUserBlockCompanyVo"/> <include refid="selectAppUserBlockCompanyVo"/>
FROM app_user_block_company FROM app_user_block_company t
WHERE user_id = #{userId} AND del_flag = '0' LEFT JOIN company ca ON t.company_id = ca.company_id
ORDER BY create_time DESC 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>
<select id="selectBlockCompanyIdsByUserIdJobs" resultType="java.lang.Long"> <select id="selectBlockCompanyIdsByUserIdJobs" resultType="java.lang.Long">

View File

@@ -20,6 +20,11 @@
<result column="update_by" property="updateBy"/> <result column="update_by" property="updateBy"/>
<result column="update_time" property="updateTime"/> <result column="update_time" property="updateTime"/>
<result column="remark" property="remark"/> <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> </resultMap>
<sql id="selectAppUserJobComplaintVo"> <sql id="selectAppUserJobComplaintVo">
@@ -29,33 +34,36 @@
from app_user_job_complaint from app_user_job_complaint
</sql> </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"> <select id="selectAppUserJobComplaintList" resultMap="AppUserJobComplaintResult">
<include refid="selectAppUserJobComplaintVo"/> <include refid="selectAppUserInfoJobComplaintVo"/>
<where> <where>
del_flag = '0' t.del_flag = '0'
<if test="userId != null"> <if test="userId != null">
and user_id = #{userId} and t.and user_id = #{userId}
</if> </if>
<if test="jobId != null"> <if test="jobId != null">
and job_id = #{jobId} and t.and job_id = #{jobId}
</if> </if>
<if test="complaintType != null"> <if test="complaintType != null">
and complaint_type = #{complaintType} and t.complaint_type = #{complaintType}
</if> </if>
<if test="complaintStatus != null"> <if test="complaintStatus != null">
and complaint_status = #{complaintStatus} and t.complaint_status = #{complaintStatus}
</if> </if>
<if test="handleUserId != null"> <if test="handleUserId != null">
and handle_user_id = #{handleUserId} and t.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}
</if> </if>
</where> </where>
order by create_time desc order by t.create_time desc
</select> </select>
<select id="selectAppUserJobComplaintById" resultMap="AppUserJobComplaintResult"> <select id="selectAppUserJobComplaintById" resultMap="AppUserJobComplaintResult">