新增 用户首选工作设置
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
package com.vetti.hotake.domain;
|
||||
|
||||
import com.vetti.common.annotation.Excel;
|
||||
import com.vetti.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 用户首选工作设置对象 hotake_settings_job
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-02
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeSettingsJob extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 过滤器名称 */
|
||||
@ApiModelProperty("过滤器名称")
|
||||
@Excel(name = "过滤器名称")
|
||||
private String name;
|
||||
|
||||
/** 地点 */
|
||||
@ApiModelProperty("地点")
|
||||
@Excel(name = "地点")
|
||||
private String location;
|
||||
|
||||
/** 纬度 */
|
||||
@ApiModelProperty("纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
/** 经度 */
|
||||
@ApiModelProperty("经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
/** 薪资范围(如"80K") */
|
||||
@ApiModelProperty("薪资范围")
|
||||
@Excel(name = "薪资范围")
|
||||
private String salary;
|
||||
|
||||
/** 标签数组({"dict_type":["dict_value","dict_value"]}) */
|
||||
@ApiModelProperty("标签数组")
|
||||
private String tagsJson;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.vetti.hotake.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户首选工作设置字典对照DTO
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-02
|
||||
*/
|
||||
@Data
|
||||
public class HotakeSettingsJobDictDto
|
||||
{
|
||||
@ApiModelProperty("语言类型")
|
||||
private List<DictItem> hotakeLanguagesType;
|
||||
|
||||
@ApiModelProperty("技能工具类型")
|
||||
private List<DictItem> hotakeSkillsToolType;
|
||||
|
||||
@ApiModelProperty("岗位级别")
|
||||
private List<DictItem> roleLevel;
|
||||
|
||||
@ApiModelProperty("岗位地点类型")
|
||||
private List<DictItem> roleLocationType;
|
||||
|
||||
@ApiModelProperty("岗位选择工作类型")
|
||||
private List<DictItem> roleSelectJobType;
|
||||
|
||||
@ApiModelProperty("岗位类型")
|
||||
private List<DictItem> roleType;
|
||||
|
||||
@ApiModelProperty("所需技能")
|
||||
private List<DictItem> roleRequiredSkills;
|
||||
|
||||
@ApiModelProperty("拥有的好技能")
|
||||
private List<DictItem> roleNiceToHaveSkills;
|
||||
|
||||
@ApiModelProperty("教育要求类型")
|
||||
private List<DictItem> roleEducationRequirementsType;
|
||||
|
||||
@ApiModelProperty("岗位所需证书")
|
||||
private List<DictItem> roleCertificationLicenses;
|
||||
|
||||
@ApiModelProperty("岗位福利")
|
||||
private List<DictItem> roleBenefits;
|
||||
|
||||
@ApiModelProperty("发布渠道")
|
||||
private List<DictItem> rolePublishingChannels;
|
||||
|
||||
@ApiModelProperty("初步筛选问题类型")
|
||||
private List<DictItem> roleInitialScreeningQuestionsType;
|
||||
|
||||
@ApiModelProperty("预期薪酬范围")
|
||||
private List<DictItem> expectedPayRange;
|
||||
|
||||
@ApiModelProperty("愿意经常出差")
|
||||
private List<DictItem> willingnessToTravel;
|
||||
|
||||
@Data
|
||||
public static class DictItem
|
||||
{
|
||||
@ApiModelProperty("字典编码")
|
||||
private Long dictCode;
|
||||
|
||||
@ApiModelProperty("字典标签")
|
||||
private String dictLabel;
|
||||
|
||||
@ApiModelProperty("字典键值")
|
||||
private String dictValue;
|
||||
|
||||
@ApiModelProperty("字典类型")
|
||||
private String dictType;
|
||||
|
||||
@ApiModelProperty("样式属性")
|
||||
private String cssClass;
|
||||
|
||||
@ApiModelProperty("表格字典样式")
|
||||
private String listClass;
|
||||
|
||||
@ApiModelProperty("是否默认")
|
||||
private String isDefault;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("数据类型")
|
||||
private String dataType;
|
||||
|
||||
@ApiModelProperty("附件地址")
|
||||
private String fileUrl;
|
||||
|
||||
@ApiModelProperty("头像地址")
|
||||
private String avatarUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeSettingsJob;
|
||||
import com.vetti.hotake.domain.dto.HotakeSettingsJobDictDto;
|
||||
|
||||
/**
|
||||
* 用户首选工作设置Service接口
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-02
|
||||
*/
|
||||
public interface IHotakeSettingsJobService
|
||||
{
|
||||
/**
|
||||
* 查询用户首选工作设置
|
||||
*
|
||||
* @param id 用户首选工作设置主键
|
||||
* @return 用户首选工作设置
|
||||
*/
|
||||
public HotakeSettingsJob selectHotakeSettingsJobById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户首选工作设置列表
|
||||
*
|
||||
* @param hotakeSettingsJob 用户首选工作设置
|
||||
* @return 用户首选工作设置集合
|
||||
*/
|
||||
public List<HotakeSettingsJob> selectHotakeSettingsJobList(HotakeSettingsJob hotakeSettingsJob);
|
||||
|
||||
/**
|
||||
* 新增用户首选工作设置
|
||||
*
|
||||
* @param hotakeSettingsJob 用户首选工作设置
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeSettingsJob insertHotakeSettingsJob(HotakeSettingsJob hotakeSettingsJob);
|
||||
|
||||
/**
|
||||
* 修改用户首选工作设置
|
||||
*
|
||||
* @param hotakeSettingsJob 用户首选工作设置
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeSettingsJob updateHotakeSettingsJob(HotakeSettingsJob hotakeSettingsJob);
|
||||
|
||||
/**
|
||||
* 批量删除用户首选工作设置
|
||||
*
|
||||
* @param ids 需要删除的用户首选工作设置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeSettingsJobByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户首选工作设置信息
|
||||
*
|
||||
* @param id 用户首选工作设置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeSettingsJobById(Long id);
|
||||
|
||||
/**
|
||||
* 获取用户首选工作设置字典对照内容
|
||||
*
|
||||
* @return 字典对照内容
|
||||
*/
|
||||
public HotakeSettingsJobDictDto getDictData();
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.vetti.common.core.domain.entity.SysDictData;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.hotake.domain.HotakeSettingsJob;
|
||||
import com.vetti.hotake.domain.dto.HotakeSettingsJobDictDto;
|
||||
import com.vetti.hotake.mapper.HotakeSettingsJobMapper;
|
||||
import com.vetti.hotake.service.IHotakeSettingsJobService;
|
||||
import com.vetti.system.service.ISysDictTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户首选工作设置Service业务层处理
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-02
|
||||
*/
|
||||
@Service
|
||||
public class HotakeSettingsJobServiceImpl extends BaseServiceImpl implements IHotakeSettingsJobService {
|
||||
|
||||
@Autowired
|
||||
private HotakeSettingsJobMapper hotakeSettingsJobMapper;
|
||||
|
||||
@Autowired
|
||||
private ISysDictTypeService dictTypeService;
|
||||
|
||||
/**
|
||||
* 查询用户首选工作设置
|
||||
*
|
||||
* @param id 用户首选工作设置主键
|
||||
* @return 用户首选工作设置
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeSettingsJob selectHotakeSettingsJobById(Long id) {
|
||||
return hotakeSettingsJobMapper.selectHotakeSettingsJobById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户首选工作设置列表
|
||||
*
|
||||
* @param hotakeSettingsJob 用户首选工作设置
|
||||
* @return 用户首选工作设置
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<HotakeSettingsJob> selectHotakeSettingsJobList(HotakeSettingsJob hotakeSettingsJob) {
|
||||
return hotakeSettingsJobMapper.selectHotakeSettingsJobList(hotakeSettingsJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户首选工作设置
|
||||
*
|
||||
* @param hotakeSettingsJob 用户首选工作设置
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public HotakeSettingsJob insertHotakeSettingsJob(HotakeSettingsJob hotakeSettingsJob) {
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeSettingsJob);
|
||||
hotakeSettingsJobMapper.insertHotakeSettingsJob(hotakeSettingsJob);
|
||||
return hotakeSettingsJob;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户首选工作设置
|
||||
*
|
||||
* @param hotakeSettingsJob 用户首选工作设置
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public HotakeSettingsJob updateHotakeSettingsJob(HotakeSettingsJob hotakeSettingsJob) {
|
||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeSettingsJob);
|
||||
hotakeSettingsJobMapper.updateHotakeSettingsJob(hotakeSettingsJob);
|
||||
return hotakeSettingsJob;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户首选工作设置
|
||||
*
|
||||
* @param ids 需要删除的用户首选工作设置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeSettingsJobByIds(Long[] ids) {
|
||||
return hotakeSettingsJobMapper.deleteHotakeSettingsJobByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户首选工作设置信息
|
||||
*
|
||||
* @param id 用户首选工作设置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeSettingsJobById(Long id) {
|
||||
return hotakeSettingsJobMapper.deleteHotakeSettingsJobById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户首选工作设置字典对照内容
|
||||
*
|
||||
* @return 字典对照内容
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeSettingsJobDictDto getDictData() {
|
||||
HotakeSettingsJobDictDto dto = new HotakeSettingsJobDictDto();
|
||||
|
||||
dto.setHotakeLanguagesType(convertToDictItems(dictTypeService.selectDictDataByType("hotake_languages_type")));
|
||||
dto.setHotakeSkillsToolType(convertToDictItems(dictTypeService.selectDictDataByType("hotake_skills_tool_type")));
|
||||
dto.setRoleLevel(convertToDictItems(dictTypeService.selectDictDataByType("role_level")));
|
||||
dto.setRoleLocationType(convertToDictItems(dictTypeService.selectDictDataByType("role_location_type")));
|
||||
dto.setRoleSelectJobType(convertToDictItems(dictTypeService.selectDictDataByType("role_select_job_type")));
|
||||
dto.setRoleType(convertToDictItems(dictTypeService.selectDictDataByType("role_type")));
|
||||
dto.setRoleRequiredSkills(convertToDictItems(dictTypeService.selectDictDataByType("role_required_skills")));
|
||||
dto.setRoleNiceToHaveSkills(convertToDictItems(dictTypeService.selectDictDataByType("role_nice_to_have_skills")));
|
||||
dto.setRoleEducationRequirementsType(convertToDictItems(dictTypeService.selectDictDataByType("role_education_requirements_type")));
|
||||
dto.setRoleCertificationLicenses(convertToDictItems(dictTypeService.selectDictDataByType("role_certification_licenses")));
|
||||
dto.setRoleBenefits(convertToDictItems(dictTypeService.selectDictDataByType("role_benefits")));
|
||||
dto.setRolePublishingChannels(convertToDictItems(dictTypeService.selectDictDataByType("role_publishing_channels")));
|
||||
dto.setRoleInitialScreeningQuestionsType(convertToDictItems(dictTypeService.selectDictDataByType("role_initial_screening_questions_type")));
|
||||
dto.setExpectedPayRange(convertToDictItems(dictTypeService.selectDictDataByType("expected_pay_range")));
|
||||
dto.setWillingnessToTravel(convertToDictItems(dictTypeService.selectDictDataByType("willingness_to_travel")));
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
private List<HotakeSettingsJobDictDto.DictItem> convertToDictItems(List<SysDictData> dictDataList) {
|
||||
List<HotakeSettingsJobDictDto.DictItem> items = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(dictDataList)) {
|
||||
for (SysDictData dictData : dictDataList) {
|
||||
HotakeSettingsJobDictDto.DictItem item = new HotakeSettingsJobDictDto.DictItem();
|
||||
item.setDictCode(dictData.getDictCode());
|
||||
item.setDictLabel(dictData.getDictLabel());
|
||||
item.setDictValue(dictData.getDictValue());
|
||||
item.setDictType(dictData.getDictType());
|
||||
item.setCssClass(dictData.getCssClass());
|
||||
item.setListClass(dictData.getListClass());
|
||||
item.setIsDefault(dictData.getIsDefault());
|
||||
item.setStatus(dictData.getStatus());
|
||||
item.setDataType(dictData.getDataType());
|
||||
item.setFileUrl(dictData.getFileUrl());
|
||||
item.setAvatarUrl(dictData.getAvatarUrl());
|
||||
items.add(item);
|
||||
}
|
||||
}
|
||||
return items;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user