Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataDeclaration
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄夏豪
dataDeclaration
Commits
ddff351d
提交
ddff351d
authored
5月 21, 2021
作者:
黄夏豪
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[数据模块] 修复了一些BUG
上级
27034f8e
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
25 行增加
和
12 行删除
+25
-12
QuoteController.java
...java/com/tykj/model_layer/controller/QuoteController.java
+9
-0
QuoteServiceImpl.java
...a/com/tykj/model_layer/service/impl/QuoteServiceImpl.java
+0
-3
ConditionSetting.java
src/main/java/com/tykj/setting/entity/ConditionSetting.java
+2
-2
ScreenSetting.java
src/main/java/com/tykj/setting/entity/ScreenSetting.java
+3
-0
ScreenSettingVo.java
...main/java/com/tykj/setting/entity/vo/ScreenSettingVo.java
+5
-0
ScreenSettingService.java
...n/java/com/tykj/setting/service/ScreenSettingService.java
+4
-4
application.yml
src/main/resources/application.yml
+2
-3
没有找到文件。
src/main/java/com/tykj/model_layer/controller/QuoteController.java
浏览文件 @
ddff351d
package
com
.
tykj
.
model_layer
.
controller
;
package
com
.
tykj
.
model_layer
.
controller
;
import
com.tykj.base.result.ResultUtil
;
import
com.tykj.base.result.ResultUtil
;
import
com.tykj.model_layer.entity.vo.SearchQuoteVO
;
import
com.tykj.model_layer.entity.vo.UpdateQuoteVO
;
import
com.tykj.model_layer.entity.vo.UpdateQuoteVO
;
import
com.tykj.model_layer.service.QuoteService
;
import
com.tykj.model_layer.service.QuoteService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -36,4 +37,12 @@ public class QuoteController {
...
@@ -36,4 +37,12 @@ public class QuoteController {
public
ResponseEntity
UpdateQuote
(
@RequestBody
UpdateQuoteVO
updateQuoteVO
)
{
public
ResponseEntity
UpdateQuote
(
@RequestBody
UpdateQuoteVO
updateQuoteVO
)
{
return
ResultUtil
.
success
(
quoteService
.
updateQuote
(
updateQuoteVO
),
"查询成功!"
);
return
ResultUtil
.
success
(
quoteService
.
updateQuote
(
updateQuoteVO
),
"查询成功!"
);
}
}
@ApiModelProperty
(
"引用更新"
)
@PostMapping
(
"/getAllQuote"
)
public
ResponseEntity
getAllQuote
(
@RequestBody
SearchQuoteVO
searchQuoteVO
)
{
return
ResultUtil
.
success
(
quoteService
.
getAllQuote
(
searchQuoteVO
),
"查询成功!"
);
}
}
}
src/main/java/com/tykj/model_layer/service/impl/QuoteServiceImpl.java
浏览文件 @
ddff351d
...
@@ -35,8 +35,6 @@ public class QuoteServiceImpl implements QuoteService {
...
@@ -35,8 +35,6 @@ public class QuoteServiceImpl implements QuoteService {
@Override
@Override
public
List
<
Quote
>
updateQuote
(
UpdateQuoteVO
updateQuoteVO
)
{
public
List
<
Quote
>
updateQuote
(
UpdateQuoteVO
updateQuoteVO
)
{
List
<
Quote
>
quoteList
=
updateQuoteVO
.
getQuoteList
();
List
<
Quote
>
quoteList
=
updateQuoteVO
.
getQuoteList
();
for
(
Quote
quote
:
quoteList
)
{
for
(
Quote
quote
:
quoteList
)
{
quote
.
setColumnId
(
updateQuoteVO
.
getId
());
quote
.
setColumnId
(
updateQuoteVO
.
getId
());
...
@@ -53,7 +51,6 @@ public class QuoteServiceImpl implements QuoteService {
...
@@ -53,7 +51,6 @@ public class QuoteServiceImpl implements QuoteService {
"value"
,
"%"
+
searchQuoteVO
.
getValue
()
+
"%"
);
"value"
,
"%"
+
searchQuoteVO
.
getValue
()
+
"%"
);
and
.
in
(
searchQuoteVO
.
getColumnIds
()!=
null
&&
searchQuoteVO
.
getColumnIds
().
length
>
0
,
and
.
in
(
searchQuoteVO
.
getColumnIds
()!=
null
&&
searchQuoteVO
.
getColumnIds
().
length
>
0
,
"columnId"
,
searchQuoteVO
.
getColumnIds
());
"columnId"
,
searchQuoteVO
.
getColumnIds
());
and
.
in
(
searchQuoteVO
.
getValues
()!=
null
&&
searchQuoteVO
.
getValues
().
length
>
0
,
and
.
in
(
searchQuoteVO
.
getValues
()!=
null
&&
searchQuoteVO
.
getValues
().
length
>
0
,
"value"
,
searchQuoteVO
.
getValues
());
"value"
,
searchQuoteVO
.
getValues
());
}
}
...
...
src/main/java/com/tykj/setting/entity/ConditionSetting.java
浏览文件 @
ddff351d
...
@@ -24,8 +24,8 @@ public class ConditionSetting {
...
@@ -24,8 +24,8 @@ public class ConditionSetting {
@ApiModelProperty
(
"主键"
)
@ApiModelProperty
(
"主键"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
"字段
名
"
)
@ApiModelProperty
(
"字段
ID
"
)
private
String
columnName
;
private
Integer
columnId
;
@ApiModelProperty
(
"操作符类型"
)
@ApiModelProperty
(
"操作符类型"
)
private
String
type
;
private
String
type
;
...
...
src/main/java/com/tykj/setting/entity/ScreenSetting.java
浏览文件 @
ddff351d
...
@@ -24,4 +24,7 @@ public class ScreenSetting {
...
@@ -24,4 +24,7 @@ public class ScreenSetting {
@ApiModelProperty
(
"表信息id"
)
@ApiModelProperty
(
"表信息id"
)
private
Integer
tableInfoId
;
private
Integer
tableInfoId
;
@ApiModelProperty
(
"名称"
)
private
String
name
;
}
}
src/main/java/com/tykj/setting/entity/vo/ScreenSettingVo.java
浏览文件 @
ddff351d
...
@@ -19,6 +19,11 @@ public class ScreenSettingVo {
...
@@ -19,6 +19,11 @@ public class ScreenSettingVo {
@ApiModelProperty
(
"表信息id"
)
@ApiModelProperty
(
"表信息id"
)
private
Integer
tableInfoId
;
private
Integer
tableInfoId
;
@ApiModelProperty
(
"名称"
)
private
String
name
;
@ApiModelProperty
(
"筛选条件"
)
@ApiModelProperty
(
"筛选条件"
)
private
List
<
ConditionSetting
>
conditions
;
private
List
<
ConditionSetting
>
conditions
;
}
}
src/main/java/com/tykj/setting/service/ScreenSettingService.java
浏览文件 @
ddff351d
...
@@ -29,7 +29,7 @@ public class ScreenSettingService {
...
@@ -29,7 +29,7 @@ public class ScreenSettingService {
public
void
save
(
ScreenSettingVo
screenSettingVo
){
public
void
save
(
ScreenSettingVo
screenSettingVo
){
boolean
newData
=
Objects
.
isNull
(
screenSettingVo
.
getId
());
boolean
newData
=
Objects
.
isNull
(
screenSettingVo
.
getId
());
if
(
newData
){
if
(
newData
){
ScreenSetting
saved
=
screenSettingRepository
.
save
(
new
ScreenSetting
(
screenSettingVo
.
getId
(),
screenSettingVo
.
getTableInfoId
()));
ScreenSetting
saved
=
screenSettingRepository
.
save
(
new
ScreenSetting
(
screenSettingVo
.
getId
(),
screenSettingVo
.
getTableInfoId
()
,
screenSettingVo
.
getName
()
));
Integer
savedId
=
saved
.
getId
();
Integer
savedId
=
saved
.
getId
();
List
<
ConditionSetting
>
conditionsForSave
=
screenSettingVo
.
getConditions
().
stream
()
List
<
ConditionSetting
>
conditionsForSave
=
screenSettingVo
.
getConditions
().
stream
()
.
map
(
conditionSetting
->
conditionSetting
.
setScreenSettingId
(
savedId
))
.
map
(
conditionSetting
->
conditionSetting
.
setScreenSettingId
(
savedId
))
...
@@ -44,7 +44,7 @@ public class ScreenSettingService {
...
@@ -44,7 +44,7 @@ public class ScreenSettingService {
boolean
exist
=
Objects
.
nonNull
(
screenSettingVo
.
getId
())
&&
screenSettingRepository
.
existsById
(
screenSettingVo
.
getId
());
boolean
exist
=
Objects
.
nonNull
(
screenSettingVo
.
getId
())
&&
screenSettingRepository
.
existsById
(
screenSettingVo
.
getId
());
if
(
exist
){
if
(
exist
){
conditionSettingRepository
.
deleteAllByScreenSettingId
(
screenSettingVo
.
getId
());
conditionSettingRepository
.
deleteAllByScreenSettingId
(
screenSettingVo
.
getId
());
screenSettingRepository
.
save
(
new
ScreenSetting
(
screenSettingVo
.
getId
(),
screenSettingVo
.
getTableInfoId
()));
screenSettingRepository
.
save
(
new
ScreenSetting
(
screenSettingVo
.
getId
(),
screenSettingVo
.
getTableInfoId
()
,
screenSettingVo
.
getName
()
));
Integer
savedId
=
screenSettingVo
.
getId
();
Integer
savedId
=
screenSettingVo
.
getId
();
List
<
ConditionSetting
>
conditionsForSave
=
screenSettingVo
.
getConditions
().
stream
()
List
<
ConditionSetting
>
conditionsForSave
=
screenSettingVo
.
getConditions
().
stream
()
.
map
(
conditionSetting
->
conditionSetting
.
setScreenSettingId
(
savedId
))
.
map
(
conditionSetting
->
conditionSetting
.
setScreenSettingId
(
savedId
))
...
@@ -66,7 +66,7 @@ public class ScreenSettingService {
...
@@ -66,7 +66,7 @@ public class ScreenSettingService {
if
(
byId
.
isPresent
()){
if
(
byId
.
isPresent
()){
ScreenSetting
screenSetting
=
byId
.
get
();
ScreenSetting
screenSetting
=
byId
.
get
();
List
<
ConditionSetting
>
conditions
=
conditionSettingRepository
.
findAllByScreenSettingId
(
id
);
List
<
ConditionSetting
>
conditions
=
conditionSettingRepository
.
findAllByScreenSettingId
(
id
);
return
new
ScreenSettingVo
(
screenSetting
.
getId
(),
screenSetting
.
getTableInfoId
(),
conditions
return
new
ScreenSettingVo
(
screenSetting
.
getId
(),
screenSetting
.
getTableInfoId
(),
screenSetting
.
getName
(),
conditions
);
);
}
else
{
}
else
{
throw
new
RuntimeException
(
"未找到该id的数据"
);
throw
new
RuntimeException
(
"未找到该id的数据"
);
...
@@ -80,7 +80,7 @@ public class ScreenSettingService {
...
@@ -80,7 +80,7 @@ public class ScreenSettingService {
private
ScreenSettingVo
screenSettingVo
(
ScreenSetting
screenSetting
){
private
ScreenSettingVo
screenSettingVo
(
ScreenSetting
screenSetting
){
List
<
ConditionSetting
>
conditions
=
conditionSettingRepository
.
findAllByScreenSettingId
(
screenSetting
.
getId
());
List
<
ConditionSetting
>
conditions
=
conditionSettingRepository
.
findAllByScreenSettingId
(
screenSetting
.
getId
());
return
new
ScreenSettingVo
(
screenSetting
.
getId
(),
screenSetting
.
getTableInfoId
(),
conditions
);
return
new
ScreenSettingVo
(
screenSetting
.
getId
(),
screenSetting
.
getTableInfoId
(),
screenSetting
.
getName
(),
conditions
);
}
}
}
}
src/main/resources/application.yml
浏览文件 @
ddff351d
...
@@ -2,11 +2,11 @@ spring:
...
@@ -2,11 +2,11 @@ spring:
datasource
:
datasource
:
username
:
root
username
:
root
password
:
Huang123+
password
:
Huang123+
url
:
jdbc:mysql://47.106.142.73:3306/dataTest?useSSL=false&serverTimezone=GMT%2b8&characterEncoding=utf-8
url
:
jdbc:mysql://47.106.142.73:3306/dataTest?useSSL=false&serverTimezone=GMT%2b8&characterEncoding=utf-8
&nullCatalogMeansCurrent=true
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
jpa
:
jpa
:
show-sql
:
true
show-sql
:
true
hibernate
:
hibernate
:
ddl-auto
:
update
ddl-auto
:
update
server
:
server
:
port
:
8801
port
:
8801
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论