use of com.varsql.web.model.entity.app.QnAEntity in project varsql by varsqlinfo.
the class UserPreferencesServiceImpl method deleteQnaInfo.
/**
* @Method Name : deleteQnaInfo
* @Method 설명 : qna 삭제.
* @작성자 : ytkim
* @작성일 : 2019. 1. 3.
* @변경이력 :
* @param paramMap
* @return
*/
@Transactional(value = ResourceConfigConstants.APP_TRANSMANAGER, rollbackFor = Exception.class)
public ResponseResult deleteQnaInfo(String qnaid) {
QnAEntity entity = qnaEntityRepository.findByQnaid(qnaid);
if (entity.getAnswerId() == null) {
qnaEntityRepository.delete(entity);
}
ResponseResult result = new ResponseResult();
result.setMessageCode("answer.msg.notdelete");
return result;
}
use of com.varsql.web.model.entity.app.QnAEntity in project varsql by varsqlinfo.
the class UserPreferencesServiceImpl method saveQnaInfo.
/**
* @Method Name : insertQnaInfo
* @Method 설명 : qna 등록.
* @작성자 : ytkim
* @작성일 : 2017. 11. 29.
* @변경이력 :
* @param paramMap
* @return
*/
public ResponseResult saveQnaInfo(QnARequesetDTO qnaInfo, boolean insFlag) {
QnAEntity entity = qnaInfo.toEntity();
qnaEntityRepository.save(entity);
return VarsqlUtils.getResponseResultItemOne(1);
}
use of com.varsql.web.model.entity.app.QnAEntity in project varsql by varsqlinfo.
the class QnaServiceImpl method updateQnaAnswerContent.
/**
* @Method Name : updateQnaAnswerContent
* @Method 설명 : qna answer 업데이트.
* @작성자 : ytkim
* @작성일 : 2019. 1. 10.
* @변경이력 :
* @param qnaInfo
* @return
*/
public ResponseResult updateQnaAnswerContent(QnARequesetDTO qnaInfo) {
QnAEntity qnaEntity = qnaEntityRepository.findByQnaid(qnaInfo.getQnaid());
qnaEntity.setAnswer(qnaInfo.getAnswer());
qnaEntity.setAnswerId(SecurityUtil.userViewId());
qnaEntity.setAnswerDt(DefaultValueUtils.currentTimestamp());
qnaEntityRepository.save(qnaEntity);
return VarsqlUtils.getResponseResultItemOne(1);
}
Aggregations