update===>:修改消息推送。
This commit is contained in:
parent
4e0844558d
commit
87a8ba5820
@ -2,11 +2,11 @@ package com.xinelu.web.controller.applet;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.service.chatRecord.IChatRecordService;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageVo;
|
||||
import com.xinelu.manage.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.manage.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.manage.service.chatrecord.chatRecord.IChatRecordService;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
|
||||
@ -2,7 +2,6 @@ package com.xinelu.web.controller.applet;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
@ -14,7 +13,6 @@ import com.xinelu.familydoctor.applet.pojo.query.NearbyOrgQuery;
|
||||
import com.xinelu.familydoctor.applet.pojo.query.PackageQuery;
|
||||
import com.xinelu.familydoctor.applet.pojo.query.TeamListQuery;
|
||||
import com.xinelu.familydoctor.applet.pojo.vo.*;
|
||||
import com.xinelu.framework.config.AsyncExecutorConfig;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@ -3,10 +3,6 @@ package com.xinelu.web.controller.fd;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.service.chatRecord.IChatRecordService;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageVo;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.SyncHospitalPersonInfoBody;
|
||||
@ -17,7 +13,6 @@ import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentRescindApplyService;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentServiceAppletService;
|
||||
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.hospitalpersoninfo.HospitalPersonInfo;
|
||||
import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService;
|
||||
@ -28,13 +23,9 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "家医调用接口")
|
||||
@RestController
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.xinelu.familydoctor.applet.pojo.dto;
|
||||
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.manage.dto.chatrecord.ChatRecordDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xinelu.familydoctor.applet.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
|
||||
@ -2,8 +2,7 @@ package com.xinelu.familydoctor.applet.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
@ -14,7 +13,6 @@ import com.xinelu.familydoctor.applet.mapper.ResidentServiceApplyMapper;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.MessagePushBody;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.ResidentServiceApplyBody;
|
||||
import com.xinelu.familydoctor.applet.pojo.dto.ResidentServiceFormApplyDto;
|
||||
import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo;
|
||||
import com.xinelu.familydoctor.applet.pojo.entity.ResidentServiceApplyEntity;
|
||||
import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xinelu.familydoctor.applet.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xinelu.applet.controller.appletscreeningrecord;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.common.annotation.RepeatSubmit;
|
||||
import com.xinelu.common.config.XinELuConfig;
|
||||
import com.xinelu.common.constant.ScreeningProjectConstants;
|
||||
@ -20,7 +20,6 @@ import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
package com.xinelu.applet.controller.chatrecord;
|
||||
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.service.chatRecord.IChatRecordService;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageVo;
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.manage.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.manage.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.manage.service.chatrecord.chatRecord.IChatRecordService;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.socket.WebSocketUtils;
|
||||
import com.xinelu.manage.domain.chatRecord.ChatRecord;
|
||||
|
||||
@ -6,7 +6,7 @@ import com.xinelu.applet.dto.patientcenter.PatientCenterCouponDTO;
|
||||
import com.xinelu.applet.mapper.nurseapplogin.NurseAppLoginMapper;
|
||||
import com.xinelu.applet.mapper.nursingstationgoods.NursingStationGoodsMapper;
|
||||
import com.xinelu.applet.mapper.patientcenter.PatientCenterMapper;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.applet.service.patientcenter.PatientCenterService;
|
||||
import com.xinelu.applet.vo.coupon.CouponVO;
|
||||
import com.xinelu.applet.vo.patientcenter.PatientCenterCouponVO;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.applet.mapper.chatrecord.ChatRecordMapper">
|
||||
<mapper namespace="com.xinelu.manage.mapper.chatrecord.chatrecord.ChatRecordMapper">
|
||||
|
||||
<resultMap type="ChatRecord" id="ChatRecordResult">
|
||||
<result property="id" column="id"/>
|
||||
@ -63,8 +63,8 @@
|
||||
read_status
|
||||
</sql>
|
||||
|
||||
<select id="selectMegVoList" parameterType="com.xinelu.applet.dto.chatrecord.MessageSearchDto"
|
||||
resultType="com.xinelu.applet.vo.chatrecord.MessageVo">
|
||||
<select id="selectMegVoList" parameterType="com.xinelu.manage.dto.chatrecord.MessageSearchDto"
|
||||
resultType="com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo">
|
||||
select
|
||||
<include refid="Message_Vo_List"/>
|
||||
from chat_record
|
||||
@ -79,7 +79,7 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMegList" resultType="com.xinelu.applet.vo.chatrecord.MessageVo">
|
||||
<select id="selectMegList" resultType="com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo">
|
||||
select <include refid="Message_Vo_List"/>
|
||||
from chat_record
|
||||
where del_flag = '0' and message_category = #{messageCategory}
|
||||
@ -115,7 +115,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectOneChatRecord" parameterType="java.lang.String"
|
||||
resultType="com.xinelu.applet.vo.chatrecord.MessageCenterVo">
|
||||
resultType="com.xinelu.manage.vo.chatrecord.chatrecord.MessageCenterVo">
|
||||
select message_category,
|
||||
crowds,
|
||||
crowds_name,
|
||||
@ -156,7 +156,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 查询健康知识推送列表 -->
|
||||
<select id="getNoticList" resultType="com.xinelu.applet.vo.chatrecord.MessageVo">
|
||||
<select id="getNoticList" resultType="com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo">
|
||||
<include refid="selectChatRecordVo"></include>
|
||||
where del_flag = '0' and sender_id = #{senderId}
|
||||
<choose>
|
||||
@ -183,7 +183,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 查询消息详情 -->
|
||||
<select id="getByNo" resultType="com.xinelu.applet.vo.chatrecord.MessageVo">
|
||||
<select id="getByNo" resultType="com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo">
|
||||
select cr.id,
|
||||
cr.message_no,
|
||||
cr.message_category,
|
||||
@ -372,7 +372,7 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateReadStatus" parameterType="com.xinelu.applet.dto.chatrecord.MarkReadDto">
|
||||
<update id="updateReadStatus" parameterType="com.xinelu.manage.dto.chatrecord.MarkReadDto">
|
||||
update chat_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="readStatus != null and readStatus != ''">
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.manage.controller.screeningrecord;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.common.annotation.RepeatSubmit;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
@ -12,6 +13,7 @@ import com.xinelu.manage.domain.screeningrecord.ScreeningRecord;
|
||||
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO;
|
||||
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordSaveDTO;
|
||||
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.service.screeningrecord.IScreeningRecordService;
|
||||
import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -45,6 +47,9 @@ public class ScreeningRecordController extends BaseController {
|
||||
@Resource
|
||||
private IHospitalPersonInfoService personInfoService;
|
||||
|
||||
@Resource
|
||||
private MessagePushService messagePushService;
|
||||
|
||||
@GetMapping("/screeningList")
|
||||
@ApiOperation(value = "居民预约筛查列表")
|
||||
public TableDataInfo screeningList(ScreeningRecordDTO query) throws Exception {
|
||||
@ -116,8 +121,12 @@ public class ScreeningRecordController extends BaseController {
|
||||
if (StringUtils.equals("1", screeningRecordVo.getScreeningStatus())) {
|
||||
return R.fail("该预约未登记,请先登记!");
|
||||
}
|
||||
int flag = screeningRecordService.update(body);
|
||||
return flag < 0 ? R.fail() : R.ok();
|
||||
JSONObject result = screeningRecordService.update(body);
|
||||
if(result != null && result.containsKey("openid")) {
|
||||
messagePushService.fdApprovePush(result);
|
||||
return R.ok();
|
||||
}
|
||||
return R.fail();
|
||||
}
|
||||
|
||||
@PostMapping("/pushScreening")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.dto.chatrecord;
|
||||
package com.xinelu.manage.dto.chatrecord;
|
||||
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.dto.chatrecord;
|
||||
package com.xinelu.manage.dto.chatrecord;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.dto.chatrecord;
|
||||
package com.xinelu.manage.dto.chatrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.dto.messagepush;
|
||||
package com.xinelu.manage.dto.messagepush;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.dto.messagepush;
|
||||
package com.xinelu.manage.dto.messagepush;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.dto.messagepush;
|
||||
package com.xinelu.manage.dto.messagepush;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.dto.messagepush;
|
||||
package com.xinelu.manage.dto.messagepush;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@ -1,10 +1,10 @@
|
||||
package com.xinelu.applet.mapper.chatrecord;
|
||||
package com.xinelu.manage.mapper.chatrecord.chatrecord;
|
||||
|
||||
import com.xinelu.applet.dto.chatrecord.MarkReadDto;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageVo;
|
||||
import com.xinelu.manage.domain.chatRecord.ChatRecord;
|
||||
import com.xinelu.manage.dto.chatrecord.MarkReadDto;
|
||||
import com.xinelu.manage.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package com.xinelu.applet.service.chatRecord;
|
||||
package com.xinelu.manage.service.chatrecord.chatRecord;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageVo;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.exception.file.InvalidExtensionException;
|
||||
import com.xinelu.manage.domain.chatRecord.ChatRecord;
|
||||
import com.xinelu.manage.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.manage.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -1,17 +1,10 @@
|
||||
package com.xinelu.applet.service.chatRecord.impl;
|
||||
package com.xinelu.manage.service.chatrecord.chatRecord.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.mapper.chatrecord.ChatRecordMapper;
|
||||
import com.xinelu.applet.service.chatRecord.IChatRecordService;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageVo;
|
||||
import com.xinelu.common.config.XinELuConfig;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.common.core.dto.MessageTemplate;
|
||||
import com.xinelu.common.enums.MessageContentType;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
@ -25,16 +18,25 @@ import com.xinelu.common.utils.http.HttpService;
|
||||
import com.xinelu.common.utils.spring.SpringUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.chatRecord.ChatRecord;
|
||||
import java.io.IOException;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
|
||||
import com.xinelu.manage.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.manage.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.manage.mapper.chatrecord.chatrecord.ChatRecordMapper;
|
||||
import com.xinelu.manage.service.chatrecord.chatRecord.IChatRecordService;
|
||||
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
|
||||
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.manage.vo.chatrecord.chatrecord.MessageVo;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@ -1,41 +1,49 @@
|
||||
package com.xinelu.applet.service.messagepush.Impl;
|
||||
package com.xinelu.manage.service.messagepush.Impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.messagepush.FDMessagePushDto;
|
||||
import com.xinelu.applet.dto.messagepush.FDWxMegDto;
|
||||
import com.xinelu.applet.dto.messagepush.TemplateData;
|
||||
import com.xinelu.applet.service.chatRecord.IChatRecordService;
|
||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
||||
import com.xinelu.common.config.AppletChatConfig;
|
||||
import com.xinelu.common.config.AppletPageConfig;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.entity.AppletAccessToken;
|
||||
import com.xinelu.common.entity.MessageValueEntity;
|
||||
import com.xinelu.common.enums.*;
|
||||
import com.xinelu.common.enums.AppletSubscriptionMessageEnum;
|
||||
import com.xinelu.common.enums.CouponTypeEnum;
|
||||
import com.xinelu.common.enums.MessageTemplateType;
|
||||
import com.xinelu.common.enums.MessageTypePath;
|
||||
import com.xinelu.common.enums.SettingsTypeEnum;
|
||||
import com.xinelu.common.enums.SubscribeStatusEnum;
|
||||
import com.xinelu.common.utils.AppletChatUtil;
|
||||
import com.xinelu.common.utils.http.HttpUtils;
|
||||
import com.xinelu.common.utils.map.MapUtil;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.subscribemessagerecord.SubscribeMessageRecord;
|
||||
import com.xinelu.manage.domain.systemsettingsinfo.SystemSettingsInfo;
|
||||
import com.xinelu.manage.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.manage.dto.messagepush.FDMessagePushDto;
|
||||
import com.xinelu.manage.dto.messagepush.FDWxMegDto;
|
||||
import com.xinelu.manage.dto.messagepush.TemplateData;
|
||||
import com.xinelu.manage.mapper.subscribemessagerecord.SubscribeMessageRecordMapper;
|
||||
import com.xinelu.manage.mapper.systemsettingsinfo.SystemSettingsInfoMapper;
|
||||
import com.xinelu.manage.service.chatrecord.chatRecord.IChatRecordService;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
|
||||
import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description 消息推送实现层
|
||||
* @Author zh
|
||||
@ -1,12 +1,9 @@
|
||||
package com.xinelu.applet.service.messagepush;
|
||||
|
||||
package com.xinelu.manage.service.messagepush;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.applet.dto.messagepush.FDMessagePushDto;
|
||||
import com.xinelu.common.entity.AppletAccessToken;
|
||||
import com.xinelu.manage.domain.subscribemessagerecord.SubscribeMessageRecord;
|
||||
import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -51,7 +51,7 @@ public interface IScreeningRecordService {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Integer update(ScreeningRecord body);
|
||||
JSONObject update(ScreeningRecord body);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
|
||||
@ -135,7 +135,6 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
int flag = screeningRecordMapper.insert(recordBody);
|
||||
if(flag > 0) {
|
||||
// 组装发送消息通知参数
|
||||
result.put("busType", "10");
|
||||
result.put("openid", registerVo.getOpenid());
|
||||
result.put("receiveName", registerVo.getPatientName());
|
||||
result.put("text1", body.getHospitalName());
|
||||
@ -153,7 +152,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer update(ScreeningRecord body) {
|
||||
public JSONObject update(ScreeningRecord body) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
body.setDoctorId(hospitalPersonInfo.getId());
|
||||
@ -168,23 +167,27 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
body.setScreeningStatus("4");
|
||||
body.setScreeningDate(new Date());
|
||||
int flag = screeningRecordMapper.update(body);
|
||||
// 校验是否已经注册
|
||||
PatientInfoVO registerVo = patientService.selectPatientInfoById(Long.getLong(body.getPatientId()));
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("patientId", body.getPatientId());
|
||||
if (flag > 0) {
|
||||
// TODO 推送提醒
|
||||
//PatientInfoVO patientInfoVO = patientService.selectPatientInfoById(body.getPatientId());
|
||||
//JSONObject jsonObject = new JSONObject();
|
||||
//jsonObject.fluentPut("senderNo", SecurityUtils.getUserId())
|
||||
// .fluentPut("senderName", SecurityUtils.getLoginUser().getUser().getNickName())
|
||||
// .fluentPut("recipientName", patientInfoVO.getPatientName())
|
||||
// .fluentPut("recipientIdentity", patientInfoVO.getCardNo())
|
||||
// .fluentPut("messageType", "6")
|
||||
// .fluentPut("messageCategory", "1")
|
||||
// .fluentPut("templateType", MessageTypeEnum.JTYSXXTZ.getType())
|
||||
// .fluentPut("sendTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss"))
|
||||
// .fluentPut("content", "您的筛查项目已检测完成,点击查看详情。")
|
||||
// .fluentPut("contentId", body.getScreeningId());
|
||||
//FdmpPushMegUtil.sendPost(jsonObject);
|
||||
// 组装发送消息通知参数
|
||||
result.put("openid", registerVo.getOpenid());
|
||||
result.put("receiveName", registerVo.getPatientName());
|
||||
result.put("text1", body.getHospitalName());
|
||||
result.put("text2", (body.getProjectName().length() >= 17? (body.getProjectName().substring(0, 17) + "..."): body.getProjectName()));
|
||||
result.put("text3", body.getProjectName());
|
||||
result.put("sendTitle", "筛查预约");
|
||||
result.put("sendTime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
|
||||
result.put("busType", "10");
|
||||
result.put("sendContent", "您的筛查项目已检测完成,点击查看详情。");
|
||||
result.put("messageType", "6");
|
||||
result.put("messageCategory", "4");
|
||||
result.put("cardNo", registerVo.getCardNo());
|
||||
}
|
||||
return flag;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.vo.chatrecord;
|
||||
package com.xinelu.manage.vo.chatrecord.chatrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.applet.vo.chatrecord;
|
||||
package com.xinelu.manage.vo.chatrecord.chatrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
Loading…
Reference in New Issue
Block a user