[B -2-34] Ajax 댓글 처리 7

2019. 10. 6. 22:06Project B (SPMS)/Project B 파트5

반응형

서비스 영역 처리

 

src/main/java

com.spms.service

ReplyService.java 인터페이스

register()

get()

modify()

remove()

getList()

...더보기
package com.spms.service;

import java.util.List;

import com.spms.domain.Criteria;
import com.spms.domain.ReplyVO;

public interface ReplyService {

	public int register(ReplyVO vo);

	public ReplyVO get(Long rno);

	public int modify(ReplyVO vo);

	public int remove(Long rno);

	public List<ReplyVO> getList(Criteria cri, Long bno);
	
}

 


src/main/java

com.spms.service

ReplyServiceImpl.java 

register()

get()

modify()

remove()

getList()

...더보기
package com.spms.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.spms.domain.Criteria;
import com.spms.domain.ReplyVO;
import com.spms.mapper.ReplyMapper;

import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j;

@Service
@Log4j
@AllArgsConstructor
public class ReplyServiceImpl implements ReplyService {

  private ReplyMapper mapper;

  @Override
  public int register(ReplyVO vo) {

    log.info("register......" + vo);

    return mapper.insert(vo);

  }

  @Override
  public ReplyVO get(Long rno) {

    log.info("get......" + rno);

    return mapper.read(rno);

  }

  @Override
  public int modify(ReplyVO vo) {

    log.info("modify......" + vo);

    return mapper.update(vo);

  }

  @Override
  public int remove(Long rno) {

    log.info("remove...." + rno);

    return mapper.delete(rno);

  }

  @Override
  public List<ReplyVO> getList(Criteria cri, Long bno) {

    log.info("get Reply List of a Board " + bno);

    return mapper.getListWithPaging(cri, bno);

  }

}

 

반응형

'Project B (SPMS) > Project B 파트5' 카테고리의 다른 글

[B -2-36] Ajax 댓글 처리 9  (0) 2019.10.08
[B -2-35] Ajax 댓글 처리 8  (0) 2019.10.06
[B -2-33] Ajax 댓글 처리 6  (0) 2019.10.06
[B -2-32] Ajax 댓글 처리 5  (0) 2019.10.06
[B -2-31] Ajax 댓글 처리 4  (0) 2019.10.06