|
|
@ -54,10 +54,15 @@ public class DcInfoBoardVocabularyServiceImpl implements IDcInfoBoardVocabularyS |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|
|
|
public AjaxResult insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|
|
|
{ |
|
|
|
dcInfoBoardVocabulary.setCreateTime(DateUtils.getNowDate()); |
|
|
|
return dcInfoBoardVocabularyMapper.insertDcInfoBoardVocabulary(dcInfoBoardVocabulary); |
|
|
|
int oldNum = dcInfoBoardVocabularyMapper.selectWordNum(dcInfoBoardVocabulary); |
|
|
|
if (oldNum > 0){ |
|
|
|
return AjaxResult.error("该关键词已存在!"); |
|
|
|
} |
|
|
|
dcInfoBoardVocabularyMapper.insertDcInfoBoardVocabulary(dcInfoBoardVocabulary); |
|
|
|
return AjaxResult.success("新增成功"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -67,9 +72,14 @@ public class DcInfoBoardVocabularyServiceImpl implements IDcInfoBoardVocabularyS |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|
|
|
public AjaxResult updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|
|
|
{ |
|
|
|
return dcInfoBoardVocabularyMapper.updateDcInfoBoardVocabulary(dcInfoBoardVocabulary); |
|
|
|
int oldNum = dcInfoBoardVocabularyMapper.selectWordNum(dcInfoBoardVocabulary); |
|
|
|
if (oldNum > 0){ |
|
|
|
return AjaxResult.error("该关键词已存在!"); |
|
|
|
} |
|
|
|
dcInfoBoardVocabularyMapper.updateDcInfoBoardVocabulary(dcInfoBoardVocabulary); |
|
|
|
return AjaxResult.success("修改成功"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|