Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
think-tank
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
张京坤
think-tank
Commits
ab0c7c45
提交
ab0c7c45
authored
7月 03, 2024
作者:
zgz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
开发环境
上级
68079b64
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
136 行增加
和
51 行删除
+136
-51
pom.xml
pom.xml
+38
-1
ThinkTankApplication.java
src/main/java/com/zzsn/thinktank/ThinkTankApplication.java
+2
-0
ThinktankBasicInfoServiceImpl.java
...thinktank/service/impl/ThinktankBasicInfoServiceImpl.java
+52
-50
application-dev.yml
src/main/resources/application-dev.yml
+12
-0
application-prod.yml
src/main/resources/application-prod.yml
+12
-0
application-test.yml
src/main/resources/application-test.yml
+18
-0
application.yml
src/main/resources/application.yml
+2
-0
没有找到文件。
pom.xml
浏览文件 @
ab0c7c45
...
...
@@ -84,6 +84,13 @@
<version>
1.2.83
</version>
</dependency>
<!-- 注册中心-->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
<version>
2.1.5.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-redis
</artifactId>
...
...
@@ -139,7 +146,37 @@
</resource>
</resources>
</build>
<!-- 环境 -->
<profiles>
<!-- 开发 -->
<profile>
<id>
dev
</id>
<activation>
<!--默认激活配置-->
<activeByDefault>
true
</activeByDefault>
</activation>
<properties>
<!--当前环境-->
<profile.name>
dev
</profile.name>
</properties>
</profile>
<!-- 测试 -->
<profile>
<id>
test
</id>
<properties>
<!--当前环境-->
<profile.name>
test
</profile.name>
</properties>
</profile>
<!-- 生产 -->
<profile>
<id>
prod
</id>
<properties>
<!--当前环境,生产环境为空-->
<profile.name>
prod
</profile.name>
</properties>
</profile>
</profiles>
</project>
src/main/java/com/zzsn/thinktank/ThinkTankApplication.java
浏览文件 @
ab0c7c45
...
...
@@ -3,11 +3,13 @@ package com.zzsn.thinktank;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.scheduling.annotation.EnableAsync
;
@SpringBootApplication
//@EnableAsync
@MapperScan
(
value
=
{
"com.zzsn.thinktank.mapper*"
})
@EnableEurekaClient
public
class
ThinkTankApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/zzsn/thinktank/service/impl/ThinktankBasicInfoServiceImpl.java
浏览文件 @
ab0c7c45
...
...
@@ -745,62 +745,64 @@ public class ThinktankBasicInfoServiceImpl extends ServiceImpl<ThinktankBasicInf
@Override
public
IPage
<
ThinktankBasicInfo
>
pageList
(
Page
page
,
ThinktankBasicInfoListVo
vo
,
HttpServletRequest
req
)
throws
Exception
{
List
<
String
>
fieldTypeId
=
vo
.
getFieldTypeId
();
List
<
String
>
regionalCountriesTypeId
=
vo
.
getRegionalCountriesTypeId
();
List
<
String
>
regionalCountriesTypeIds
=
new
ArrayList
<>();
QueryWrapper
<
ThinktankBasicInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
1
);
if
(
vo
!=
null
&&
StringUtils
.
isNotBlank
(
vo
.
getKeyword
())){
queryWrapper
.
and
(
wreapper
->{
wreapper
.
like
(
"chinese_whole"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"chinese_simple"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"english_whole"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"english_simple"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"tag_name"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"belong_country"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"biographical_notes"
,
vo
.
getKeyword
());
});
}
if
(
fieldTypeId
!=
null
&&
fieldTypeId
.
size
()>
0
){
queryWrapper
.
and
(
wreapper
->{
for
(
int
i
=
0
;
i
<
fieldTypeId
.
size
();
i
++){
wreapper
.
like
(
"tag_id"
,
fieldTypeId
.
get
(
i
));
if
(
i
!=
fieldTypeId
.
size
()-
1
){
wreapper
.
or
();
if
(
vo
!=
null
){
List
<
String
>
fieldTypeId
=
vo
.
getFieldTypeId
();
List
<
String
>
regionalCountriesTypeId
=
vo
.
getRegionalCountriesTypeId
();
List
<
String
>
regionalCountriesTypeIds
=
new
ArrayList
<>();
queryWrapper
.
eq
(
"status"
,
1
);
if
(
StringUtils
.
isNotBlank
(
vo
.
getKeyword
())){
queryWrapper
.
and
(
wreapper
->{
wreapper
.
like
(
"chinese_whole"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"chinese_simple"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"english_whole"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"english_simple"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"tag_name"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"belong_country"
,
vo
.
getKeyword
());
wreapper
.
or
();
wreapper
.
like
(
"biographical_notes"
,
vo
.
getKeyword
());
});
}
if
(
fieldTypeId
!=
null
&&
fieldTypeId
.
size
()>
0
){
queryWrapper
.
and
(
wreapper
->{
for
(
int
i
=
0
;
i
<
fieldTypeId
.
size
();
i
++){
wreapper
.
like
(
"tag_id"
,
fieldTypeId
.
get
(
i
));
if
(
i
!=
fieldTypeId
.
size
()-
1
){
wreapper
.
or
();
}
}
}
}
);
}
if
(
regionalCountriesTypeId
!=
null
&&
regionalCountriesTypeId
.
size
()>
0
){
for
(
String
id:
regionalCountriesTypeId
){
SysBaseRegion
region
=
sysBaseRegionService
.
getById
(
id
);
if
(
region
!=
null
&&
region
.
getLevelId
()!=
null
&&
region
.
getLevelId
().
equals
(
"country"
)){
regionalCountriesTypeIds
.
add
(
id
);
}
else
if
(
region
!=
null
&&
region
.
getLevelId
()!=
null
&&
region
.
getLevelId
().
equals
(
"continent"
)){
QueryWrapper
<
SysBaseRegion
>
query
=
new
QueryWrapper
<>(
);
query
.
eq
(
"pid"
,
"id"
);
List
<
SysBaseRegion
>
list
=
sysBaseRegionService
.
list
(
query
);
for
(
SysBaseRegion
obj:
list
){
regionalCountriesTypeIds
.
add
(
obj
.
getId
());
}
);
}
if
(
regionalCountriesTypeId
!=
null
&&
regionalCountriesTypeId
.
size
()>
0
){
for
(
String
id:
regionalCountriesTypeId
){
SysBaseRegion
region
=
sysBaseRegionService
.
getById
(
id
);
if
(
region
!=
null
&&
region
.
getLevelId
()!=
null
&&
region
.
getLevelId
().
equals
(
"country"
)){
regionalCountriesTypeIds
.
add
(
id
);
}
else
if
(
region
!=
null
&&
region
.
getLevelId
()!=
null
&&
region
.
getLevelId
().
equals
(
"continent"
)){
QueryWrapper
<
SysBaseRegion
>
query
=
new
QueryWrapper
<>();
query
.
eq
(
"pid"
,
"id"
);
List
<
SysBaseRegion
>
list
=
sysBaseRegionService
.
list
(
query
);
for
(
SysBaseRegion
obj:
list
){
regionalCountriesTypeIds
.
add
(
obj
.
getId
());
}
}
}
}
}
if
(
regionalCountriesTypeIds
!=
null
&&
regionalCountriesTypeIds
.
size
()>
0
)
{
queryWrapper
.
and
(
wreapper
->
{
for
(
int
i
=
0
;
i
<
regionalCountriesTypeIds
.
size
();
i
++){
wreapper
.
like
(
"belong_country_id"
,
regionalCountriesTypeIds
.
get
(
i
));
if
(
i
!=
regionalCountriesTypeIds
.
size
()-
1
){
wreapper
.
or
();
if
(
regionalCountriesTypeIds
!=
null
&&
regionalCountriesTypeIds
.
size
()>
0
){
queryWrapper
.
and
(
wreapper
->
{
for
(
int
i
=
0
;
i
<
regionalCountriesTypeIds
.
size
();
i
++)
{
wreapper
.
like
(
"belong_country_id"
,
regionalCountriesTypeIds
.
get
(
i
));
if
(
i
!=
regionalCountriesTypeIds
.
size
()-
1
){
wreapper
.
or
();
}
}
}
}
);
}
);
}
}
queryWrapper
.
orderByDesc
(
"update_time"
);
return
this
.
getBaseMapper
().
selectPage
(
page
,
queryWrapper
);
...
...
src/main/resources/application-dev.yml
0 → 100644
浏览文件 @
ab0c7c45
eureka
:
instance
:
#注册到注册中心通过Feign调用时,hostname必须是服务器ip
hostname
:
114.115.141.81
instance-id
:
114.115.141.81:9099
prefer-ip-address
:
false
client
:
register-with-eureka
:
true
fetch-registry
:
false
service-url
:
defaultZone
:
http://sasac:Sasac09ckJHyujT!W@192.168.200.226:8017/eureka/
src/main/resources/application-prod.yml
0 → 100644
浏览文件 @
ab0c7c45
#eureka:
# instance:
# #注册到注册中心通过Feign调用时,hostname必须是服务器ip
# hostname: 114.116.39.74
# instance-id: 114.116.39.74:8071
# prefer-ip-address: false
# client:
# register-with-eureka: true
# fetch-registry: false
# service-url:
# defaultZone: http://sasac:Sasac09ckJHyuj@172.16.33.129:8761/eureka/
\ No newline at end of file
src/main/resources/application-test.yml
0 → 100644
浏览文件 @
ab0c7c45
#eureka:
# instance:
# #注册到注册中心通过Feign调用时,hostname必须是服务器ip
# hostname: 114.115.141.81
# instance-id: 114.115.141.81:8071
# prefer-ip-address: false
# client:
# register-with-eureka: true
# fetch-registry: false
# service-url:
# # defaultZone: http://admin:admin321@27.189.2.43:8761/eureka/
# # 四期
# # defaultZone: http://sasac:Sasac09ckJHyuj@106.38.99.147:20717/eureka/
# # 三期
# # defaultZone: http://admin:admin321sasac@106.38.99.147:20543/eureka/
# # 五期(测试环境)
# defaultZone: http://sasac:Sasac09ckJHyujT!W@106.38.99.147:20591/eureka/
\ No newline at end of file
src/main/resources/application.yml
浏览文件 @
ab0c7c45
...
...
@@ -4,6 +4,8 @@ server:
# context-path: /thinktank
spring
:
profiles
:
active
:
@
profile.name@
servlet
:
multipart
:
#单个上传文件大小
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论