新增 用户首选工作设置
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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.vetti.hotake.mapper.HotakeSettingsJobMapper">
|
||||
|
||||
<resultMap type="HotakeSettingsJob" id="HotakeSettingsJobResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="location" column="location" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="salary" column="salary" />
|
||||
<result property="tagsJson" column="tags_json" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHotakeSettingsJobVo">
|
||||
select id, name, location, latitude, longitude, salary, tags_json,
|
||||
del_flag, create_by, create_time, update_by, update_time, remark from hotake_settings_job
|
||||
</sql>
|
||||
|
||||
<select id="selectHotakeSettingsJobList" parameterType="HotakeSettingsJob" resultMap="HotakeSettingsJobResult">
|
||||
<include refid="selectHotakeSettingsJobVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="location != null and location != ''"> and location like concat('%', #{location}, '%')</if>
|
||||
<if test="latitude != null"> and latitude = #{latitude}</if>
|
||||
<if test="longitude != null"> and longitude = #{longitude}</if>
|
||||
<if test="salary != null and salary != ''"> and salary = #{salary}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHotakeSettingsJobById" parameterType="Long" resultMap="HotakeSettingsJobResult">
|
||||
<include refid="selectHotakeSettingsJobVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHotakeSettingsJob" parameterType="HotakeSettingsJob" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into hotake_settings_job
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="location != null">location,</if>
|
||||
<if test="latitude != null">latitude,</if>
|
||||
<if test="longitude != null">longitude,</if>
|
||||
<if test="salary != null">salary,</if>
|
||||
<if test="tagsJson != null">tags_json,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="location != null">#{location},</if>
|
||||
<if test="latitude != null">#{latitude},</if>
|
||||
<if test="longitude != null">#{longitude},</if>
|
||||
<if test="salary != null">#{salary},</if>
|
||||
<if test="tagsJson != null">#{tagsJson},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHotakeSettingsJob" parameterType="HotakeSettingsJob">
|
||||
update hotake_settings_job
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="latitude != null">latitude = #{latitude},</if>
|
||||
<if test="longitude != null">longitude = #{longitude},</if>
|
||||
<if test="salary != null">salary = #{salary},</if>
|
||||
<if test="tagsJson != null">tags_json = #{tagsJson},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHotakeSettingsJobById" parameterType="Long">
|
||||
delete from hotake_settings_job where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHotakeSettingsJobByIds" parameterType="String">
|
||||
delete from hotake_settings_job where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user