@ -75,7 +75,11 @@ public class TestDemoServiceImpl extends ServicePlusImpl<TestDemoMapper, TestDem
public Boolean insertByBo(TestDemoBo bo) {
TestDemo add = BeanUtil.toBean(bo, TestDemo.class);
validEntityBeforeSave(add);
return save(add);
boolean flag = save(add);
if (flag) {
bo.setId(add.getId());
}
return flag;
@Override
@ -54,7 +54,11 @@ public class TestTreeServiceImpl extends ServicePlusImpl<TestTreeMapper, TestTre
public Boolean insertByBo(TestTreeBo bo) {
TestTree add = BeanUtil.toBean(bo, TestTree.class);
@ -79,7 +79,12 @@ public class ${ClassName}ServiceImpl extends ServicePlusImpl<${ClassName}Mapper,
public Boolean insertByBo(${ClassName}Bo bo) {
${ClassName} add = BeanUtil.toBean(bo, ${ClassName}.class);
#set($pk=$pkColumn.javaField.substring(0,1).toUpperCase() + ${pkColumn.javaField.substring(1)})
bo.set$pk(add.get$pk());