代码拉取完成,页面将自动刷新
package com.wmx.service.impl;
import com.wmx.repository.TVRepository;
import com.wmx.service.TVServiceExt;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* 电视业务层接口实现
*
* @author wangMaoXiong
* @version 1.0
* @date 2022/4/9 8:33
*/
@Service
public class TVServiceExtImpl implements TVServiceExt {
@Resource
private TVRepository tvRepository;
/**
* REQUIRES_NEW:表示新开一个事务,如果当前已经有事务,则会暂停
*
* @param id
*/
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void deleteByIdExt(int id) {
boolean existsById = tvRepository.existsById(id);
if (existsById){
tvRepository.deleteById(id);
}
// System.out.println("123".split(",")[1]);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。