| | |
| | | package com.ycl.service.platform.zf.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.api.BaseEntity; |
| | | import com.ycl.entity.platform.zf.EnforcelawReport; |
| | | import com.ycl.enums.common.ResultCode; |
| | | import com.ycl.exception.ApiException; |
| | | import com.ycl.mapper.platform.zf.EnforcelawReportMapper; |
| | | import com.ycl.service.platform.zf.IEnforcelawReportService; |
| | | import com.ycl.vo.zf.ZfVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class EnforcelawReportServiceImpl extends ServiceImpl<EnforcelawReportMapper, EnforcelawReport> implements IEnforcelawReportService { |
| | | |
| | | @Resource |
| | | private EnforcelawReportMapper enforcelawReportMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void report(ZfVO.ZfReportVO params) { |
| | | EnforcelawReport enforcelawReport = new EnforcelawReport(); |
| | | BeanUtils.copyProperties(params, enforcelawReport); |
| | | if (enforcelawReportMapper.insert(enforcelawReport) != 1) { |
| | | throw new ApiException(ResultCode.RECORD_SAVE_FAIL); |
| | | } |
| | | } |
| | | } |