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);
}
Aggregations