From dceaebdb4b9448b7e21df0b41ec2d71f1809c163 Mon Sep 17 00:00:00 2001 From: "Stormeye.Wu" Date: Thu, 27 Sep 2018 18:08:44 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=B2=BE=E5=87=86=E5=8F=91=E5=88=B8enum?= =?UTF-8?q?=E6=95=B4=E7=90=86][=E6=95=B4=E7=90=86]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/CouponInjectServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/CouponInjectServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/CouponInjectServiceImpl.java index c6cfe1b96..547de7860 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/CouponInjectServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/CouponInjectServiceImpl.java @@ -11,6 +11,7 @@ import com.iformall.enums.*; import com.iformall.exception.MallinkException; import com.iformall.mapper.CouponInjectMapper; import com.iformall.service.*; +import com.iformall.utils.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -179,9 +180,9 @@ public class CouponInjectServiceImpl implements CouponInjectService { logger.info("手机号未发现"); return; } - if(record.getSendType()==1){//定时发送 - wxmsg.setIsright(record.getSendType()==1?0:1);//值是相反的 - wxmsg.setSendtime(com.iformall.utils.DateUtils.date2String(record.getSendTime(),"yyyy-MM-dd HH:mm:ss")); + if(record.getSendType().equals(EnumCouponInjectSendType.TIMING.getCode())){ + wxmsg.setIsright(EnumMsgStatus.MSG_SEND_NOT_IMMEDIATELY.getCode());//值是相反的 + wxmsg.setSendtime(DateUtils.date2String(record.getSendTime(),"yyyy-MM-dd HH:mm:ss")); wxmsg.setStatus(EnumMsgStatus.MSG_STATUS_NOT_SEND.getCode()); }else{ wxmsg.setIsright(EnumMsgStatus.MSG_SEND_IMMEDIATELY.getCode());//立即发送