- 修改 package

This commit is contained in:
sin 2019-05-14 19:19:46 +08:00
parent e25ba3895d
commit ce78a4eb0b
3 changed files with 39 additions and 9 deletions

View File

@ -1,4 +1,4 @@
package cn.iocoder.mall.order; package cn.iocoder.mall.order.biz;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -0,0 +1,37 @@
package cn.iocoder.mall.order.biz.mapper;
import cn.iocoder.mall.order.biz.OrderApplicationTest;
import cn.iocoder.mall.order.biz.dao.OrderMapper;
import cn.iocoder.mall.order.biz.dataobject.OrderDO;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional;
/**
* mapper test
*
* @author Sin
* @time 2019/5/13 10:45 PM
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = OrderApplicationTest.class)
@Transactional
public class OrderMapperTest {
@Autowired
private OrderMapper orderMapper;
@Test
public void updateByIdTest() {
int id = 47;
// int updateStatus = 99;
// int res = orderMapper.update(new OrderDO().setStatus(id), new UpdateWrapper<OrderDO>().eq("id", updateStatus));
OrderDO orderDO = orderMapper.selectById(id);
// Assert.assertTrue(orderDO.getStatus() == updateStatus);
}
}

View File

@ -1,13 +1,8 @@
package cn.iocoder.mall.order.biz.service; package cn.iocoder.mall.order.biz.service;
import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.order.biz.OrderApplicationTest;
import cn.iocoder.mall.order.OrderApplicationTest;
import cn.iocoder.mall.order.api.OrderService; import cn.iocoder.mall.order.api.OrderService;
import cn.iocoder.mall.order.api.bo.OrderCreateBO;
import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
import cn.iocoder.mall.order.biz.dao.OrderMapper; import cn.iocoder.mall.order.biz.dao.OrderMapper;
import cn.iocoder.mall.order.biz.dataobject.OrderDO;
import org.junit.Assert;
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;
@ -15,8 +10,6 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
/** /**
* 订单 service test * 订单 service test
* *