목록JSP/MVC_BBS (39)
WON.dev
package org.joonzis.service; import org.joonzis.vo.MVO; public interface MemService { public int goJoin(MVO mvo); public int ckMember(MVO mvo); public MVO getMember(MVO mvo); }
package org.joonzis.service; import java.util.List; import org.joonzis.dao.CDao; import org.joonzis.dao.CDaoImpl; import org.joonzis.vo.CVO; public class CommentServiceImpl implements CommentService{ private CDao cdao = CDaoImpl.getInstance(); @Override public int commentCountByIdx(int b_idx) { return cdao.commentCountByIdx(b_idx); } @Override public int insertComment(CVO cvo) { return cdao.inse..
package org.joonzis.service; import java.util.List; import org.joonzis.vo.CVO; public interface CommentService { public int commentCountByIdx(int b_idx); public int insertComment(CVO cvo); public List getCommentList(int b_idx); public void removeComment(int c_idx); public void removeCommentAll(int b_idx); }
package org.joonzis.service; import java.util.List; import java.util.Map; import org.joonzis.dao.BDao; import org.joonzis.dao.BDaoImpl; import org.joonzis.vo.BVO; public class BBSServiceImpl implements BBSService{ private BDao bdao = BDaoImpl.getInstance(); @Override public int recordCount() { return bdao.getTotalRecordCount(); } @Override public List getBBSList(Map map) { return bdao.getList(ma..
package org.joonzis.service; import java.util.List; import java.util.Map; import org.joonzis.vo.BVO; public interface BBSService { // 전체 게시물 수 public int recordCount(); // 페이징 처리된 게시글 public List getBBSList(Map map); // 상세 페이지 public BVO getBBS(int b_idx); // 조회수 증가 public void getUpdateHit(BVO bvo); // 게시글 작성 public int getInsertBBS(BVO bvo); // 게시글 수정 public void updateBBS(BVO bvo); // 게시글 삭제 ..
INSERT INTO MEMBER_T VALUES( member_seq.nextval, #{mid}, #{mpw}, #{mname}, #{mtel}, #{mage}, sysdate ) SELECT COUNT(*) FROM MEMBER_T WHERE MID=#{mid} AND MPW=#{mpw} SELECT * FROM MEMBER_T WHERE MID=#{mid} AND MPW=#{mpw}
SELECT COUNT(*) FROM COMMENT_T WHERE B_IDX=#{b_idx} INSERT INTO COMMENT_T VALUES( comment_seq.nextval, #{writer}, #{content}, #{pw}, #{ip}, sysdate, #{b_idx} ) SELECT * FROM COMMENT_T WHERE B_IDX=#{b_idx} DELETE FROM COMMENT_T WHERE C_IDX=#{c_idx} DELETE FROM COMMENT_T WHERE B_IDX=#{b_idx}
SELECT COUNT(*) FROM BBS_T SELECT * FROM (SELECT rownum r_num, A.* FROM (SELECT * FROM BBS_T ORDER BY B_IDX DESC)A) WHERE r_num BETWEEN #{begin} and #{end} SELECT * FROM BBS_T WHERE b_idx=#{b_idx} UPDATE BBS_T SET HIT=#{hit} WHERE B_IDX=#{b_idx} INSERT INTO BBS_T VALUES( bbs_seq.nextval, #{writer}, #{title}, #{content}, #{pw}, 0, #{ip}, #{filename}, sysdate ) UPDATE BBS_T SET title=#{title}, con..
package org.joonzis.mybatis.config; import java.io.InputStream; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; public class DBService {// factory를 만드는게 목적 // 필드 private static SqlSessionFactory factory = null; // 싱글톤 static { try { String resource = "org/joonzis/mybatis/config/sqlmap.xml"; Inpu..