use of sqltoy.showcase.sagacity.vo.DictTypeVO in project sagacity-sqltoy by chenrenfei.
the class SqlToyCRUDServiceTest method testSaveOrUpdate.
@Test
public void testSaveOrUpdate() {
DictTypeVO dictTypeVO = new DictTypeVO();
dictTypeVO.setDictTypeCode("POST_TYPE");
// 换一个主键值,则变为保存
// dictTypeVO.setDictTypeCode("POST_TYPE");
dictTypeVO.setDictTypeName("岗位类别1");
dictTypeVO.setOperateDate(DateUtil.getNowTime());
dictTypeVO.setOperator("admin");
dictTypeVO.setDataType(0);
dictTypeVO.setStatus("1");
sqlToyCRUDService.saveOrUpdate(dictTypeVO, null);
}
use of sqltoy.showcase.sagacity.vo.DictTypeVO in project sagacity-sqltoy by chenrenfei.
the class SqlToyCRUDServiceTest method testSaveOrUpdateAll.
@Test
public void testSaveOrUpdateAll() {
List entities = new ArrayList();
DictTypeVO dictTypeVO = new DictTypeVO();
dictTypeVO.setDictTypeCode("POST_TYPE");
dictTypeVO.setDictTypeName("岗位类别更新");
// dictTypeVO.setOperateDate(DateUtil.getNowTime());
// dictTypeVO.setOperator("admin");
dictTypeVO.setDataType(0);
dictTypeVO.setStatus("1");
entities.add(dictTypeVO);
DictTypeVO dictTypeVO1 = new DictTypeVO();
dictTypeVO1.setDictTypeCode("POST_TYPE2");
dictTypeVO1.setDictTypeName("岗位类别2");
// dictTypeVO1.setOperateDate(DateUtil.getNowTime());
// dictTypeVO1.setOperator("admin");
dictTypeVO1.setDataType(0);
dictTypeVO1.setStatus("1");
entities.add(dictTypeVO1);
sqlToyCRUDService.saveOrUpdateAll(entities, null, new ReflectPropertyHandler() {
@Override
public void process() {
this.setValue("status", "2");
}
});
}
Aggregations