|
@@ -33,6 +33,7 @@ import com.cyksj.service.relation.GroupRelationFrontService;
|
|
|
import com.cyksj.service.sys.SysConfigService;
|
|
import com.cyksj.service.sys.SysConfigService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
@@ -487,15 +488,25 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
List<CorpUserExternalTagGroupInfo.Tag> tagList = tagGroup.getTag();
|
|
List<CorpUserExternalTagGroupInfo.Tag> tagList = tagGroup.getTag();
|
|
|
for (CorpUserExternalTagGroupInfo.Tag save_tag : tagList) {
|
|
for (CorpUserExternalTagGroupInfo.Tag save_tag : tagList) {
|
|
|
if (StrUtil.equals(tagName, save_tag.getName())) {
|
|
if (StrUtil.equals(tagName, save_tag.getName())) {
|
|
|
- CorpTag corpTag = new CorpTag();
|
|
|
|
|
- corpTag.setGroupId(tagGroup.getGroupId());
|
|
|
|
|
- corpTag.setGroupName(tagGroup.getGroupName());
|
|
|
|
|
- corpTag.setType(1);
|
|
|
|
|
-
|
|
|
|
|
- corpTag.setTagId(save_tag.getId());
|
|
|
|
|
- corpTag.setName(save_tag.getName());
|
|
|
|
|
- corpTagMapper.insert(corpTag);
|
|
|
|
|
- return corpTag;
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ CorpTagGroup corpTagGroup = new CorpTagGroup();
|
|
|
|
|
+ corpTagGroup.setGroupId(tagGroup.getGroupId());
|
|
|
|
|
+ corpTagGroup.setGroupName(tagGroup.getGroupName());
|
|
|
|
|
+ corpTagGroup.setOrdered(tagGroup.getOrder());
|
|
|
|
|
+ corpTagGroupMapper.insert(corpTagGroup);
|
|
|
|
|
+
|
|
|
|
|
+ CorpTag corpTag = new CorpTag();
|
|
|
|
|
+ corpTag.setGroupId(tagGroup.getGroupId());
|
|
|
|
|
+ corpTag.setGroupName(tagGroup.getGroupName());
|
|
|
|
|
+ corpTag.setType(1);
|
|
|
|
|
+
|
|
|
|
|
+ corpTag.setTagId(save_tag.getId());
|
|
|
|
|
+ corpTag.setName(save_tag.getName());
|
|
|
|
|
+ corpTag.setOrdered(save_tag.getOrder());
|
|
|
|
|
+ corpTagMapper.insert(corpTag);
|
|
|
|
|
+ return corpTag;
|
|
|
|
|
+ } catch (DuplicateKeyException e) {
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|