test_class.declarator: orderService
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private OrderServiceImpl orderService;
test_class.type: OrderServiceImpl
test_class.var_name: orderService
test_class.declarator: BUYER_OPENID = "abc123"
test_class.modifier: private final
test_class.original_string: private final String BUYER_OPENID = "abc123";
test_class.type: String
test_class.var_name: BUYER_OPENID
test_class.declarator: ORDER_ID = "1569052543479819643"
test_class.modifier: private final
test_class.original_string: private final String ORDER_ID = "1569052543479819643";
test_class.type: String
test_class.var_name: ORDER_ID
test_class.file: wechat_order_h/src/test/java/com/hhh/wechat_order/service/impl/OrderServiceImplTest.java
test_class.identifier: OrderServiceImplTest
test_case.body: @Test
      public void paid() {
          OrderDTO orderDTO = orderService.findOne(ORDER_ID);
          OrderDTO result = orderService.paid(orderDTO);
          Assert.assertEquals(PayStatusEnum.SUCCESS.getCode(), result.getPayStatus());
      }
test_case.class_method_signature: OrderServiceImplTest.paid()
test_case.full_signature: @Test public void paid()
test_case.identifier: paid
test_case.invocations: findOne paid assertEquals getCode getPayStatus
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void paid()
focal_class.declarator: productService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ProductService productService;
focal_class.type: ProductService
focal_class.var_name: productService
focal_class.declarator: orderDetailRepository
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private OrderDetailRepository orderDetailRepository;
focal_class.type: OrderDetailRepository
focal_class.var_name: orderDetailRepository
focal_class.declarator: orderMasterRepository
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private OrderMasterRepository orderMasterRepository;
focal_class.type: OrderMasterRepository
focal_class.var_name: orderMasterRepository
focal_class.declarator: payService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private PayService payService;
focal_class.type: PayService
focal_class.var_name: payService
focal_class.declarator: webSocket
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private WebSocket webSocket;
focal_class.type: WebSocket
focal_class.var_name: webSocket
focal_class.file: wechat_order_h/src/main/java/com/hhh/wechat_order/service/impl/OrderServiceImpl.java
focal_class.identifier: OrderServiceImpl
focal_class.interfaces: implements OrderService
focal_class.class_method_signature: OrderServiceImpl.create(OrderDTO orderDTO)
focal_class.full_signature: @Override @Transactional public OrderDTO create(OrderDTO orderDTO)
focal_class.identifier: create
focal_class.modifiers: @Override @Transactional public
focal_class.parameters: (OrderDTO orderDTO)
focal_class.return: OrderDTO
focal_class.signature: OrderDTO create(OrderDTO orderDTO)
focal_class.class_method_signature: OrderServiceImpl.findOne(String orderId)
focal_class.full_signature: @Override public OrderDTO findOne(String orderId)
focal_class.identifier: findOne
focal_class.modifiers: @Override public
focal_class.parameters: (String orderId)
focal_class.return: OrderDTO
focal_class.signature: OrderDTO findOne(String orderId)
focal_class.class_method_signature: OrderServiceImpl.findList(String buyerOpenid, Pageable pageable)
focal_class.full_signature: @Override public Page<OrderDTO> findList(String buyerOpenid, Pageable pageable)
focal_class.identifier: findList
focal_class.modifiers: @Override public
focal_class.parameters: (String buyerOpenid, Pageable pageable)
focal_class.return: Page<OrderDTO>
focal_class.signature: Page<OrderDTO> findList(String buyerOpenid, Pageable pageable)
focal_class.class_method_signature: OrderServiceImpl.findList(Pageable pageable)
focal_class.full_signature: @Override public Page<OrderDTO> findList(Pageable pageable)
focal_class.identifier: findList
focal_class.modifiers: @Override public
focal_class.parameters: (Pageable pageable)
focal_class.return: Page<OrderDTO>
focal_class.signature: Page<OrderDTO> findList(Pageable pageable)
focal_class.class_method_signature: OrderServiceImpl.findOrderMastersByCreateTimeDesc(Pageable pageable)
focal_class.full_signature: @Override public Page<OrderDTO> findOrderMastersByCreateTimeDesc(Pageable pageable)
focal_class.identifier: findOrderMastersByCreateTimeDesc
focal_class.modifiers: @Override public
focal_class.parameters: (Pageable pageable)
focal_class.return: Page<OrderDTO>
focal_class.signature: Page<OrderDTO> findOrderMastersByCreateTimeDesc(Pageable pageable)
focal_class.class_method_signature: OrderServiceImpl.findListStats(String buyerOpenid, Integer orderStatus)
focal_class.full_signature: @Override public List<OrderDTO> findListStats(String buyerOpenid, Integer orderStatus)
focal_class.identifier: findListStats
focal_class.modifiers: @Override public
focal_class.parameters: (String buyerOpenid, Integer orderStatus)
focal_class.return: List<OrderDTO>
focal_class.signature: List<OrderDTO> findListStats(String buyerOpenid, Integer orderStatus)
focal_class.class_method_signature: OrderServiceImpl.cancel(OrderDTO orderDTO)
focal_class.full_signature: @Override @Transactional public OrderDTO cancel(OrderDTO orderDTO)
focal_class.identifier: cancel
focal_class.modifiers: @Override @Transactional public
focal_class.parameters: (OrderDTO orderDTO)
focal_class.return: OrderDTO
focal_class.signature: OrderDTO cancel(OrderDTO orderDTO)
focal_class.class_method_signature: OrderServiceImpl.finish(OrderDTO orderDTO)
focal_class.full_signature: @Override @Transactional public OrderDTO finish(OrderDTO orderDTO)
focal_class.identifier: finish
focal_class.modifiers: @Override @Transactional public
focal_class.parameters: (OrderDTO orderDTO)
focal_class.return: OrderDTO
focal_class.signature: OrderDTO finish(OrderDTO orderDTO)
focal_class.class_method_signature: OrderServiceImpl.paid(OrderDTO orderDTO)
focal_class.full_signature: @Override @Transactional public OrderDTO paid(OrderDTO orderDTO)
focal_class.identifier: paid
focal_class.modifiers: @Override @Transactional public
focal_class.parameters: (OrderDTO orderDTO)
focal_class.return: OrderDTO
focal_class.signature: OrderDTO paid(OrderDTO orderDTO)
focal_method.body: @Override
      @Transactional
      public OrderDTO paid(OrderDTO orderDTO) {
          //判断订单状态
          if(!orderDTO.getOrderStatus().equals(OrderStatusEnum.NEW.getCode())){
              log.error("【订单支付成功】 订单状态不正确 , orderId={} , orderStatus={}" , orderDTO.getOrderId() , orderDTO.getOrderStatus());
              throw new SellException(ResultEnum.ORDER_STATUS_ERROR);
          }
          //判断支付状态
          //TODO
          if( !orderDTO.getPayStatus().equals(PayStatusEnum.WAIT.getCode())){
              log.error("【订单支付完成】 订单支付状态不正确 , orderDTO={}" , orderDTO);
              throw new SellException(ResultEnum.ORDER_PAY_STATUS_ERROR);
          }
          //修改支付状态
          orderDTO.setOrderStatus(OrderStatusEnum.NEW_PAYED.getCode());
          orderDTO.setPayStatus(PayStatusEnum.SUCCESS.getCode());
          OrderMaster orderMaster = new OrderMaster();
          BeanUtils.copyProperties(orderDTO , orderMaster);
          OrderMaster updateResult = orderMasterRepository.save(orderMaster);
          if(updateResult == null){
              log.error("【订单支付完成】 更新失败 , orderMaster={}" , orderMaster);
              throw new SellException(ResultEnum.ORDER_UPDATE_FAIL);
          }
          return orderDTO;
      }
focal_method.class_method_signature: OrderServiceImpl.paid(OrderDTO orderDTO)
focal_method.full_signature: @Override @Transactional public OrderDTO paid(OrderDTO orderDTO)
focal_method.identifier: paid
focal_method.invocations: equals getOrderStatus getCode error erStatus() equals getPayStatus getCode error setOrderStatus getCode setPayStatus getCode copyProperties save error
focal_method.modifiers: @Override @Transactional public
focal_method.parameters: (OrderDTO orderDTO)
focal_method.return: OrderDTO
focal_method.signature: OrderDTO paid(OrderDTO orderDTO)