Compare commits
8 Commits
6680622a85
...
main
Author | SHA1 | Date | |
---|---|---|---|
8c5ec3e0b3 | |||
c795e63e96 | |||
9281eb700b | |||
8cf753ad54 | |||
65487c073f | |||
4c28d07bc3 | |||
a6d43c0bca | |||
070239d1d5 |
@@ -12,6 +12,7 @@ import com.ruoyi.common.annotation.BussinessLog;
|
||||
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.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@@ -133,4 +134,14 @@ public class AppCompanyController extends BaseController
|
||||
Company status = companyService.registerStatus();
|
||||
return AjaxResult.success(status);
|
||||
}
|
||||
|
||||
@GetMapping("/queryCodeCompany")
|
||||
@ApiOperation("根据社会信用代码查询企业")
|
||||
public AjaxResult queryCodeCompany(@RequestParam("code") String code)
|
||||
{
|
||||
if (!StringUtils.hasText(code)) {
|
||||
return AjaxResult.error("社会信用代码不能为空");
|
||||
}
|
||||
return AjaxResult.success(companyService.queryCodeCompany(code));
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ import com.ruoyi.cms.domain.query.ESJobSearch;
|
||||
import com.ruoyi.cms.service.IESJobSearchService;
|
||||
import com.ruoyi.cms.service.IJobCollectionService;
|
||||
import com.ruoyi.cms.service.IJobService;
|
||||
import com.ruoyi.cms.util.sensitiveWord.SensitiveWordChecker;
|
||||
import com.ruoyi.common.annotation.BussinessLog;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -13,6 +14,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.dromara.easyes.core.biz.EsPageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -36,6 +38,8 @@ public class AppJobController extends BaseController
|
||||
private IJobCollectionService jobCollectionService;
|
||||
@Autowired
|
||||
private IESJobSearchService esJobSearchService;
|
||||
@Autowired
|
||||
private SensitiveWordChecker sensitiveWordChecker;
|
||||
|
||||
/**
|
||||
* 查询岗位列表
|
||||
@@ -192,7 +196,25 @@ public class AppJobController extends BaseController
|
||||
@PostMapping("/publishJob")
|
||||
public AjaxResult fix(@RequestBody Job job)
|
||||
{
|
||||
// 校验描述中的敏感词
|
||||
List<String> sensitiveWords = sensitiveWordChecker.checkSensitiveWords(job.getDescription());
|
||||
if (!sensitiveWords.isEmpty()) {
|
||||
String errorMsg = "描述中包含敏感词:" + String.join("、", sensitiveWords);
|
||||
return AjaxResult.error(errorMsg);
|
||||
}
|
||||
jobService.publishJob(job);
|
||||
return success();
|
||||
}
|
||||
|
||||
@GetMapping("/jobCompare")
|
||||
@ApiOperation("根据多个岗位id查询岗位详情")
|
||||
public AjaxResult jobCompare(@ApiParam("岗位ID数组") @RequestParam("jobIds") Long[] jobIds) {
|
||||
if (ArrayUtils.isEmpty(jobIds)) {
|
||||
return AjaxResult.error("请传递岗位ID参数(jobIds),多个ID用&分隔");
|
||||
}
|
||||
if (jobIds.length > 5) {
|
||||
return AjaxResult.error("最多支持对比5个岗位,请减少参数数量");
|
||||
}
|
||||
return success(esJobSearchService.selectByIds(jobIds));
|
||||
}
|
||||
}
|
||||
|
@@ -169,4 +169,8 @@ public class Job extends BaseEntity
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("岗位联系人列表")
|
||||
private List<JobContact> jobContactList;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("附件列表")
|
||||
private List<File> filesList;
|
||||
}
|
||||
|
@@ -75,4 +75,6 @@ public interface ICompanyService
|
||||
List<Company> approvalList(Company company);
|
||||
|
||||
Company approval(Company company);
|
||||
|
||||
Company queryCodeCompany(String code);
|
||||
}
|
||||
|
@@ -67,4 +67,6 @@ public interface IESJobSearchService
|
||||
void updateJob(Long jobId);
|
||||
|
||||
void deleteJob(Long jobId);
|
||||
|
||||
List<ESJobDocument> selectByIds(Long[] jobIds);
|
||||
}
|
||||
|
@@ -296,4 +296,9 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
return company1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Company queryCodeCompany(String code) {
|
||||
Company companyResult = companyMapper.selectOne(Wrappers.<Company>lambdaQuery().eq(Company::getCode, code).orderByDesc(Company::getUpdateTime).last("LIMIT 1"));
|
||||
return companyResult;
|
||||
}
|
||||
}
|
||||
|
@@ -553,4 +553,10 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
esJobDocumentMapper.delete(lambdaEsQueryWrapper);
|
||||
esJobDocumentMapper.insert(esJobDocument);
|
||||
}
|
||||
|
||||
public List<ESJobDocument> selectByIds(Long[] jobIds) {
|
||||
LambdaEsQueryWrapper<ESJobDocument> wrapper = new LambdaEsQueryWrapper<>();
|
||||
wrapper.in(ESJobDocument::getJobId,jobIds);
|
||||
return esJobDocumentMapper.selectList(wrapper);
|
||||
}
|
||||
}
|
||||
|
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.ruoyi.cms.domain.*;
|
||||
import com.ruoyi.cms.domain.File;
|
||||
import com.ruoyi.cms.domain.query.ESJobSearch;
|
||||
import com.ruoyi.cms.domain.vo.CandidateVO;
|
||||
import com.ruoyi.cms.mapper.*;
|
||||
@@ -75,6 +76,8 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private JobContactMapper jobContactMapper;
|
||||
@Autowired
|
||||
private FileMapper fileMapper;
|
||||
|
||||
/**
|
||||
* 更新工作地址的经纬度信息
|
||||
@@ -206,6 +209,14 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
if(contacts!=null){
|
||||
job.setJobContactList(contacts);
|
||||
}
|
||||
//查询附件
|
||||
File file=new File();
|
||||
file.setBussinessId(jobId);
|
||||
List<File> filesList=fileMapper.selectFileList(file);
|
||||
if(filesList!=null){
|
||||
job.setFilesList(filesList);
|
||||
}
|
||||
|
||||
return job;
|
||||
}
|
||||
|
||||
|
@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectByOpenid" resultType="com.ruoyi.common.core.domain.entity.AppUser">
|
||||
SELECT * FROM app_user WHERE DEL_FLAG = '0' and openid=#{openid} LIMIT 1
|
||||
<include refid="selectAppUserVo"/> WHERE DEL_FLAG = '0' and openid=#{openid} LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insertSysUserRole" parameterType="java.util.Map">
|
||||
|
@@ -31,10 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="notPassReason" column="not_pass_reason" />
|
||||
<result property="registeredAddress" column="registered_address" />
|
||||
<result property="isAbnormal" column="is_abnormal" />
|
||||
<result property="enterpriseType" column="enterprise_type" />
|
||||
<result property="isImpCompany" column="is_imp_company" />
|
||||
<result property="impCompanyType" column="imp_company_type" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCompanyVo">
|
||||
select company_id, name, location, industry, scale, del_flag, create_by, create_time, update_by, update_time, remark,code,description,nature,total_recruitment,registered_address,contact_person,contact_person_phone,is_abnormal,not_pass_reason,status,case when status='2' then update_time else null end reject_time from company
|
||||
select company_id, name, location, industry, scale, del_flag, create_by, create_time, update_by, update_time, remark,code,description,nature,total_recruitment,registered_address,contact_person,contact_person_phone,is_abnormal,not_pass_reason,status,case when status='2' then update_time else null end reject_time,is_imp_company,imp_company_type,enterprise_type from company
|
||||
</sql>
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO company (
|
||||
|
@@ -111,4 +111,7 @@ public class Company extends BaseEntity
|
||||
|
||||
@ApiModelProperty("本地重点发展产业")
|
||||
private String impCompanyType;
|
||||
|
||||
@ApiModelProperty("企业类型 0普通 1就业见习基地")
|
||||
private String enterpriseType;
|
||||
}
|
||||
|
@@ -259,7 +259,8 @@ public class SysLoginService
|
||||
String token = loginUserIdApp(existingUser);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("isNewUser", false);
|
||||
ajax.put("code", existingUser.getIdCard());
|
||||
ajax.put("idCard",existingUser.getIdCard());
|
||||
ajax.put("isCompanyUser",existingUser.getIsCompanyUser());
|
||||
return ajax;
|
||||
}else {
|
||||
JSONObject phoneInfo = wechatUtil.decryptPhoneNumber(dto.getEncryptedData(), sessionKey, dto.getIv());
|
||||
@@ -270,22 +271,29 @@ public class SysLoginService
|
||||
|
||||
// 3. 检查手机号是否已被绑定
|
||||
AppUser existUser = appUserService.getPhone(phone);
|
||||
String token="";
|
||||
boolean isNewUser=false;
|
||||
if (existUser != null) {
|
||||
return AjaxResult.error("该手机号已注册");
|
||||
existUser.setOpenid(openid);
|
||||
appUserService.updateAppUser(existUser);
|
||||
// 5. 生成系统令牌
|
||||
token = loginUserIdApp(existUser);
|
||||
ajax.put("idCard",existUser.getIdCard());
|
||||
ajax.put("isCompanyUser",existUser.getIsCompanyUser());
|
||||
}else{
|
||||
// 4. 创建用户并存储所有信息
|
||||
AppUser appUser = new AppUser();
|
||||
appUser.setOpenid(openid);
|
||||
appUser.setUnionid(unionid);
|
||||
appUser.setPhone(phone);
|
||||
appUser.setIsCompanyUser(dto.getUserType());//保存角色
|
||||
appUserService.insertAppUser(appUser);
|
||||
// 5. 生成系统令牌
|
||||
token = loginUserIdApp(appUser);
|
||||
isNewUser=true;
|
||||
}
|
||||
|
||||
// 4. 创建用户并存储所有信息
|
||||
AppUser appUser = new AppUser();
|
||||
appUser.setOpenid(openid);
|
||||
appUser.setUnionid(unionid);
|
||||
appUser.setPhone(phone);
|
||||
appUser.setIsCompanyUser(dto.getUserType());//保存角色
|
||||
appUserService.insertAppUser(appUser);
|
||||
|
||||
// 5. 生成系统令牌
|
||||
String token = loginUserIdApp(appUser);
|
||||
ajax.put("isNewUser", isNewUser);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("isNewUser", true);
|
||||
return ajax;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user