This commit is contained in:
geek 2017-06-28 15:36:19 +09:00
parent 09b58f1df7
commit 4e9484758e

View File

@ -0,0 +1,59 @@
package com.loafle.overflow.module.member.service;
import com.loafle.overflow.module.member.dao.MemberDAO;
import com.loafle.overflow.module.member.model.Member;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by geek on 17. 6. 28.
*/
@Service
public class MemberService {
@Autowired
private MemberDAO memberDAO;
public Member signin(Member member) throws Exception {
Member m = this.memberDAO.findByEmail(member);
if ( null == m ) {
return m;
}
if ( m.getStatus().getId() == 1 ) {
throw new Exception("Email Auth Confirm Check");
}
// Todo member.pw m.pw compare
return m;
}
public Member signup(Member member) {
return this.memberDAO.save(member);
}
public void signout(Member member) {
// Todo websocket session remove
}
public Member modify(Member member) {
return this.memberDAO.save(member);
}
public Member read(long memberId) {
return this.memberDAO.findOne(memberId);
}
public void withdrawal(Member member) {
// Todo DB delete?
}
public void emailConfirm(Member member) {
}
}