mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 04:27:21 +09:00
공지사항 삭제 기능 추가
This commit is contained in:
@@ -98,16 +98,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 10%">
|
||||
이미지셋 <br />
|
||||
<button type="button" @click="setImg">이미지추가</button>
|
||||
<button type="button" @click="testImg = ''">이미지클리어</button>
|
||||
</th>
|
||||
<td class="sender" colspan="5">
|
||||
<p v-html="testImg"></p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
@@ -133,7 +123,6 @@ export default {
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data() {
|
||||
return {
|
||||
testImg: '',
|
||||
props: {},
|
||||
row: {},
|
||||
rsnType: [],
|
||||
@@ -177,11 +166,6 @@ export default {
|
||||
ValidationConfirmPopup,
|
||||
},
|
||||
methods: {
|
||||
setImg() {
|
||||
///%7Cefs%7Chome%7CsendMessage%7C2022%7C09%7C20%7C10%7C2022092010000168664_1.jpg
|
||||
this.testImg =
|
||||
"<img src='/api/v1/bo/homeMgt/preview/%7Cefs%7Chome%7CsendMessage%7C2022%7C09%7C20%7C10%7C2022092010000168664_1.jpg' />";
|
||||
},
|
||||
handleImageAdded(file, Editor, cursorLocation, resetUploader) {
|
||||
var fd = new FormData();
|
||||
fd.append('files', file);
|
||||
@@ -189,8 +173,9 @@ export default {
|
||||
homeMgtApi
|
||||
.getImageUrl(fd)
|
||||
.then((response) => {
|
||||
const url = '..' + response.data.data.replaceAll('\\', '/'); // Get url from response
|
||||
console.log(url);
|
||||
const url =
|
||||
'/api/v1/bo/homeMgt/preview/' +
|
||||
encodeURIComponent(response.data.data.replaceAll('\\', '/').replaceAll('/', '|')); // Get url from response
|
||||
Editor.insertEmbed(cursorLocation, 'image', url);
|
||||
resetUploader();
|
||||
})
|
||||
|
||||
@@ -188,8 +188,9 @@ export default {
|
||||
homeMgtApi
|
||||
.getImageUrl(fd)
|
||||
.then((response) => {
|
||||
const url = '..' + response.data.data.replaceAll('\\', '/'); // Get url from response
|
||||
console.log(url);
|
||||
const url =
|
||||
'/api/v1/bo/homeMgt/preview/' +
|
||||
encodeURIComponent(response.data.data.replaceAll('\\', '/').replaceAll('/', '|')); // Get url from response
|
||||
Editor.insertEmbed(cursorLocation, 'image', url);
|
||||
resetUploader();
|
||||
})
|
||||
@@ -502,7 +503,6 @@ export default {
|
||||
this.row.fileTitle = fileTitle;
|
||||
this.row.filePath = filePath;
|
||||
this.row.fileNm = fileName;
|
||||
console.log(this.row);
|
||||
homeMgtApi.fileDownload(this.row);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -15,6 +15,11 @@ const updateNotice = (params) => {
|
||||
return httpClient.post('/api/v1/bo/homeMgt/updateNotice', params, { withCredentials: false });
|
||||
};
|
||||
|
||||
// 공지사항 삭제
|
||||
const deleteNotice = (params) => {
|
||||
return httpClient.post('/api/v1/bo/homeMgt/deleteNotice', params, { withCredentials: false });
|
||||
};
|
||||
|
||||
const getImageUrl = (params) => {
|
||||
return httpClient.post('/api/v1/bo/homeMgt/getImageUrl', params, {
|
||||
headers: {
|
||||
@@ -56,6 +61,7 @@ const fileDownload = (params) => {
|
||||
export default {
|
||||
insertNotice,
|
||||
updateNotice,
|
||||
deleteNotice,
|
||||
fileDownload,
|
||||
getImageUrl,
|
||||
};
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue admin add" @click="ModalOpen()">공지사항 등록</button>
|
||||
<button type="button" class="button white del" @click="deleteNotice()">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
@@ -65,13 +66,16 @@
|
||||
</div>
|
||||
<NoticePop ref="NoticePop" />
|
||||
<NoticeUpdatePop ref="NoticeUpdatePop" />
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import httpClient from '../../../common/http-client';
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import commonModal from '@/components/modal/commonModal';
|
||||
import NoticePop from '../components/NoticePop.vue';
|
||||
import NoticeUpdatePop from '../components/NoticeUpdatePop.vue';
|
||||
import homeMgtApi from '../service/homeMgtApi';
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
@@ -98,9 +102,10 @@ class CustomATagRenderer {
|
||||
|
||||
export default {
|
||||
name: 'notice',
|
||||
components: { customGrid, NoticePop, NoticeUpdatePop },
|
||||
components: { customGrid, NoticePop, NoticeUpdatePop, commonModal },
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
totalItems: 0,
|
||||
perPageCnt: 50,
|
||||
searchType1: '',
|
||||
@@ -214,6 +219,48 @@ export default {
|
||||
this.grid.pagePerRows = this.perPageCnt;
|
||||
this.search(true);
|
||||
},
|
||||
deleteNotice() {
|
||||
var chkList = this.$refs.table.checkedElementDatas();
|
||||
if (chkList.length == 0) {
|
||||
this.row.title = '공지사항 관리';
|
||||
this.row.msg1 = '삭제 대상을 체크를 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
//const param = chkList.map((row)=>({regReqNo:row.regReqNo} ));
|
||||
const param = chkList.map((row) => ({ ntNo: row.ntNo }));
|
||||
this.row.list = param;
|
||||
|
||||
this.row.title = '공지사항 관리';
|
||||
this.row.msg1 = '삭제 하시겠습니까?';
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
|
||||
console.log(typeof this.row.list[0].ntNo);
|
||||
//this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
},
|
||||
confirmCalbackFnc(props) {
|
||||
if (props.result) {
|
||||
this.noticeDelete();
|
||||
}
|
||||
},
|
||||
async noticeDelete() {
|
||||
try {
|
||||
let response = await homeMgtApi.deleteNotice(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == '0000') {
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
} else {
|
||||
this.row.title = '공지사항 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (err) {
|
||||
this.row.title = '공지사항 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -38,12 +38,14 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import kr.co.uplus.ez.api.homeMgt.dto.*;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.utils.FileIoUtils;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value ="api/v1/bo/homeMgt")
|
||||
@RequestMapping(value = "/api/v1/bo/homeMgt")
|
||||
public class HomeMgtController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(HomeMgtController.class);
|
||||
|
||||
@@ -53,19 +55,18 @@ public class HomeMgtController {
|
||||
@Autowired
|
||||
ValidComponents validComponents;
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 10. 18.
|
||||
* auth : kjh
|
||||
* desc : 공지사항 조회.
|
||||
* date : 2022. 10. 18. auth : kjh desc : 공지사항 조회.
|
||||
*
|
||||
* @param noticeListReqDto
|
||||
* @return NoticeListResDto
|
||||
*/
|
||||
@ApiOperation(value = "noticeList", notes = "공지사항 조회")
|
||||
@ApiOperation(value = "/noticeList", notes = "공지사항 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "noticeList", method = {RequestMethod.POST})
|
||||
@RequestMapping(value = "/noticeList", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public NoticeListResDto noticeList(@RequestBody @Valid NoticeListReqDto noticeListReqDto, BindingResult bindingResult, HttpServletResponse response) {
|
||||
public NoticeListResDto noticeList(@RequestBody @Valid NoticeListReqDto noticeListReqDto,
|
||||
BindingResult bindingResult, HttpServletResponse response) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new NoticeListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
@@ -75,32 +76,30 @@ public class HomeMgtController {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 10. 21.
|
||||
* auth : kjh
|
||||
* desc : 공지사항 등록.
|
||||
* date : 2022. 10. 21. auth : kjh desc : 공지사항 등록.
|
||||
*
|
||||
* @param insertNoticeReqDto
|
||||
* @return InsertNoticeResDto
|
||||
*/
|
||||
@ApiOperation(value = "insertNotice", notes = "공지사항 등록")
|
||||
@ApiOperation(value = "/insertNotice", notes = "공지사항 등록")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "insertNotice", method = {RequestMethod.POST})
|
||||
@RequestMapping(value = "/insertNotice", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public InsertNoticeResDto insertNotice(@RequestPart(value = "key") InsertNoticeReqDto insertNoticeReqDto,
|
||||
MultipartHttpServletRequest multipartRequest) {
|
||||
|
||||
return homeService.insertNotice(insertNoticeReqDto ,multipartRequest);
|
||||
return homeService.insertNotice(insertNoticeReqDto, multipartRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 10. 24.
|
||||
* auth : kjh
|
||||
* desc : 공지사항 수정.
|
||||
* date : 2022. 10. 24. auth : kjh desc : 공지사항 수정.
|
||||
*
|
||||
* @param updateNoticeReqDto
|
||||
* @return UpdateNoticeResDto
|
||||
*/
|
||||
@ApiOperation(value = "updateNotice", notes = "공지사항 수정")
|
||||
@ApiOperation(value = "/updateNotice", notes = "공지사항 수정")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "updateNotice", method = {RequestMethod.POST})
|
||||
@RequestMapping(value = "/updateNotice", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public UpdateNoticeResDto updateNotice(@RequestPart(value = "key") UpdateNoticeReqDto updateNoticeReqDto,
|
||||
MultipartHttpServletRequest multipartRequest) {
|
||||
@@ -111,13 +110,31 @@ public class HomeMgtController {
|
||||
/**
|
||||
* date : 2022. 10. 24.
|
||||
* auth : kjh
|
||||
* desc : 공지사항 editor 이미지 업로드 후 링크 리턴.
|
||||
* desc : 공지사항 삭제.
|
||||
* @param deleteNoticeReqDto
|
||||
* @return DeleteNoticeResDto
|
||||
*/
|
||||
@ApiOperation(value = "/deleteNotice", notes = "공지사항 삭제")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/deleteNotice", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public DeleteNoticeResDto deleteNotice(@RequestBody @Valid DeleteNoticeReqDto deleteNoticeReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new DeleteNoticeResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return homeService.deleteNotice(deleteNoticeReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 10. 24. auth : kjh desc : 공지사항 editor 이미지 업로드 후 링크 리턴.
|
||||
*
|
||||
* @param updateNoticeReqDto
|
||||
* @return UpdateNoticeResDto
|
||||
*/
|
||||
@ApiOperation(value = "getImageUrl", notes = "공지사항 editor 이미지 업로드 후 링크 리턴")
|
||||
@ApiOperation(value = "/getImageUrl", notes = "공지사항 editor 이미지 업로드 후 링크 리턴")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "getImageUrl", method = {RequestMethod.POST})
|
||||
@RequestMapping(value = "/getImageUrl", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public FileResDto fileResDto(MultipartHttpServletRequest multipartRequest) {
|
||||
|
||||
@@ -126,26 +143,25 @@ public class HomeMgtController {
|
||||
|
||||
/**
|
||||
* 파일 다운로드
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping("filedownload")
|
||||
public void filedownload(@RequestBody LinkedHashMap param, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
public void filedownload(@RequestBody LinkedHashMap param, HttpServletRequest request, HttpServletResponse response)
|
||||
throws IOException {
|
||||
logger.debug(param.toString());
|
||||
|
||||
File file = new File(param.get("filePath") + File.separator + param.get("fileNm"));
|
||||
System.out.println("file ::::: " +file);
|
||||
System.out.println("file.exists() ::::: " + file.exists());
|
||||
|
||||
if (file.exists()) {
|
||||
FileIoUtils.fileDownload(file, request, response );
|
||||
FileIoUtils.fileDownload(file, request, response);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "이미지 미리보기", notes = "이미지 미리보기")
|
||||
@GetMapping(value = "/preview/{imgurl}", produces=MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
@GetMapping(value = "/preview/{imgurl}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
public ResponseEntity<byte[]> previewImageResource(@PathVariable @ApiParam(value = "이미지 경로") String imgurl) {
|
||||
System.out.println("imgurl :::: " + imgurl);
|
||||
System.out.println("call previewImageResource");
|
||||
try {
|
||||
String imgurldec = URLDecoder.decode(imgurl);
|
||||
|
||||
@@ -157,19 +173,18 @@ public class HomeMgtController {
|
||||
|
||||
String fileNameOnly = imgurlreplace;
|
||||
String[] fileNameArr = imgurlreplace.split("/");
|
||||
if(fileNameArr != null && fileNameArr.length != 0) fileNameOnly = fileNameArr[fileNameArr.length-1];
|
||||
if (fileNameArr != null && fileNameArr.length != 0)
|
||||
fileNameOnly = fileNameArr[fileNameArr.length - 1];
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentDisposition(
|
||||
ContentDisposition.builder("attachment")
|
||||
.filename(fileNameOnly, StandardCharsets.UTF_8)
|
||||
.build());
|
||||
ContentDisposition.builder("attachment").filename(fileNameOnly, StandardCharsets.UTF_8).build());
|
||||
headers.add(HttpHeaders.CONTENT_TYPE, contentType);
|
||||
|
||||
byte[] b = Files.readAllBytes(path);
|
||||
|
||||
return new ResponseEntity<byte[]>(b, headers, HttpStatus.OK);
|
||||
}catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.error("imgurl err, e={}, e", e.getMessage());
|
||||
return new ResponseEntity<byte[]>(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package kr.co.uplus.ez.api.homeMgt;
|
||||
|
||||
import kr.co.uplus.ez.api.homeMgt.dto.*;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -26,4 +27,6 @@ public interface HomeMgtMapper {
|
||||
|
||||
void delNoticeFile(DelNoticeReqDto delNoticeReqDto);
|
||||
|
||||
int deleteNotice(DeleteNoticeReqDto deleteNoticeReqDto);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import kr.co.uplus.ez.common.utils.DateUtils;
|
||||
import kr.co.uplus.ez.common.utils.FileIoUtils;
|
||||
import kr.co.uplus.ez.common.utils.FileUtil;
|
||||
|
||||
//import kr.co.uplus.ez.common.utils.EncryptionUtil;
|
||||
//import org.apache.commons.lang3.StringUtils;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -21,9 +19,8 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
//import java.util.HashMap;
|
||||
import java.util.List;
|
||||
//import java.util.Map;
|
||||
|
||||
|
||||
@Service
|
||||
public class HomeMgtService {
|
||||
@@ -144,8 +141,6 @@ public class HomeMgtService {
|
||||
insertNoticeFileDto.setRegId(insertNoticeReqDto.getRegId());
|
||||
insertNoticeFileDto.setChgId(insertNoticeReqDto.getRegId());
|
||||
|
||||
System.out.println("insertNoticeFileDto.getFilePath() :::: " + insertNoticeFileDto.getFilePath());
|
||||
|
||||
homeMgtMapper.insertNoticeFile(insertNoticeFileDto);
|
||||
idx++;
|
||||
}
|
||||
@@ -171,9 +166,6 @@ public class HomeMgtService {
|
||||
List<MultipartFile> files = multipartRequest.getFiles("files");
|
||||
String yyyyMMddHHmmss = DateUtils.date2strYMDHMS();
|
||||
|
||||
System.out.println(" files len :::: " + files.size());
|
||||
System.out.println(" legacyFiles :::: " + updateNoticeReqDto.getLegacyFiles());
|
||||
|
||||
// 공지사항 수정
|
||||
try {
|
||||
homeMgtMapper.updateNotice(updateNoticeReqDto);
|
||||
@@ -228,15 +220,11 @@ public class HomeMgtService {
|
||||
if(!updateNoticeReqDto.getDelFileNo().isEmpty()) {
|
||||
String[] delFile = updateNoticeReqDto.getDelFileNo().split(",");
|
||||
for(int j=0; j<delFile.length; j++){
|
||||
System.out.println("delFile :::: " + delFile[j]);
|
||||
DelNoticeReqDto delNoticeReqDto = new DelNoticeReqDto();
|
||||
delNoticeReqDto.setFileNo(Integer.parseInt(delFile[j]));
|
||||
delNoticeReqDto.setNtNo(updateNoticeReqDto.getNtNo());
|
||||
System.out.println(delNoticeReqDto);
|
||||
homeMgtMapper.delNoticeFile(delNoticeReqDto);
|
||||
}
|
||||
}else {
|
||||
System.out.println("파일이 빈 상태입니다.");
|
||||
}
|
||||
|
||||
return new UpdateNoticeResDto(ApiResponseCode.SUCCESS);
|
||||
@@ -254,9 +242,7 @@ public class HomeMgtService {
|
||||
HomeMgtMapper homeMgtMapper = sqlSessionSlave.getMapper(HomeMgtMapper.class);
|
||||
|
||||
List<MultipartFile> files = multipartRequest.getFiles("files");
|
||||
System.out.println(" files len :::: " + files.size());
|
||||
String yyyyMMddHHmmss = DateUtils.date2strYMDHMS();
|
||||
|
||||
String yyyyMMdd = DateUtils.date2strYMD(); // Path : efs/admin/notice/yyyy/mm/
|
||||
String path = noticeFilePath + yyyyMMdd.substring(0, 4) +
|
||||
File.separator + yyyyMMdd.substring(4, 6) +
|
||||
@@ -272,8 +258,7 @@ public class HomeMgtService {
|
||||
String fileNm = yyyyMMddHHmmss + "_noticeEditFile." + ext;
|
||||
// File Upload.
|
||||
FileUtil.upload(files.get(i), fileNm, path);
|
||||
path = path.replace("C:/Users/admin/git/hubez-admin/frontend/public", "");
|
||||
uploadFile = path.replace("\\","/") + File.separator + fileNm;
|
||||
uploadFile = path + File.separator + fileNm;
|
||||
}
|
||||
|
||||
}catch(Exception e) {
|
||||
@@ -283,4 +268,24 @@ public class HomeMgtService {
|
||||
return new FileResDto(ApiResponseCode.SUCCESS, uploadFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 11. 02.
|
||||
* auth : kjh
|
||||
* desc : 공지사항 삭제
|
||||
* @param deleteNoticeReqDto
|
||||
* @return
|
||||
*/
|
||||
public DeleteNoticeResDto deleteNotice(DeleteNoticeReqDto deleteNoticeReqDto) {
|
||||
|
||||
HomeMgtMapper homeMgtMapper = sqlSessionSlave.getMapper(HomeMgtMapper.class);
|
||||
|
||||
try {
|
||||
homeMgtMapper.deleteNotice(deleteNoticeReqDto);
|
||||
} catch (Exception e) {
|
||||
return new DeleteNoticeResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
return new DeleteNoticeResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package kr.co.uplus.ez.api.homeMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.homeMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class DeleteNotice implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "공지사항 번호", name = "공지사항 번호", dataType = "int")
|
||||
private int ntNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kr.co.uplus.ez.api.homeMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class DeleteNoticeReqDto implements Serializable{
|
||||
|
||||
private List<DeleteNotice> list;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.homeMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class DeleteNoticeResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
|
||||
// 데이터.
|
||||
private Object data;
|
||||
|
||||
public DeleteNoticeResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public DeleteNoticeResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public DeleteNoticeResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -196,11 +196,27 @@
|
||||
|
||||
<!-- 첨부파일 삭제 -->
|
||||
<delete id="delNoticeFile" parameterType="kr.co.uplus.ez.api.homeMgt.dto.DelNoticeReqDto">
|
||||
/* homeMgt-mapper.xml(delNoticeFile) */
|
||||
DELETE FROM hubez_common.EZ_BBS_FATC
|
||||
WHERE BBS_NO = #{ntNo}
|
||||
AND FILE_NO = #{fileNo}
|
||||
</delete>
|
||||
|
||||
<!-- 공지사항 삭제 -->
|
||||
<delete id="deleteNotice" parameterType="kr.co.uplus.ez.api.homeMgt.dto.DeleteNoticeReqDto">
|
||||
/* homeMgt-mapper.xml(deleteNotice) */
|
||||
DELETE
|
||||
FROM
|
||||
hubez_common.EZ_NTBBS
|
||||
<where>
|
||||
NT_NO IN
|
||||
<foreach collection="list" item="item" index="i" open="("
|
||||
separator="," close=")">
|
||||
#{item.ntNo}
|
||||
</foreach>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
|
||||
<sql id="NoticeListCondition">
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
|
||||
Reference in New Issue
Block a user