抄抄抄


 Map data = new HashMap<>();
        data.put("userName", "zhangquandan");
        data.put("password", "123456");
        RetrofitUtil.getApi().getData(data)
                .compose(new SimpleTransform(this, "登录中..."))
                .subscribe(new HttpResultObserver() {
                               @Override
                               public void onFailure(String msg) {
                                   Log.v("test",msg);
                               }

                               @Override
                               public void onFinished() {
                                   Log.v("test","登录成功");

                               }
                           }

                );
        Map data2=new HashMap<>();
        data2.put("tenantId","");
        data2.put("userId","");
        data2.put("day","2020-03-02");
        data2.put("groupId","");
        data2.put("shiftId","");
        data2.put("page","1");
        data2.put("pageSize",20);

        RetrofitUtil.getApi().getData2(data2)
                .compose(new NormalTransform(this,"获取中"))
                .subscribe(new HttpResultObserver(){
                    @Override
                    public void onNext(AttendResult o) {
                        super.onNext(o);
                        Log.v("test",o.ds.rows.size()+"  xxxxxxx");
                    }

                    @Override
                    public void onFailure(String msg) {
                        super.onFailure(msg);
                        Log.v("test",msg+"   错错错错错错错错错错错错");

                    }
                });



你可能感兴趣的:(抄抄抄)