|  | @@ -1,13 +1,21 @@
 | 
	
		
			
				|  |  |  package com.cooleshow.teacher.presenter.main;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import android.text.TextUtils;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import com.cooleshow.base.common.BaseConstant;
 | 
	
		
			
				|  |  |  import com.cooleshow.base.presenter.BasePresenter;
 | 
	
		
			
				|  |  |  import com.cooleshow.base.rx.BaseObserver;
 | 
	
		
			
				|  |  | +import com.cooleshow.base.utils.RequestBodyUtil;
 | 
	
		
			
				|  |  |  import com.cooleshow.teacher.api.APIService;
 | 
	
		
			
				|  |  |  import com.cooleshow.teacher.bean.TeacherPromoteIncomeBean;
 | 
	
		
			
				|  |  |  import com.cooleshow.teacher.contract.HomeContract;
 | 
	
		
			
				|  |  |  import com.cooleshow.teacher.contract.MainContract;
 | 
	
		
			
				|  |  |  import com.cooleshow.usercenter.bean.TeacherUserInfo;
 | 
	
		
			
				|  |  |  import com.cooleshow.usercenter.bean.UserInfo;
 | 
	
		
			
				|  |  | +import com.cooleshow.usercenter.data.api.UserApi;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import org.json.JSONException;
 | 
	
		
			
				|  |  | +import org.json.JSONObject;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * Author by pq, Date on 2022/4/20.
 | 
	
	
		
			
				|  | @@ -40,4 +48,24 @@ public class MainPresenter extends BasePresenter<MainContract.MainView> implemen
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * @param
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    public void notifyUserPushId(String registerId) {
 | 
	
		
			
				|  |  | +        if (TextUtils.isEmpty(registerId)) {
 | 
	
		
			
				|  |  | +            return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +            jsonObject.put("imDeviceId", registerId);
 | 
	
		
			
				|  |  | +        } catch (JSONException e) {
 | 
	
		
			
				|  |  | +            e.printStackTrace();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        addSubscribe(create(UserApi.class).notifyUserPushId(BaseConstant.CLIENT_API_GROUP_NAME, RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<Object>(getView()) {
 | 
	
		
			
				|  |  | +            @Override
 | 
	
		
			
				|  |  | +            protected void onSuccess(Object data) {
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |