liyanqi
2022-09-16 db137098ca20ecaa8937cd626fd86fb32bdf75c9
ycl-common/src/main/java/com/ycl/service/platform/zf/impl/EnforcelawReportServiceImpl.java
@@ -1,10 +1,18 @@
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>
@@ -17,4 +25,16 @@
@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);
        }
    }
}