liyanqi
2022-09-16 db137098ca20ecaa8937cd626fd86fb32bdf75c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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>
 * 违规事项处置管理:包含违法(违建)情况上报、立案、派遣、处置、核查、结案 服务实现类
 * </p>
 *
 * @author lyq
 * @since 2022-09-14
 */
@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);
        }
    }
}