|  |  |  | 
|---|
|  |  |  | package com.matrix.system.shopXcx.mqTask; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.biz.bean.BizUser; | 
|---|
|  |  |  | import com.matrix.biz.service.BizUserService; | 
|---|
|  |  |  | import com.matrix.core.constance.MatrixConstance; | 
|---|
|  |  |  | import com.matrix.core.tools.LogUtil; | 
|---|
|  |  |  | import com.matrix.core.tools.StringUtils; | 
|---|
|  |  |  | import com.matrix.system.common.constance.AppConstance; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.matrix.system.constance.Dictionary; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.entity.ShopSalesmanOrder; | 
|---|
|  |  |  | import com.matrix.system.hive.bean.*; | 
|---|
|  |  |  | import com.matrix.system.hive.dao.*; | 
|---|
|  |  |  | import com.matrix.system.hive.service.CodeService; | 
|---|
|  |  |  | import com.matrix.system.hive.service.ShoppingGoodsService; | 
|---|
|  |  |  | import com.matrix.system.hive.service.SysOrderService; | 
|---|
|  |  |  | import com.matrix.system.hive.service.SysVipInfoService; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopOrder; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopOrderDetails; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopSku; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.matrix.system.shopXcx.dao.ShopSkuDao; | 
|---|
|  |  |  | import com.rabbitmq.client.DeliverCallback; | 
|---|
|  |  |  | import com.rabbitmq.client.Delivery; | 
|---|
|  |  |  | import org.springframework.beans.BeanUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  | 
|---|
|  |  |  | ShopOrderDetailsDao shopOrderDetailsDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | BizUserService bizUserService; | 
|---|
|  |  |  | SysVipInfoService sysVipInfoService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(needTb){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | BizUser bizUser = bizUserService.findByOpenId(orderDto.getUserId()); | 
|---|
|  |  |  | SysVipInfo vipInfo = sysVipInfoService.findById(orderDto.getUserId()); | 
|---|
|  |  |  | SysOrder order = new SysOrder(); | 
|---|
|  |  |  | //TODO 根据公司id区分 | 
|---|
|  |  |  | SysVipInfo vipInfo = vipDao.selectByPhone(bizUser.getPhoneNumber()); | 
|---|
|  |  |  | if(SysVipInfo.UNDEAL_VIP==vipInfo.getIsDeal()){ | 
|---|
|  |  |  | //非成交客户下单更新客户为成交客户 | 
|---|
|  |  |  | vipInfo.setIsDeal(SysVipInfo.DEAL_VIP); | 
|---|