| | |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.SysOrderDao; |
| | | import com.matrix.system.hive.dao.SysOrderItemDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | } |
| | | |
| | | //获取订单归属门店 |
| | | order.setCompanyId(bizUser.getCompanyId()); |
| | | order.setShopId(Long.parseLong(orderDto.getStoreId()+"")); |
| | | //同步的订单订单编号保持一致 |
| | | order.setOrderNo(orderDto.getOrderNo()); |
| | |
| | | orderItem.setPrice(orderItemDto.getPrice().doubleValue()); |
| | | orderItem.setZkPrice(orderItemDto.getPrice().doubleValue()); |
| | | orderItem.setGoodsId(shoppingGoods.getId()); |
| | | if (shoppingGoods.getGoodType().equals(Dictionary.SHOPPING_GOODS_TYPE_JJCP)) { |
| | | orderItem.setAssembleId(shoppingGoods.getAssembleGoods().get(0).getId()); |
| | | } else if (shoppingGoods.getGoodType().equals(Dictionary.SHOPPING_GOODS_TYPE_XM)) { |
| | | orderItem.setAssembleId(shoppingGoods.getAssembleProj().get(0).getId()); |
| | | } |
| | | |
| | | // 设置对应产品的id |
| | | switch (shoppingGoods.getGoodType()) { |
| | |
| | | // 设置销量 |
| | | orderService.setShopSelCount(sourceOrder); |
| | | |
| | | SysOrderFlow flow = new SysOrderFlow(); |
| | | flow.setAmount(orderDto.getOrderMoney()); |
| | | flow.setPayMethod("微信"); |
| | | |
| | | List<SysOrderFlow> flows = new ArrayList<>(); |
| | | flows.add(flow); |
| | | sourceOrder.setFlows(flows); |
| | | orderService.updateAfterMoney(sourceOrder); |
| | | |
| | | } |
| | | |
| | | |