Commit 4d1bdca8 by lihui.wang

FamilyMarkLanternSender

parent e54cdd53
...@@ -45,9 +45,6 @@ public class PayMessageServiceImpl implements IPayMessageService { ...@@ -45,9 +45,6 @@ public class PayMessageServiceImpl implements IPayMessageService {
@Autowired @Autowired
IPayMessageActiveService iPayMessageActiveService; IPayMessageActiveService iPayMessageActiveService;
@Autowired
private SpringUtil springUtil;
@Override @Override
public void pushMessage(BaseParam baseParam) { public void pushMessage(BaseParam baseParam) {
...@@ -88,7 +85,7 @@ public class PayMessageServiceImpl implements IPayMessageService { ...@@ -88,7 +85,7 @@ public class PayMessageServiceImpl implements IPayMessageService {
try try
{ {
IMessageProcessor processor = MessageProcessorFactory.GetMessageProcessor(message, active); IMessageProcessor processor = MessageProcessorFactory.GetMessageProcessor(active);
PayMessage payMessage=new PayMessage(); PayMessage payMessage=new PayMessage();
payMessage.setBaseParam(baseParam); payMessage.setBaseParam(baseParam);
......
...@@ -41,12 +41,6 @@ public class PayPlatformAccountServiceImpl implements IPayPlatformAccountService ...@@ -41,12 +41,6 @@ public class PayPlatformAccountServiceImpl implements IPayPlatformAccountService
@Autowired @Autowired
IPayMessageService iPayMessageService; IPayMessageService iPayMessageService;
@Autowired
IPayPlatformAccountService iPayPlatformAccountService;
@Override @Override
public PayPlatformAccountDM getPayPlatformAccount(PayMessage payMessage,String platform) { public PayPlatformAccountDM getPayPlatformAccount(PayMessage payMessage,String platform) {
EncryptionHelper encryptionHelper = new EncryptionHelper(); EncryptionHelper encryptionHelper = new EncryptionHelper();
......
package com.freemud.pay.job.service.processorfactory; package com.freemud.pay.job.service.processorfactory;
import com.alipay.api.AlipayApiException;
import com.freemud.pay.job.entity.PayMessage; import com.freemud.pay.job.entity.PayMessage;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -15,5 +16,5 @@ import org.springframework.stereotype.Service; ...@@ -15,5 +16,5 @@ import org.springframework.stereotype.Service;
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目 * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/ */
public interface IMessageProcessor { public interface IMessageProcessor {
Boolean Process(PayMessage payMessage); Boolean Process(PayMessage payMessage) throws AlipayApiException;
} }
...@@ -3,6 +3,7 @@ package com.freemud.pay.job.service.processorfactory; ...@@ -3,6 +3,7 @@ package com.freemud.pay.job.service.processorfactory;
import com.freemud.pay.job.dao.dbModel.PayMessageActiveDM; import com.freemud.pay.job.dao.dbModel.PayMessageActiveDM;
import com.freemud.pay.job.dao.dbModel.PayMessageDM; import com.freemud.pay.job.dao.dbModel.PayMessageDM;
import com.freemud.pay.job.service.processorfactory.processimpl.AliFuWuChuangSingleMessageSender; import com.freemud.pay.job.service.processorfactory.processimpl.AliFuWuChuangSingleMessageSender;
import com.freemud.pay.job.service.processorfactory.processimpl.FamilyMarkLanternSender;
import com.freemud.pay.job.service.util.SpringUtil; import com.freemud.pay.job.service.util.SpringUtil;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -23,7 +24,7 @@ public class MessageProcessorFactory { ...@@ -23,7 +24,7 @@ public class MessageProcessorFactory {
protected static final Logger logger = LoggerFactory.getLogger(MessageProcessorFactory.class); protected static final Logger logger = LoggerFactory.getLogger(MessageProcessorFactory.class);
public static IMessageProcessor GetMessageProcessor(PayMessageDM messasge, PayMessageActiveDM active) public static IMessageProcessor GetMessageProcessor( PayMessageActiveDM active)
{ {
if (active == null if (active == null
|| StringUtils.isEmpty(active.getAction())) || StringUtils.isEmpty(active.getAction()))
...@@ -32,10 +33,19 @@ public class MessageProcessorFactory { ...@@ -32,10 +33,19 @@ public class MessageProcessorFactory {
return null; return null;
} }
String s = active.getAction().toLowerCase(); String s = active.getAction().toLowerCase();
if ("ali.single.send".equals(s)) { switch (s){
case "ali.single.send":
return SpringUtil.getBean(AliFuWuChuangSingleMessageSender.class); return SpringUtil.getBean(AliFuWuChuangSingleMessageSender.class);
} else { case "qj.point.send":
return SpringUtil.getBean(FamilyMarkLanternSender.class);
default:
return null; return null;
} }
// if ("ali.single.send".equals(s)) {
// return SpringUtil.getBean(AliFuWuChuangSingleMessageSender.class);
// } else {
// return null;
// }
} }
} }
\ No newline at end of file
...@@ -67,7 +67,6 @@ public class AliFuWuChuangSingleMessageSender implements IMessageProcessor { ...@@ -67,7 +67,6 @@ public class AliFuWuChuangSingleMessageSender implements IMessageProcessor {
PayPlatformAccountDM payPlatformAccountDM = iPayPlatformAccountService.getPayPlatformAccount(payMessage, PayPlatformAccountConstans.PLATFORM_ALI_FWC); PayPlatformAccountDM payPlatformAccountDM = iPayPlatformAccountService.getPayPlatformAccount(payMessage, PayPlatformAccountConstans.PLATFORM_ALI_FWC);
System.out.println(payPlatformAccountDM.getId());
if (payPlatformAccountDM == null){ if (payPlatformAccountDM == null){
payMessage.setNoRetry(true); payMessage.setNoRetry(true);
logger.info("平台信息为空"); logger.info("平台信息为空");
......
...@@ -70,11 +70,6 @@ public class InterrprentUtil { ...@@ -70,11 +70,6 @@ public class InterrprentUtil {
*/ */
EncryptionHelper encryptionHelper = new EncryptionHelper(); EncryptionHelper encryptionHelper = new EncryptionHelper();
String code = payMessage.getPayMessage().getCode().isEmpty()?null:encryptionHelper.Decode(payMessage.getPayMessage().getCode().trim()); String code = payMessage.getPayMessage().getCode().isEmpty()?null:encryptionHelper.Decode(payMessage.getPayMessage().getCode().trim());
// string.IsNullOrWhiteSpace()
// ? string.Empty
// : new ZhuiHu.Encryption.EncryptionUtility().Decode(context.getPayMessage().Code.Trim());
ActiveDM couponInfo = iActiveService.selectByPrimaryKey(payMessage.getPayMessageActive().getCouponactiveid()); ActiveDM couponInfo = iActiveService.selectByPrimaryKey(payMessage.getPayMessageActive().getCouponactiveid());
templateContent = templateContent.replace("#code#", code) templateContent = templateContent.replace("#code#", code)
.replace("#validFrom#", dateformat2.format(couponInfo.getStartdate())) .replace("#validFrom#", dateformat2.format(couponInfo.getStartdate()))
...@@ -82,7 +77,6 @@ public class InterrprentUtil { ...@@ -82,7 +77,6 @@ public class InterrprentUtil {
}else { }else {
logger.info("活动券码号为空"); logger.info("活动券码号为空");
} }
return templateContent; return templateContent;
} }
......
...@@ -76,7 +76,9 @@ ...@@ -76,7 +76,9 @@
<!--<table tableName="Pay_Message_Active" domainObjectName="PayMessageActiveDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>--> <!--<table tableName="Pay_Message_Active" domainObjectName="PayMessageActiveDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<!--<table tableName="Partner" domainObjectName="PartnerDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>--> <!--<table tableName="Partner" domainObjectName="PartnerDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<!--<table tableName="Pay_PlatformAccount" domainObjectName="PayPlatformAccountDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>--> <!--<table tableName="Pay_PlatformAccount" domainObjectName="PayPlatformAccountDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="Active" domainObjectName="ActiveDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table> <!--<table tableName="Active" domainObjectName="ActiveDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="Partner_Setting" domainObjectName="PartnerSettingDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>
<!--<table tableName="partner" domainObjectName="Partner" ></table> <!--<table tableName="partner" domainObjectName="Partner" ></table>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<configuration debug="false" scan="true" scanPeriod="1 seconds"> <configuration debug="false" scan="true" scanPeriod="1 seconds">
<contextName>logback</contextName> <contextName>logback</contextName>
<property name="log.path" value="/data/applogs/xxl-job/xxl-job-executor-sample-springboot.log"/> <property name="log.path" value="/data/applogs/xxl-job/freemud-pay-push-message.log"/>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter" > <!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter" >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment