|
@@ -32,7 +32,7 @@ public class IntroduceMapFacade extends IntroduceMapServiceImpl {
|
|
|
* @param introduceMapVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public Boolean saveRecord(IntroduceMapVO introduceMapVO) {
|
|
|
+ public Boolean saveIntroduceMap(IntroduceMapVO introduceMapVO) {
|
|
|
IntroduceInfo introduceInfo = introduceInfoFacade.getById(introduceMapVO.getIntroduceId());
|
|
|
if (introduceInfo == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息未添加");
|
|
@@ -45,16 +45,13 @@ public class IntroduceMapFacade extends IntroduceMapServiceImpl {
|
|
|
eq("type", introduceMapVO.getType()).
|
|
|
eq("introduce_id", introduceMapVO.getIntroduceId());
|
|
|
IntroduceMap introduceMap = this.getOne(introduceMapQueryWrapper);
|
|
|
- UpdateWrapper<IntroduceMap> introduceMapUpdateWrapper = new UpdateWrapper<>();
|
|
|
if (introduceMap == null) {
|
|
|
- //删除该标签关联的提示信息,插入新的提示信息
|
|
|
+ //删除该标签关联的别的提示信息,插入新的提示信息
|
|
|
+ UpdateWrapper<IntroduceMap> introduceMapUpdateWrapper = new UpdateWrapper<>();
|
|
|
introduceMapUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
eq("question_id", introduceMapVO.getQuestionId()).
|
|
|
- eq("type", introduceMapVO.getType()).
|
|
|
- set("is_deleted", IsDeleteEnum.Y.getKey()).
|
|
|
- set("gmt_modified", new Date()).
|
|
|
- set("modifier", UserUtils.getCurrentPrincipleID());
|
|
|
- this.update(new IntroduceMap(), introduceMapUpdateWrapper);
|
|
|
+ eq("type", introduceMapVO.getType());
|
|
|
+ this.remove(introduceMapUpdateWrapper);
|
|
|
|
|
|
//插入新的关系
|
|
|
introduceMap = new IntroduceMap();
|