Browse Source

[회원가입][New] 가입 완료 > 이미 회원 루틴 처리

hyodong.min 7 years ago
parent
commit
24a0cbc0ee

+ 3 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/LifeplusAPIBean.java

@@ -25,6 +25,9 @@ public class LifeplusAPIBean extends JsonBeanBase {
   public static int RETURN_MOBILE_AUTH_ERROR_UNDER_14_YEARS = -2;
   public static int RETURN_MOBILE_AUTH_ERROR_NEED_FOR_30_DAYS = -900;
   public static int RETURN_MOBILE_AUTH_ERROR_ALREADY_MEMBER = -4;
+  public static int RETURN_SIGN_UP_ERROR_ALREADY_MEMBER = -300;
+  public static int RETURN_LOG_IN_ERROR_MEMBER_BLOCK = -100;
+  public static int RETURN_LOG_IN_ERROR_MEMBER_REST = -200;
   public static int RETURN_REGISTRATION_FAIL = -30;
   public static int RETURN_CONFIRM_FAIL = -40;
 

+ 3 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/model/module/LoginModuleParser.java

@@ -3,6 +3,7 @@
  */
 package kr.co.zumo.app.lifeplus.model.module;
 
+import kr.co.zumo.app.lifeplus.bean.api.LifeplusAPIBean;
 import kr.co.zumo.app.lifeplus.bean.api.LoginResultBean;
 import kr.co.zumo.app.lifeplus.model.SuperModel;
 
@@ -66,12 +67,12 @@ public class LoginModuleParser {
 
       }
       else {
-        if (loginResultBean.getCode() == -100) {
+        if (loginResultBean.getCode() == LifeplusAPIBean.RETURN_LOG_IN_ERROR_MEMBER_BLOCK) {
           // 블럭 계정
           SuperModel.getInstance().addMemberStatus(SuperModel.MEMBER_STATUS_BIT_BLOCK);
           return verify();
         }
-        else if (loginResultBean.getCode() == -200) {
+        else if (loginResultBean.getCode() == LifeplusAPIBean.RETURN_LOG_IN_ERROR_MEMBER_REST) {
           // 휴면 계정
           SuperModel.getInstance().addMemberStatus(SuperModel.MEMBER_STATUS_BIT_REST);
           return verify();

+ 4 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpAgreeModel.java

@@ -208,6 +208,10 @@ public class SignUpAgreeModel extends Model {
               SuperModel.getInstance().addMemberStatus(SuperModel.MEMBER_STATUS_BIT_OUT);
               onResult(new Event.Builder(Event.RESULT).integer(Event.MEMBER_NEED_30DAYS).build());
             }
+            if (resultBean.getCode() == LifeplusAPIBean.RETURN_SIGN_UP_ERROR_ALREADY_MEMBER) {
+              // 이미 가입한 회원 (탈퇴안한 상태?)
+              onResult(new Event.Builder(Event.RESULT).integer(Event.MEMBER_ALREADY_MEMBER).build());
+            }
             else {
               onResult(new Event.Builder(Event.ERROR).integer(Event.MEMBER_JOIN).string(resultBean.getReturnMessage()).build());
             }

+ 4 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpAgreePresenter.java

@@ -107,6 +107,10 @@ public class SignUpAgreePresenter extends Presenter<SignUpAgreeModel, ISignUpAgr
           // 30일이내 가입
           go(ScreenID.SIGN_UP_NEED_FOR_30DAYS);
         }
+        else if (event.getInteger() == Event.MEMBER_ALREADY_MEMBER) {
+          // 이미 가입한 회원 (탈퇴안한 상태?)
+          go(ScreenID.SIGN_UP_ALREADY_MEMBER);
+        }
         else if (event.getInteger() == Event.MEMBER_LOGIN) {
           onLogin();
         }