ConfideRecommendParam.kt 2.67 KB
Newer Older
洪国微 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
package com.ydl.confide.home.http


/**
 * @author yuanwai
 * @描述:倾诉首页为你推荐请求参数bean
 * @Copyright Copyright (c) 2018
 * @Company 壹点灵
 * @date 2018/9/11
 */
class ConfideRecommendParam private constructor(builder: Builder){
    /**
     * 页码
     */
    internal var page : Int = 1
    /**
     * 综合排序(传对应排序的ID)
     */
    private var sortType : String = ""
    /**
     * 性别(传对应性别的ID)
     */
    private var sexType : String = ""
    /**
     * 年龄(传对应年龄ID拼接成的字符串) 例如:选中60后、70后、80后,传参为:“6-7-8”
     */
    private var ageType : String = ""
    /**
     * 年龄(传对应年龄ID拼接成的字符串) 例如:选中60后、70后、80后,传参为:“6-7-8”
     */
    private var goodType : String = ""

33 34
    private var keyWords : String = ""

洪国微 committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
    //当前列表已存在专家uid列表
    var notInUid : ArrayList<Int> = ArrayList()

    fun getSortType() : String{
        return sortType
    }

    fun getSexType() : String{
        return sexType
    }

    fun getAgeType() : String{
        return ageType
    }

    fun getGoodType() : String{
        return goodType
    }

54 55 56 57
    fun getKeywords() : String{
        return keyWords
    }

洪国微 committed
58 59 60 61 62 63 64
    init {
        this.page = builder.page
        this.sortType = builder.sortType
        this.sexType = builder.sexType
        this.ageType = builder.ageType
        this.goodType = builder.goodType
        this.notInUid = builder.notInUid
65
        this.keyWords = builder.keyWords
洪国微 committed
66 67 68 69 70 71 72 73 74
    }

    class Builder {
        internal var page : Int = 1
        internal var sortType : String = ""
        internal var sexType : String = ""
        internal var ageType : String = ""
        internal var goodType : String = ""
        internal var notInUid : ArrayList<Int> = ArrayList()
75
        internal var keyWords : String = ""
洪国微 committed
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101

        fun page(page: Int): Builder {
            this.page = page
            return this
        }

        fun sortType(sortType: String): Builder {
            this.sortType = sortType
            return this
        }

        fun sexType(sexType: String): Builder {
            this.sexType = sexType
            return this
        }

        fun ageType(ageType: String): Builder {
            this.ageType = ageType
            return this
        }

        fun goodType(goodType: String): Builder {
            this.goodType = goodType
            return this
        }

102 103 104 105 106 107

        fun keyWords(keyWords: String): Builder {
            this.keyWords = keyWords
            return this
        }

洪国微 committed
108 109 110
        fun build() : ConfideRecommendParam{
            return ConfideRecommendParam(this)
        }
111 112


洪国微 committed
113 114 115 116
    }
}