Browse Source

异常处理

develop
wangsixiang 9 months ago
parent
commit
3cdc9d5b2b
  1. 10
      zc-business/src/main/java/com/zc/business/service/impl/DcShiftsServiceImpl.java

10
zc-business/src/main/java/com/zc/business/service/impl/DcShiftsServiceImpl.java

@ -103,7 +103,7 @@ public class DcShiftsServiceImpl implements IDcShiftsService
* @return 结果
*/
@Override
@Transactional(rollbackFor = ServiceException.class)
@Transactional(rollbackFor = Exception.class)
public int insertDcShifts(DcShifts dcShifts) throws Exception{
String msg = "";
JSON employeesJson = dcShifts.getEmployeesJson();
@ -155,7 +155,7 @@ public class DcShiftsServiceImpl implements IDcShiftsService
* @return 结果
*/
@Override
@Transactional(rollbackFor = ServiceException.class)
@Transactional(rollbackFor = Exception.class)
public int updateDcShifts(DcShifts dcShifts) throws Exception{
String msg = "";
dcShifts.setUpdateTime(DateUtils.getNowDate());
@ -198,7 +198,7 @@ public class DcShiftsServiceImpl implements IDcShiftsService
* @return 结果
*/
@Override
@Transactional(rollbackFor = ServiceException.class)
@Transactional(rollbackFor = Exception.class)
public int deleteDcShiftsByIds(Long[] ids) throws Exception{
for (Long id:ids){
DcShifts dcShifts = dcShiftsMapper.selectDcShiftsById(id);
@ -226,7 +226,7 @@ public class DcShiftsServiceImpl implements IDcShiftsService
}
@Override
@Transactional(rollbackFor = ServiceException.class)
@Transactional(rollbackFor = Exception.class)
public int deleteDcShiftsListId(DcShifts dcShifts) throws Exception {
List<DcShifts> shiftsValue = dcShiftsMapper.selectDcShiftsDeleteList(dcShifts);
for (DcShifts shifts:shiftsValue){
@ -269,7 +269,7 @@ public class DcShiftsServiceImpl implements IDcShiftsService
}
@Override
@Transactional(rollbackFor = ServiceException.class)
@Transactional(rollbackFor = Exception.class)
public AjaxResult importEquipment(MultipartFile file) throws Exception{
String msg = "";
ExcelUtil<DcShifts> util = new ExcelUtil<DcShifts>(DcShifts.class);

Loading…
Cancel
Save