Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
9d6e44e9
提交
9d6e44e9
authored
3月 20, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
8de2702c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
6 行增加
和
9 行删除
+6
-9
ImChatTemplate.java
...baiyihui/family/doctor/server/service/ImChatTemplate.java
+1
-1
ImChatTemplateImpl.java
...family/doctor/server/service/impl/ImChatTemplateImpl.java
+4
-7
ImMsgTemplateServiceImpl.java
.../doctor/server/service/impl/ImMsgTemplateServiceImpl.java
+1
-1
没有找到文件。
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/ImChatTemplate.java
浏览文件 @
9d6e44e9
...
@@ -29,5 +29,5 @@ public interface ImChatTemplate {
...
@@ -29,5 +29,5 @@ public interface ImChatTemplate {
void
doctorPrompted
(
String
admId
);
void
doctorPrompted
(
String
admId
);
Boolean
sendMsg
(
List
<
Components
>
componentsList
,
String
admId
,
Integer
contentType
);
Boolean
sendMsg
(
List
<
Components
>
componentsList
,
String
admId
);
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ImChatTemplateImpl.java
浏览文件 @
9d6e44e9
...
@@ -12,7 +12,6 @@ import com.ebaiyihui.family.doctor.common.dto.DoctorIdDTO;
...
@@ -12,7 +12,6 @@ import com.ebaiyihui.family.doctor.common.dto.DoctorIdDTO;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.ImConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.ImConstants
;
import
com.ebaiyihui.family.doctor.server.common.enums.ContentType
;
import
com.ebaiyihui.family.doctor.server.common.enums.SenderEnum
;
import
com.ebaiyihui.family.doctor.server.common.enums.SenderEnum
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
...
@@ -143,21 +142,19 @@ public class ImChatTemplateImpl implements ImChatTemplate {
...
@@ -143,21 +142,19 @@ public class ImChatTemplateImpl implements ImChatTemplate {
}
}
@Override
@Override
public
Boolean
sendMsg
(
List
<
Components
>
componentsList
,
String
admId
,
Integer
contentType
)
{
public
Boolean
sendMsg
(
List
<
Components
>
componentsList
,
String
admId
)
{
if
(!
componentsList
.
isEmpty
())
{
if
(!
componentsList
.
isEmpty
())
{
log
.
info
(
"componentsList={}"
,
componentsList
);
for
(
int
i
=
0
;
i
<=
componentsList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<=
componentsList
.
size
();
i
++)
{
String
content
=
componentsList
.
get
(
i
).
getContent
();
String
content
=
componentsList
.
get
(
i
).
getContent
();
List
<
MessageInfo
>
messageInfos
=
new
ArrayList
<>();
List
<
MessageInfo
>
messageInfos
=
new
ArrayList
<>();
PatientSignInfo
patientSignInfo
=
getPatientSignInfo
(
admId
);
PatientSignInfo
patientSignInfo
=
getPatientSignInfo
(
admId
);
if
(
ContentType
.
DOCTOR
.
getValue
().
equals
(
contentType
))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
}
else
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getPatientName
());
}
MessageInfo
messageInfo
=
new
MessageInfo
();
MessageInfo
messageInfo
=
new
MessageInfo
();
if
(
SenderEnum
.
DOCTOR
.
getDesc
().
equals
(
componentsList
.
get
(
i
).
getSender
()))
{
if
(
SenderEnum
.
DOCTOR
.
getDesc
().
equals
(
componentsList
.
get
(
i
).
getSender
()))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
messageInfo
=
getDoctorInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
);
messageInfo
=
getDoctorInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
);
}
else
{
}
else
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getPatientName
());
messageInfo
=
getInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
);
messageInfo
=
getInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
);
}
}
messageInfos
.
add
(
messageInfo
);
messageInfos
.
add
(
messageInfo
);
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ImMsgTemplateServiceImpl.java
浏览文件 @
9d6e44e9
...
@@ -48,7 +48,7 @@ public class ImMsgTemplateServiceImpl implements ImMsgTemplateService {
...
@@ -48,7 +48,7 @@ public class ImMsgTemplateServiceImpl implements ImMsgTemplateService {
String
components
=
imMsgTemplateEntity
.
getContent
();
String
components
=
imMsgTemplateEntity
.
getContent
();
MsgContent
msgContent
=
JSON
.
parseObject
(
components
,
MsgContent
.
class
);
MsgContent
msgContent
=
JSON
.
parseObject
(
components
,
MsgContent
.
class
);
List
<
Components
>
componentsList
=
msgContent
.
getComponents
().
stream
().
sorted
(
Comparator
.
comparing
(
Components:
:
getSort
)).
collect
(
Collectors
.
toList
());
List
<
Components
>
componentsList
=
msgContent
.
getComponents
().
stream
().
sorted
(
Comparator
.
comparing
(
Components:
:
getSort
)).
collect
(
Collectors
.
toList
());
Boolean
flag
=
imChatTemplate
.
sendMsg
(
componentsList
,
reqVo
.
getAdmId
()
,
imMsgTemplateEntity
.
getContentType
()
);
Boolean
flag
=
imChatTemplate
.
sendMsg
(
componentsList
,
reqVo
.
getAdmId
());
if
(!
flag
)
{
if
(!
flag
)
{
throw
new
BusinessException
(
"消息推送失败"
);
throw
new
BusinessException
(
"消息推送失败"
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论