|
@@ -20,7 +20,9 @@ import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
import com.lemon.lifecenter.common.LifeCenterController;
|
|
import com.lemon.lifecenter.common.LifeCenterController;
|
|
import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
import com.lemon.lifecenter.common.LifeCenterSessionController;
|
|
import com.lemon.lifecenter.common.LifeCenterSessionController;
|
|
|
|
+import com.lemon.lifecenter.dto.AcceptDTO;
|
|
import com.lemon.lifecenter.dto.LoginDTO;
|
|
import com.lemon.lifecenter.dto.LoginDTO;
|
|
|
|
+import com.lemon.lifecenter.service.AcceptService;
|
|
import com.lemon.lifecenter.service.LoginService;
|
|
import com.lemon.lifecenter.service.LoginService;
|
|
|
|
|
|
@Controller
|
|
@Controller
|
|
@@ -34,6 +36,9 @@ public class LoginController extends LifeCenterController {
|
|
@Autowired
|
|
@Autowired
|
|
LoginService loginService;
|
|
LoginService loginService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ AcceptService acceptService;
|
|
|
|
+
|
|
@RequestMapping("/admin")
|
|
@RequestMapping("/admin")
|
|
public ModelAndView adminLogin() {
|
|
public ModelAndView adminLogin() {
|
|
ModelAndView mv = setMV("login/admin");
|
|
ModelAndView mv = setMV("login/admin");
|
|
@@ -133,8 +138,12 @@ public class LoginController extends LifeCenterController {
|
|
LifeCenterSessionController.setSession( request, "sesGroupIdx", String.valueOf( memberData.getGroupIdx() ) );
|
|
LifeCenterSessionController.setSession( request, "sesGroupIdx", String.valueOf( memberData.getGroupIdx() ) );
|
|
LifeCenterSessionController.setSession( request, "sesPhoneNumber", String.valueOf( memberData.getPhoneNumber() ) );
|
|
LifeCenterSessionController.setSession( request, "sesPhoneNumber", String.valueOf( memberData.getPhoneNumber() ) );
|
|
|
|
|
|
|
|
+ AcceptDTO acceptDTO = new AcceptDTO();
|
|
|
|
+ acceptDTO.setId( memberData.getId() );
|
|
|
|
+ int acceptTotal = acceptService.selectMemberLogTotal( acceptDTO );
|
|
|
|
|
|
url = "/patient/list";
|
|
url = "/patient/list";
|
|
|
|
+
|
|
if( memberData.getGroupIdx() == 1 ) {
|
|
if( memberData.getGroupIdx() == 1 ) {
|
|
url = "/center/list";
|
|
url = "/center/list";
|
|
}
|
|
}
|
|
@@ -142,16 +151,20 @@ public class LoginController extends LifeCenterController {
|
|
// member 테이블 pw_change_req 컬럼 값이 Y 인경우 비밀번호 변경 필요
|
|
// member 테이블 pw_change_req 컬럼 값이 Y 인경우 비밀번호 변경 필요
|
|
if( memberData.getPwChangeReq().equals( "Y" ) ) {
|
|
if( memberData.getPwChangeReq().equals( "Y" ) ) {
|
|
LifeCenterSessionController.setSession( request, "sesPasswordChange", "REQUIRED" );
|
|
LifeCenterSessionController.setSession( request, "sesPasswordChange", "REQUIRED" );
|
|
- url = "/staff/myinfo";
|
|
|
|
-
|
|
|
|
} else {
|
|
} else {
|
|
// 로그인시 초기화 비밀번호일 경우 비밀번호 변경 페이지로 이동
|
|
// 로그인시 초기화 비밀번호일 경우 비밀번호 변경 페이지로 이동
|
|
if( passwordVal.equals( config.staffResetPw ) || passwordVal.equals( config.centerResetPw ) ) {
|
|
if( passwordVal.equals( config.staffResetPw ) || passwordVal.equals( config.centerResetPw ) ) {
|
|
LifeCenterSessionController.setSession( request, "sesPasswordChange", "RESET" );
|
|
LifeCenterSessionController.setSession( request, "sesPasswordChange", "RESET" );
|
|
- url = "/staff/myinfo";
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 동의하지않은 필수약관 갯수가 0이상일 경우
|
|
|
|
+ if( acceptTotal > 0 ) {
|
|
|
|
+ LifeCenterSessionController.setSession( request, "sesAcceptCheck", "Y" );
|
|
|
|
+ url = "/accept/list";
|
|
|
|
+ } else {
|
|
|
|
+ LifeCenterSessionController.setSession( request, "sesAcceptCheck", "N" );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|