实体类代码:
@Data
@TableName("T_***")
public class Flow*** implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private int id;
@LengthForUtf8(max = 50)
private String name;
@NotNull
@LengthForUtf8(max = 100)
private String processDefinitionId;
service层代码:
@Service
public class FlowEntityServiceImpl extends ServiceImpl<FlowEntityMapper, FlowEntity> implements FlowEntityService{
@Override
@Transactional(rollbackFor = Exception.class)
public void save(){
FlowEntity flowentity = new FlowEntity();
flowentity.setCcToVos(listStrings);
flowentity.setCreateBy(userId);
flowentity.setCreateTime(new Date());
baseMapper.insert(flowentity);
}
}

本文介绍了如何使用Java的Spring框架实现在Service层中操作`T_***`表的FlowEntity实例,包括创建、保存FlowEntity对象,如设置属性并调用Mapper进行插入。
1687

被折叠的 条评论
为什么被折叠?



