parent
a548a318ba
commit
e0d52bbf13
@ -1,27 +1,79 @@
|
|||||||
//package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
||||||
//
|
|
||||||
//import cn.estsh.i3plus.core.api.iservice.busi.IPositionService;
|
import cn.estsh.i3plus.core.api.iservice.busi.IPositionService;
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import cn.estsh.i3plus.pojo.platform.bean.Position;
|
||||||
//import org.springframework.boot.test.context.SpringBootTest;
|
import com.alibaba.fastjson.JSON;
|
||||||
//import org.springframework.test.context.junit4.SpringRunner;
|
import org.junit.Test;
|
||||||
//
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
///**
|
|
||||||
// * @Description :
|
import javax.transaction.Transactional;
|
||||||
// * @Reference :
|
import java.util.List;
|
||||||
// * @Author : wei.peng
|
|
||||||
// * @Date : 2018-10-29 19:02
|
/**
|
||||||
// * @Modify :
|
* @Description : 岗位信息测试
|
||||||
// **/
|
* @Reference :
|
||||||
//@RunWith(SpringRunner.class)
|
* @Author : wei.peng
|
||||||
//@SpringBootTest(classes = {cn.estsh.ImppGo.class})
|
* @Date : 2018-10-29 19:02
|
||||||
//public class TestPositionServiceImpl {
|
* @Modify :
|
||||||
//
|
**/
|
||||||
// @Autowired
|
public class TestPositionServiceImpl extends TestBase {
|
||||||
// private IPositionService positionService;
|
|
||||||
//
|
@Autowired
|
||||||
// @Test
|
private IPositionService positionService;
|
||||||
// public void test1(){
|
|
||||||
// System.out.println(positionService);
|
/**
|
||||||
// }
|
* 测试获取 所有岗位
|
||||||
//
|
*/
|
||||||
//}
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void testListPosition() {
|
||||||
|
List list = positionService.listPosition();
|
||||||
|
System.out.println(JSON.toJSONString(list));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键查询测试
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void testGetPositionById() {
|
||||||
|
Position position = positionService.getPositionById("1056796316849541120");
|
||||||
|
System.out.println(JSON.toJSONString(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入数据 测试
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void testInsertPosition() {
|
||||||
|
Position position = new Position();
|
||||||
|
position.setName("张三的岗位");
|
||||||
|
position.setPositionCode("ZS_CODE");
|
||||||
|
position.setPositionDescription("描述该岗位的信息");
|
||||||
|
Position pos = positionService.insertPosition(position);
|
||||||
|
System.out.println(JSON.toJSONString(pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据测试
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void testDeletePositionById() {
|
||||||
|
positionService.deletePositionById("105605611393555");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据测试
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void testUpdatePosition(){
|
||||||
|
Position position = positionService.getPositionById("1056878692237709312");
|
||||||
|
position.setName("===>> 改动后的名称");
|
||||||
|
positionService.updatePosition(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue