EmailAuth model modify

This commit is contained in:
geek 2017-06-23 17:24:32 +09:00
parent 5f31eb3145
commit ba698b9453
2 changed files with 2 additions and 63 deletions

View File

@ -1,63 +0,0 @@
//package com.loafle.overflow.module.email.dao;
//
//import com.loafle.overflow.commons.dao.JPABaseDAO;
//import com.loafle.overflow.module.email.model.EmailAuth;
//
//import javax.persistence.Query;
//import java.util.List;
//
///**
// * Created by geek@loafle.com on 17. 6. 6.
// */
//public class JPAEmailAuthDAO extends JPABaseDAO<EmailAuth> implements EmailAuthDAO {
//
// public EmailAuth findByAuthToken(EmailAuth emailAuth) {
// Query query = getEntityManager().createNativeQuery("SELECT e.* FROM EMAIL_AUTH e WHERE e.auth_token = :auth_token", EmailAuth.class);
// query.setParameter("auth_token", emailAuth.getAuthToken());
//
// EmailAuth auth = null;
//
// try {
// auth = (EmailAuth)query.getSingleResult();
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// return auth;
// }
// }
//
// @Override
// public List<EmailAuth> findByMemberId(EmailAuth emailAuth) {
// Query query = getEntityManager().createNativeQuery("SELECT e.* FROM EMAIL_AUTH e WHERE e.member_id = :member_id", EmailAuth.class);
// query.setParameter("member_id", emailAuth.getMember().getId());
//
// List<EmailAuth> auths = null;
//
// try {
// auths = (List<EmailAuth>)query.getResultList();
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// return auths;
// }
// }
//
//// @Override
//// public EmailAuth updateEmailAuth(EmailAuth emailAuth) {
//// EntityTransaction tx = this.getEntityManager().getTransaction();
//// if (!tx.isActive()) {
//// tx.begin();
//// }
////
//// try {
//// emailAuth.setUpdateDate(new Date());
////
//// EmailAuth result = this.getEntityManager().merge(emailAuth);
//// tx.commit();
//// return result;
//// }catch (Exception e) {
//// tx.rollback();
//// return null;
//// }
//// }
//}

View File

@ -4,6 +4,7 @@ import com.loafle.overflow.AppConfig;
import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.meta.model.MetaMemberStatus;
import com.loafle.overflow.module.member.model.Member;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@ -15,6 +16,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
//@Ignore
public class MemberDAOTest {