/*
package com.njcn;

import com.njcn.device.pq.pojo.po.DeptLine;
import com.njcn.device.pq.service.DeptLineService;
import com.njcn.web.pojo.param.DeptLineParam;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

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

*/
/**
 * @author hongawen
 * @version 1.0.0
 * @date 2021年12月14日 12:55
 *//*

public class DeviceTest extends BaseJunitTest {

    @Autowired
    private DeptLineService deptLineService;


    @Test
    public void test() {
        DeptLineParam deptLineParam = new DeptLineParam();
        deptLineParam.setId("1");
        List<String> ids = Stream.of("999", "888", "777").collect(Collectors.toList());
        //先解绑，再进行绑定
        List<DeptLine> deptLines = new ArrayList<>();
        deptLineParam.setIds(ids);
        deptLineParam.getIds().stream().map(id -> {
            System.out.println("==================");
            DeptLine deptLine = new DeptLine();
            deptLine.setId(deptLineParam.getId());
            deptLine.setLineId(id);
            deptLines.add(deptLine);
            return deptLine;
        });
        deptLineService.saveBatch(deptLines);
    }


}
*/
