# SalesKpiWeeklyBasicDTO.java

    package cloud.wconnect.workperformance.pojo.dto.saleskpi.weekly.basic;

    import com.google.common.collect.Lists;
    import lombok.AllArgsConstructor;
    import lombok.Builder;
    import lombok.Data;
    import lombok.NoArgsConstructor;

    import jakarta.validation.Valid;
    import java.util.List;

    /**
     * DTO：Sales KPI Weekly Basic
     *
     * @author zc
     * @date 2023/9/9
     */
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public class SalesKpiWeeklyBasicDTO {

        /**
         * total
         */
        @Valid
        private SalesKpiWeeklyValueBasicDTO total;

        /**
         * target
         */
        @Valid
        private SalesKpiWeeklyValueBasicDTO target;

        /**
         * notes
         */
        private SalesKpiWeeklyNotesBasicDTO notes;

        /**
         * 提取用户 id
         *
         * @return 用户 id 集合
         * @author zc
         * @date 2023/9/9
         */
        public List<Integer> summaryUserIds() {
            List<Integer> userIds = Lists.newArrayListWithExpectedSize(3);

            if (total != null) {
                Integer updateUid = total.getUpdateUid();
                if (updateUid != null) {
                    userIds.add(updateUid);
                }
            }
            if (target != null) {
                Integer updateUid = target.getUpdateUid();
                if (updateUid != null) {
                    userIds.add(updateUid);
                }
            }
            if (notes != null) {
                Integer updateUid = notes.getUpdateUid();
                if (updateUid != null) {
                    userIds.add(updateUid);
                }
            }

            return userIds;
        }

    }