Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
3447b1ca
Commit
3447b1ca
authored
Aug 21, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix[智能问数]: 示例添加字段[图片、附件名]
parent
64582e53
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
178 additions
and
61 deletions
+178
-61
BizAiBiExampleConvert.java
.../java/cn/com/poc/ai_bi/convert/BizAiBiExampleConvert.java
+32
-0
BizAiBiExampleDto.java
src/main/java/cn/com/poc/ai_bi/dto/BizAiBiExampleDto.java
+71
-37
BizAiBiExampleEntity.java
...in/java/cn/com/poc/ai_bi/entity/BizAiBiExampleEntity.java
+25
-0
BizAiBiExampleModel.java
...main/java/cn/com/poc/ai_bi/model/BizAiBiExampleModel.java
+39
-14
BizAiBiExampleRepository.java
...cn/com/poc/ai_bi/repository/BizAiBiExampleRepository.java
+1
-1
AiBiRestImpl.java
src/main/java/cn/com/poc/ai_bi/rest/impl/AiBiRestImpl.java
+3
-2
BizAiBiExampleService.java
.../java/cn/com/poc/ai_bi/service/BizAiBiExampleService.java
+3
-3
BizAiBiExampleServiceImpl.java
...com/poc/ai_bi/service/impl/BizAiBiExampleServiceImpl.java
+4
-4
No files found.
src/main/java/cn/com/poc/ai_bi/convert/BizAiBiExampleConvert.java
View file @
3447b1ca
...
@@ -15,6 +15,14 @@ public class BizAiBiExampleConvert {
...
@@ -15,6 +15,14 @@ public class BizAiBiExampleConvert {
entity
.
setDataRelation
(
model
.
getDataRelation
());
entity
.
setDataRelation
(
model
.
getDataRelation
());
entity
.
setExampleDesc
(
model
.
getExampleDesc
());
entity
.
setExampleDesc
(
model
.
getExampleDesc
());
entity
.
setQuestion
(
model
.
getQuestion
());
entity
.
setQuestion
(
model
.
getQuestion
());
entity
.
setId
(
model
.
getId
());
entity
.
setTitle
(
model
.
getTitle
());
entity
.
setDataType
(
model
.
getDataType
());
entity
.
setDataRelation
(
model
.
getDataRelation
());
entity
.
setExampleDesc
(
model
.
getExampleDesc
());
entity
.
setQuestion
(
model
.
getQuestion
());
entity
.
setAttachmentName
(
model
.
getAttachmentName
());
entity
.
setImageUrl
(
model
.
getImageUrl
());
return
entity
;
return
entity
;
}
}
...
@@ -26,6 +34,14 @@ public class BizAiBiExampleConvert {
...
@@ -26,6 +34,14 @@ public class BizAiBiExampleConvert {
model
.
setDataRelation
(
entity
.
getDataRelation
());
model
.
setDataRelation
(
entity
.
getDataRelation
());
model
.
setExampleDesc
(
entity
.
getExampleDesc
());
model
.
setExampleDesc
(
entity
.
getExampleDesc
());
model
.
setQuestion
(
entity
.
getQuestion
());
model
.
setQuestion
(
entity
.
getQuestion
());
model
.
setId
(
entity
.
getId
());
model
.
setTitle
(
entity
.
getTitle
());
model
.
setDataType
(
entity
.
getDataType
());
model
.
setDataRelation
(
entity
.
getDataRelation
());
model
.
setExampleDesc
(
entity
.
getExampleDesc
());
model
.
setQuestion
(
entity
.
getQuestion
());
model
.
setAttachmentName
(
entity
.
getAttachmentName
());
model
.
setImageUrl
(
entity
.
getImageUrl
());
return
model
;
return
model
;
}
}
...
@@ -37,6 +53,14 @@ public class BizAiBiExampleConvert {
...
@@ -37,6 +53,14 @@ public class BizAiBiExampleConvert {
dto
.
setDataRelation
(
entity
.
getDataRelation
());
dto
.
setDataRelation
(
entity
.
getDataRelation
());
dto
.
setExampleDesc
(
entity
.
getExampleDesc
());
dto
.
setExampleDesc
(
entity
.
getExampleDesc
());
dto
.
setQuestion
(
entity
.
getQuestion
());
dto
.
setQuestion
(
entity
.
getQuestion
());
dto
.
setId
(
entity
.
getId
());
dto
.
setTitle
(
entity
.
getTitle
());
dto
.
setDataType
(
entity
.
getDataType
());
dto
.
setDataRelation
(
entity
.
getDataRelation
());
dto
.
setExampleDesc
(
entity
.
getExampleDesc
());
dto
.
setQuestion
(
entity
.
getQuestion
());
dto
.
setAttachmentName
(
entity
.
getAttachmentName
());
dto
.
setImageUrl
(
entity
.
getImageUrl
());
return
dto
;
return
dto
;
}
}
...
@@ -48,6 +72,14 @@ public class BizAiBiExampleConvert {
...
@@ -48,6 +72,14 @@ public class BizAiBiExampleConvert {
entity
.
setDataRelation
(
dto
.
getDataRelation
());
entity
.
setDataRelation
(
dto
.
getDataRelation
());
entity
.
setExampleDesc
(
dto
.
getExampleDesc
());
entity
.
setExampleDesc
(
dto
.
getExampleDesc
());
entity
.
setQuestion
(
dto
.
getQuestion
());
entity
.
setQuestion
(
dto
.
getQuestion
());
entity
.
setId
(
dto
.
getId
());
entity
.
setTitle
(
dto
.
getTitle
());
entity
.
setDataType
(
dto
.
getDataType
());
entity
.
setDataRelation
(
dto
.
getDataRelation
());
entity
.
setExampleDesc
(
dto
.
getExampleDesc
());
entity
.
setQuestion
(
dto
.
getQuestion
());
entity
.
setAttachmentName
(
dto
.
getAttachmentName
());
entity
.
setImageUrl
(
dto
.
getImageUrl
());
return
entity
;
return
entity
;
}
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/ai_bi/dto/BizAiBiExampleDto.java
View file @
3447b1ca
package
cn
.
com
.
poc
.
ai_bi
.
dto
;
package
cn
.
com
.
poc
.
ai_bi
.
dto
;
public
class
BizAiBiExampleDto
{
public
class
BizAiBiExampleDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** id
/**
*
* id
*/
*/
private
java
.
lang
.
Long
id
;
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
public
java
.
lang
.
Long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
java
.
lang
.
Long
id
){
public
void
setId
(
java
.
lang
.
Long
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/** title
*标题
/**
*/
* title
* 标题
*/
private
java
.
lang
.
String
title
;
private
java
.
lang
.
String
title
;
public
java
.
lang
.
String
getTitle
(){
public
java
.
lang
.
String
getTitle
()
{
return
this
.
title
;
return
this
.
title
;
}
}
public
void
setTitle
(
java
.
lang
.
String
title
){
public
void
setTitle
(
java
.
lang
.
String
title
)
{
this
.
title
=
title
;
this
.
title
=
title
;
}
}
/** data_type
*
/**
*/
* data_type
*/
private
java
.
lang
.
String
dataType
;
private
java
.
lang
.
String
dataType
;
public
java
.
lang
.
String
getDataType
(){
public
java
.
lang
.
String
getDataType
()
{
return
this
.
dataType
;
return
this
.
dataType
;
}
}
public
void
setDataType
(
java
.
lang
.
String
dataType
){
public
void
setDataType
(
java
.
lang
.
String
dataType
)
{
this
.
dataType
=
dataType
;
this
.
dataType
=
dataType
;
}
}
/** data_relation
*
/**
*/
* data_relation
*/
private
java
.
lang
.
String
dataRelation
;
private
java
.
lang
.
String
dataRelation
;
public
java
.
lang
.
String
getDataRelation
(){
public
java
.
lang
.
String
getDataRelation
()
{
return
this
.
dataRelation
;
return
this
.
dataRelation
;
}
}
public
void
setDataRelation
(
java
.
lang
.
String
dataRelation
){
public
void
setDataRelation
(
java
.
lang
.
String
dataRelation
)
{
this
.
dataRelation
=
dataRelation
;
this
.
dataRelation
=
dataRelation
;
}
}
/** example_desc
*
/**
*/
* example_desc
*/
private
java
.
lang
.
String
exampleDesc
;
private
java
.
lang
.
String
exampleDesc
;
public
java
.
lang
.
String
getExampleDesc
(){
public
java
.
lang
.
String
getExampleDesc
()
{
return
this
.
exampleDesc
;
return
this
.
exampleDesc
;
}
}
public
void
setExampleDesc
(
java
.
lang
.
String
exampleDesc
){
public
void
setExampleDesc
(
java
.
lang
.
String
exampleDesc
)
{
this
.
exampleDesc
=
exampleDesc
;
this
.
exampleDesc
=
exampleDesc
;
}
}
/** question
*
/**
*/
* question
*/
private
java
.
lang
.
String
question
;
private
java
.
lang
.
String
question
;
public
java
.
lang
.
String
getQuestion
(){
public
java
.
lang
.
String
getQuestion
()
{
return
this
.
question
;
return
this
.
question
;
}
}
public
void
setQuestion
(
java
.
lang
.
String
question
){
public
void
setQuestion
(
java
.
lang
.
String
question
)
{
this
.
question
=
question
;
this
.
question
=
question
;
}
}
/**
* attachment_name
* 附件名
*/
private
java
.
lang
.
String
attachmentName
;
public
java
.
lang
.
String
getAttachmentName
()
{
return
this
.
attachmentName
;
}
public
void
setAttachmentName
(
java
.
lang
.
String
attachmentName
)
{
this
.
attachmentName
=
attachmentName
;
}
/**
* image_url
* 图片地址
*/
private
java
.
lang
.
String
imageUrl
;
public
java
.
lang
.
String
getImageUrl
()
{
return
this
.
imageUrl
;
}
public
void
setImageUrl
(
java
.
lang
.
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/ai_bi/entity/BizAiBiExampleEntity.java
View file @
3447b1ca
...
@@ -76,4 +76,29 @@ public class BizAiBiExampleEntity {
...
@@ -76,4 +76,29 @@ public class BizAiBiExampleEntity {
public
void
setQuestion
(
java
.
lang
.
String
question
){
public
void
setQuestion
(
java
.
lang
.
String
question
){
this
.
question
=
question
;
this
.
question
=
question
;
}
}
/** attachment_name
*附件名
*/
private
java
.
lang
.
String
attachmentName
;
public
java
.
lang
.
String
getAttachmentName
(){
return
this
.
attachmentName
;
}
public
void
setAttachmentName
(
java
.
lang
.
String
attachmentName
){
this
.
attachmentName
=
attachmentName
;
}
/** image_url
*图片地址
*/
private
java
.
lang
.
String
imageUrl
;
public
java
.
lang
.
String
getImageUrl
(){
return
this
.
imageUrl
;
}
public
void
setImageUrl
(
java
.
lang
.
String
imageUrl
){
this
.
imageUrl
=
imageUrl
;
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/ai_bi/model/BizAiBiExampleModel.java
View file @
3447b1ca
...
@@ -2,14 +2,11 @@ package cn.com.poc.ai_bi.model;
...
@@ -2,14 +2,11 @@ package cn.com.poc.ai_bi.model;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.*
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
/**
* Model class for biz_ai_bi_example
* Model class for biz_ai_bi_example
...
@@ -22,24 +19,24 @@ import javax.persistence.GenerationType;
...
@@ -22,24 +19,24 @@ import javax.persistence.GenerationType;
public
class
BizAiBiExampleModel
extends
BaseModelClass
implements
Serializable
{
public
class
BizAiBiExampleModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** id
/** id
*
*
*/
*/
private
java
.
lang
.
Long
id
;
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
,
length
=
19
)
@Column
(
name
=
"id"
,
length
=
19
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Long
getId
(){
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
java
.
lang
.
Long
id
){
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
super
.
addValidField
(
"id"
);
}
}
/** title
/** title
*标题
*标题
...
@@ -119,6 +116,34 @@ public class BizAiBiExampleModel extends BaseModelClass implements Serializable
...
@@ -119,6 +116,34 @@ public class BizAiBiExampleModel extends BaseModelClass implements Serializable
this
.
question
=
question
;
this
.
question
=
question
;
super
.
addValidField
(
"question"
);
super
.
addValidField
(
"question"
);
}
}
/**
*
*/
private
String
attachmentName
;
@Column
(
name
=
"attachment_name"
,
length
=
150
)
public
String
getAttachmentName
()
{
return
attachmentName
;
}
public
void
setAttachmentName
(
String
attachmentName
)
{
this
.
attachmentName
=
attachmentName
;
super
.
addValidField
(
"attachmentName"
);
}
/**
*
*/
private
String
imageUrl
;
@Column
(
name
=
"image_url"
,
length
=
150
)
public
String
getImageUrl
()
{
return
imageUrl
;
}
public
void
setImageUrl
(
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
super
.
addValidField
(
"imageUrl"
);
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/ai_bi/repository/BizAiBiExampleRepository.java
View file @
3447b1ca
package
cn
.
com
.
poc
.
ai_bi
.
repository
;
package
cn
.
com
.
poc
.
ai_bi
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.ai_bi.model.BizAiBiExampleModel
;
import
cn.com.poc.ai_bi.model.BizAiBiExampleModel
;
import
cn.com.yict.framemax.data.repository.Repository
;
public
interface
BizAiBiExampleRepository
extends
Repository
<
BizAiBiExampleModel
,
java
.
lang
.
Long
>
{
public
interface
BizAiBiExampleRepository
extends
Repository
<
BizAiBiExampleModel
,
java
.
lang
.
Long
>
{
}
}
\ No newline at end of file
src/main/java/cn/com/poc/ai_bi/rest/impl/AiBiRestImpl.java
View file @
3447b1ca
...
@@ -6,6 +6,7 @@ import cn.com.poc.ai_bi.dto.AIBiExampleDto;
...
@@ -6,6 +6,7 @@ import cn.com.poc.ai_bi.dto.AIBiExampleDto;
import
cn.com.poc.ai_bi.dto.AiBiDialoguesDto
;
import
cn.com.poc.ai_bi.dto.AiBiDialoguesDto
;
import
cn.com.poc.ai_bi.dto.AiBiGenerateInsightReportDto
;
import
cn.com.poc.ai_bi.dto.AiBiGenerateInsightReportDto
;
import
cn.com.poc.ai_bi.dto.BizAiBiExampleDto
;
import
cn.com.poc.ai_bi.dto.BizAiBiExampleDto
;
import
cn.com.poc.ai_bi.entity.BizAiBiExampleEntity
;
import
cn.com.poc.ai_bi.rest.AiBiRest
;
import
cn.com.poc.ai_bi.rest.AiBiRest
;
import
cn.com.poc.ai_bi.service.BizAiBiExampleService
;
import
cn.com.poc.ai_bi.service.BizAiBiExampleService
;
import
cn.com.poc.common.utils.Assert
;
import
cn.com.poc.common.utils.Assert
;
...
@@ -64,13 +65,13 @@ public class AiBiRestImpl implements AiBiRest {
...
@@ -64,13 +65,13 @@ public class AiBiRestImpl implements AiBiRest {
@Override
@Override
public
String
getInsightReport
(
String
dialoguesId
)
{
public
String
getInsightReport
(
String
dialoguesId
)
{
Assert
.
notBlank
(
dialoguesId
,
"对话id不能为空"
);
Assert
.
notBlank
(
dialoguesId
,
"对话id不能为空"
);
return
aiBiService
.
getInsightReport
(
dialoguesId
);
return
aiBiService
.
getInsightReport
(
dialoguesId
);
}
}
@Override
@Override
public
AIBiExampleDto
getExample
()
throws
Exception
{
public
AIBiExampleDto
getExample
()
throws
Exception
{
List
<
BizAiBiExampleDto
>
exampleDtos
=
bizAiBiExampleService
.
findByExample
(
BizAiBiExampleConvert
.
dtoToEntity
(
new
BizAiBiExampleDto
()
),
null
)
List
<
BizAiBiExampleDto
>
exampleDtos
=
bizAiBiExampleService
.
findByExample
(
new
BizAiBiExampleEntity
(
),
null
)
.
stream
()
.
stream
()
.
map
(
BizAiBiExampleConvert:
:
entityToDto
)
.
map
(
BizAiBiExampleConvert:
:
entityToDto
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
...
...
src/main/java/cn/com/poc/ai_bi/service/BizAiBiExampleService.java
View file @
3447b1ca
package
cn
.
com
.
poc
.
ai_bi
.
service
;
package
cn
.
com
.
poc
.
ai_bi
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.ai_bi.entity.BizAiBiExampleEntity
;
import
cn.com.poc.ai_bi.entity.BizAiBiExampleEntity
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
public
interface
BizAiBiExampleService
extends
BaseService
{
public
interface
BizAiBiExampleService
extends
BaseService
{
BizAiBiExampleEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
BizAiBiExampleEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizAiBiExampleEntity
>
findByExample
(
BizAiBiExampleEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
List
<
BizAiBiExampleEntity
>
findByExample
(
BizAiBiExampleEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAiBiExampleEntity
save
(
BizAiBiExampleEntity
entity
)
throws
Exception
;
BizAiBiExampleEntity
save
(
BizAiBiExampleEntity
entity
)
throws
Exception
;
...
...
src/main/java/cn/com/poc/ai_bi/service/impl/BizAiBiExampleServiceImpl.java
View file @
3447b1ca
package
cn
.
com
.
poc
.
ai_bi
.
service
.
impl
;
package
cn
.
com
.
poc
.
ai_bi
.
service
.
impl
;
import
cn.com.poc.ai_bi.convert.BizAiBiExampleConvert
;
import
cn.com.poc.ai_bi.entity.BizAiBiExampleEntity
;
import
cn.com.poc.ai_bi.model.BizAiBiExampleModel
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.ai_bi.service.BizAiBiExampleService
;
import
cn.com.poc.ai_bi.service.BizAiBiExampleService
;
import
cn.com.poc.ai_bi.model.BizAiBiExampleModel
;
import
cn.com.poc.ai_bi.entity.BizAiBiExampleEntity
;
import
cn.com.poc.ai_bi.convert.BizAiBiExampleConvert
;
import
cn.com.poc.ai_bi.repository.BizAiBiExampleRepository
;
import
cn.com.poc.ai_bi.repository.BizAiBiExampleRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -33,7 +33,7 @@ public class BizAiBiExampleServiceImpl extends BaseServiceImpl
...
@@ -33,7 +33,7 @@ public class BizAiBiExampleServiceImpl extends BaseServiceImpl
}
}
public
List
<
BizAiBiExampleEntity
>
findByExample
(
BizAiBiExampleEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
public
List
<
BizAiBiExampleEntity
>
findByExample
(
BizAiBiExampleEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizAiBiExampleEntity
>
result
=
new
ArrayList
<
BizAiBiExampleEntity
>();
List
<
BizAiBiExampleEntity
>
result
=
new
ArrayList
<
BizAiBiExampleEntity
>();
BizAiBiExampleModel
model
=
new
BizAiBiExampleModel
();
BizAiBiExampleModel
model
=
new
BizAiBiExampleModel
();
if
(
example
!=
null
){
if
(
example
!=
null
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment