This commit is contained in:
geek 2018-04-20 15:21:02 +09:00
parent 23f0b926b7
commit 812f2c7fd2
2 changed files with 19 additions and 5 deletions

View File

@ -183,7 +183,7 @@ public class MemberService {
member.setPw(preMember.getPw()); member.setPw(preMember.getPw());
} }
if (member.getStatus() == null || member.getStatus().getId() < 0) { if (member.getStatus() == null || member.getStatus().getId() <= 0) {
member.getStatus().setId(preMember.getStatus().getId()); member.getStatus().setId(preMember.getStatus().getId());
} }
return this.modify(member); return this.modify(member);
@ -234,10 +234,6 @@ public class MemberService {
// Todo DB delete? // Todo DB delete?
} }
public void emailConfirm(Member member) {
}
public List<Member> readAllByProbeKey(String probeKey) { public List<Member> readAllByProbeKey(String probeKey) {
Probe probe = this.probeService.readByProbeKey(probeKey); Probe probe = this.probeService.readByProbeKey(probeKey);

View File

@ -1,7 +1,9 @@
package com.loafle.overflow.central.module.infra.service; package com.loafle.overflow.central.module.infra.service;
import com.loafle.overflow.central.commons.model.PageParams;
import com.loafle.overflow.central.module.domain.model.Domain; import com.loafle.overflow.central.module.domain.model.Domain;
import com.loafle.overflow.central.module.infra.model.Infra; import com.loafle.overflow.central.module.infra.model.Infra;
import com.loafle.overflow.central.module.probe.model.Probe;
import com.loafle.overflow.central.module.probe.service.ProbeService; import com.loafle.overflow.central.module.probe.service.ProbeService;
import com.loafle.overflow.central.module.target.model.Target; import com.loafle.overflow.central.module.target.model.Target;
import com.loafle.overflow.central.spring.AppConfigTest; import com.loafle.overflow.central.spring.AppConfigTest;
@ -9,11 +11,14 @@ import org.codehaus.jackson.map.ObjectMapper;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.io.IOException; import java.io.IOException;
import static org.junit.Assert.assertNotNull;
/** /**
* Created by snoop on 17. 7. 27. * Created by snoop on 17. 7. 27.
*/ */
@ -37,6 +42,19 @@ public class InfraServiceTest {
} }
@Test
public void readAllByProbe() throws IOException {
Probe probe = new Probe();
probe.setId(1);
PageParams pageParams = new PageParams();
pageParams.setCountPerPage(100);
pageParams.setPageNo(0);
pageParams.setSortCol("id");
pageParams.setSortDirection("descending");
Page<Infra> list = this.infraService.readAllByProbe(probe, pageParams);
assertNotNull(list);
}
@Test @Test
public void read() throws Exception { public void read() throws Exception {