Search in sources :

Example 1 with DictDetailVO

use of sqltoy.showcase.sagacity.vo.DictDetailVO in project sagacity-sqltoy by chenrenfei.

the class SqlToyCRUDServiceTest method testSaveCascade.

@Test
public void testSaveCascade() {
    DictTypeVO dictTypeVO = new DictTypeVO();
    dictTypeVO.setDictTypeCode("POST_TYPE");
    dictTypeVO.setDictTypeName("岗位类别");
    dictTypeVO.setOperateDate(DateUtil.getNowTime());
    dictTypeVO.setOperator("admin");
    dictTypeVO.setDataSize(5);
    dictTypeVO.setDataType(1);
    dictTypeVO.setStatus("1");
    List dictDetailVOs = new ArrayList();
    DictDetailVO detailVO = new DictDetailVO();
    detailVO.setDictKey("1");
    detailVO.setDictName("staff");
    detailVO.setStatus("1");
    detailVO.setShowIndex(1);
    detailVO.setUpdateBy("0001");
    detailVO.setUpdateTime(DateUtil.getTimestamp(null));
    dictDetailVOs.add(detailVO);
    DictDetailVO detailVO1 = new DictDetailVO();
    detailVO1.setDictKey("2");
    detailVO1.setDictName("master");
    detailVO1.setStatus("1");
    detailVO1.setShowIndex(2);
    detailVO1.setUpdateTime(DateUtil.getTimestamp(null));
    detailVO1.setUpdateBy("0001");
    dictDetailVOs.add(detailVO1);
    dictTypeVO.setDictDetailVOs(dictDetailVOs);
    // 先删除
    sqlToyCRUDService.delete(dictTypeVO);
    sqlToyCRUDService.save(dictTypeVO);
}
Also used : DictTypeVO(sqltoy.showcase.sagacity.vo.DictTypeVO) DictDetailVO(sqltoy.showcase.sagacity.vo.DictDetailVO) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 Test (org.junit.Test)1 DictDetailVO (sqltoy.showcase.sagacity.vo.DictDetailVO)1 DictTypeVO (sqltoy.showcase.sagacity.vo.DictTypeVO)1