Merge remote-tracking branch 'origin/jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' into jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支

This commit is contained in:
纪寒 2023-12-06 16:36:40 +08:00
commit afc139a881
4 changed files with 66 additions and 1 deletions

View File

@ -3,7 +3,10 @@ package com.xinelu.web.controller.fd;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.R; import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody;
import com.xinelu.familydoctor.applet.pojo.body.SyncHospitalPersonInfoBody; import com.xinelu.familydoctor.applet.pojo.body.SyncHospitalPersonInfoBody;
import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery;
@ -13,8 +16,11 @@ import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo;
import com.xinelu.familydoctor.applet.service.IResidentRescindApplyService; import com.xinelu.familydoctor.applet.service.IResidentRescindApplyService;
import com.xinelu.familydoctor.applet.service.IResidentServiceAppletService; import com.xinelu.familydoctor.applet.service.IResidentServiceAppletService;
import com.xinelu.familydoctor.applet.service.IResidentSignAppletService; import com.xinelu.familydoctor.applet.service.IResidentSignAppletService;
import com.xinelu.manage.domain.chatRecord.ChatRecord;
import com.xinelu.manage.domain.hospitalinfo.HospitalInfo; import com.xinelu.manage.domain.hospitalinfo.HospitalInfo;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo; import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.dto.chatrecord.MessageSearchDto;
import com.xinelu.manage.mapper.chatrecord.ChatRecordMapper;
import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService; import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService;
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService; import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
import com.xinelu.manage.service.patientinfo.IPatientInfoService; import com.xinelu.manage.service.patientinfo.IPatientInfoService;
@ -30,7 +36,7 @@ import javax.annotation.Resource;
@Api(tags = "家医调用接口") @Api(tags = "家医调用接口")
@RestController @RestController
@RequestMapping("/applet/fd") @RequestMapping("/applet/fd")
public class FDController { public class FDController extends BaseController {
@Resource @Resource
private IResidentRescindApplyService residentRescindApplyService; private IResidentRescindApplyService residentRescindApplyService;
@Resource @Resource
@ -43,6 +49,8 @@ public class FDController {
private IHospitalPersonInfoService hospitalPersonInfoService; private IHospitalPersonInfoService hospitalPersonInfoService;
@Resource @Resource
private IHospitalInfoService hospitalInfoService; private IHospitalInfoService hospitalInfoService;
@Resource
private ChatRecordMapper chatRecordMapper;
@ApiOperation("服务申请列表") @ApiOperation("服务申请列表")
@ -191,4 +199,32 @@ public class FDController {
} }
return R.ok(); return R.ok();
} }
@ApiOperation(value = "获取居民消息推送列表", notes = "山东通APP消息通知模块中的消息提醒用")
@GetMapping("/getNotice/{identity}")
public TableDataInfo noticDel(@PathVariable String identity) {
// 获取注册信息
PatientInfoVO patientInfo = patientInfoService.selectPatientInfoByCardNo(identity);
if (patientInfo == null) {
return null;
}
MessageSearchDto query = new MessageSearchDto();
query.setRecipientId(patientInfo.getId());
query.setMessageCategory("4");
startPage();
return getDataTable(chatRecordMapper.selectMegList(query));
}
@ApiOperation(value = "获取居民消息推送最后一次记录", notes = "山东通APP消息通知模块中的消息提醒用")
@GetMapping("/getLastNotice/{identity}")
public R<ChatRecord> getLastNotice(@PathVariable String identity) {
PatientInfoVO patientInfo = patientInfoService.selectPatientInfoByCardNo(identity);
if (patientInfo == null) {
return null;
}
MessageSearchDto query = new MessageSearchDto();
query.setRecipientId(patientInfo.getId());
query.setMessageCategory("4");
return R.ok(chatRecordMapper.getLast(query));
}
} }

View File

@ -86,6 +86,14 @@ public class ChatRecord extends BaseEntity implements Serializable {
@Excel(name = "发送时间时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "发送时间时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private Date sendTime; private Date sendTime;
/**
* 发送时间时间格式yyyy-MM-dd HH:mm:ss
*/
@ApiModelProperty(value = "发送时间时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "发送时间时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private Date sendTime1;
/** /**
* 接收人 * 接收人
*/ */

View File

@ -118,4 +118,12 @@ public interface ChatRecordMapper {
List<ChatRecord> getList(ChatRecord chatRecord); List<ChatRecord> getList(ChatRecord chatRecord);
/**
* @Author mengkuiliang
* @Description 查询最后一次通知记录
* @Date 2023-12-06 006 14:53
* @Param [query]
* @return com.xinelu.manage.domain.chatRecord.ChatRecord
**/
ChatRecord getLast(MessageSearchDto query);
} }

View File

@ -451,4 +451,17 @@
</if> </if>
ORDER BY send_time desc ORDER BY send_time desc
</select> </select>
<!-- 查询最后一次通知记录 -->
<select id="getLast" resultType="com.xinelu.manage.domain.chatRecord.ChatRecord">
select
message_no,message_category,source_type,consultation_id,crowds,crowds_name,sender_id,
sender_name,send_time as send_time1,recipient_id,
recipient_name,message_type,title,content,content_id,
read_status,title
from chat_record
where del_flag = '0' and message_category = #{messageCategory} and recipient_id = #{recipientId}
order by send_time desc
limit 1
</select>
</mapper> </mapper>