diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeSettingsJobController.java b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeSettingsJobController.java new file mode 100644 index 0000000..b52fc84 --- /dev/null +++ b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeSettingsJobController.java @@ -0,0 +1,110 @@ +package com.vetti.web.controller.hotake; + +import com.vetti.common.annotation.Log; +import com.vetti.common.core.controller.BaseController; +import com.vetti.common.core.domain.R; +import com.vetti.common.core.page.TableWebDataInfo; +import com.vetti.common.enums.BusinessType; +import com.vetti.hotake.domain.HotakeSettingsJob; +import com.vetti.hotake.domain.dto.HotakeSettingsJobDictDto; +import com.vetti.hotake.service.IHotakeSettingsJobService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 用户首选工作设置Controller + * + * @author wangxiangshun + * @date 2025-11-02 + */ +@Api(tags ="用户首选工作设置") +@RestController +@RequestMapping("/hotake/settingsJob") +public class HotakeSettingsJobController extends BaseController +{ + @Autowired + private IHotakeSettingsJobService hotakeSettingsJobService; + + /** + * 查询用户首选工作设置列表 + */ + @ApiOperation("查询用户首选工作设置列表(分页)") + @GetMapping("/getPagelist") + public TableWebDataInfo list(HotakeSettingsJob hotakeSettingsJob) + { + startPage(); + List list = hotakeSettingsJobService.selectHotakeSettingsJobList(hotakeSettingsJob); + return getWebDataTable(list); + } + + /** + * 查询用户首选工作设置列表 + */ + @ApiOperation("查询用户首选工作设置列表(无分页)") + @GetMapping("/getList") + public R> getList(HotakeSettingsJob hotakeSettingsJob) + { + List list = hotakeSettingsJobService.selectHotakeSettingsJobList(hotakeSettingsJob); + return R.ok(list,""); + } + + /** + * 获取用户首选工作设置字典对照内容 + */ + @ApiOperation("获取用户首选工作设置字典对照内容") + @GetMapping("/getDictData") + public R getDictData() + { + HotakeSettingsJobDictDto dictData = hotakeSettingsJobService.getDictData(); + return R.ok(dictData,""); + } + + /** + * 获取用户首选工作设置详细信息 + */ + @ApiOperation("获取用户首选工作设置详细信息") + @GetMapping(value = "/{id}") + public R getInfo(@ApiParam("设置ID") @PathVariable("id") Long id) + { + return R.ok(hotakeSettingsJobService.selectHotakeSettingsJobById(id),""); + } + + /** + * 新增用户首选工作设置 + */ + @ApiOperation("新增用户首选工作设置") + @Log(title = "用户首选工作设置", businessType = BusinessType.INSERT) + @PostMapping + public R add(@RequestBody HotakeSettingsJob hotakeSettingsJob) + { + return R.ok(hotakeSettingsJobService.insertHotakeSettingsJob(hotakeSettingsJob)); + } + + /** + * 修改用户首选工作设置 + */ + @ApiOperation("修改用户首选工作设置") + @Log(title = "用户首选工作设置", businessType = BusinessType.UPDATE) + @PutMapping + public R edit(@RequestBody HotakeSettingsJob hotakeSettingsJob) + { + return R.ok(hotakeSettingsJobService.updateHotakeSettingsJob(hotakeSettingsJob)); + } + + /** + * 删除用户首选工作设置 + */ + @ApiOperation("删除用户首选工作设置") + @Log(title = "用户首选工作设置", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + public R remove(@PathVariable Long id) + { + return R.ok(hotakeSettingsJobService.deleteHotakeSettingsJobById(id)); + } + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeSettingsJob.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeSettingsJob.java new file mode 100644 index 0000000..78005ec --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeSettingsJob.java @@ -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; + + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeSettingsJobDictDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeSettingsJobDictDto.java new file mode 100644 index 0000000..d0ea442 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeSettingsJobDictDto.java @@ -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 hotakeLanguagesType; + + @ApiModelProperty("技能工具类型") + private List hotakeSkillsToolType; + + @ApiModelProperty("岗位级别") + private List roleLevel; + + @ApiModelProperty("岗位地点类型") + private List roleLocationType; + + @ApiModelProperty("岗位选择工作类型") + private List roleSelectJobType; + + @ApiModelProperty("岗位类型") + private List roleType; + + @ApiModelProperty("所需技能") + private List roleRequiredSkills; + + @ApiModelProperty("拥有的好技能") + private List roleNiceToHaveSkills; + + @ApiModelProperty("教育要求类型") + private List roleEducationRequirementsType; + + @ApiModelProperty("岗位所需证书") + private List roleCertificationLicenses; + + @ApiModelProperty("岗位福利") + private List roleBenefits; + + @ApiModelProperty("发布渠道") + private List rolePublishingChannels; + + @ApiModelProperty("初步筛选问题类型") + private List roleInitialScreeningQuestionsType; + + @ApiModelProperty("预期薪酬范围") + private List expectedPayRange; + + @ApiModelProperty("愿意经常出差") + private List 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; + } +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeSettingsJobService.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeSettingsJobService.java new file mode 100644 index 0000000..dbdc5f2 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeSettingsJobService.java @@ -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 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(); +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeSettingsJobServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeSettingsJobServiceImpl.java new file mode 100644 index 0000000..60060a0 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeSettingsJobServiceImpl.java @@ -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 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 convertToDictItems(List dictDataList) { + List 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; + } +} diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeSettingsJobMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeSettingsJobMapper.xml new file mode 100644 index 0000000..3f1496d --- /dev/null +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeSettingsJobMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + select id, name, location, latitude, longitude, salary, tags_json, + del_flag, create_by, create_time, update_by, update_time, remark from hotake_settings_job + + + + + + + + insert into hotake_settings_job + + name, + location, + latitude, + longitude, + salary, + tags_json, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{name}, + #{location}, + #{latitude}, + #{longitude}, + #{salary}, + #{tagsJson}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update hotake_settings_job + + name = #{name}, + location = #{location}, + latitude = #{latitude}, + longitude = #{longitude}, + salary = #{salary}, + tags_json = #{tagsJson}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from hotake_settings_job where id = #{id} + + + + delete from hotake_settings_job where id in + + #{id} + + +