update
This commit is contained in:
@@ -35,6 +35,8 @@ public class CompanyJobLiveServiceImpl implements ICompanyJobLiveService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insert(CompanyJobLive companyJobLive) {
|
public int insert(CompanyJobLive companyJobLive) {
|
||||||
|
Long companyId = getCompanyId();
|
||||||
|
companyJobLive.setCompanyId(companyId);
|
||||||
return companyJobLiveMapper.insert(companyJobLive);
|
return companyJobLiveMapper.insert(companyJobLive);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,9 +57,14 @@ public class CompanyJobLiveServiceImpl implements ICompanyJobLiveService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CompanyJobLive> selectByCompanyId() {
|
public List<CompanyJobLive> selectByCompanyId() {
|
||||||
|
Long companyId = getCompanyId();
|
||||||
|
return companyJobLiveMapper.selectByCompanyId(companyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long getCompanyId() {
|
||||||
LoginUser logUser = SecurityUtils.getLoginUser();
|
LoginUser logUser = SecurityUtils.getLoginUser();
|
||||||
SysUser sysUser = logUser.getUser();
|
SysUser sysUser = logUser.getUser();
|
||||||
Company company = companyMapper.selectOne(Wrappers.lambdaQuery(Company.class).eq(Company::getCode, sysUser.getIdCard()).orderByDesc(Company::getUpdateTime).last("LIMIT 1"));
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,11 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectCompanyJobLiveVo"/>
|
<include refid="selectCompanyJobLiveVo"/>
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="title != null and title != ''">
|
<if test="title != null and title != ''">
|
||||||
and l.title like CONCAT('%',#{title},'%')
|
and l.title like '%' || #{title} || '%'
|
||||||
</if>
|
</if>
|
||||||
<if test="companyName != null and companyName != ''">
|
<if test="companyName != null and companyName != ''">
|
||||||
and c.name like CONCAT('%',#{companyName},'%')
|
and c.name like '%' || #{companyName} || '%'
|
||||||
</if>
|
</if>
|
||||||
|
and TO_TIMESTAMP(l.end_time, 'YYYY-MM-DD HH24:MI:SS') >= sysdate()
|
||||||
|
|
||||||
order by l.create_time desc
|
order by l.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user