Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jy_jfb
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
jy_jfb
Commits
7490b1df
提交
7490b1df
authored
9月 16, 2025
作者:
wangmenglong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
人员新增类型
上级
8f5cf367
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
308 行增加
和
5 行删除
+308
-5
Industry.java
jfb-lib/src/main/java/data/recruit/Industry.java
+21
-0
Org.java
jfb-lib/src/main/java/data/recruit/Org.java
+24
-0
Person.java
jfb-lib/src/main/java/data/recruit/Person.java
+19
-0
Recruit.java
jfb-lib/src/main/java/data/recruit/Recruit.java
+46
-0
JfbRecruitApplication.java
.../src/main/java/com/jfb/recruit/JfbRecruitApplication.java
+2
-0
IndustryController.java
...n/java/com/jfb/recruit/controller/IndustryController.java
+13
-1
ImportIndustryController.java
.../jfb/recruit/controller/api/ImportIndustryController.java
+104
-0
IndustryService.java
...rc/main/java/com/jfb/recruit/service/IndustryService.java
+4
-0
IndustryServiceImpl.java
...ava/com/jfb/recruit/service/impl/IndustryServiceImpl.java
+75
-4
没有找到文件。
jfb-lib/src/main/java/data/recruit/Industry.java
浏览文件 @
7490b1df
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import
data.parent.NameObj
;
import
data.parent.NameObj
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* @author wangmenglong
* @author wangmenglong
* @description: 行业
* @description: 行业
...
@@ -21,4 +23,23 @@ public class Industry extends NameObj {
...
@@ -21,4 +23,23 @@ public class Industry extends NameObj {
@TableField
(
"code"
)
@TableField
(
"code"
)
private
String
code
;
private
String
code
;
/**
* 阿里行业编号
**/
@TableField
(
"parent_id"
)
private
String
parentId
;
/**
* 阿里行业编号
**/
@TableField
(
"`sort`"
)
private
int
sort
;
/**
* 阿里行业编号
**/
@TableField
(
exist
=
false
)
private
List
<
Industry
>
chilList
;
}
}
jfb-lib/src/main/java/data/recruit/Org.java
浏览文件 @
7490b1df
...
@@ -32,4 +32,28 @@ public class Org extends NameObj {
...
@@ -32,4 +32,28 @@ public class Org extends NameObj {
@TableField
(
"address"
)
@TableField
(
"address"
)
private
String
address
;
private
String
address
;
/**
* 详情
**/
@TableField
(
"descr"
)
private
String
descr
;
/**
* 省
**/
@TableField
(
"province"
)
private
String
province
;
/**
* 市
**/
@TableField
(
"city"
)
private
String
city
;
/**
* 区
**/
@TableField
(
"region"
)
private
String
region
;
}
}
jfb-lib/src/main/java/data/recruit/Person.java
浏览文件 @
7490b1df
...
@@ -68,4 +68,23 @@ public class Person extends NameObj {
...
@@ -68,4 +68,23 @@ public class Person extends NameObj {
@TableField
(
"recruit_type"
)
@TableField
(
"recruit_type"
)
private
String
recruitType
;
private
String
recruitType
;
/**
* 教育经历
**/
@TableField
(
"educational_background"
)
private
String
educationalBackground
;
/**
* 自我评价
**/
@TableField
(
"self_evaluation"
)
private
String
selfEvaluation
;
/**
* 工作经历
**/
@TableField
(
"work_experience"
)
private
String
workExperience
;
}
}
jfb-lib/src/main/java/data/recruit/Recruit.java
浏览文件 @
7490b1df
...
@@ -113,6 +113,31 @@ public class Recruit extends NameObj {
...
@@ -113,6 +113,31 @@ public class Recruit extends NameObj {
@TableField
(
"industry_name"
)
@TableField
(
"industry_name"
)
private
String
industryName
;
private
String
industryName
;
/**
* 支付宝行业id
**/
@TableField
(
"one_industry_name"
)
private
String
oneIndustryName
;
/**
* 支付宝行业id
**/
@TableField
(
"one_industry_id"
)
private
String
oneIndustryId
;
/**
* 支付宝行业id
**/
@TableField
(
"tow_industry_name"
)
private
String
towIndustryName
;
/**
* 支付宝行业id
**/
@TableField
(
"tow_industry_id"
)
private
String
towIndustryId
;
/**
/**
* 次数
* 次数
**/
**/
...
@@ -179,6 +204,27 @@ public class Recruit extends NameObj {
...
@@ -179,6 +204,27 @@ public class Recruit extends NameObj {
@TableField
(
"experience_code"
)
@TableField
(
"experience_code"
)
private
String
experienceCode
;
private
String
experienceCode
;
/**
* up上架 down下架
**/
@TableField
(
"status"
)
private
String
status
;
/**
* 省
**/
@TableField
(
"province"
)
private
String
province
;
/**
* 市
**/
@TableField
(
"city"
)
private
String
city
;
/**
* 区
**/
@TableField
(
"region"
)
private
String
region
;
}
}
jfb-recruit/src/main/java/com/jfb/recruit/JfbRecruitApplication.java
浏览文件 @
7490b1df
...
@@ -4,6 +4,7 @@ package com.jfb.recruit;
...
@@ -4,6 +4,7 @@ package com.jfb.recruit;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.context.config.annotation.RefreshScope
;
import
org.springframework.cloud.context.config.annotation.RefreshScope
;
...
@@ -11,6 +12,7 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
...
@@ -11,6 +12,7 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
@EnableDiscoveryClient
@EnableDiscoveryClient
@SpringBootApplication
(
scanBasePackages
=
{
"com.jfb.recruit"
})
@SpringBootApplication
(
scanBasePackages
=
{
"com.jfb.recruit"
})
@MapperScan
(
basePackages
=
"com.jfb.recruit.mapper"
)
@MapperScan
(
basePackages
=
"com.jfb.recruit.mapper"
)
@EnableCaching
// 开启缓存
public
class
JfbRecruitApplication
{
public
class
JfbRecruitApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
jfb-recruit/src/main/java/com/jfb/recruit/controller/IndustryController.java
浏览文件 @
7490b1df
...
@@ -54,10 +54,22 @@ public class IndustryController extends BaseController {
...
@@ -54,10 +54,22 @@ public class IndustryController extends BaseController {
public
BaseResult
listAll
(
HttpServletRequest
req
,
Industry
industry
){
public
BaseResult
listAll
(
HttpServletRequest
req
,
Industry
industry
){
UserContext
userContext
=
UserUtils
.
getUserContext
();
UserContext
userContext
=
UserUtils
.
getUserContext
();
industry
.
setBaseCode
(
userContext
.
getBaseCode
());
industry
.
setBaseCode
(
userContext
.
getBaseCode
());
List
<
Industry
>
list
=
industryService
.
list
(
pageNum
,
pageSize
,
industry
);
List
<
Industry
>
list
=
industryService
.
list
All
(
industry
);
return
BaseResult
.
success
(
list
);
return
BaseResult
.
success
(
list
);
}
}
/**
* @description: 获取行业列表
* @author: wangmenglong
* @date; 2023/12/7 10:07
* @param: [req]
* @return: com.github.pagehelper.PageInfo
**/
@GetMapping
(
"/l/all/evict"
)
public
BaseResult
listAllEvict
(
HttpServletRequest
req
,
Industry
industry
){
industryService
.
cleanAllIndustryCache
();
return
BaseResult
.
success
();
}
/**
/**
...
...
jfb-recruit/src/main/java/com/jfb/recruit/controller/api/ImportIndustryController.java
0 → 100644
浏览文件 @
7490b1df
package
com
.
jfb
.
recruit
.
controller
.
api
;
import
com.jfb.recruit.service.IndustryService
;
import
com.jfb.recruit.xsnowflake.SnowFlakeFactory
;
import
data.recruit.Industry
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
util.CommonUtils
;
import
util.MultipartFileToFile
;
import
util.excel.ExcelXlsxReader
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.File
;
import
java.util.List
;
import
java.util.Map
;
/**
* 日结名单导入
* @author: wangmenglong
* @date: 2021/7/26
*/
@RestController
@RequestMapping
(
value
=
"/import/industry"
)
public
class
ImportIndustryController
{
@Autowired
IndustryService
industryService
;
@Autowired
SnowFlakeFactory
snowFlakeFactory
;
/**
* 日结名单导入
* @param: [req]
* @return: util.BaseResult
* @author: wangmenglong
* @date: 2021/7/13
*/
@RequestMapping
(
value
=
"/upload"
,
method
=
RequestMethod
.
POST
)
public
void
uploadEntryFile
(
HttpServletRequest
req
,
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
multipartFile
)
{
try
{
File
file
=
MultipartFileToFile
.
multipartFileToFile
(
multipartFile
);
ExcelXlsxReader
excelXlsxReader
=
new
ExcelXlsxReader
();
Map
<
String
,
List
<
List
<
String
>>>
map
=
excelXlsxReader
.
process
(
file
);
List
<
List
<
String
>>
rowList
=
map
.
get
(
"1"
);
rowList
.
remove
(
0
);
for
(
List
<
String
>
colList
:
rowList
)
{
Thread
.
sleep
(
100
);
//获取每行数据
Industry
industry
=
new
Industry
();
String
oneName
=
CommonUtils
.
replaceBlank
(
colList
.
get
(
0
));
String
oneSort
=
CommonUtils
.
replaceBlank
(
colList
.
get
(
1
));
String
twoName
=
CommonUtils
.
replaceBlank
(
colList
.
get
(
2
));
String
twoSort
=
CommonUtils
.
replaceBlank
(
colList
.
get
(
3
));
String
name
=
CommonUtils
.
replaceBlank
(
colList
.
get
(
4
));
String
code
=
CommonUtils
.
replaceBlank
(
colList
.
get
(
5
));
Industry
oneindustry
=
industryService
.
getDetailsByName
(
oneName
,
"0"
);
Industry
twoindustry
=
industryService
.
getDetailsByName
(
twoName
,
"1"
);
if
(
oneindustry
==
null
){
oneindustry
=
new
Industry
();
oneindustry
.
setId
(
snowFlakeFactory
.
nextId
());
oneindustry
.
setParentId
(
"0"
);
oneindustry
.
setSort
(
Integer
.
parseInt
(
oneSort
));
oneindustry
.
setName
(
oneName
);
industryService
.
create
(
oneindustry
);
}
if
(
twoindustry
==
null
){
twoindustry
=
new
Industry
();
twoindustry
.
setId
(
snowFlakeFactory
.
nextId
());
twoindustry
.
setParentId
(
"0"
);
twoindustry
.
setSort
(
Integer
.
parseInt
(
twoSort
));
twoindustry
.
setParentId
(
oneindustry
.
getId
());
twoindustry
.
setName
(
twoName
);
industryService
.
create
(
twoindustry
);
}
industry
=
new
Industry
();
industry
.
setId
(
snowFlakeFactory
.
nextId
());
industry
.
setParentId
(
"0"
);
industry
.
setCode
(
code
);
industry
.
setName
(
name
);
industry
.
setParentId
(
twoindustry
.
getId
());
industryService
.
create
(
industry
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
jfb-recruit/src/main/java/com/jfb/recruit/service/IndustryService.java
浏览文件 @
7490b1df
...
@@ -17,6 +17,8 @@ public interface IndustryService {
...
@@ -17,6 +17,8 @@ public interface IndustryService {
List
<
Industry
>
listAll
(
Industry
industry
);
List
<
Industry
>
listAll
(
Industry
industry
);
void
cleanAllIndustryCache
();
boolean
create
(
Industry
industry
);
boolean
create
(
Industry
industry
);
boolean
update
(
Industry
industry
);
boolean
update
(
Industry
industry
);
...
@@ -27,4 +29,6 @@ public interface IndustryService {
...
@@ -27,4 +29,6 @@ public interface IndustryService {
boolean
isHave
(
String
openId
,
String
id
);
boolean
isHave
(
String
openId
,
String
id
);
Industry
getDetailsByName
(
String
name
,
String
parentType
);
}
}
jfb-recruit/src/main/java/com/jfb/recruit/service/impl/IndustryServiceImpl.java
浏览文件 @
7490b1df
...
@@ -13,6 +13,8 @@ import com.jfb.recruit.util.auth.UserUtils;
...
@@ -13,6 +13,8 @@ import com.jfb.recruit.util.auth.UserUtils;
import
com.jfb.recruit.xsnowflake.SnowFlakeFactory
;
import
com.jfb.recruit.xsnowflake.SnowFlakeFactory
;
import
data.recruit.Industry
;
import
data.recruit.Industry
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -62,19 +64,64 @@ public class IndustryServiceImpl extends ServiceImpl<IndustryMapper, Industry> i
...
@@ -62,19 +64,64 @@ public class IndustryServiceImpl extends ServiceImpl<IndustryMapper, Industry> i
* @return: java.util.List<data.industry.Industry>
* @return: java.util.List<data.industry.Industry>
**/
**/
@Override
@Override
/**
* 首次调用时自动写入缓存,后续直接从缓存获取
* value:缓存名称(相当于前缀)
* key:缓存 key(使用 SpEL 表达式,这里为 ID)
* expire:过期时间(需配合缓存配置)
*/
@Cacheable
(
value
=
"industryList"
,
key
=
"'all'"
// 全量列表用固定 key
)
public
List
<
Industry
>
listAll
(
Industry
industry
)
{
public
List
<
Industry
>
listAll
(
Industry
industry
)
{
//创建查询条件
//创建查询条件
LambdaQueryWrapper
<
Industry
>
qw
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Industry
>
qw
=
new
LambdaQueryWrapper
<>();
qw
.
like
(
StringUtils
.
isNotBlank
(
industry
.
getName
()),
Industry:
:
getName
,
industry
.
getName
())
qw
.
eq
(
Industry:
:
getDel
,
false
)
.
eq
(
Industry:
:
getDel
,
false
)
.
eq
(
Industry:
:
getParentId
,
"0"
)
.
eq
(
StringUtils
.
isNotBlank
(
industry
.
getBaseCode
()),
Industry:
:
getBaseCode
,
industry
.
getBaseCode
())
.
orderByAsc
(
Industry:
:
getSort
);
.
orderByDesc
(
Industry:
:
getCreateTime
);
List
<
Industry
>
industryList
=
super
.
list
(
qw
);
List
<
Industry
>
industryList
=
super
.
list
(
qw
);
industryList
.
stream
().
forEach
(
industry1
->
{
//创建查询条件
LambdaQueryWrapper
<
Industry
>
qw1
=
new
LambdaQueryWrapper
<>();
qw1
.
eq
(
Industry:
:
getDel
,
false
)
.
eq
(
Industry:
:
getParentId
,
industry1
.
getId
())
.
orderByAsc
(
Industry:
:
getSort
);
List
<
Industry
>
industryList1
=
super
.
list
(
qw1
);
industryList1
.
stream
().
forEach
(
industry2
->
{
//创建查询条件
LambdaQueryWrapper
<
Industry
>
qw2
=
new
LambdaQueryWrapper
<>();
qw2
.
eq
(
Industry:
:
getDel
,
false
)
.
eq
(
Industry:
:
getParentId
,
industry2
.
getId
())
.
orderByAsc
(
Industry:
:
getSort
);
List
<
Industry
>
industryList2
=
super
.
list
(
qw2
);
industry2
.
setChilList
(
industryList2
);
});
industry1
.
setChilList
(
industryList1
);
});
//返回查询结果
//返回查询结果
return
industryList
;
return
industryList
;
}
}
// 清空全量列表的缓存(仅清理 key = 'all' 的缓存项)
@Override
@CacheEvict
(
value
=
"industryList"
,
key
=
"'all'"
)
public
void
cleanAllIndustryCache
()
{
// 方法体可空,仅用于触发缓存清理
System
.
out
.
println
(
"全量列表缓存已清理"
);
}
/**
/**
* @description: 新增行业
* @description: 新增行业
* @author: wangmenglong
* @author: wangmenglong
...
@@ -146,6 +193,30 @@ public class IndustryServiceImpl extends ServiceImpl<IndustryMapper, Industry> i
...
@@ -146,6 +193,30 @@ public class IndustryServiceImpl extends ServiceImpl<IndustryMapper, Industry> i
return
super
.
getById
(
id
);
return
super
.
getById
(
id
);
}
}
/**
* @author: wangmenglong
* @date; 2024/3/24 17:19
* @description: 获取行业详情
* @param: [id]
* @return: data.industry.Industry
**/
@Override
public
Industry
getDetailsByName
(
String
name
,
String
parentType
)
{
LambdaQueryWrapper
<
Industry
>
qw
=
new
LambdaQueryWrapper
<>();
qw
.
eq
(
Industry:
:
getDel
,
false
)
.
eq
(
Industry:
:
getName
,
name
);
if
(
parentType
.
equals
(
"0"
)){
qw
.
eq
(
Industry:
:
getParentId
,
"0"
);
}
else
if
(
parentType
.
equals
(
"1"
)){
qw
.
ne
(
Industry:
:
getParentId
,
"0"
);
qw
.
isNull
(
Industry:
:
getCode
);
}
return
super
.
getOne
(
qw
);
}
/**
/**
* @author: wangmenglong
* @author: wangmenglong
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论