This commit is contained in:
chenyanchang
2026-06-17 16:57:05 +08:00
parent 99d1e5deef
commit 88d6bf8f87
2 changed files with 12 additions and 3 deletions

View File

@@ -35,6 +35,8 @@ public class CompanyJobLiveServiceImpl implements ICompanyJobLiveService {
@Override
public int insert(CompanyJobLive companyJobLive) {
Long companyId = getCompanyId();
companyJobLive.setCompanyId(companyId);
return companyJobLiveMapper.insert(companyJobLive);
}
@@ -55,9 +57,14 @@ public class CompanyJobLiveServiceImpl implements ICompanyJobLiveService {
@Override
public List<CompanyJobLive> selectByCompanyId() {
Long companyId = getCompanyId();
return companyJobLiveMapper.selectByCompanyId(companyId);
}
private Long getCompanyId() {
LoginUser logUser = SecurityUtils.getLoginUser();
SysUser sysUser = logUser.getUser();
Company company = companyMapper.selectOne(Wrappers.lambdaQuery(Company.class).eq(Company::getCode, sysUser.getIdCard()).orderByDesc(Company::getUpdateTime).last("LIMIT 1"));
return companyJobLiveMapper.selectByCompanyId(company.getCompanyId());
return company.getCompanyId();
}
}

View File

@@ -29,11 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectCompanyJobLiveVo"/>
where 1=1
<if test="title != null and title != ''">
and l.title like CONCAT('%',#{title},'%')
and l.title like '%' || #{title} || '%'
</if>
<if test="companyName != null and companyName != ''">
and c.name like CONCAT('%',#{companyName},'%')
and c.name like '%' || #{companyName} || '%'
</if>
and TO_TIMESTAMP(l.end_time, 'YYYY-MM-DD HH24:MI:SS') >= sysdate()
order by l.create_time desc
</select>