Commit f1d812ca by 王祖波

Merge branch 'feature-qdcms' into 'master'

Feature qdcms

See merge request !2466
parents 9b2042f2 28199c51
......@@ -49,6 +49,10 @@ public class MemberOrderBo implements Serializable {
*/
private Integer times;
/**
* 订单类型
*/
private Integer orderType;
public Integer getOrderStatus() {
return orderStatus;
......@@ -121,4 +125,12 @@ public class MemberOrderBo implements Serializable {
public void setTimes(Integer times) {
this.times = times;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
}
......@@ -17,6 +17,7 @@ import com.gic.haoban.manage.service.service.content.InteractRecordService;
import com.gic.haoban.manage.service.service.content.PotentialCustomerService;
import com.gic.haoban.manage.service.service.content.adaptor.MaterialEnterpriseAdaptor;
import com.gic.haoban.manage.service.task.KafkaMessageServiceImpl;
import com.gic.haoban.manage.service.util.OrderCheckUtil;
import com.gic.member.api.dto.event.lifecycle.CreateMemberEventParam;
import com.gic.member.api.dto.info.MemberSummaryInfoDTO;
import com.gic.member.api.dto.info.qo.QueryMemberInfoDTO;
......@@ -184,8 +185,9 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
return ServiceResponse.success();
}
OrderInfoResp orderInfoResp = serviceResponse.getResult();
if (orderInfoResp.getOrderType() == null || OrderChannelEnum.WEIMOB.getSort() != orderInfoResp.getOrderType()) {
log.info("订单 {} 非微盟渠道", orderId);
if (orderInfoResp.getOrderType() == null ||
!OrderCheckUtil.checkOrderType(orderInfoResp.getOrderType())) {
log.info("订单 {} 非微盟/自研渠道", orderId);
return ServiceResponse.success();
}
......@@ -195,6 +197,7 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
memberOrderBo.setOrderId(orderSaveNotifyDTO.getOrderId());
memberOrderBo.setOrderNumber(orderInfoResp.getRorderNumber());
memberOrderBo.setOrderTime(orderInfoResp.getOrderTime());
memberOrderBo.setOrderType(orderInfoResp.getOrderType());
if (isOnlineOrder) {
memberOrderBo.setTableName(KafkaMessageServiceImpl.tab_gic_eorder);
}else {
......
......@@ -9,8 +9,11 @@ import com.gic.business.order.enums.OrderEnum;
import com.gic.business.order.qdto.ordermanage.OrderInfoQDTO;
import com.gic.business.order.service.ordermanage.OrderInfoOutApiService;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.content.api.dto.burypoint.ContentMemberBuryPointDTO;
import com.gic.content.api.dto.setting.ContentSettingDTO;
import com.gic.content.api.enums.ContentMallShopType;
import com.gic.content.api.qdto.burypoint.MemberBuryPointOrderQDTO;
import com.gic.content.api.service.ContentMemberBuryPointApiService;
import com.gic.content.api.service.ContentSettingApiService;
import com.gic.enterprise.api.constant.EnterpriseServiceEnum;
import com.gic.enterprise.api.dto.enterprise.EnterpriseUsingStatusDTO;
......@@ -61,6 +64,8 @@ public class MallOrderStatusChangeApiServiceImpl implements MallOrderStatusChang
private EnterpriseUseForbidService enterpriseUseForbidService;
@Autowired
private ContentSettingApiService contentSettingApiService;
@Autowired
private ContentMemberBuryPointApiService contentMemberBuryPointApiService;
private static final String ORDER_EVENT_RETRY = "orderEventRetryMQ";
......@@ -184,7 +189,7 @@ public class MallOrderStatusChangeApiServiceImpl implements MallOrderStatusChang
}
/**
* 处理微盟订单
* 处理微盟/自研订单
* MQ: dealWeimoOrder
* @param params
* @return
......@@ -192,7 +197,7 @@ public class MallOrderStatusChangeApiServiceImpl implements MallOrderStatusChang
@Override
public ServiceResponse<Void> dealWeimoOrder(String params) {
log.info("处理微盟订单 {}", params);
log.info("处理微盟/自研订单 {}", params);
//订单分为tab_gic_eorder 和 tab_gic_ordeer
MemberOrderBo memberOrderBo = JSON.parseObject(params, MemberOrderBo.class);
......@@ -232,8 +237,9 @@ public class MallOrderStatusChangeApiServiceImpl implements MallOrderStatusChang
return ServiceResponse.success();
}
if (!ContentMallShopType.WEIMO_MALL.getCode().equals(response.getResult().getMallShopType())) {
log.info("当前企业内容配置非微盟商城 {}", JSON.toJSONString(response));
if (!ContentMallShopType.WEIMO_MALL.getCode().equals(response.getResult().getMallShopType())
&& !ContentMallShopType.THIRD_MALL.getCode().equals(response.getResult().getMallShopType())) {
log.info("当前企业内容配置非微盟/自研商城 {}", JSON.toJSONString(response));
return ServiceResponse.success();
}
......@@ -241,11 +247,24 @@ public class MallOrderStatusChangeApiServiceImpl implements MallOrderStatusChang
String orderId = memberOrderBo.getOrderId();
String orderNumber = memberOrderBo.getOrderNumber();
Date orderTime = memberOrderBo.getOrderTime();
Integer orderType = memberOrderBo.getOrderType();
InteractRecordMessageBO interactRecordMessageBO = new InteractRecordMessageBO();
interactRecordMessageBO.setEnterpriseId(enterpriseId);
interactRecordMessageBO.setMemberId(memberId);
MaterialDataAdaptor.MaterialBizInfo materialBizInfo = materialDataAdaptor.queryMaterialBizInfo(enterpriseId, memberId, orderTime, null);
MaterialDataAdaptor.MaterialBizInfo materialBizInfo = null;
MemberBuryPointOrderQDTO memberBuryPointOrderQDTO = new MemberBuryPointOrderQDTO();
memberBuryPointOrderQDTO.setEnterpriseId(enterpriseId);
memberBuryPointOrderQDTO.setOrderCreateTime(orderTime);
memberBuryPointOrderQDTO.setMemberId(memberId);
memberBuryPointOrderQDTO.setConvFlag(1);
memberBuryPointOrderQDTO.setMallType(2);
memberBuryPointOrderQDTO.setOrderType(orderType);
ServiceResponse<ContentMemberBuryPointDTO> buryPointResponse = contentMemberBuryPointApiService.queryMemberBuryPoint(memberBuryPointOrderQDTO);
if (buryPointResponse.isSuccess() && buryPointResponse.getResult() != null) {
ContentMemberBuryPointDTO result = buryPointResponse.getResult();
materialBizInfo = new MaterialDataAdaptor.MaterialBizInfo(result.getClerkId(), String.valueOf(result.getContentMaterialId()), result.getStoreId());
}
// MaterialDataAdaptor.MaterialBizInfo materialBizInfo = materialDataAdaptor.queryMaterialBizInfo(enterpriseId, memberId, orderTime, null);
if (materialBizInfo == null) {
if (memberOrderBo.getTimes() == null) {
memberOrderBo.setTimes(1);
......
package com.gic.haoban.manage.service.util;
import com.gic.enterprise.api.enums.PlatformChannelEnum;
import com.gic.orderecommerce.api.constant.OrderChannelEnum;
import com.google.common.collect.Lists;
import java.util.List;
public class OrderCheckUtil {
private static final List<Integer> DEAL_ORDER_TYPE_LIST = Lists.newArrayList(
OrderChannelEnum.WEIMOB.getSort(),
OrderChannelEnum.BRAND_MALL.getSort());
/**
* 销售线索是否需要处理订单类型
* @param orderType
* @return
*/
public static boolean checkOrderType(Integer orderType) {
return DEAL_ORDER_TYPE_LIST.contains(orderType);
}
}
\ No newline at end of file
......@@ -244,6 +244,7 @@
<dubbo:reference id="contentProducerApiService" interface="com.gic.content.api.service.ContentProducerApiService" timeout="10000" retries="0" check="false" />
<dubbo:reference interface="com.gic.content.api.service.ContentMaterialApiService" id="contentMaterialApiService" timeout="10000" retries="0" check="false" />
<dubbo:reference interface="com.gic.content.api.service.ContentSettingApiService" id="contentSettingApiService" timeout="10000" retries="0" check="false" />
<dubbo:reference interface="com.gic.content.api.service.ContentMemberBuryPointApiService" id="contentMemberBuryPointApiService" timeout="10000" retries="0" check="false" />
<dubbo:reference interface="com.gic.clerk.api.service.MenuApiService" id="menuApiService" timeout="10000" retries="0" check="false" />
<dubbo:reference interface="com.gic.member.ext.api.service.MemberGrowthWriteApiService" id="memberGrowthWriteApiService" timeout="10000" retries="0" check="false" />
<dubbo:reference interface="com.gic.member.api.service.integral.IntegralWriteApiService" id="integralWriteApiService" timeout="10000" retries="0" check="false"/>
......
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