1.添加用户投诉岗位
2.管理员对企业和岗位下架
This commit is contained in:
@@ -135,9 +135,12 @@ lc_web_auth:
|
||||
appSecret: x14lueHbtLQL7Pz2G7gE4wcGCV6TDblO5xfeu9V2wGk=
|
||||
getTokenUrl: http://100.128.128.6:9081/prod-psout-api/auth/token
|
||||
getUserInfoUrl: http://100.128.128.6:9081/prod-psout-api/system/app/authorize/user/info
|
||||
editUserInfoUrl: http://100.128.128.6:9081/prod-psout-api/system/auth/user/edit
|
||||
|
||||
lc_cms_auth:
|
||||
appId: cloud-9793ee8a8c3d47b8871007ffc4128502
|
||||
appSecret: Yi+NACK70UPg8rFvsnnfBUq1wcLD4nm6ilC4II/4C4k=
|
||||
getTokenUrl: http://100.128.128.6:9081/prod-api/auth/token
|
||||
getUserInfoUrl: http://100.128.128.6:9081/prod-api/system/app/authorize/user/info
|
||||
resrtPwdUrl: http://100.128.128.6:9081/prod-api/ps/user/resetPwd/zkr
|
||||
changeStatusUrl: http://100.128.128.6:9081/prod-api/ps/user/change/status/zkr
|
||||
|
||||
@@ -141,9 +141,12 @@ lc_web_auth:
|
||||
appSecret: x14lueHbtLQL7Pz2G7gE4wcGCV6TDblO5xfeu9V2wGk=
|
||||
getTokenUrl: http://218.31.252.15:9081/prod-psout-api/auth/token
|
||||
getUserInfoUrl: http://218.31.252.15:9081/prod-psout-api/system/app/authorize/user/info
|
||||
editUserInfoUrl: http://218.31.252.15:9081/prod-psout-api/system/auth/user/edit
|
||||
#监管端:
|
||||
lc_cms_auth:
|
||||
appId: cloud-9793ee8a8c3d47b8871007ffc4128502
|
||||
appSecret: Yi+NACK70UPg8rFvsnnfBUq1wcLD4nm6ilC4II/4C4k=
|
||||
getTokenUrl: http://218.31.252.15:9081/prod-api/auth/token
|
||||
getUserInfoUrl: http://218.31.252.15:9081/prod-api/system/app/authorize/user/info
|
||||
resrtPwdUrl: http://218.31.252.15:9081/prod-api/ps/user/resetPwd/zkr
|
||||
changeStatusUrl: http://218.31.252.15:9081/prod-api/ps/user/change/status/zkr
|
||||
|
||||
@@ -182,4 +182,12 @@ public class AppUserController extends BaseController
|
||||
appReviewJob.setUserId(SiteSecurityUtils.getUserId());
|
||||
return toAjax(appReviewJobService.insertAppReviewJob(appReviewJob));
|
||||
}
|
||||
|
||||
@ApiOperation("求职者求职安全保障")
|
||||
@PostMapping("/editUserSafety")
|
||||
public AjaxResult editUserSafety(@RequestBody AppUser appUser)
|
||||
{
|
||||
appUser.setUserId(SiteSecurityUtils.getUserId());
|
||||
return AjaxResult.success(appUserService.editUserSafety(appUser));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ public class CmsJobController extends BaseController
|
||||
String errorMsg = "描述中包含敏感词:" + String.join("、", sensitiveWords);
|
||||
return AjaxResult.error(errorMsg, sensitiveWords);
|
||||
}
|
||||
job.setJobStatus("0");
|
||||
// 无敏感词,执行插入
|
||||
return toAjax(jobService.insertJob(job));
|
||||
}
|
||||
@@ -432,6 +433,7 @@ public class CmsJobController extends BaseController
|
||||
job.setCompanyId(getCompanyId(allCompany, job.getCompanyName()));
|
||||
job.setExperience("0");//经验不限
|
||||
job.setJobType("0");//疆内
|
||||
job.setJobStatus("0");//岗位上架
|
||||
String companyName=StringUtils.isNotEmpty(job.getCompanyName())?job.getCompanyName():null;
|
||||
// 联系方式转换
|
||||
List<JobContact> contactList = new ArrayList<>();
|
||||
@@ -460,6 +462,28 @@ public class CmsJobController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("岗位下架")
|
||||
@PreAuthorize("@ss.hasPermi('cms:job:jobDown')")
|
||||
@PutMapping("/jobDown/{jobId}")
|
||||
@Log(title = "岗位", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult jobDown(@PathVariable("jobId") Long jobId){
|
||||
if(jobId==null){
|
||||
return error("岗位id为空");
|
||||
}
|
||||
return toAjax(jobService.jobDown(jobId));
|
||||
}
|
||||
|
||||
@ApiOperation("岗位上架")
|
||||
@PreAuthorize("@ss.hasPermi('cms:job:jobUp')")
|
||||
@PutMapping("/jobUp/{jobId}")
|
||||
@Log(title = "岗位", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult jobUp(@PathVariable("jobId") Long jobId){
|
||||
if(jobId==null){
|
||||
return error("岗位id为空");
|
||||
}
|
||||
return toAjax(jobService.jobUp(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allCompany
|
||||
* @param aab004
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserJobComplaint;
|
||||
import com.ruoyi.cms.service.IAppUserJobComplaintService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cms/jobComplaint")
|
||||
public class CmsUserJobComplaintController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private IAppUserJobComplaintService appUserJobComplaintService;
|
||||
|
||||
/**
|
||||
* 投诉列表分页
|
||||
*/
|
||||
@ApiOperation("投诉列表分页")
|
||||
@PreAuthorize("@ss.hasPermi('cms:jobComplaint:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppUserJobComplaint appUserJobComplaint) {
|
||||
startPage();
|
||||
List<AppUserJobComplaint> list = appUserJobComplaintService.selectAppUserJobComplaintList(appUserJobComplaint);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@ApiOperation("详情")
|
||||
@PreAuthorize("@ss.hasPermi('cms:jobComplaint:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(appUserJobComplaintService.selectAppUserJobComplaintById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增投诉(用户端提交可单独抽接口,这里后台新增)
|
||||
*/
|
||||
@ApiOperation("新增投诉")
|
||||
@PreAuthorize("@ss.hasPermi('cms:jobComplaint:add')")
|
||||
@Log(title = "岗位投诉", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppUserJobComplaint appUserJobComplaint) {
|
||||
return toAjax(appUserJobComplaintService.insertAppUserJobComplaint(appUserJobComplaint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(处理投诉、填写回复)
|
||||
*/
|
||||
@ApiOperation("修改")
|
||||
@PreAuthorize("@ss.hasPermi('cms:jobComplaint:edit')")
|
||||
@Log(title = "岗位投诉", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppUserJobComplaint appUserJobComplaint) {
|
||||
return toAjax(appUserJobComplaintService.updateAppUserJobComplaint(appUserJobComplaint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@ApiOperation("批量删除")
|
||||
@PreAuthorize("@ss.hasPermi('cms:jobComplaint:remove')")
|
||||
@Log(title = "岗位投诉", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(appUserJobComplaintService.deleteAppUserJobComplaintByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验是否已投诉该岗位
|
||||
*/
|
||||
@ApiOperation("校验是否已投诉该岗位")
|
||||
@PreAuthorize("@ss.hasPermi('cms:jobComplaint:checkComplaint')")
|
||||
@GetMapping("/checkComplaint")
|
||||
public AjaxResult checkComplaint(Long userId, Long jobId) {
|
||||
boolean has = appUserJobComplaintService.checkUserHasComplaint(userId, jobId);
|
||||
return AjaxResult.success(has);
|
||||
}
|
||||
}
|
||||
@@ -165,4 +165,27 @@ public class CompanyController extends BaseController
|
||||
List<Company> list = companyService.selectCompanyList(company);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("企业下架")
|
||||
@PreAuthorize("@ss.hasPermi('cms:company:companyDown')")
|
||||
@Log(title = "企业", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/companyDown/{companyId}")
|
||||
public AjaxResult companyDown(@PathVariable("companyId") Long companyId){
|
||||
if(companyId==null){
|
||||
return error("企业id为空");
|
||||
}
|
||||
return toAjax(companyService.companyDown(companyId));
|
||||
}
|
||||
|
||||
@ApiOperation("企业上架")
|
||||
@PreAuthorize("@ss.hasPermi('cms:company:companyUp')")
|
||||
@PutMapping("/companyUp/{companyId}")
|
||||
@Log(title = "企业", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult companyUp(@PathVariable("companyId") Long companyId){
|
||||
if(companyId==null){
|
||||
return error("企业id为空");
|
||||
}
|
||||
return toAjax(companyService.companyUp(companyId));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.cms.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户投诉岗位记录 shz.app_user_job_complaint
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户投诉岗位表")
|
||||
@TableName("app_user_job_complaint")
|
||||
public class AppUserJobComplaint extends BaseEntity {
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 投诉人用户ID */
|
||||
@ApiModelProperty("投诉人用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 被投诉岗位ID */
|
||||
@ApiModelProperty("被投诉岗位ID")
|
||||
private Long jobId;
|
||||
|
||||
/** 投诉类型 1岗位虚假 2薪资不符 3信息过期 4骚扰沟通 5其他 */
|
||||
@ApiModelProperty("投诉类型 1岗位虚假 2薪资不符 3信息过期 4骚扰沟通 5其他")
|
||||
private Integer complaintType;
|
||||
|
||||
/** 投诉详情描述 */
|
||||
@ApiModelProperty("投诉详情描述")
|
||||
private String complaintContent;
|
||||
|
||||
/** 举证图片/附件地址,多图逗号分隔 */
|
||||
@ApiModelProperty("举证图片/附件地址,多图逗号分隔")
|
||||
private String evidenceUrl;
|
||||
|
||||
/** 投诉人联系电话 */
|
||||
@ApiModelProperty("投诉人联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
/** 投诉状态 1待处理 2处理中 3已办结 4驳回 */
|
||||
@ApiModelProperty("投诉状态 1待处理 2处理中 3已办结 4驳回")
|
||||
private Integer complaintStatus;
|
||||
|
||||
/** 处理管理员ID */
|
||||
@ApiModelProperty("处理管理员ID")
|
||||
private Long handleUserId;
|
||||
|
||||
/** 处理回复内容 */
|
||||
@ApiModelProperty("处理回复内容")
|
||||
private String handleContent;
|
||||
|
||||
/** 处理时间 */
|
||||
@ApiModelProperty("处理时间")
|
||||
private LocalDateTime handleTime;
|
||||
}
|
||||
@@ -206,6 +206,9 @@ public class Job extends BaseEntity
|
||||
@ApiModelProperty("审核状态")
|
||||
private String reviewStatus;
|
||||
|
||||
@ApiModelProperty("状态 0上架,1下架")
|
||||
private String jobStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("户外招聘会岗位审核状态")
|
||||
private String fairReviewStatus;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.cms.domain.AppUserJobComplaint;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AppUserJobComplaintMapper extends BaseMapper<AppUserJobComplaint> {
|
||||
|
||||
/**
|
||||
* 查询投诉列表
|
||||
*/
|
||||
List<AppUserJobComplaint> selectAppUserJobComplaintList(AppUserJobComplaint appUserJobComplaint);
|
||||
|
||||
/**
|
||||
* 根据id查询单条
|
||||
*/
|
||||
AppUserJobComplaint selectAppUserJobComplaintById(Long id);
|
||||
|
||||
/**
|
||||
* 根据用户ID+岗位ID查询未删除投诉记录
|
||||
* @param userId 用户ID
|
||||
* @param jobId 岗位ID
|
||||
* @return 投诉记录
|
||||
*/
|
||||
AppUserJobComplaint selectExistComplaint(@Param("userId") Long userId, @Param("jobId") Long jobId);
|
||||
}
|
||||
@@ -31,4 +31,6 @@ public interface CompanyMapper extends BaseMapper<Company>
|
||||
List<Company> selectLikeCompanyList(Company company);
|
||||
|
||||
Company selectCompanyByJobId(Long jobId);
|
||||
|
||||
int updateStatus(Company company);
|
||||
}
|
||||
|
||||
@@ -69,4 +69,12 @@ public interface JobMapper extends BaseMapper<Job> {
|
||||
Long delRowWork();
|
||||
|
||||
List<AppUser> getRecommendByJobId(@Param("jobId") Long jobId);
|
||||
|
||||
public int updateStatus(Job job);
|
||||
|
||||
//根据企业id批量上架岗位
|
||||
public void updateBatchUpStatus(@Param("companyId") Long companyId);
|
||||
|
||||
//根据企业id批量下架架岗位
|
||||
public void updateBatchDownStatus(@Param("companyId") Long companyId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ruoyi.cms.service;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserJobComplaint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IAppUserJobComplaintService {
|
||||
|
||||
/**
|
||||
* 查询投诉列表
|
||||
*/
|
||||
List<AppUserJobComplaint> selectAppUserJobComplaintList(AppUserJobComplaint appUserJobComplaint);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*/
|
||||
AppUserJobComplaint selectAppUserJobComplaintById(Long id);
|
||||
|
||||
/**
|
||||
* 新增投诉
|
||||
*/
|
||||
int insertAppUserJobComplaint(AppUserJobComplaint appUserJobComplaint);
|
||||
|
||||
/**
|
||||
* 修改投诉
|
||||
*/
|
||||
int updateAppUserJobComplaint(AppUserJobComplaint appUserJobComplaint);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
int deleteAppUserJobComplaintByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 校验用户是否已投诉该岗位
|
||||
* @param userId 用户ID
|
||||
* @param jobId 岗位ID
|
||||
* @return true=已投诉 false=未投诉
|
||||
*/
|
||||
boolean checkUserHasComplaint(Long userId, Long jobId);
|
||||
}
|
||||
@@ -83,4 +83,6 @@ public interface IAppUserService
|
||||
public MyChart getMyTj(Long userId);
|
||||
|
||||
public List<AppUserShow> selectUserApplyList(AppUser appUser);
|
||||
|
||||
int editUserSafety(AppUser appUser);
|
||||
}
|
||||
|
||||
@@ -81,4 +81,8 @@ public interface ICompanyService
|
||||
Company queryCodeCompany(String code);
|
||||
|
||||
List<Company> selectLikeCompanyList(Company company);
|
||||
|
||||
int companyDown(Long companyId);
|
||||
|
||||
int companyUp(Long companyId);
|
||||
}
|
||||
|
||||
@@ -72,4 +72,6 @@ public interface IESJobSearchService
|
||||
List<ESJobDocument> selectByIds(Long[] jobIds);
|
||||
|
||||
List<ESJobDocument> selectSysTextListExceptJobId(ESJobSearch esJobSearch, List<Long> jobIds, AppUser appUser);
|
||||
|
||||
void batchUpdateJob(List<Long> jobIdList);
|
||||
}
|
||||
|
||||
@@ -118,4 +118,8 @@ public interface IJobService
|
||||
List<AppUser> getRecommendByJobId(Long jobId);
|
||||
|
||||
void shzLocalUploadFile(List<Job> jobs);
|
||||
|
||||
public int jobDown(Long jobId);
|
||||
|
||||
public int jobUp(Long jobId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.cms.domain.AppUserJobComplaint;
|
||||
import com.ruoyi.cms.mapper.AppUserJobComplaintMapper;
|
||||
import com.ruoyi.cms.service.IAppUserJobComplaintService;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AppUserJobComplaintServiceImpl extends ServiceImpl<AppUserJobComplaintMapper, AppUserJobComplaint> implements IAppUserJobComplaintService {
|
||||
|
||||
@Autowired
|
||||
private AppUserJobComplaintMapper appUserJobComplaintMapper;
|
||||
|
||||
@Override
|
||||
public List<AppUserJobComplaint> selectAppUserJobComplaintList(AppUserJobComplaint appUserJobComplaint) {
|
||||
return appUserJobComplaintMapper.selectAppUserJobComplaintList(appUserJobComplaint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppUserJobComplaint selectAppUserJobComplaintById(Long id) {
|
||||
return appUserJobComplaintMapper.selectAppUserJobComplaintById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertAppUserJobComplaint(AppUserJobComplaint appUserJobComplaint) {
|
||||
Long userId = appUserJobComplaint.getUserId();
|
||||
Long jobId = appUserJobComplaint.getJobId();
|
||||
// 校验重复投诉
|
||||
if (checkUserHasComplaint(userId, jobId)) {
|
||||
throw new ServiceException("您已投诉过该岗位,请勿重复提交");
|
||||
}
|
||||
return appUserJobComplaintMapper.insert(appUserJobComplaint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateAppUserJobComplaint(AppUserJobComplaint appUserJobComplaint) {
|
||||
return appUserJobComplaintMapper.updateById(appUserJobComplaint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteAppUserJobComplaintByIds(Long[] ids) {
|
||||
return appUserJobComplaintMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户是否已经投诉该岗位
|
||||
*/
|
||||
@Override
|
||||
public boolean checkUserHasComplaint(Long userId, Long jobId) {
|
||||
if (userId == null || jobId == null) {
|
||||
return false;
|
||||
}
|
||||
AppUserJobComplaint exist = appUserJobComplaintMapper.selectExistComplaint(userId, jobId);
|
||||
return exist != null;
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,11 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.cms.util.http.HttpClientUtils;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.domain.entity.MyChart;
|
||||
import com.ruoyi.common.core.domain.entity.File;
|
||||
import com.ruoyi.cms.domain.vo.AppSkillVo;
|
||||
@@ -15,11 +18,13 @@ import com.ruoyi.common.core.domain.entity.*;
|
||||
import com.ruoyi.cms.domain.vo.AppUserLky;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.domain.model.RegisterBody;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cms.service.IAppUserService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -47,6 +52,14 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
private CompanyMapper companyMapper;
|
||||
@Autowired
|
||||
private FileMapper fileMapper;
|
||||
@Autowired
|
||||
private HttpClientUtils httpClientUtils;
|
||||
|
||||
//互联网修改个人信息
|
||||
@Value("${lc_web_auth.editUserInfoUrl}")
|
||||
String WEB_UPDATE_USER_INFO;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
/**
|
||||
* 查询APP用户
|
||||
@@ -632,4 +645,31 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int editUserSafety(AppUser appUser) {
|
||||
appUserMapper.updateById(appUser);
|
||||
String lcUserToken=redisCache.getCacheObject(CacheConstants.LC_HLW_TOKEN+appUser.getUserId());
|
||||
if(StringUtils.isBlank(lcUserToken)){
|
||||
throw new RuntimeException("token已失效");
|
||||
}
|
||||
//修改门户个人信息
|
||||
JSONObject pJson = new JSONObject();
|
||||
if (StringUtils.isNotBlank(appUser.getEmail())) {
|
||||
pJson.put("personEmail", appUser.getEmail());
|
||||
}
|
||||
if (StringUtils.isNotBlank(appUser.getPhone())) {
|
||||
pJson.put("personPhone", appUser.getPhone());
|
||||
}
|
||||
if (StringUtils.isNotBlank(appUser.getPassword())) {
|
||||
pJson.put("password", appUser.getPassword());
|
||||
}
|
||||
String result=httpClientUtils.sendHttpPost(WEB_UPDATE_USER_INFO,lcUserToken,pJson.toJSONString());
|
||||
if (StringUtils.isBlank(result)) {
|
||||
throw new RuntimeException("调用门户修改用户信息接口响应为空");
|
||||
}
|
||||
JSONObject json = JSONObject.parseObject(result);
|
||||
System.out.println("门户修改个人信息返回:"+json);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.ruoyi.cms.domain.query.CompanySearch;
|
||||
import com.ruoyi.cms.domain.query.JobSearch;
|
||||
import com.ruoyi.cms.domain.query.LabelQuery;
|
||||
import com.ruoyi.cms.mapper.*;
|
||||
import com.ruoyi.cms.service.IESJobSearchService;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.entity.Company;
|
||||
import com.ruoyi.common.core.domain.entity.CompanyContact;
|
||||
@@ -53,6 +54,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
private CompanyLabelMapper companyLabelMapper;
|
||||
@Autowired
|
||||
private CompanyContactMapper companyContactMapper;
|
||||
@Autowired
|
||||
private IESJobSearchService iesJobSearchService;
|
||||
/**
|
||||
* 查询公司
|
||||
*
|
||||
@@ -338,4 +341,50 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
public List<Company> selectLikeCompanyList(Company company) {
|
||||
return companyMapper.selectLikeCompanyList(company);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int companyDown(Long companyId) {
|
||||
//更新企业状态
|
||||
Company company=new Company();
|
||||
company.setCompanyId(companyId);
|
||||
company.setCompanyStatus("1");
|
||||
int i=companyMapper.updateStatus(company);
|
||||
//批量下架所有岗位
|
||||
jobMapper.updateBatchDownStatus(companyId);
|
||||
//查询企业下所有岗位
|
||||
JobSearch parJob=new JobSearch();
|
||||
parJob.setCompanyId(company.getCompanyId());
|
||||
List<Job> jobs=jobMapper.selectJobList(parJob);
|
||||
//批量刷新es
|
||||
if (jobs != null && !jobs.isEmpty()) {
|
||||
List<Long> jobIdList = jobs.stream()
|
||||
.map(Job::getJobId)
|
||||
.collect(Collectors.toList());
|
||||
iesJobSearchService.batchUpdateJob(jobIdList);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int companyUp(Long companyId) {
|
||||
//更新企业状态
|
||||
Company company=new Company();
|
||||
company.setCompanyId(companyId);
|
||||
company.setCompanyStatus("0");
|
||||
int i=companyMapper.updateStatus(company);
|
||||
//批量上架所有岗位
|
||||
jobMapper.updateBatchUpStatus(companyId);
|
||||
//查询企业下所有岗位
|
||||
JobSearch parJob=new JobSearch();
|
||||
parJob.setCompanyId(company.getCompanyId());
|
||||
List<Job> jobs=jobMapper.selectJobList(parJob);
|
||||
//批量刷新es
|
||||
if (jobs != null && !jobs.isEmpty()) {
|
||||
List<Long> jobIdList = jobs.stream()
|
||||
.map(Job::getJobId)
|
||||
.collect(Collectors.toList());
|
||||
iesJobSearchService.batchUpdateJob(jobIdList);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.cms.service.impl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.cms.domain.vo.CompanyVo;
|
||||
import com.ruoyi.cms.mapper.AppUserBlockCompanyMapper;
|
||||
import com.ruoyi.cms.mapper.CompanyMapper;
|
||||
import com.ruoyi.cms.service.ICompanyService;
|
||||
import com.ruoyi.common.core.domain.entity.AppUser;
|
||||
import com.ruoyi.cms.domain.ESJobDocument;
|
||||
@@ -75,6 +76,9 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
@Autowired
|
||||
private JobTitleMapper jobTitleMapper;
|
||||
Logger logger = LoggerFactory.getLogger(JobServiceImpl.class);
|
||||
@Autowired
|
||||
private CompanyMapper companyMapper;
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化索引及数据
|
||||
*/
|
||||
@@ -919,7 +923,7 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
|
||||
BeanUtils.copyBeanProp(esJobDocument, job);
|
||||
esJobDocument.setJobCategory(resolveJobCategoryLabel(job.getJobCategory()));
|
||||
esJobDocument.setAppJobUrl("https://www.xjksly.cn/app#/packageA/pages/post/post?jobId="+ Base64.getEncoder().encodeToString(String.valueOf(job.getJobId()).getBytes()));
|
||||
esJobDocument.setAppJobUrl("https://xjshzly.longbiosphere.com/app#/packageA/pages/post/post?jobId="+ Base64.getEncoder().encodeToString(String.valueOf(job.getJobId()).getBytes()));
|
||||
if(!StringUtil.isEmptyOrNull(job.getScale())){
|
||||
esJobDocument.setScale(Integer.valueOf(job.getScale()));
|
||||
}else {
|
||||
@@ -941,7 +945,7 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
esJobDocument.setLatAndLon(esJobDocument.getLatitude().toString() + "," + esJobDocument.getLongitude().toString());
|
||||
}
|
||||
if(StringUtil.isEmptyOrNull(job.getCompanyNature())){
|
||||
esJobDocument.setCompanyNature("6");
|
||||
esJobDocument.setCompanyNature("4");
|
||||
}
|
||||
ensureJobDocumentIndexExists();
|
||||
|
||||
@@ -1127,4 +1131,129 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
}
|
||||
return jobCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据岗位id批量更新es
|
||||
* @param jobIdList
|
||||
*/
|
||||
@Override
|
||||
public void batchUpdateJob(List<Long> jobIdList) {
|
||||
if (jobIdList == null || jobIdList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
//索引初始化
|
||||
ensureJobDocumentIndexExists();
|
||||
//查询所有岗位数据
|
||||
List<Job> allJobList = jobMapper.selectBatchIds(jobIdList);
|
||||
if (allJobList == null || allJobList.isEmpty()) {
|
||||
LambdaEsQueryWrapper<ESJobDocument> delWrapper = new LambdaEsQueryWrapper<>();
|
||||
delWrapper.in(ESJobDocument::getJobId, jobIdList);
|
||||
esJobDocumentMapper.delete(delWrapper);
|
||||
return;
|
||||
}
|
||||
//查询所有企业数据
|
||||
List<Long> companyIdList = allJobList.stream()
|
||||
.map(Job::getCompanyId)
|
||||
.filter(id -> id != null)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<Company> companyList = new ArrayList<>();
|
||||
if (!companyIdList.isEmpty()) {
|
||||
companyList = companyMapper.selectBatchIds(companyIdList);
|
||||
}
|
||||
Map<Long, Company> companyMap = companyList.stream()
|
||||
.collect(Collectors.toMap(Company::getCompanyId, c -> c));
|
||||
|
||||
// 批量转换ES
|
||||
List<ESJobDocument> esDocList = allJobList.stream()
|
||||
.map(job -> convertToEsDoc(job, companyMap))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
try {
|
||||
// 批量删除旧索引
|
||||
LambdaEsQueryWrapper<ESJobDocument> delWrapper = new LambdaEsQueryWrapper<>();
|
||||
delWrapper.in(ESJobDocument::getJobId, jobIdList);
|
||||
esJobDocumentMapper.delete(delWrapper);
|
||||
// 批量插入新索引
|
||||
esJobDocumentMapper.insertBatch(esDocList);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("ES批量更新失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Job 转 ESJobDocument 抽取单独方法
|
||||
*/
|
||||
private ESJobDocument convertToEsDoc(Job job, Map<Long, Company> companyMap) {
|
||||
ESJobDocument esDoc = new ESJobDocument();
|
||||
BeanUtils.copyBeanProp(esDoc, job);
|
||||
// 企业编码赋值
|
||||
if (job.getCompanyId() != null) {
|
||||
Company company = companyMap.get(job.getCompanyId());
|
||||
if (company != null) {
|
||||
esDoc.setCode(company.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
esDoc.setJobCategory(resolveJobCategoryLabel(job.getJobCategory()));
|
||||
esDoc.setAppJobUrl("https://www.xjksly.cn/app#/packageA/pages/post/post?jobId="+ job.getJobId());
|
||||
esDoc.setScale(parseIntDefaultZero(job.getScale()));
|
||||
//工作经验
|
||||
if (StringUtil.isEmptyOrNull(job.getExperience())) {
|
||||
esDoc.setExperience("0");
|
||||
esDoc.setExperience_int(0);
|
||||
} else {
|
||||
Integer expInt = parseIntDefaultZero(job.getExperience());
|
||||
esDoc.setExperience_int(expInt);
|
||||
}
|
||||
|
||||
// 学历字段统一处理
|
||||
if (StringUtil.isEmptyOrNull(job.getEducation())) {
|
||||
esDoc.setEducation("-1");
|
||||
esDoc.setEducation_int(-1);
|
||||
} else {
|
||||
Integer eduInt = parseIntDefaultMinusOne(job.getEducation());
|
||||
esDoc.setEducation_int(eduInt);
|
||||
}
|
||||
|
||||
// 经纬度拼接
|
||||
if (esDoc.getLatitude() != null && esDoc.getLongitude() != null) {
|
||||
esDoc.setLatAndLon(esDoc.getLatitude() + "," + esDoc.getLongitude());
|
||||
}
|
||||
|
||||
// 企业行业默认值
|
||||
if (StringUtil.isEmptyOrNull(job.getCompanyNature())) {
|
||||
esDoc.setCompanyNature("4");
|
||||
}
|
||||
|
||||
return esDoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字符串转数字,空/非法返回0
|
||||
*/
|
||||
private Integer parseIntDefaultZero(String str) {
|
||||
if (StringUtil.isEmptyOrNull(str)) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
return Integer.valueOf(str);
|
||||
} catch (NumberFormatException e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 字符串转数字,空/非法返回-1
|
||||
*/
|
||||
private Integer parseIntDefaultMinusOne(String str) {
|
||||
if (StringUtil.isEmptyOrNull(str)) {
|
||||
return -1;
|
||||
}
|
||||
try {
|
||||
return Integer.valueOf(str);
|
||||
} catch (NumberFormatException e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.dromara.easyes.core.biz.EsPageInfo;
|
||||
import org.slf4j.Logger;
|
||||
@@ -1305,4 +1304,28 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
//刷新es
|
||||
iesJobSearchService.resetTextCache();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public int jobDown(Long jobId) {
|
||||
Job job=new Job();
|
||||
job.setJobId(jobId);
|
||||
job.setJobStatus("1");
|
||||
int i=jobMapper.updateStatus(job);
|
||||
//刷新单条数据
|
||||
iesJobSearchService.updateJob(jobId);
|
||||
return i;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public int jobUp(Long jobId) {
|
||||
Job job=new Job();
|
||||
job.setJobId(jobId);
|
||||
job.setJobStatus("0");
|
||||
//刷新单条数据
|
||||
int i=jobMapper.updateStatus(job);
|
||||
iesJobSearchService.updateJob(jobId);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.cms.util.http;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class HttpClientUtils {
|
||||
|
||||
/**
|
||||
* @param url
|
||||
* @param token
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public String sendHttpPost(String url,String token, String params) {
|
||||
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
if (StringUtils.isNotEmpty(token)) {
|
||||
httpPost.setHeader("Authorization", "Bearer " + token);
|
||||
}
|
||||
httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");
|
||||
httpPost.setEntity(new StringEntity(params, "UTF-8"));
|
||||
// 响应自动关闭,无需手动close
|
||||
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
||||
if (response.getEntity() == null) {
|
||||
return "";
|
||||
}
|
||||
String result = EntityUtils.toString(response.getEntity(), "UTF-8");
|
||||
// 释放连接
|
||||
EntityUtils.consume(response.getEntity());
|
||||
return result;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("调用外部接口异常:" + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ruoyi.cms.mapper.AppUserJobComplaintMapper">
|
||||
<resultMap type="AppUserJobComplaint" id="AppUserJobComplaintResult">
|
||||
<id column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="job_id" property="jobId"/>
|
||||
<result column="complaint_type" property="complaintType"/>
|
||||
<result column="complaint_content" property="complaintContent"/>
|
||||
<result column="evidence_url" property="evidenceUrl"/>
|
||||
<result column="contact_phone" property="contactPhone"/>
|
||||
<result column="complaint_status" property="complaintStatus"/>
|
||||
<result column="handle_user_id" property="handleUserId"/>
|
||||
<result column="handle_content" property="handleContent"/>
|
||||
<result column="handle_time" property="handleTime"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
<result column="create_by" property="createBy"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_by" property="updateBy"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppUserJobComplaintVo">
|
||||
select id, user_id, job_id, complaint_type, complaint_content, evidence_url, contact_phone,
|
||||
complaint_status, handle_user_id, handle_content, handle_time, del_flag,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from app_user_job_complaint
|
||||
</sql>
|
||||
|
||||
<select id="selectAppUserJobComplaintList" resultMap="AppUserJobComplaintResult">
|
||||
<include refid="selectAppUserJobComplaintVo"/>
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="jobId != null">
|
||||
and job_id = #{jobId}
|
||||
</if>
|
||||
<if test="complaintType != null">
|
||||
and complaint_type = #{complaintType}
|
||||
</if>
|
||||
<if test="complaintStatus != null">
|
||||
and 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 >= #{params.beginTime}
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''">
|
||||
and create_time <= #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectAppUserJobComplaintById" resultMap="AppUserJobComplaintResult">
|
||||
<include refid="selectAppUserJobComplaintVo"/>
|
||||
where id = #{id} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectExistComplaint" resultMap="AppUserJobComplaintResult">
|
||||
<include refid="selectAppUserJobComplaintVo"/>
|
||||
where user_id = #{userId} and job_id = #{jobId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="legalPerson" column="legal_person" />
|
||||
<result property="legalIdCard" column="legal_id_card" />
|
||||
<result property="legalPhone" column="legal_phone" />
|
||||
<result property="companyStatus" column="company_status" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
@@ -166,4 +167,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select a.* from COMPANY a inner join job b on a.company_id=b.company_id and b.job_id=#{jobId} limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateStatus" parameterType="Company">
|
||||
update COMPANY set company_status=#{companyStatus},update_time=#{updateTime},update_by=#{updateBy} where company_id=#{companyId} and del_flag='0'
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
<result property="code" column="code" />
|
||||
<result property="jobAddress" column="job_address" />
|
||||
<result property="reviewStatus" column="review_status" />
|
||||
<result property="jobStatus" column="job_status" />
|
||||
|
||||
<association property="companyVo" resultMap="CompanyResult"/>
|
||||
<association property="jobContactList" resultMap="JomContactResult"/>
|
||||
@@ -137,7 +138,7 @@
|
||||
job_title, min_salary, max_salary, education, experience, company_name, job_location,
|
||||
job_location_area_code, posting_date, vacancies, latitude, longitude, "view", company_id,
|
||||
is_hot, is_urgent, apply_num, description, is_publish, data_source, job_url, remark, del_flag,
|
||||
create_by, create_time, row_id, job_category,job_type,job_address
|
||||
create_by, create_time, row_id, job_category,job_type,job_address,job_status
|
||||
) VALUES
|
||||
<foreach collection="list" item="job" separator=",">
|
||||
(
|
||||
@@ -146,7 +147,7 @@
|
||||
#{job.vacancies}, #{job.latitude}, #{job.longitude}, #{job.view}, #{job.companyId},
|
||||
#{job.isHot}, #{job.isUrgent}, #{job.applyNum}, #{job.description}, #{job.isPublish}, #{job.dataSource},
|
||||
#{job.jobUrl}, #{job.remark}, #{job.delFlag}, #{job.createBy}, #{job.createTime},
|
||||
#{job.rowId}, #{job.jobCategory},#{job.jobType},#{job.jobAddress}
|
||||
#{job.rowId}, #{job.jobCategory},#{job.jobType},#{job.jobAddress},#{job.jobStatus}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
@@ -206,6 +207,7 @@
|
||||
<if test="isHot != null "> and is_hot = #{isHot}</if>
|
||||
<if test="applyNum != null "> and apply_num = #{applyNum}</if>
|
||||
<if test="code != null "> and company_id in(select company_id from company where code=#{code})</if>
|
||||
<if test="jobStatus != null "> and job_status = #{jobStatus}</if>
|
||||
<if test="compensation!=null ">
|
||||
<if test="compensation==0 ">
|
||||
and min_salary < 1750
|
||||
@@ -254,6 +256,7 @@
|
||||
<if test="isHot != null "> and is_hot = #{isHot}</if>
|
||||
<if test="applyNum != null "> and apply_num = #{applyNum}</if>
|
||||
<if test="isPublish != null "> and is_publish = #{isPublish}</if>
|
||||
<if test="jobStatus != null "> and job_status = #{jobStatus}</if>
|
||||
<if test="countyIds!=null and countyIds.size!=0">
|
||||
and job_location_area_code in <foreach collection="countyIds" index="item" close=")" open="(">
|
||||
#{item}
|
||||
@@ -292,10 +295,10 @@
|
||||
</select>
|
||||
<select id="selectAllJob" resultMap="JobEsResult">
|
||||
SELECT j.*,c.industry,c.scale,c.nature as company_nature,c.code,c.description as company_description,c.name,c.company_id,t.contact_person,t.contact_person_phone,jc.contact_person as job_contact_person,jc.contact_person_phone as job_contact_person_phone FROM job as j
|
||||
left join company as c on c.company_id = j.company_id and j.del_flag='0' and c.del_flag='0'
|
||||
left join company as c on c.company_id = j.company_id and j.del_flag='0' and c.del_flag='0' and c.company_status='0'
|
||||
LEFT JOIN (SELECT t1.*, ROW_NUMBER() OVER (PARTITION BY t1.company_id ORDER BY t1.id) AS rn FROM company_contact AS t1 WHERE t1.del_flag = '0' ) AS t ON t.company_id = j.company_id AND t.rn = 1
|
||||
LEFT JOIN (SELECT jc1.*, ROW_NUMBER() OVER(PARTITION BY jc1.job_id ORDER BY jc1.id) rn FROM job_contact jc1 WHERE jc1.del_flag='0') jc ON jc.job_id = j.job_id AND jc.rn=1
|
||||
WHERE j.del_flag = '0' limit #{offset},#{batchSize}
|
||||
WHERE j.del_flag = '0' and job_status='0' limit #{offset},#{batchSize}
|
||||
</select>
|
||||
<select id="selectAllInsertRowWork" resultType="com.ruoyi.cms.domain.RowWork">
|
||||
select Id, TaskId, TaskName, Std_class, SF, ZCMC, Aca112, Acb22a, Aac011, Acb240,
|
||||
@@ -420,4 +423,17 @@
|
||||
ORDER BY match_level ASC, login_date DESC
|
||||
LIMIT (SELECT vacancies FROM shz.job WHERE job_id = #{jobId})
|
||||
</select>
|
||||
|
||||
<update id="updateStatus" parameterType="Job">
|
||||
update job set job_status=#{jobStatus},update_time=#{updateTime},update_by=#{updateBy} where job_id=#{jobId} and del_flag='0'
|
||||
</update>
|
||||
|
||||
<update id="updateBatchDownStatus">
|
||||
update job set job_status='1', update_time = NOW() where del_flag='0' and company_id=#{companyId} and job_status='0'
|
||||
</update>
|
||||
|
||||
<update id="updateBatchUpStatus">
|
||||
update job set job_status='0', update_time = NOW() where del_flag='0' and company_id=#{companyId} and job_status='1'
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -49,4 +49,9 @@ public class CacheConstants
|
||||
*pc岗位ids
|
||||
*/
|
||||
public static final String SYS_JOB_IDS = "job_ids:";
|
||||
|
||||
/**
|
||||
* 浪潮互联网token
|
||||
*/
|
||||
public static final String LC_HLW_TOKEN ="lc_hlw_token:";
|
||||
}
|
||||
|
||||
@@ -124,6 +124,9 @@ public class Company extends BaseEntity
|
||||
@ApiModelProperty("法人联系方式")
|
||||
private String legalPhone;
|
||||
|
||||
@ApiModelProperty("是否下架(0上架,1下架)")
|
||||
private String companyStatus;
|
||||
|
||||
/**
|
||||
* 岗位列表
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.cms.service.ICompanyService;
|
||||
import com.ruoyi.cms.service.impl.AppUserServiceImpl;
|
||||
import com.ruoyi.cms.util.StringUtil;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.entity.AppUser;
|
||||
import com.ruoyi.common.core.domain.entity.Company;
|
||||
@@ -43,6 +44,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
@@ -271,6 +273,8 @@ public class SsoService {
|
||||
|
||||
//用户存在,生成本系统用户的token
|
||||
String token = loginSysUser(sysUser, userJson.getString("userName"));
|
||||
//缓存浪潮互联网token
|
||||
redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+appUser.getUserId(),lcToken, 6, TimeUnit.HOURS);
|
||||
JSONObject backJson = new JSONObject();
|
||||
backJson.put("token", token);
|
||||
backJson.put("lcToken", lcToken);
|
||||
@@ -355,6 +359,7 @@ public class SsoService {
|
||||
|
||||
//用户存在,生成本系统用户的token
|
||||
String token = loginSysUser(sysUser, userJson.getString("userName"));
|
||||
redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+appUserId,lcToken, 6, TimeUnit.HOURS);
|
||||
JSONObject backJson = new JSONObject();
|
||||
backJson.put("token", token);
|
||||
backJson.put("lcToken", lcToken);
|
||||
|
||||
Reference in New Issue
Block a user