提交 9905f91e authored 作者: wml's avatar wml

招聘类型

上级 c5eadde3
package com.jfb.recruit.controller;
import base.controller.BaseController;
import base.result.BaseResult;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.jfb.recruit.service.RecruitTypeService;
import data.recruit.RecruitType;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @author wangmenglong
* @description: 招聘类型
* @date 2023/12/11 11:35
*/
@RestController
@RequestMapping("/recruit/type")
public class RecruitTypeController extends BaseController {
@Resource
RecruitTypeService recruitTypeService;
/**
* @description: 获取所有招聘类型列表
* @author: wangmenglong
* @date; 2023/12/7 10:07
* @param: [req]
* @return: com.github.pagehelper.PageInfo
**/
@GetMapping("/all")
public BaseResult all(HttpServletRequest req, RecruitType recrutiType){
PageInit(req);
List<RecruitType> list = recruitTypeService.listAll(recrutiType);
PageInfo<RecruitType> pageInfo = new PageInfo<RecruitType>(list);
return BaseResult.success(pageInfo);
}
}
package com.jfb.recruit.service;
import data.recruit.RecruitType;
import data.user.User;
import java.util.List;
/**
*
* @return: 招聘类型
* @Author: wml
* @Date 2025/5/9 10:20
*/
public interface RecruitTypeService {
List<RecruitType> listAll(RecruitType recruitType);
}
package com.jfb.recruit.service.impl;
import com.alibaba.cloud.commons.lang.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.jfb.recruit.mapper.RecruitTypeMapper;
import com.jfb.recruit.service.RecruitTypeService;
import data.recruit.RecruitType;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* @return: 招聘类型管理
* @Author: wml
* @Date 2025/5/9 10:22
*/
@Service
@Transactional
public class RecruitTypeServiceImpl extends ServiceImpl<RecruitTypeMapper, RecruitType> implements RecruitTypeService {
/**
* @description: 获取所有列表
* @author: wangmenglong
**/
@Override
public List<RecruitType> listAll(RecruitType recruitType) {
//创建查询条件
LambdaQueryWrapper<RecruitType> qw = new LambdaQueryWrapper<>();
qw.like(StringUtils.isNotBlank(recruitType.getName()),RecruitType::getName,recruitType.getName())
.eq(RecruitType::getDel,false)
.eq(StringUtils.isNotBlank(recruitType.getBaseCode()),RecruitType::getBaseCode, recruitType.getBaseCode())
.orderByDesc(RecruitType::getCreateTime);
List<RecruitType> orgList = super.list(qw);
//返回查询结果
return orgList;
}
}
nacos:
server-addr: 192.168.0.100:8848
namespace: cm_crm
group: cm-crm-group
namespace: jy-jfb
group: jy-jfb-group
port: 8000
profiles:
active:
......@@ -25,7 +25,7 @@ spring:
profiles:
active: #必须在application上面
application:
name: cm_crm
name: jfb-recruit
#毕竟各个不同的组件都是独立开发的,集成到一起后总会遇到各种惊喜。spring.main.allow-bean-definition-overriding=true就是解决bean重复定义的。设置为true时,后定义的bean会覆盖之前定义的相同名称的bean。
# main:
# allow-bean-definition-overriding: true
......@@ -48,12 +48,7 @@ spring:
file-extension: yaml
shared-configs[0]:
namespace: ${nacos.namespace}
data-id: cm-crm-datasource-config.yaml
group: ${nacos.group}
refresh: true
shared-configs[1]:
namespace: ${nacos.namespace}
data-id: cm-crm-redis-config.yaml
data-id: jfb-recruit-datasource-config.yaml
group: ${nacos.group}
refresh: true
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论