2020import zuo .biao .apijson .JSONObject ;
2121import zuo .biao .apijson .JSONRequest ;
2222import zuo .biao .apijson .JSONResponse ;
23- import zuo .biao .apijson .RequestRole ;
2423import zuo .biao .library .manager .HttpManager .OnHttpResponseListener ;
2524import zuo .biao .library .util .Log ;
2625import zuo .biao .library .util .SettingUtil ;
3231import apijson .demo .server .model .Login ;
3332import apijson .demo .server .model .Moment ;
3433import apijson .demo .server .model .Password ;
34+ import apijson .demo .server .model .Privacy ;
3535import apijson .demo .server .model .User ;
36- import apijson .demo .server .model .UserPrivacy ;
3736import apijson .demo .server .model .Verify ;
3837import apijson .demo .server .model .Wallet ;
3938
@@ -135,14 +134,14 @@ public static void delete(JSONObject request, int requestCode, OnHttpResponseLis
135134
136135 //加 _ 表示class名,避免PASSWORD不知道是 Password 还是 password 这种冲突
137136 public static final String USER_ ;
138- public static final String USER_PRIVACY_ ;
137+ public static final String PRIVACY_ ;
139138 public static final String MOMENT_ ;
140139 public static final String COMMENT_ ;
141140 public static final String WALLET_ ;
142141 public static final String VERIFY_ ;
143142 static {
144143 USER_ = User .class .getSimpleName ();
145- USER_PRIVACY_ = UserPrivacy .class .getSimpleName ();
144+ PRIVACY_ = Privacy .class .getSimpleName ();
146145 MOMENT_ = Moment .class .getSimpleName ();
147146 COMMENT_ = Comment .class .getSimpleName ();
148147 WALLET_ = Wallet .class .getSimpleName ();
@@ -240,7 +239,7 @@ public static void setPassword(String verify, String phone, String password
240239 * @param listener
241240 */
242241 public static void checkRegister (String phone , int requestCode , OnHttpResponseListener listener ) {
243- head (new JSONRequest (new UserPrivacy ().setPhone (phone )), requestCode , listener );
242+ head (new JSONRequest (new Privacy ().setPhone (phone )), requestCode , listener );
244243 }
245244
246245 /**登录
@@ -649,10 +648,10 @@ public static void deleteComment(long id, int requestCode, OnHttpResponseListene
649648 * @param requestCode
650649 * @param listener
651650 */
652- public static void getUserPrivacy (int requestCode , OnHttpResponseListener listener ) {
651+ public static void getPrivacy (int requestCode , OnHttpResponseListener listener ) {
653652 postGet (new JSONRequest (
654- new UserPrivacy (application .getCurrentUserId ())
655- ).setTag (USER_PRIVACY_ ), requestCode , listener );
653+ new Privacy (application .getCurrentUserId ())
654+ ).setTag (PRIVACY_ ), requestCode , listener );
656655 }
657656
658657 /**修改余额
@@ -662,13 +661,13 @@ public static void getUserPrivacy(int requestCode, OnHttpResponseListener listen
662661 * @param listener
663662 */
664663 public static void changeBalance (double change , String payPassword , int requestCode , OnHttpResponseListener listener ) {
665- JSONObject userPrivacy = new JSONObject (
666- new UserPrivacy (application .getCurrentUserId ()).setPayPassword (payPassword )
664+ JSONObject privacy = new JSONObject (
665+ new Privacy (application .getCurrentUserId ()).setPayPassword (payPassword )
667666 );
668- userPrivacy .put ("balance+" , change , true );
669- JSONRequest request = new JSONRequest (USER_PRIVACY_ , userPrivacy );
667+ privacy .put ("balance+" , change , true );
668+ JSONRequest request = new JSONRequest (PRIVACY_ , privacy );
670669
671- HttpManager .getInstance ().post (URL_BASE + "put/balance" , request .setTag (USER_PRIVACY_ ), requestCode , listener );
670+ HttpManager .getInstance ().post (URL_BASE + "put/balance" , request .setTag (PRIVACY_ ), requestCode , listener );
672671 }
673672
674673
0 commit comments