实体类代码:
@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);
}
}