Command.java 9.92 KB
Newer Older
konghaorui 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
package com.yidianling.dynamic.model;

import com.ydl.ydlcommon.base.config.HttpConfig;
import com.ydl.ydlcommon.data.http.BaseCommand;
import com.ydl.ydlcommon.router.YdlCommonOut;

/**
 * Created by Jim on 2018/2/5 0005.
 */

public class Command {
    //点赞:动态,回帖,个人主页
    public static class ZanAction extends BaseCommand {
        public String type;//业务类型:1访问用户,2动态,3话题
        public String id;//动态id,回复id,用户uid

        public ZanAction(String type, String id) {
            this.type = type;
            this.id = id;
        }

    }


    //获取社区帖子评论详情
    public static class TrendsReplyInfo extends BaseCommand {

        public String id;//评论id
        public String aid;//标识当前是否为点赞详情

        public TrendsReplyInfo(String id, String aid) {
            super();
            this.id = id;
            this.aid = aid;
        }

    }

    public static class UserAndTrendVisitCmd extends BaseCommand {
        public String type;
        public String id;

        public UserAndTrendVisitCmd(String type, String id) {
            this.type = type;
            this.id = id;
        }

    }


    // 个人资料
    public static class MemberInfoCmd extends BaseCommand {
        public String id;


        public MemberInfoCmd(String id) {
            this.id = id;

        }

    }

    public static class RmBlack extends BaseCommand {
        public String uidBlack;

        public RmBlack(String uidBlack) {
            this.uidBlack = uidBlack;
        }

        public String getUrl() {
            return "" + "/consult/rm-black";
        }
    }

    //关注
    public static class FocusCmd extends BaseCommand {
        public String id;//话题id或用户uid
        public String type;//业务类型:1关注用户,2关注话题

        public FocusCmd(String id, String type) {
            this.id = id;
            this.type = type;
        }

    }

    //加入黑名单
    public static class SetBlackCall extends BaseCommand {
        public String uidBlack;

        public SetBlackCall(String uidBlack) {
            super();
            this.uidBlack = uidBlack;
        }

    }


    //获取举报理由
    public static class GetReportReason extends BaseCommand {

    }


    //举报心事或者心事回复(动态)
    public static class ReportWorry extends BaseCommand {

        public int id;//心事id
        public int reasonId;//举报理由的id
        public int answerId;//如果是针对心事的举报,需要指定该值为0
        public String answerContent;//如果是针对心事的举报,指定该值为空即可
        public int type;//1举报心事(帖子和评论回复),2个人

        //for worry
        public ReportWorry(int id, int reasonId) {
            this(id, reasonId, 0, null, 1);
        }

        // for worry's reply
        public ReportWorry(int id, int reasonId, int answerId, String answerContent, int type) {
            this.id = id;
            this.reasonId = reasonId;
            this.answerId = answerId;
            this.answerContent = answerContent;
            this.type = type;
        }


    }


    //发布动态
    public static class PublishTrend extends BaseCommand {
        public int anonymous;//是否匿名:1否,2匿名
        public int is_doctor_show = 2;// 1仅专家可见 2所有可见
        public String ext_type;//5动态 6问答
        public String topic_id;//话题id
        public String content;//内容
        public String title;//话题
        public String ext_title;//扩展标题
        public String ext_cover;//扩展图片
        public String ext_url;//扩展url

        public PublishTrend(int anonymous, String topic_id, String content, String title, String ext_type, int is_doctor_show) {
            this.anonymous = anonymous;
            this.is_doctor_show = is_doctor_show;
            this.ext_type = ext_type;
            this.topic_id = topic_id;
            this.content = content;
            this.title = title;
        }

        public PublishTrend(int anonymous, String topic_id, String content, String title, String ext_title, String ext_cover, String ext_url, String ext_type, int is_doctor_show) {
            this.anonymous = anonymous;
            this.topic_id = topic_id;
            this.content = content;
            this.is_doctor_show = is_doctor_show;
            this.title = title;
            this.ext_title = ext_title;
            this.ext_cover = ext_cover;
            this.ext_type = ext_type;
            this.ext_url = ext_url;
        }

    }

    //话题列表
    public static class AllTopicCmd extends BaseCommand {
        public String cate;
        public String my;

        public AllTopicCmd(String cate, String my) {
            this.cate = cate;
            this.my = my;

        }

    }

    //话题详情
    public static class TopicDetailCmd extends BaseCommand {
        public String id;


        public TopicDetailCmd(String id) {
            this.id = id;

        }

    }

    public static class AdClickCount extends BaseCommand {
        public int foc_id;

        public AdClickCount(int foc_id) {
            this.foc_id = foc_id;
        }
    }

    //动态列表
    public static class TrendListCmd extends BaseCommand {
        public String tab;
        public int page;
        public String topicId;//默认0,话题id:用于获取话题详情的动态
        public String id;//列表最后一条帖子的id(用于后台定位)
严久程 committed
206
        public int dyEntrance;
konghaorui committed
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
        public TrendListCmd(String tab, int page, String topic_id, String last_id) {
            this.tab = tab;
            this.page = page;
            this.topicId = topic_id;
            this.id = last_id;
        }
    }

    //个人动态
    public static class UserTrendCmd extends BaseCommand {
        public String id;
        public int page;
        public int tab = 1;


        public UserTrendCmd(String id, int page) {
            this.id = id;
            this.page = page;
        }

        public UserTrendCmd(String id, int tab, int page) {
            this.id = id;
            this.page = page;
            this.tab = tab;
        }

    }

    public static class FetchTestDetailCommand extends BaseCommand {
        String id;

        public FetchTestDetailCommand(String id) {
            this.id = id;
        }
    }

    //获取社区帖子评论列表
    public static class TrendsComments extends BaseCommand {

        public String id;//动态id
        //        public String page;//页码,大于等于2
        public String first_page;//1表示从动态列表过来,0表示其他

        public String last_aid;//列表最后一个评论的id
        public String direction;//1上加载,0下加载

        public TrendsComments(String id, String first_page, String last_aid, String direction) {
            super();
            this.id = id;
//            this.page = page;
            this.first_page = first_page;
            this.last_aid = last_aid;
            this.direction = direction;
        }

    }


    //帖子或评论删除
    public static class TrendsReplyDel extends BaseCommand {

        public int type;// 移除类型:1移除评论,2移除动态
        public int id;//评论的id,动态id

        public TrendsReplyDel(int type, int id) {
            super();
            this.type = type;
            this.id = id;
        }
    }


    //私聊 获取聊天者的订单关系数据
    public static class GetExpert extends BaseCommand {

        public String toUid;
        public int canTalk;//为3的时候扣分

        public GetExpert(String toUid, int canTalk) {
            this.toUid = toUid;
            this.canTalk = canTalk;
        }

    }

    //回复盖楼
    public static class CommentOrReply extends BaseCommand {
        public String type;//业务类型:1回复动态,2盖楼
        public String id;//动态id,楼层id
        public String content;//内容

        public CommentOrReply(String type, String id, String content) {
            this.type = type;
            this.id = id;
            this.content = content;
        }

    }

    //获取社区帖子详情
    public static class TrendsInfo extends BaseCommand {

        public int askId;

        public TrendsInfo(int askId) {
            super();
            this.askId = askId;
        }
    }

    //感谢表单提交
    public static class SubmitZan extends BaseCommand {

        public int recieveUid;
        public int starNum;
        public String content;
        public int answerId;
        public int type;//类型,值为1或者2,默认为1。1带有心形数量的感谢;2只留个言,心形数量为0

        public SubmitZan(int recieveUid, int starNum, String content, int answerId, int type) {
            this.recieveUid = recieveUid;
            this.starNum = starNum;
            this.content = content;
            this.answerId = answerId;
            this.type = type;
        }
    }


    // 送感谢 (为了获取相关数据)
    public static class GetThxHeadDate extends BaseCommand {

        public int answerId;

        public GetThxHeadDate(int answerId) {
            this.answerId = answerId;
        }

    }

    //获取赞列表
    public static class GetZanList extends BaseCommand {

        public int page;
        public int answerId;

        public GetZanList(int page, int answerId) {
            super();
            this.page = page;
            this.answerId = answerId;
        }
    }

    //获取专家相关信息
    public static class Service extends BaseCommand {
        public String id;

        public Service(String id) {
            this.id = id;
        }

    }

    public static class ConnectListen extends BaseCommand {

        public int id;

        public ConnectListen(int id) {
            this.id = id;
        }

        public String getUrl() {
            return HttpConfig.Companion.getPHP_BASE_URL()+ "/listen/connect";
        }
    }

}