|
@@ -13,7 +13,9 @@ import com.fs.qw.mapper.QwTagMapper;
|
|
|
import com.fs.tag.domain.FsVideoCourseTag;
|
|
import com.fs.tag.domain.FsVideoCourseTag;
|
|
|
import com.fs.tag.mapper.FsVideoCourseTagMapper;
|
|
import com.fs.tag.mapper.FsVideoCourseTagMapper;
|
|
|
import com.fs.tag.service.IFsVideoCourseTagService;
|
|
import com.fs.tag.service.IFsVideoCourseTagService;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -22,6 +24,7 @@ import org.springframework.stereotype.Service;
|
|
|
* @author fs
|
|
* @author fs
|
|
|
* @date 2025-11-05
|
|
* @date 2025-11-05
|
|
|
*/
|
|
*/
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
public class FsVideoCourseTagServiceImpl extends ServiceImpl<FsVideoCourseTagMapper, FsVideoCourseTag> implements IFsVideoCourseTagService {
|
|
public class FsVideoCourseTagServiceImpl extends ServiceImpl<FsVideoCourseTagMapper, FsVideoCourseTag> implements IFsVideoCourseTagService {
|
|
|
|
|
|
|
@@ -94,8 +97,13 @@ public class FsVideoCourseTagServiceImpl extends ServiceImpl<FsVideoCourseTagMap
|
|
|
@Override
|
|
@Override
|
|
|
public int insertFsVideoCourseTag(FsVideoCourseTag fsVideoCourseTag)
|
|
public int insertFsVideoCourseTag(FsVideoCourseTag fsVideoCourseTag)
|
|
|
{
|
|
{
|
|
|
- fsVideoCourseTag.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
- return baseMapper.insertFsVideoCourseTag(fsVideoCourseTag);
|
|
|
|
|
|
|
+ try{
|
|
|
|
|
+ fsVideoCourseTag.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
+ return baseMapper.insertFsVideoCourseTag(fsVideoCourseTag);
|
|
|
|
|
+ }catch (DuplicateKeyException e){
|
|
|
|
|
+ log.info("同一主体的小节添加标签不允许重复!");
|
|
|
|
|
+ throw new RuntimeException("同一主体的小节不允许重复!");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|