|
@@ -5,6 +5,8 @@ import com.izouma.jiashanxia.dto.CreateOrder;
|
|
|
import com.izouma.jiashanxia.dto.OrderInfoVO;
|
|
import com.izouma.jiashanxia.dto.OrderInfoVO;
|
|
|
import com.izouma.jiashanxia.dto.PageQuery;
|
|
import com.izouma.jiashanxia.dto.PageQuery;
|
|
|
import com.izouma.jiashanxia.enums.PayMethod;
|
|
import com.izouma.jiashanxia.enums.PayMethod;
|
|
|
|
|
+import com.izouma.jiashanxia.exception.BusinessException;
|
|
|
|
|
+import com.izouma.jiashanxia.repo.OrderInfoRepo;
|
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
import org.junit.runner.RunWith;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -22,6 +24,8 @@ public class OrderInfoServiceTest {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private OrderInfoService orderInfoService;
|
|
private OrderInfoService orderInfoService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private OrderInfoRepo orderInfoRepo;
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
public void order() {
|
|
public void order() {
|
|
@@ -97,4 +101,10 @@ public class OrderInfoServiceTest {
|
|
|
public void test3() {
|
|
public void test3() {
|
|
|
orderInfoService.batchByCart(Collections.singletonList(1536L));
|
|
orderInfoService.batchByCart(Collections.singletonList(1536L));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Test
|
|
|
|
|
+ public void test4() {
|
|
|
|
|
+ OrderInfo orderInfo = orderInfoRepo.findById(1835L).orElseThrow(new BusinessException("wu"));
|
|
|
|
|
+ orderInfoService.distribution3(orderInfo);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|