Search in sources :

Example 6 with MemberDao2

use of com.bitcamp.mvc.dao.MemberDao2 in project bitcampSCOpen2017 by ryuyj.

the class MemberUpdateService method update.

@Transactional
public void update(UpdateRequest req) {
    dao = sqlSessionTemplate.getMapper(MemberDao2.class);
    Member member = dao.selectById(req.getId());
    if (member == null) {
        throw new MemberNotFoundException("회원 없음 : " + req.getId());
    }
    dao.updateMember(req.toMember());
}
Also used : MemberDao2(com.bitcamp.mvc.dao.MemberDao2) Member(com.bitcamp.mvc.model.Member) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

MemberDao2 (com.bitcamp.mvc.dao.MemberDao2)6 Member (com.bitcamp.mvc.model.Member)6 Transactional (org.springframework.transaction.annotation.Transactional)6