package com.ydtech.modules.protocol.entity.po; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; import java.io.Serializable; import java.util.List; import java.util.stream.Collectors; /** * 协议授权部门表 * * @TableName ptl_agreement_dept */ @TableName(value = "ptl_agreement_dept") @Data @ToString @EqualsAndHashCode @NoArgsConstructor @AllArgsConstructor public class PtlAgreementDept implements Serializable { /** * 协议id */ @TableField(value = "agreement_id") private String agreementId; /** * 部门ID */ @TableField(value = "dept_id") private String deptId; @TableField(exist = false) private static final long serialVersionUID = 1L; public static List toPtlAgreementDeptList(String agreementId, List deptIdList) { return deptIdList.stream().map(d -> new PtlAgreementDept(agreementId, d)).collect(Collectors.toList()); } }