Browse Source

新增/修改日程,不需要发消息;改为定时任务去检索,提醒日期=当前日期的日程,统一发送消息

dev
yinzuomei 3 years ago
parent
commit
074f292b07
  1. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcScheduleDao.java
  2. 14
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java
  3. 20
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcScheduleServiceImpl.java
  4. 10
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcScheduleDao.xml

3
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcScheduleDao.java

@ -2,7 +2,6 @@ package com.epmet.modules.partyOrg.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.partyOrg.entity.IcScheduleEntity; import com.epmet.modules.partyOrg.entity.IcScheduleEntity;
import com.epmet.resi.partymember.dto.IcScheduleDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.ActAndScheduleListFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.ActAndScheduleListFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.AddOrEditScheduleFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.AddOrEditScheduleFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO;
@ -30,4 +29,6 @@ public interface IcScheduleDao extends BaseDao<IcScheduleEntity> {
List<ActAndScheduleListResultDTO.ScheduleListDTO> getScheduleList(ActAndScheduleListFormDTO formDTO); List<ActAndScheduleListResultDTO.ScheduleListDTO> getScheduleList(ActAndScheduleListFormDTO formDTO);
List<IcScheduleListDTO> selectScheduleList(IcScheduleFormDTO formDTO); List<IcScheduleListDTO> selectScheduleList(IcScheduleFormDTO formDTO);
List<IcScheduleEntity> selectNeedNotice(String dateId);
} }

14
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java

@ -84,7 +84,8 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart
private IcPartyMemberDao icPartyMemberDao; private IcPartyMemberDao icPartyMemberDao;
@Autowired @Autowired
private IcPartyActSignInRecordDao icPartyActSignInRecordDao; private IcPartyActSignInRecordDao icPartyActSignInRecordDao;
@Autowired
private IcScheduleDao icScheduleDao;
/** /**
* 活动类型列表 * 活动类型列表
* *
@ -729,6 +730,17 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart
.openFeignClient(SpringContextUtils.getBean(EpmetMessageOpenFeignClient.class)) .openFeignClient(SpringContextUtils.getBean(EpmetMessageOpenFeignClient.class))
.sendRocketMqMsg(SystemMessageType.PARTY_MEETING_MESSAGE, msg); .sendRocketMqMsg(SystemMessageType.PARTY_MEETING_MESSAGE, msg);
} }
//日程又增加了一个提醒时间
List<IcScheduleEntity> scheduleEntityList=icScheduleDao.selectNeedNotice(dateId);
for(IcScheduleEntity icScheduleEntity:scheduleEntityList){
PartyMeetingMessageMQMsg msg = new PartyMeetingMessageMQMsg();
msg.setCustomerId(icScheduleEntity.getCustomerId());
msg.setIcPartyActId(icScheduleEntity.getId());
msg.setType("notify");
SendMqMsgUtil.build()
.openFeignClient(SpringContextUtils.getBean(EpmetMessageOpenFeignClient.class))
.sendRocketMqMsg(SystemMessageType.PARTY_MEETING_MESSAGE, msg);
}
} }
/** /**

20
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcScheduleServiceImpl.java

@ -2,7 +2,6 @@ package com.epmet.modules.partyOrg.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.rocketmq.messages.PartyMeetingMessageMQMsg;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
@ -11,9 +10,6 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.SpringContextUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.modules.partyOrg.dao.IcScheduleDao; import com.epmet.modules.partyOrg.dao.IcScheduleDao;
import com.epmet.modules.partyOrg.entity.IcScheduleEntity; import com.epmet.modules.partyOrg.entity.IcScheduleEntity;
import com.epmet.modules.partyOrg.service.IcScheduleService; import com.epmet.modules.partyOrg.service.IcScheduleService;
@ -21,7 +17,6 @@ import com.epmet.resi.partymember.dto.IcScheduleDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.AddOrEditScheduleFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.AddOrEditScheduleFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.IcScheduleFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.IcScheduleFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.IcScheduleListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcScheduleListDTO;
import com.epmet.send.SendMqMsgUtil;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
@ -120,13 +115,14 @@ public class IcScheduleServiceImpl extends BaseServiceImpl<IcScheduleDao, IcSche
e.setPid(agencyInfo.getPid()); e.setPid(agencyInfo.getPid());
e.setOrgIdPath("".equals(agencyInfo.getPids()) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId())); e.setOrgIdPath("".equals(agencyInfo.getPids()) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId()));
baseDao.insert(e); baseDao.insert(e);
PartyMeetingMessageMQMsg msg = new PartyMeetingMessageMQMsg();
msg.setCustomerId(formDTO.getCustomerId()); // PartyMeetingMessageMQMsg msg = new PartyMeetingMessageMQMsg();
msg.setIcPartyActId(e.getId()); // msg.setCustomerId(formDTO.getCustomerId());
msg.setType("notify"); // msg.setIcPartyActId(e.getId());
SendMqMsgUtil.build() // msg.setType("notify");
.openFeignClient(SpringContextUtils.getBean(EpmetMessageOpenFeignClient.class)) // SendMqMsgUtil.build()
.sendRocketMqMsg(SystemMessageType.PARTY_MEETING_MESSAGE, msg); // .openFeignClient(SpringContextUtils.getBean(EpmetMessageOpenFeignClient.class))
// .sendRocketMqMsg(SystemMessageType.PARTY_MEETING_MESSAGE, msg);
} }
/** /**

10
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcScheduleDao.xml

@ -112,5 +112,13 @@
order by HAPPENED_TIME desc order by HAPPENED_TIME desc
</select> </select>
<select id="selectNeedNotice" parameterType="java.lang.String" resultType="com.epmet.modules.partyOrg.entity.IcScheduleEntity">
SELECT
i.*
FROM
ic_schedule i
WHERE
i.DEL_FLAG = '0'
AND DATE_FORMAT( i.REMIND_TIME, '%Y%m%d' ) = #{dateId}
</select>
</mapper> </mapper>
Loading…
Cancel
Save