parent
							
								
									a548a318ba
								
							
						
					
					
						commit
						e0d52bbf13
					
				| @ -1,27 +1,79 @@ | ||||
| //package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
 | ||||
| //
 | ||||
| //import cn.estsh.i3plus.core.api.iservice.busi.IPositionService;
 | ||||
| //import org.springframework.beans.factory.annotation.Autowired;
 | ||||
| //import org.springframework.boot.test.context.SpringBootTest;
 | ||||
| //import org.springframework.test.context.junit4.SpringRunner;
 | ||||
| //
 | ||||
| ///**
 | ||||
| // * @Description :
 | ||||
| // * @Reference :
 | ||||
| // * @Author : wei.peng
 | ||||
| // * @Date : 2018-10-29 19:02
 | ||||
| // * @Modify :
 | ||||
| // **/
 | ||||
| //@RunWith(SpringRunner.class)
 | ||||
| //@SpringBootTest(classes = {cn.estsh.ImppGo.class})
 | ||||
| //public class TestPositionServiceImpl {
 | ||||
| //
 | ||||
| //    @Autowired
 | ||||
| //    private IPositionService positionService;
 | ||||
| //
 | ||||
| //    @Test
 | ||||
| //    public void test1(){
 | ||||
| //        System.out.println(positionService);
 | ||||
| //    }
 | ||||
| //
 | ||||
| //}
 | ||||
| package cn.estsh.i3plus.core.apiservice.serviceimpl.busi; | ||||
| 
 | ||||
| import cn.estsh.i3plus.core.api.iservice.busi.IPositionService; | ||||
| import cn.estsh.i3plus.pojo.platform.bean.Position; | ||||
| import com.alibaba.fastjson.JSON; | ||||
| import org.junit.Test; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| 
 | ||||
| import javax.transaction.Transactional; | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * @Description : 岗位信息测试 | ||||
|  * @Reference : | ||||
|  * @Author : wei.peng | ||||
|  * @Date : 2018-10-29 19:02 | ||||
|  * @Modify : | ||||
|  **/ | ||||
| public class TestPositionServiceImpl extends TestBase { | ||||
| 
 | ||||
|     @Autowired | ||||
|     private IPositionService 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