refactor: idgen 구조 추가
This commit is contained in:
parent
720d08ed0e
commit
4a3b517791
13
pom.xml
13
pom.xml
@ -36,11 +36,14 @@
|
|||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<!-- <scope>test</scope>-->
|
<!-- <scope>test</scope>-->
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.mariadb.jdbc</groupId>-->
|
<!-- https://mvnrepository.com/artifact/org.modelmapper/modelmapper -->
|
||||||
<!-- <artifactId>mariadb-java-client</artifactId>-->
|
<dependency>
|
||||||
<!-- <scope>runtime</scope>-->
|
<groupId>org.modelmapper</groupId>
|
||||||
<!-- </dependency>-->
|
<artifactId>modelmapper</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.itn.mjonApi.cmn.idgen.mapper;
|
||||||
|
|
||||||
|
import com.itn.mjonApi.cmn.idgen.mapper.domain.IdgenVO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface IdgenMapper {
|
||||||
|
|
||||||
|
// @Select("select * from ids")
|
||||||
|
List<IdgenVO> findByTableName(String tableName);
|
||||||
|
}
|
||||||
@ -1,27 +1,30 @@
|
|||||||
package com.itn.mjonApi.mjon.member.mapper.domain;
|
package com.itn.mjonApi.cmn.idgen.mapper.domain;
|
||||||
/*
|
/*
|
||||||
table : mj_mymsg
|
table : mj_mymsg
|
||||||
comment : '내문자 보관함';
|
comment : '내문자 보관함';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@Getter
|
import java.io.Serializable;
|
||||||
@Setter
|
|
||||||
@NoArgsConstructor
|
@Getter
|
||||||
@AllArgsConstructor
|
@Setter
|
||||||
public class MyMsgVO {
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
private Integer msgId; /*auto_increment comment '문자 고유아이디' primary key*/
|
public class IdgenVO implements Serializable {
|
||||||
private String mberId; /*comment '회원 아이디'*/
|
|
||||||
private String esntlId; /*null comment '회원고유 아이디'*/
|
private static final long serialVersionUID = -7865729705175845268L;
|
||||||
private String subject; /*null comment '문자 제목'*/
|
private Integer msgId; /*auto_increment comment '문자 고유아이디' primary key*/
|
||||||
private String smsTxt; /*null comment '문자 내용'*/
|
private String mberId; /*comment '회원 아이디'*/
|
||||||
private String smsLen; /*null comment '문자 길이'*/
|
private String esntlId; /*null comment '회원고유 아이디'*/
|
||||||
private String atchFileId1; /*null comment '첨부파일번호'*/
|
private String subject; /*null comment '문자 제목'*/
|
||||||
private String atchFileId2; /*null comment '첨부파일번호'*/
|
private String smsTxt; /*null comment '문자 내용'*/
|
||||||
private String atchFileId3; /*null comment '첨부파일번호'*/
|
private String smsLen; /*null comment '문자 길이'*/
|
||||||
private String regdate; /*null comment '등록일자'*/
|
private String atchFileId1; /*null comment '첨부파일번호'*/
|
||||||
private String msgType; /*default 'S' null comment '문자종류'*/
|
private String atchFileId2; /*null comment '첨부파일번호'*/
|
||||||
|
private String atchFileId3; /*null comment '첨부파일번호'*/
|
||||||
}
|
private String regdate; /*null comment '등록일자'*/
|
||||||
|
private String msgType; /*default 'S' null comment '문자종류'*/
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.itn.mjonApi.mjon.member.mapper;
|
package com.itn.mjonApi.mjon.member.mapper;
|
||||||
|
|
||||||
import com.itn.mjonApi.mjon.member.mapper.domain.MyMsgVO;
|
import com.itn.mjonApi.cmn.idgen.mapper.domain.IdgenVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
@ -10,8 +10,8 @@ import java.util.List;
|
|||||||
public interface MyMsgMapper {
|
public interface MyMsgMapper {
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
List<MyMsgVO> findAll();
|
List<IdgenVO> findAll();
|
||||||
|
|
||||||
@Select("select * from MJ_MYMSG")
|
@Select("select * from MJ_MYMSG")
|
||||||
List<MyMsgVO> findAll_2();
|
List<IdgenVO> findAll_2();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
package com.itn.mjonApi.mjon.member.service;
|
package com.itn.mjonApi.mjon.member.service;
|
||||||
|
|
||||||
import com.itn.mjonApi.cmn.msg.RestResponse;
|
import com.itn.mjonApi.cmn.msg.RestResponse;
|
||||||
import com.itn.mjonApi.mjon.member.mapper.domain.MyMsgVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface MemberService {
|
public interface MemberService {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package com.itn.mjonApi.mjon.member.service.impl;
|
|||||||
|
|
||||||
import com.itn.mjonApi.cmn.msg.RestResponse;
|
import com.itn.mjonApi.cmn.msg.RestResponse;
|
||||||
import com.itn.mjonApi.mjon.member.mapper.MyMsgMapper;
|
import com.itn.mjonApi.mjon.member.mapper.MyMsgMapper;
|
||||||
import com.itn.mjonApi.mjon.member.mapper.domain.MyMsgVO;
|
import com.itn.mjonApi.cmn.idgen.mapper.domain.IdgenVO;
|
||||||
import com.itn.mjonApi.mjon.member.service.MemberService;
|
import com.itn.mjonApi.mjon.member.service.MemberService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@ -17,15 +17,16 @@ public class MemberServiceImpl implements MemberService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
MyMsgMapper myMsgMapper;
|
MyMsgMapper myMsgMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RestResponse findAll() {
|
public RestResponse findAll() {
|
||||||
List<MyMsgVO> MyMsgListVO = myMsgMapper.findAll();
|
List<IdgenVO> MyMsgListVO = myMsgMapper.findAll();
|
||||||
return new RestResponse(HttpStatus.OK, "성공", MyMsgListVO, LocalDateTime.now());
|
return new RestResponse(HttpStatus.OK, "성공", MyMsgListVO, LocalDateTime.now());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RestResponse findAll2() {
|
public RestResponse findAll2() {
|
||||||
List<MyMsgVO> MyMsgListVO = myMsgMapper.findAll_2();
|
List<IdgenVO> MyMsgListVO = myMsgMapper.findAll_2();
|
||||||
return new RestResponse(HttpStatus.OK, "성공", MyMsgListVO, LocalDateTime.now());
|
return new RestResponse(HttpStatus.OK, "성공", MyMsgListVO, LocalDateTime.now());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.itn.mjonApi.mjon.send.web;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* packageName : com.itn.mjonApi.mjon.send.web
|
||||||
|
* fileName : SendRestController
|
||||||
|
* author : hylee
|
||||||
|
* date : 2023-02-15
|
||||||
|
* description :
|
||||||
|
* ===========================================================
|
||||||
|
* DATE AUTHOR NOTE
|
||||||
|
* -----------------------------------------------------------
|
||||||
|
* 2023-02-15 hylee 최초 생성
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
public class SendRestController {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<mapper namespace="com.itn.mjonApi.mjon.member.mapper.MyMsgMapper">
|
<mapper namespace="com.itn.mjonApi.mjon.member.mapper.MyMsgMapper">
|
||||||
|
|
||||||
<select id="findAll" resultType="com.itn.mjonApi.mjon.member.mapper.domain.MyMsgVO">
|
<select id="findAll" resultType="com.itn.mjonApi.cmn.idgen.mapper.domain.IdgenVO">
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
FROM MJ_MYMSG
|
FROM MJ_MYMSG
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user