Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
medical-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
aiming-medical
medical-server
Commits
a7ed3cff
提交
a7ed3cff
authored
10月 31, 2023
作者:
zhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.develop
2.fix bug
上级
0da44840
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
36 行增加
和
6 行删除
+36
-6
DiseaseConfig.java
...in/java/com/xwd/hospital/server/domain/DiseaseConfig.java
+12
-0
DiseaseConfigParam.java
.../com/xwd/hospital/server/rest/req/DiseaseConfigParam.java
+16
-0
DiseaseConfigBaseMapper.xml
src/main/resources/mappers/base/DiseaseConfigBaseMapper.xml
+8
-6
没有找到文件。
src/main/java/com/xwd/hospital/server/domain/DiseaseConfig.java
浏览文件 @
a7ed3cff
...
...
@@ -48,6 +48,12 @@ public class DiseaseConfig extends BaseDomain {
@TableField
(
value
=
"disease_desc"
,
select
=
false
)
@Schema
(
description
=
"疾病描述"
,
nullable
=
false
)
private
String
diseaseDesc
;
/**
* 常见症状
*/
@TableField
(
value
=
"common_symptoms"
)
@Schema
(
description
=
"常见症状"
,
nullable
=
false
)
private
String
commonSymptoms
;
/**
* 操作人Id
*/
...
...
@@ -112,6 +118,12 @@ public class DiseaseConfig extends BaseDomain {
}
return
false
;
}
if
(
this
.
getCommonSymptoms
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"常见症状不能为空!"
);
}
return
false
;
}
if
(
this
.
getEditorId
()
==
null
)
{
if
(
throwException
)
{
throw
new
ApiCode
.
ApiException
(-
1
,
"操作人Id不能为空!"
);
...
...
src/main/java/com/xwd/hospital/server/rest/req/DiseaseConfigParam.java
浏览文件 @
a7ed3cff
...
...
@@ -45,6 +45,11 @@ public class DiseaseConfigParam extends BaseParam<DiseaseConfig> {
*/
@Parameter
(
description
=
"疾病描述"
)
private
String
diseaseDesc
;
/**
* 常见症状
*/
@Parameter
(
description
=
"常见症状"
)
private
String
commonSymptoms
;
/**
* 操作人Id
*/
...
...
@@ -131,6 +136,17 @@ public class DiseaseConfigParam extends BaseParam<DiseaseConfig> {
wrapper
.
eq
(
columnPrefix
+
"disease_desc"
,
this
.
getDiseaseDesc
());
}
}
if
(
this
.
getCommonSymptoms
()
!=
null
)
{
if
(
this
.
getCommonSymptoms
().
startsWith
(
"%"
)
&&
this
.
getCommonSymptoms
().
endsWith
(
"%"
))
{
wrapper
.
like
(
columnPrefix
+
"common_symptoms"
,
this
.
getCommonSymptoms
().
substring
(
1
,
this
.
getCommonSymptoms
().
length
()
-
1
));
}
else
if
(
this
.
getCommonSymptoms
().
startsWith
(
"%"
)
&&
!
this
.
getCommonSymptoms
().
endsWith
(
"%"
))
{
wrapper
.
likeLeft
(
columnPrefix
+
"common_symptoms"
,
this
.
getCommonSymptoms
().
substring
(
1
));
}
else
if
(
this
.
getCommonSymptoms
().
endsWith
(
"%"
))
{
wrapper
.
likeRight
(
columnPrefix
+
"common_symptoms"
,
this
.
getCommonSymptoms
().
substring
(
0
,
this
.
getCommonSymptoms
().
length
()
-
1
));
}
else
{
wrapper
.
eq
(
columnPrefix
+
"common_symptoms"
,
this
.
getCommonSymptoms
());
}
}
wrapper
.
eq
(
this
.
getEditorId
()
!=
null
,
columnPrefix
+
"editor_id"
,
this
.
getEditorId
());
if
(
this
.
getEditorName
()
!=
null
)
{
if
(
this
.
getEditorName
().
startsWith
(
"%"
)
&&
this
.
getEditorName
().
endsWith
(
"%"
))
{
...
...
src/main/resources/mappers/base/DiseaseConfigBaseMapper.xml
浏览文件 @
a7ed3cff
...
...
@@ -4,6 +4,7 @@
<resultMap
id=
"BaseResultMap"
type=
"com.xwd.hospital.server.domain.DiseaseConfig"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"disease_name"
jdbcType=
"VARCHAR"
property=
"diseaseName"
/>
<result
column=
"common_symptoms"
jdbcType=
"VARCHAR"
property=
"commonSymptoms"
/>
<result
column=
"editor_id"
jdbcType=
"BIGINT"
property=
"editorId"
/>
<result
column=
"editor_name"
jdbcType=
"VARCHAR"
property=
"editorName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
...
...
@@ -13,25 +14,25 @@
<result
column=
"disease_desc"
jdbcType=
"VARCHAR"
property=
"diseaseDesc"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
`id`, `disease_name`, `editor_id`, `editor_name`, `create_time`, `update_time`
`id`, `disease_name`, `
common_symptoms`, `
editor_id`, `editor_name`, `create_time`, `update_time`
</sql>
<sql
id=
"Base_Column_List_With_Prefix"
>
t.`id`, t.`disease_name`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
t.`id`, t.`disease_name`, t.`
common_symptoms`, t.`
editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql>
<sql
id=
"Base_Column_List_Full"
>
`id`, `disease_name`, `disease_desc`, `editor_id`, `editor_name`, `create_time`, `update_time`
`id`, `disease_name`, `disease_desc`, `
common_symptoms`, `
editor_id`, `editor_name`, `create_time`, `update_time`
</sql>
<sql
id=
"Base_Column_List_Full_With_Prefix"
>
t.`id`, t.`disease_name`, t.`disease_desc`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
t.`id`, t.`disease_name`, t.`disease_desc`, t.`
common_symptoms`, t.`
editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql>
<insert
id=
"batchInsert"
>
insert into pms_disease_config (
`disease_name`, `disease_desc`, `editor_id`, `editor_name`
`disease_name`, `disease_desc`, `
common_symptoms`, `
editor_id`, `editor_name`
)
values
<foreach
collection=
"records"
item=
"record"
separator=
","
>
(
#{record.diseaseName, jdbcType=VARCHAR}, #{record.diseaseDesc, jdbcType=VARCHAR}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
#{record.diseaseName, jdbcType=VARCHAR}, #{record.diseaseDesc, jdbcType=VARCHAR}, #{record.
commonSymptoms, jdbcType=VARCHAR}, #{record.
editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
)
</foreach>
</insert>
...
...
@@ -40,6 +41,7 @@
<trim
suffixOverrides=
","
>
disease_name = #{et.diseaseName, jdbcType=VARCHAR},
disease_desc = #{et.diseaseDesc, jdbcType=VARCHAR},
common_symptoms = #{et.commonSymptoms, jdbcType=VARCHAR},
editor_id = #{et.editorId, jdbcType=BIGINT},
editor_name = #{et.editorName, jdbcType=VARCHAR},
</trim>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论