package com.usoftchina.qywx.sdk.dto;

import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author yingp
 */
public class SendMessageResp extends BaseResp {
    private String invaliduser;
    private String invalidparty;
    private String invalidtag;

    public String getInvaliduser() {
        return invaliduser;
    }

    public void setInvaliduser(String invaliduser) {
        this.invaliduser = invaliduser;
    }

    public String getInvalidparty() {
        return invalidparty;
    }

    public void setInvalidparty(String invalidparty) {
        this.invalidparty = invalidparty;
    }

    public String getInvalidtag() {
        return invalidtag;
    }

    public void setInvalidtag(String invalidtag) {
        this.invalidtag = invalidtag;
    }

    public List<String> invalidUserList() {
        if (StringUtils.isEmpty(invaliduser)) {
            return Collections.emptyList();
        }
        return new ArrayList<>(Arrays.asList(invaliduser.split("\\|")));
    }

    public List<String> invalidPartyList() {
        if (StringUtils.isEmpty(invalidparty)) {
            return Collections.emptyList();
        }
        return new ArrayList<>(Arrays.asList(invalidparty.split("\\|")));
    }

    public List<String> invalidTagList() {
        if (StringUtils.isEmpty(invalidtag)) {
            return Collections.emptyList();
        }
        return new ArrayList<>(Arrays.asList(invalidtag.split("\\|")));
    }
}
