第三次提交

master
weizhongxi 4 years ago
parent ba3e65c96b
commit 9c1ab6c76f

@ -16,8 +16,8 @@ import java.util.List;
public interface ABMessageRepository extends JpaRepository<ABMessageDO,Long> {
@Modifying
@Query("update ABMessageDO t set t.sendStatus = ?1 where t.recId = ?2")
void updateSendStatus( Integer sendStatus, Long recId);
@Query("update ABMessageDO t set t.sendStatus = ?1 ,t.pushTime = ?2 where t.recId = ?3")
void updateSendStatus( Integer sendStatus,Date pushTime, Long recId);
@Query("from ABMessageDO a where a.pushTime >= ?1 and a.pushTime < ?2 and a.sendStatus = ?3 ")
List<ABMessageDO> findAllByPushTimeAndSendStatus(Date startPushTime, Date endPushTime, Integer sendStatus);

@ -58,10 +58,12 @@ public class ABMessageServiceImpl implements ABMessageService {
if (recId == null) {
return Boolean.FALSE;
}
//获取请求时间
Date pushTime = new Date();
if (success) {
abMessageRepository.updateSendStatus(1, recId);
abMessageRepository.updateSendStatus(1, pushTime,recId);
}else {
abMessageRepository.updateSendStatus(0, recId);
abMessageRepository.updateSendStatus(0,pushTime, recId);
}
return Boolean.TRUE;
}

Loading…
Cancel
Save