package com.engine.organization.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import weaver.general.StringUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Author dxfeng
 * @description:
 * @Date 2022/5/9
 * @Version V1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DeleteParam {
     private String ids;

     public List<Long> getIds() {
          if(StringUtil.isEmpty(ids)){
               return new ArrayList<>();
          }
          return Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList());
     }

}
