Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
60d5c082
提交
60d5c082
authored
4月 01, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
5b4745f6
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
342 行增加
和
27 行删除
+342
-27
ImMessageDTO.java
...a/com/ebaiyihui/family/doctor/common/bo/ImMessageDTO.java
+98
-0
IMUpdateOnlineStatusReqDTO.java
.../family/doctor/common/dto/IMUpdateOnlineStatusReqDTO.java
+21
-0
InfoListDTO.java
...a/com/ebaiyihui/family/doctor/common/dto/InfoListDTO.java
+23
-0
UnReadMsgDTO.java
.../com/ebaiyihui/family/doctor/common/dto/UnReadMsgDTO.java
+19
-0
ByhFamilyDoctorApplication.java
...c/main/java/com/ebaiyihui/ByhFamilyDoctorApplication.java
+2
-0
UrlConstants.java
...i/family/doctor/server/common/constants/UrlConstants.java
+5
-0
ImMsgTemplateController.java
...ily/doctor/server/controller/ImMsgTemplateController.java
+8
-8
MobileBenefitPackageController.java
...tor/server/controller/MobileBenefitPackageController.java
+7
-0
PatientEntity.java
.../ebaiyihui/family/doctor/server/entity/PatientEntity.java
+6
-0
ImMsgTemplateService.java
...ui/family/doctor/server/service/ImMsgTemplateService.java
+2
-3
MobileBenefitPackageService.java
...ly/doctor/server/service/MobileBenefitPackageService.java
+3
-0
ImMsgTemplateServiceImpl.java
.../doctor/server/service/impl/ImMsgTemplateServiceImpl.java
+106
-4
MobileBenefitPackageServiceImpl.java
.../server/service/impl/MobileBenefitPackageServiceImpl.java
+18
-0
ThirdOrderPushUtil.java
...aiyihui/family/doctor/server/util/ThirdOrderPushUtil.java
+24
-12
没有找到文件。
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/bo/ImMessageDTO.java
0 → 100644
浏览文件 @
60d5c082
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
bo
;
import
lombok.Data
;
/**
* @ClassName: ImMessageEntity
* @Author:yanliang
* @Date:2024/4/1 11:11
* @Description
*/
@Data
public
class
ImMessageDTO
{
private
String
id
;
/**
* 创建者
**/
private
String
createUser
;
/**
* 更新者
**/
private
String
updateUser
;
/**
* 创建时间 yyyy-MM-dd hh:mm:ss
**/
private
String
createDateTime
;
/**
* 最后更新时间 yyyy-MM-dd hh:mm:ss
**/
private
String
updateDateTime
;
private
String
sessionId
;
/**
* 发送者Id
**/
private
String
senderId
;
/**
* 接收者Id
**/
private
String
receiverId
;
/**
* 消息内容
**/
private
String
message
;
/**
* 消息类型
**/
private
String
msgType
;
/**
* 消息发送时间 以腾讯云推送时间为准
**/
private
String
msgTime
;
/**
* 客户端自定义消息主键
**/
private
String
clientMsgId
;
/**
* 腾讯云消息主键
**/
private
String
apiMsgId
;
/**
* 语音时长
**/
private
Integer
duration
;
/**
* 发送者操作平台
**/
private
String
optPlatform
;
/**
* Linux时间戳
**/
private
Long
timeStamp
;
private
Integer
status
;
/**
* 有序的消息编号
*/
private
Long
msgId
;
private
String
treatmentId
;
private
String
senderUserId
;
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/IMUpdateOnlineStatusReqDTO.java
0 → 100644
浏览文件 @
60d5c082
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
dto
;
import
lombok.Data
;
/**
* @ClassName: IMUpdateOnlineStatusReqDTO
* @Author:yanliang
* @Date:2024/4/1 09:38
* @Description
*/
@Data
public
class
IMUpdateOnlineStatusReqDTO
{
private
String
phone
;
private
String
patientUserId
;
private
Integer
status
;
private
String
offLineTime
;
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/InfoListDTO.java
0 → 100644
浏览文件 @
60d5c082
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
dto
;
import
lombok.Data
;
/**
* @ClassName: InfoListDTO
* @Author:yanliang
* @Date:2024/4/1 14:27
* @Description
*/
@Data
public
class
InfoListDTO
{
private
String
userName
;
private
String
messageNum
;
private
String
groupId
;
private
String
doctorId
;
private
String
timestamp
;
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/UnReadMsgDTO.java
0 → 100644
浏览文件 @
60d5c082
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @ClassName: UnReadMsgDTO
* @Author:yanliang
* @Date:2024/4/1 14:26
* @Description
*/
@Data
public
class
UnReadMsgDTO
{
private
List
<
InfoListDTO
>
infoList
;
private
String
phone
;
}
family-doctor-server/src/main/java/com/ebaiyihui/ByhFamilyDoctorApplication.java
浏览文件 @
60d5c082
...
...
@@ -8,6 +8,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
/**
...
...
@@ -23,6 +24,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableFeignClients
@EnableCircuitBreaker
@EnableAsync
@EnableScheduling
@MapperScan
(
"com.ebaiyihui.family.doctor.server.mapper"
)
public
class
ByhFamilyDoctorApplication
{
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/common/constants/UrlConstants.java
浏览文件 @
60d5c082
...
...
@@ -75,4 +75,9 @@ public class UrlConstants {
* 查询用户报告详情
*/
public
static
final
String
REPORT_DETAIL_URL
=
"/auth/v1.0.0/report_detail"
;
/**
* 未读消息推送
*/
public
static
final
String
UN_READ_MSG_URL
=
"/auth/v1.0.0/push/unread_msg"
;
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/controller/ImMsgTemplateController.java
浏览文件 @
60d5c082
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
controller
;
import
com.ebaiyihui.family.doctor.common.
dto.ImNoReadMsg
DTO
;
import
com.ebaiyihui.family.doctor.common.
bo.ImMessage
DTO
;
import
com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO
;
import
com.ebaiyihui.family.doctor.common.vo.ImNoReadMsgVo
;
import
com.ebaiyihui.family.doctor.server.service.ImMsgTemplateService
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
io.swagger.annotations.Api
;
...
...
@@ -42,15 +41,16 @@ public class ImMsgTemplateController {
return
BaseResponse
.
success
(
"消息推送成功"
);
}
@RequestMapping
(
value
=
"/queryImNoReadMsg"
,
method
=
RequestMethod
.
POST
)
public
BaseResponse
<
ImNoReadMsgVo
>
queryImNoReadMsg
(
@RequestBody
ImNoReadMsgDTO
reqVo
,
BindingResult
bindingResult
)
{
BaseResponse
<
ImNoReadMsgVo
>
response
=
null
;
@RequestMapping
(
value
=
"/unReadMsgCount"
,
method
=
RequestMethod
.
POST
)
public
BaseResponse
<
String
>
unReadMsgCount
(
@RequestBody
ImMessageDTO
imMessageDTO
,
BindingResult
bindingResult
)
{
BaseResponse
<
String
>
response
=
null
;
try
{
response
=
imMsgTemplateService
.
queryImNoReadMsg
(
reqVo
);
response
=
imMsgTemplateService
.
unReadMsgCount
(
imMessageDTO
);
}
catch
(
Exception
e
)
{
return
BaseResponse
.
error
(
e
.
getMessage
());
}
return
response
;
return
BaseResponse
.
success
(
"消息推送成功"
)
;
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/controller/MobileBenefitPackageController.java
浏览文件 @
60d5c082
...
...
@@ -2,6 +2,7 @@ package com.ebaiyihui.family.doctor.server.controller;
import
com.ebaiyihui.family.doctor.common.bo.MobileBenefitRes
;
import
com.ebaiyihui.family.doctor.common.bo.Result
;
import
com.ebaiyihui.family.doctor.common.dto.IMUpdateOnlineStatusReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.MobileBenefitPackageDTO
;
import
com.ebaiyihui.family.doctor.common.vo.RegisterPatientVo
;
import
com.ebaiyihui.family.doctor.server.service.MobileBenefitPackageService
;
...
...
@@ -40,4 +41,10 @@ public class MobileBenefitPackageController {
public
Result
<
MobileBenefitRes
>
addBenefitPackage
(
@RequestBody
List
<
MobileBenefitPackageDTO
>
vos
){
return
mobileBenefitPackageService
.
addBenefitPackage
(
vos
);
}
@ApiOperation
(
value
=
"更新账户的IM在线状态"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/update/online/status"
,
method
=
RequestMethod
.
POST
)
Result
<
String
>
updateOnlineStatus
(
@RequestBody
IMUpdateOnlineStatusReqDTO
reqDTO
){
return
mobileBenefitPackageService
.
updateOnlineStatus
(
reqDTO
);
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/entity/PatientEntity.java
浏览文件 @
60d5c082
...
...
@@ -37,4 +37,10 @@ public class PatientEntity {
private
Integer
patientType
;
private
String
userId
;
private
Integer
onOfflineStatus
;
private
Integer
unReadCount
;
private
String
offLineTime
;
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/ImMsgTemplateService.java
浏览文件 @
60d5c082
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
service
;
import
com.ebaiyihui.family.doctor.common.
dto.ImNoReadMsg
DTO
;
import
com.ebaiyihui.family.doctor.common.
bo.ImMessage
DTO
;
import
com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO
;
import
com.ebaiyihui.family.doctor.common.vo.ImNoReadMsgVo
;
import
com.ebaiyihui.framework.response.BaseResponse
;
/**
...
...
@@ -16,5 +15,5 @@ public interface ImMsgTemplateService {
BaseResponse
<
String
>
sendImMsg
(
SendImMsgDTO
reqVo
);
BaseResponse
<
ImNoReadMsgVo
>
queryImNoReadMsg
(
ImNoReadMsgDTO
reqVo
);
BaseResponse
<
String
>
unReadMsgCount
(
ImMessageDTO
imMessageEntity
);
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/MobileBenefitPackageService.java
浏览文件 @
60d5c082
...
...
@@ -2,6 +2,7 @@ package com.ebaiyihui.family.doctor.server.service;
import
com.ebaiyihui.family.doctor.common.bo.MobileBenefitRes
;
import
com.ebaiyihui.family.doctor.common.bo.Result
;
import
com.ebaiyihui.family.doctor.common.dto.IMUpdateOnlineStatusReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.MobileBenefitPackageDTO
;
import
com.ebaiyihui.family.doctor.common.vo.RegisterPatientVo
;
import
com.ebaiyihui.framework.response.BaseResponse
;
...
...
@@ -20,4 +21,6 @@ public interface MobileBenefitPackageService {
BaseResponse
<
RegisterPatientVo
>
register
(
String
token
);
Result
<
MobileBenefitRes
>
addBenefitPackage
(
List
<
MobileBenefitPackageDTO
>
vos
);
Result
<
String
>
updateOnlineStatus
(
IMUpdateOnlineStatusReqDTO
reqDTO
);
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ImMsgTemplateServiceImpl.java
浏览文件 @
60d5c082
...
...
@@ -2,23 +2,41 @@ package com.ebaiyihui.family.doctor.server.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.doctoruser.api.pojo.base.dto.doctor.QueryPersonnelInfoReq
;
import
com.doctoruser.api.pojo.base.vo.doctor.PersonnelInfo
;
import
com.doctoruser.api.pojo.vo.UserInfoByDoctorIdRespVO
;
import
com.doctoruser.api.pojo.vo.UserInfoByUserIdRespVO
;
import
com.ebaiyihui.family.doctor.common.bo.Components
;
import
com.ebaiyihui.family.doctor.common.bo.ImMessageDTO
;
import
com.ebaiyihui.family.doctor.common.bo.MsgContent
;
import
com.ebaiyihui.family.doctor.common.dto.I
mNoReadMsg
DTO
;
import
com.ebaiyihui.family.doctor.common.dto.I
nfoList
DTO
;
import
com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO
;
import
com.ebaiyihui.family.doctor.common.vo.ImNoReadMsgVo
;
import
com.ebaiyihui.family.doctor.common.dto.UnReadMsgDTO
;
import
com.ebaiyihui.family.doctor.server.common.enums.SignStatus
;
import
com.ebaiyihui.family.doctor.server.common.enums.StatusEnum
;
import
com.ebaiyihui.family.doctor.server.entity.ImMsgTemplateEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
import
com.ebaiyihui.family.doctor.server.feign.DoctorInfofeignClient
;
import
com.ebaiyihui.family.doctor.server.feign.UserApiFeignClient
;
import
com.ebaiyihui.family.doctor.server.mapper.ImMsgTemplateMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.PatientMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper
;
import
com.ebaiyihui.family.doctor.server.service.ImChatTemplate
;
import
com.ebaiyihui.family.doctor.server.service.ImMsgTemplateService
;
import
com.ebaiyihui.family.doctor.server.util.JsonUtil
;
import
com.ebaiyihui.family.doctor.server.util.ThirdOrderPushUtil
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -28,14 +46,30 @@ import java.util.stream.Collectors;
* @Description
*/
@Service
@Slf4j
public
class
ImMsgTemplateServiceImpl
implements
ImMsgTemplateService
{
@Autowired
private
ImMsgTemplateMapper
imMsgTemplateMapper
;
private
UserApiFeignClient
userApiFeignClient
;
@Autowired
private
DoctorInfofeignClient
doctorInfofeignClient
;
@Autowired
private
ImChatTemplate
imChatTemplate
;
@Autowired
private
PatientMapper
patientMapper
;
@Autowired
private
ImMsgTemplateMapper
imMsgTemplateMapper
;
@Autowired
private
PatientSignMapper
patientSignMapper
;
@Autowired
private
ThirdOrderPushUtil
thirdOrderPushUtil
;
@Async
@Override
public
BaseResponse
<
String
>
sendImMsg
(
SendImMsgDTO
sendImMsgDTO
)
{
...
...
@@ -58,7 +92,75 @@ public class ImMsgTemplateServiceImpl implements ImMsgTemplateService {
}
@Override
public
BaseResponse
<
ImNoReadMsgVo
>
queryImNoReadMsg
(
ImNoReadMsgDTO
reqVo
)
{
public
BaseResponse
<
String
>
unReadMsgCount
(
ImMessageDTO
imMessageDTO
)
{
//
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
patientSign
.
setAdmId
(
imMessageDTO
.
getTreatmentId
());
patientSign
.
setSignStatus
(
SignStatus
.
SIGNED
.
getValue
());
patientSign
.
setStatus
(
StatusEnum
.
IN_CONSULTATION
.
getValue
());
psWrapper
.
setEntity
(
patientSign
);
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
if
(
Objects
.
nonNull
(
patientSignEntity
))
{
// 获取医生基本信息
QueryPersonnelInfoReq
queryPersonnelInfoReq
=
new
QueryPersonnelInfoReq
();
queryPersonnelInfoReq
.
setDoctorId
(
String
.
valueOf
(
patientSignEntity
.
getDoctorId
()));
BaseResponse
<
PersonnelInfo
>
doctorInfo
=
doctorInfofeignClient
.
queryPersonnelInfo
(
queryPersonnelInfoReq
);
// 调用用户系统查询医生userId
UserInfoByUserIdRespVO
userInfoByUserIdRespVO
=
queryDocAccountInfo
(
String
.
valueOf
(
patientSignEntity
.
getDoctorId
()));
if
(
userInfoByUserIdRespVO
==
null
)
{
log
.
error
(
"IM INFORM ERROR : 获取医生信息失败 doctorId:{}"
,
String
.
valueOf
(
patientSignEntity
.
getDoctorId
()));
return
BaseResponse
.
error
(
"获取im医生账号信息失败!"
);
}
if
(
null
==
doctorInfo
&&
!
doctorInfo
.
isSuccess
())
{
log
.
error
(
"IM INFORM ERROR : 获取医生信息失败 doctorId:{}"
,
String
.
valueOf
(
patientSignEntity
.
getDoctorId
()));
return
BaseResponse
.
error
(
"获取im医生账号信息失败!"
);
}
String
doctorUserId
=
userInfoByUserIdRespVO
.
getUserId
();
if
(
imMessageDTO
.
getSenderUserId
().
equals
(
doctorUserId
))
{
// 查询患者信息
PatientEntity
patientEntity
=
patientMapper
.
selectById
(
patientSignEntity
.
getPatientId
());
if
(
Objects
.
nonNull
(
patientEntity
))
{
// 状态是离线则未读消息+1
if
(
patientEntity
.
getOnOfflineStatus
().
equals
(-
1
))
{
patientEntity
.
setUnReadCount
(
patientEntity
.
getUnReadCount
()
+
1
);
}
else
{
patientEntity
.
setUnReadCount
(
0
);
}
patientMapper
.
updateById
(
patientEntity
);
// 推送未读消息统计
UnReadMsgDTO
unReadMsgDTO
=
new
UnReadMsgDTO
();
unReadMsgDTO
.
setPhone
(
patientSignEntity
.
getPatientPhone
());
List
<
InfoListDTO
>
infoList
=
new
ArrayList
<>();
InfoListDTO
infoListDTO
=
new
InfoListDTO
();
infoListDTO
.
setUserName
(
patientSignEntity
.
getPatientName
());
infoListDTO
.
setDoctorId
(
String
.
valueOf
(
patientSignEntity
.
getDoctorId
()));
infoListDTO
.
setMessageNum
(
String
.
valueOf
(
patientEntity
.
getUnReadCount
()));
infoListDTO
.
setTimestamp
(
imMessageDTO
.
getMsgTime
());
unReadMsgDTO
.
setInfoList
(
infoList
);
thirdOrderPushUtil
.
syncUnReadMsgCount
(
unReadMsgDTO
);
}
}
}
return
BaseResponse
.
success
();
}
private
UserInfoByUserIdRespVO
queryDocAccountInfo
(
String
doctorId
)
{
BaseResponse
<
UserInfoByDoctorIdRespVO
>
response
=
userApiFeignClient
.
getUserInfoByDoctorId
(
doctorId
);
log
.
info
(
"response:{}"
,
JsonUtil
.
convertObject
(
response
));
UserInfoByUserIdRespVO
userInfoByUserIdRespVO
=
new
UserInfoByUserIdRespVO
();
if
(
response
.
isSuccess
())
{
userInfoByUserIdRespVO
.
setUserId
(
response
.
getData
().
getUserId
());
log
.
info
(
"UserInfoByUserIdRespVO===>{}"
,
JSON
.
toJSONString
(
userInfoByUserIdRespVO
));
return
userInfoByUserIdRespVO
;
}
return
null
;
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/MobileBenefitPackageServiceImpl.java
浏览文件 @
60d5c082
...
...
@@ -8,6 +8,7 @@ import com.ebaiyihui.card.common.vo.CardDetailsInfoRespVO;
import
com.ebaiyihui.card.common.vo.RegisterCardReqVO
;
import
com.ebaiyihui.family.doctor.common.bo.MobileBenefitRes
;
import
com.ebaiyihui.family.doctor.common.bo.Result
;
import
com.ebaiyihui.family.doctor.common.dto.IMUpdateOnlineStatusReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.MobileBenefitPackageDTO
;
import
com.ebaiyihui.family.doctor.common.vo.RegisterPatientVo
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
...
...
@@ -207,6 +208,23 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
return
Result
.
success
(
success
());
}
@Override
public
Result
<
String
>
updateOnlineStatus
(
IMUpdateOnlineStatusReqDTO
reqDTO
)
{
QueryWrapper
<
PatientEntity
>
wrapper
=
new
QueryWrapper
<>();
PatientEntity
patient
=
new
PatientEntity
();
patient
.
setPhone
(
reqDTO
.
getPhone
());
patient
.
setUserId
(
reqDTO
.
getPatientUserId
());
PatientEntity
patientEntity
=
patientMapper
.
selectOne
(
wrapper
);
if
(
Objects
.
nonNull
(
patientEntity
))
{
patientEntity
.
setOnOfflineStatus
(
reqDTO
.
getStatus
());
patientEntity
.
setOffLineTime
(
reqDTO
.
getOffLineTime
());
patientMapper
.
updateById
(
patientEntity
);
}
return
Result
.
success
(
success
());
}
private
MobileBenefitRes
success
()
{
MobileBenefitRes
resp
=
new
MobileBenefitRes
();
resp
.
setOrderStatus
(
"OOS"
);
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/util/ThirdOrderPushUtil.java
浏览文件 @
60d5c082
...
...
@@ -106,7 +106,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
notifyConsultDataDTO
);
log
.
info
(
"syncBenefitUsedOrder请求入参{}"
,
param
);
String
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
PUSH_DATA_URL
,
param
,
getThirdHead
(
notifyConsultDataDTO
));
log
.
info
(
"syncBenefitUsedOrder请求返参{}"
,
param
);
log
.
info
(
"syncBenefitUsedOrder请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"syncSignedOrder推送失败:{}"
,
e
);
}
...
...
@@ -122,7 +122,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
syncSignedOrderDTO
);
log
.
info
(
"syncSignedOrder请求入参{}"
,
param
);
String
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
SYNC_SIGNED_ORDER_URL
,
param
,
getThirdHead
(
syncSignedOrderDTO
));
log
.
info
(
"syncSignedOrder请求返参{}"
,
param
);
log
.
info
(
"syncSignedOrder请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"syncSignedOrder推送失败:{}"
,
e
);
}
...
...
@@ -138,7 +138,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
syncSignedOrderDTO
);
log
.
info
(
"updateSignedOrder请求入参{}"
,
param
);
String
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
UPDATE_SIGNED_ORDER_URL
,
param
,
getThirdHead
(
syncSignedOrderDTO
));
log
.
info
(
"updateSignedOrder请求返参{}"
,
param
);
log
.
info
(
"updateSignedOrder请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"updateSignedOrder推送失败:{}"
,
e
);
}
...
...
@@ -156,7 +156,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
abnormalDataDTO
);
log
.
info
(
"getAbnormalData请求入参{}"
,
param
);
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
ABNORMAL_DATA_URL
,
param
,
getThirdHead
(
abnormalDataDTO
));
log
.
info
(
"getAbnormalData请求返参{}"
,
param
);
log
.
info
(
"getAbnormalData请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getAbnormalData请求失败:{}"
,
e
);
}
...
...
@@ -174,7 +174,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
healthInfoDTO
);
log
.
info
(
"getHealthSchStatus请求入参{}"
,
param
);
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
HEALTH_SCHEDULE_STATUS_URL
,
param
,
getThirdHead
(
healthInfoDTO
));
log
.
info
(
"getHealthSchStatus请求返参{}"
,
param
);
log
.
info
(
"getHealthSchStatus请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getHealthSchStatus请求失败:{}"
,
e
);
}
...
...
@@ -192,7 +192,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
healthInfoDTO
);
log
.
info
(
"getHealthRecordWhetherUpdate请求入参{}"
,
param
);
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
HEALTH_RECORD_WHETHER_UPDATE_URL
,
param
,
getThirdHead
(
healthInfoDTO
));
log
.
info
(
"getHealthRecordWhetherUpdate请求返参{}"
,
param
);
log
.
info
(
"getHealthRecordWhetherUpdate请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getHealthRecordWhetherUpdate请求失败:{}"
,
e
);
}
...
...
@@ -209,7 +209,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
followUpOrderDTO
);
log
.
info
(
"pushFollowUpOrder请求入参{}"
,
param
);
String
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
PUSH_FOLLOW_UP_ORDER_URL
,
param
,
getThirdHead
(
followUpOrderDTO
));
log
.
info
(
"pushFollowUpOrder请求返参{}"
,
param
);
log
.
info
(
"pushFollowUpOrder请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"pushFollowUpOrder请求失败:{}"
,
e
);
}
...
...
@@ -226,7 +226,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
userInfoDTO
);
log
.
info
(
"getUserPic请求入参{}"
,
param
);
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
USER_PIC_URL
,
param
,
getThirdHead
(
userInfoDTO
));
log
.
info
(
"getUserPic请求返参{}"
,
param
);
log
.
info
(
"getUserPic请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getUserPic请求失败:{}"
,
e
);
}
...
...
@@ -243,7 +243,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
userInfoDTO
);
log
.
info
(
"getUserBasicInfo请求入参{}"
,
param
);
String
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
USER_BASIC_INFO_URL
,
param
,
getThirdHead
(
userInfoDTO
));
log
.
info
(
"getUserBasicInfo请求返参{}"
,
param
);
log
.
info
(
"getUserBasicInfo请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getUserBasicInfo请求失败:{}"
,
e
);
}
...
...
@@ -260,7 +260,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
userInfoDTO
);
log
.
info
(
"getUserBasicInd请求入参{}"
,
param
);
String
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
USER_BASIC_IND_URL
,
param
,
getThirdHead
(
userInfoDTO
));
log
.
info
(
"getUserBasicInd请求返参{}"
,
param
);
log
.
info
(
"getUserBasicInd请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getUserBasicInd请求失败:{}"
,
e
);
}
...
...
@@ -278,7 +278,7 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
masterUrlDTO
);
log
.
info
(
"getMasterUrl请求入参{}"
,
param
);
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
MASTER_URL
,
param
,
getThirdHead
(
masterUrlDTO
));
log
.
info
(
"getMasterUrl请求返参{}"
,
param
);
log
.
info
(
"getMasterUrl请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getMasterUrl请求失败:{}"
,
e
);
}
...
...
@@ -296,11 +296,23 @@ public class ThirdOrderPushUtil {
String
param
=
JSONObject
.
toJSONString
(
reportDetailDTO
);
log
.
info
(
"getReportDetail请求入参{}"
,
param
);
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
REPORT_DETAIL_URL
,
param
,
getThirdHead
(
reportDetailDTO
));
log
.
info
(
"getReportDetail请求返参{}"
,
param
);
log
.
info
(
"getReportDetail请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"getReportDetail请求失败:{}"
,
e
);
}
return
result
;
}
@Async
public
void
syncUnReadMsgCount
(
UnReadMsgDTO
unReadMsgDTO
)
{
try
{
String
param
=
JSONObject
.
toJSONString
(
unReadMsgDTO
);
log
.
info
(
"syncUnReadMsgCount请求入参{}"
,
param
);
String
result
=
HttpKit
.
jsonPost
(
projProperties
.
getFamilyDoctorThirdUrl
()
+
UrlConstants
.
UN_READ_MSG_URL
,
param
,
getThirdHead
(
unReadMsgDTO
));
log
.
info
(
"syncUnReadMsgCount请求返参{}"
,
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"syncUnReadMsgCount推送失败:{}"
,
e
);
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论