New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import annotation.Excel; |
| | | import com.ycl.system.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * platform对象 t_image_resource_security |
| | | * |
| | | * @author flq |
| | | * @date 2024-08-24 |
| | | */ |
| | | @Data |
| | | public class ImageResourceSecurity extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** $column.columnComment */ |
| | | private Long id; |
| | | |
| | | /** 部门id */ |
| | | @Excel(name = "部门id") |
| | | private Long deptId; |
| | | |
| | | /** 平台运行率 */ |
| | | @Excel(name = "平台运行率") |
| | | private BigDecimal platformOnline; |
| | | |
| | | /** 视频传输网资产准确率 */ |
| | | @Excel(name = "视频传输网资产准确率") |
| | | private BigDecimal propertyAccuracy; |
| | | |
| | | /** 弱口令得分 */ |
| | | @Excel(name = "弱口令得分") |
| | | private BigDecimal weakPassword; |
| | | |
| | | /** 视频传输网危险资产比例 */ |
| | | @Excel(name = "视频传输网危险资产比例") |
| | | private BigDecimal riskProperty; |
| | | |
| | | /** 视频传输网边界完整性检测扣分项 */ |
| | | @Excel(name = "视频传输网边界完整性检测扣分项") |
| | | private BigDecimal boundaryIntegrity; |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import annotation.Excel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.system.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 安全检测结果对象 t_image_resource_security_detail |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-08-24 |
| | | */ |
| | | @Data |
| | | public class ImageResourceSecurityDetail extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** $column.columnComment */ |
| | | private Long id; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String ip; |
| | | |
| | | /** 部门id */ |
| | | @Excel(name = "部门id") |
| | | private Long deptId; |
| | | |
| | | /** 报警类型 */ |
| | | @Excel(name = "报警类型") |
| | | private String alarmCategory; |
| | | |
| | | /** 报警级别 */ |
| | | @Excel(name = "报警级别") |
| | | private Long alarmLevel; |
| | | |
| | | /** 报警次数 */ |
| | | @Excel(name = "报警次数") |
| | | private Long num; |
| | | |
| | | /** 报警时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date alarmTime; |
| | | |
| | | |
| | | } |
| | |
| | | comment1.setString(new XSSFRichTextString("扣除相关镜头数量*0.1分")); |
| | | sheet.getRow(0).getCell(1).setCellComment(comment1); |
| | | |
| | | Comment comment2 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, 5, 8, 7, 9)); |
| | | comment2.setString(new XSSFRichTextString("扣2分/12小时")); |
| | | sheet.getRow(0).getCell(1).setCellComment(comment2); |
| | | // Comment comment2 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, 5, 8, 7, 9)); |
| | | // comment2.setString(new XSSFRichTextString("扣2分/12小时")); |
| | | // sheet.getRow(0).getCell(1).setCellComment(comment2); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | public Result videoImportantPointImageOnlineRate(DataCenterQuery query) { |
| | | return dataCenterService.videoImportantPointImageOnlineRate(query); |
| | | } |
| | | |
| | | /** |
| | | * 视频:图像资源安全管理 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/videoImageResourceSecurity") |
| | | public Result videoImageResourceSecurity(DataCenterQuery query) { |
| | | return dataCenterService.videoImageResourceSecurity(query); |
| | | } |
| | | |
| | | /** |
| | | * 车辆:视图库对接稳定性 |
New file |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | import com.ycl.platform.service.IImageResourceSecurityService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import enumeration.BusinessType; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * platformController |
| | | * |
| | | * @author flq |
| | | * @date 2024-08-24 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/platform/resourceSecurity") |
| | | public class ImageResourceSecurityController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IImageResourceSecurityService imageResourceSecurityService; |
| | | |
| | | /** |
| | | * 查询platform列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:security:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | startPage(); |
| | | List<ImageResourceSecurity> list = imageResourceSecurityService.selectImageResourceSecurityList(imageResourceSecurity); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 获取platform详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:security:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(imageResourceSecurityService.selectImageResourceSecurityById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 修改platform |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:security:edit')") |
| | | @Log(title = "platform", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | return toAjax(imageResourceSecurityService.updateImageResourceSecurity(imageResourceSecurity)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurityDetail; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 安全检测结果Mapper接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-08-24 |
| | | */ |
| | | public interface ImageResourceSecurityDetailMapper |
| | | { |
| | | /** |
| | | * 查询安全检测结果 |
| | | * |
| | | * @param id 安全检测结果主键 |
| | | * @return 安全检测结果 |
| | | */ |
| | | public ImageResourceSecurityDetail selectImageResourceSecurityDetailById(Long id); |
| | | |
| | | /** |
| | | * 查询安全检测结果列表 |
| | | * |
| | | * @param imageResourceSecurityDetail 安全检测结果 |
| | | * @return 安全检测结果集合 |
| | | */ |
| | | public List<ImageResourceSecurityDetail> selectImageResourceSecurityDetailList(ImageResourceSecurityDetail imageResourceSecurityDetail); |
| | | |
| | | /** |
| | | * 新增安全检测结果 |
| | | * |
| | | * @param imageResourceSecurityDetail 安全检测结果 |
| | | * @return 结果 |
| | | */ |
| | | public int insertImageResourceSecurityDetail(ImageResourceSecurityDetail imageResourceSecurityDetail); |
| | | |
| | | /** |
| | | * 修改安全检测结果 |
| | | * |
| | | * @param imageResourceSecurityDetail 安全检测结果 |
| | | * @return 结果 |
| | | */ |
| | | public int updateImageResourceSecurityDetail(ImageResourceSecurityDetail imageResourceSecurityDetail); |
| | | |
| | | /** |
| | | * 删除安全检测结果 |
| | | * |
| | | * @param id 安全检测结果主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityDetailById(Long id); |
| | | |
| | | /** |
| | | * 批量删除安全检测结果 |
| | | * |
| | | * @param ids 需要删除的数据主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityDetailByIds(Long[] ids); |
| | | } |
New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * platformMapper接口 |
| | | * |
| | | * @author flq |
| | | * @date 2024-08-24 |
| | | */ |
| | | public interface ImageResourceSecurityMapper |
| | | { |
| | | /** |
| | | * 查询platform |
| | | * |
| | | * @param id platform主键 |
| | | * @return platform |
| | | */ |
| | | public ImageResourceSecurity selectImageResourceSecurityById(Long id); |
| | | |
| | | /** |
| | | * 查询platform列表 |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return platform集合 |
| | | */ |
| | | public List<ImageResourceSecurity> selectImageResourceSecurityList(ImageResourceSecurity imageResourceSecurity); |
| | | |
| | | /** |
| | | * 新增platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | public int insertImageResourceSecurity(ImageResourceSecurity imageResourceSecurity); |
| | | |
| | | /** |
| | | * 修改platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | public int updateImageResourceSecurity(ImageResourceSecurity imageResourceSecurity); |
| | | |
| | | /** |
| | | * 删除platform |
| | | * |
| | | * @param id platform主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityById(Long id); |
| | | |
| | | /** |
| | | * 批量删除platform |
| | | * |
| | | * @param ids 需要删除的数据主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityByIds(Long[] ids); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Result faceAvailabilityOfLargeImg(DataCenterQuery query); |
| | | |
| | | Result videoImageResourceSecurity(DataCenterQuery query); |
| | | } |
New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * platformService接口 |
| | | * |
| | | * @author flq |
| | | * @date 2024-08-24 |
| | | */ |
| | | public interface IImageResourceSecurityService |
| | | { |
| | | /** |
| | | * 查询platform |
| | | * |
| | | * @param id platform主键 |
| | | * @return platform |
| | | */ |
| | | public ImageResourceSecurity selectImageResourceSecurityById(Long id); |
| | | |
| | | /** |
| | | * 查询platform列表 |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return platform集合 |
| | | */ |
| | | public List<ImageResourceSecurity> selectImageResourceSecurityList(ImageResourceSecurity imageResourceSecurity); |
| | | |
| | | /** |
| | | * 新增platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | public int insertImageResourceSecurity(ImageResourceSecurity imageResourceSecurity); |
| | | |
| | | /** |
| | | * 修改platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | public int updateImageResourceSecurity(ImageResourceSecurity imageResourceSecurity); |
| | | |
| | | /** |
| | | * 批量删除platform |
| | | * |
| | | * @param ids 需要删除的platform主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityByIds(Long[] ids); |
| | | |
| | | /** |
| | | * 删除platform信息 |
| | | * |
| | | * @param id platform主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityById(Long id); |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.github.pagehelper.Page; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurityDetail; |
| | | import com.ycl.platform.domain.query.DataCenterQuery; |
| | | import com.ycl.platform.domain.result.HK.*; |
| | | import com.ycl.platform.domain.result.UY.MonitorQualifyResult; |
| | | import com.ycl.platform.domain.result.UY.OneMachineFileResult; |
| | | import com.ycl.platform.domain.result.UY.RecordMetaDSumResult; |
| | | import com.ycl.platform.domain.result.UY.VideoOnlineResult; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityDetailMapper; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityMapper; |
| | | import com.ycl.platform.service.DataCenterService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import com.ycl.utils.MongoUtil; |
| | | import constant.HttpStatus; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | |
| | | public class DataCenterServiceImpl implements DataCenterService { |
| | | |
| | | private final MongoTemplate mongoTemplate; |
| | | |
| | | private final ImageResourceSecurityMapper securityMapper; |
| | | private final ImageResourceSecurityDetailMapper securityDetailMapper; |
| | | private final static String TIME_FIELD = "mongoCreateTime"; |
| | | |
| | | /** |
| | |
| | | List<FaceDeviceSamplingResult> resultList = mongoTemplate.find(query, FaceDeviceSamplingResult.class); |
| | | return Result.ok().data(resultList).total(total); |
| | | } |
| | | /** |
| | | * 视频:视频图像资源安全管理 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result videoImageResourceSecurity(DataCenterQuery query) { |
| | | ImageResourceSecurityDetail imageResourceSecurityDetail = new ImageResourceSecurityDetail(); |
| | | Page<ImageResourceSecurityDetail> page = PageHelper.startPage(query.getPageNum(), query.getPageSize()); |
| | | securityDetailMapper.selectImageResourceSecurityDetailList(imageResourceSecurityDetail); |
| | | |
| | | return Result.ok().data(page.getResult()).total(page.getTotal()); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityMapper; |
| | | import com.ycl.platform.service.IImageResourceSecurityService; |
| | | import com.ycl.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * platformService业务层处理 |
| | | * |
| | | * @author flq |
| | | * @date 2024-08-24 |
| | | */ |
| | | @Service |
| | | public class ImageResourceSecurityServiceImpl implements IImageResourceSecurityService |
| | | { |
| | | @Autowired |
| | | private ImageResourceSecurityMapper imageResourceSecurityMapper; |
| | | |
| | | /** |
| | | * 查询platform |
| | | * |
| | | * @param id platform主键 |
| | | * @return platform |
| | | */ |
| | | @Override |
| | | public ImageResourceSecurity selectImageResourceSecurityById(Long id) |
| | | { |
| | | return imageResourceSecurityMapper.selectImageResourceSecurityById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询platform列表 |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return platform |
| | | */ |
| | | @Override |
| | | public List<ImageResourceSecurity> selectImageResourceSecurityList(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | return imageResourceSecurityMapper.selectImageResourceSecurityList(imageResourceSecurity); |
| | | } |
| | | |
| | | /** |
| | | * 新增platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertImageResourceSecurity(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | imageResourceSecurity.setCreateTime(DateUtils.getNowDate()); |
| | | return imageResourceSecurityMapper.insertImageResourceSecurity(imageResourceSecurity); |
| | | } |
| | | |
| | | /** |
| | | * 修改platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateImageResourceSecurity(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | return imageResourceSecurityMapper.updateImageResourceSecurity(imageResourceSecurity); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除platform |
| | | * |
| | | * @param ids 需要删除的platform主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteImageResourceSecurityByIds(Long[] ids) |
| | | { |
| | | return imageResourceSecurityMapper.deleteImageResourceSecurityByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除platform信息 |
| | | * |
| | | * @param id platform主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteImageResourceSecurityById(Long id) |
| | | { |
| | | return imageResourceSecurityMapper.deleteImageResourceSecurityById(id); |
| | | } |
| | | } |
| | |
| | | private static final Integer Offline = -1; |
| | | private static final String AuditStatus_Pass = "1"; |
| | | private static final String Remark = "系统生成"; |
| | | private static final Integer randomSize = 50; |
| | | private static final Integer randomSize = 1; |
| | | |
| | | /** |
| | | * 合同考核 在线率每日任务检测 |
| | |
| | | for (CalculateRuleVO calculateRuleVO : ruleList) { |
| | | Double max = calculateRuleVO.getMax(); |
| | | Double min = calculateRuleVO.getMin(); |
| | | //判断范围在哪个区间 |
| | | //判断范围在哪个区间 //TODO:判断单位 |
| | | if (checkRange(min, max, BigDecimal.valueOf(result.getMissDuration()))) { |
| | | if (calculateRuleVO.getNum() == null) { |
| | | calculateRuleVO.setNum(1); |
| | |
| | | } |
| | | } |
| | | for (CalculateRuleVO calculateRuleVO : ruleList) { |
| | | if (calculateRuleVO.getNum() > 0) { |
| | | if (calculateRuleVO.getNum()!=null && calculateRuleVO.getNum() > 0) { |
| | | //需要扣除的分数,此规则只有一条不需要判断范围 |
| | | double deductScore = calculateRuleVO.getCalcFraction() * calculateRuleVO.getNum(); |
| | | ContractScore contractScore = getContractScore(calculateRuleVO, deductScore, calculateRuleVO.getNum() + "", Remark + calculateRuleVO.getNum() + "路设备违反规则"); |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.ImageResourceSecurityDetailMapper"> |
| | | |
| | | <resultMap type="com.ycl.platform.domain.entity.ImageResourceSecurityDetail" id="ImageResourceSecurityDetailResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="ip" column="ip"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="alarmCategory" column="alarm_category"/> |
| | | <result property="alarmLevel" column="alarm_level"/> |
| | | <result property="num" column="num"/> |
| | | <result property="alarmTime" column="alarm_time"/> |
| | | <result property="createTime" column="create_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectImageResourceSecurityDetailVo"> |
| | | select id, |
| | | ip, |
| | | dept_id, |
| | | alarm_category, |
| | | alarm_level, |
| | | num, |
| | | alarm_time, |
| | | create_time |
| | | from t_image_resource_security_detail |
| | | </sql> |
| | | |
| | | <select id="selectImageResourceSecurityDetailList" resultMap="ImageResourceSecurityDetailResult"> |
| | | <include refid="selectImageResourceSecurityDetailVo"/> |
| | | <where> |
| | | <if test="ip != null and ip != ''">and ip = #{ip}</if> |
| | | <if test="deptId != null ">and dept_id = #{deptId}</if> |
| | | <if test="alarmCategory != null and alarmCategory != ''">and alarm_category = #{alarmCategory}</if> |
| | | <if test="alarmLevel != null ">and alarm_level = #{alarmLevel}</if> |
| | | <if test="num != null ">and num = #{num}</if> |
| | | <if test="alarmTime != null ">and alarm_time = #{alarmTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectImageResourceSecurityDetailById"> |
| | | resultMap="ImageResourceSecurityDetailResult"> |
| | | <include refid="selectImageResourceSecurityDetailVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertImageResourceSecurityDetail" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into t_image_resource_security_detail |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="ip != null">ip,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="alarmCategory != null">alarm_category,</if> |
| | | <if test="alarmLevel != null">alarm_level,</if> |
| | | <if test="num != null">num,</if> |
| | | <if test="alarmTime != null">alarm_time,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="ip != null">#{ip},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="alarmCategory != null">#{alarmCategory},</if> |
| | | <if test="alarmLevel != null">#{alarmLevel},</if> |
| | | <if test="num != null">#{num},</if> |
| | | <if test="alarmTime != null">#{alarmTime},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateImageResourceSecurityDetail"> |
| | | update t_image_resource_security_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="ip != null">ip = #{ip},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="alarmCategory != null">alarm_category = #{alarmCategory},</if> |
| | | <if test="alarmLevel != null">alarm_level = #{alarmLevel},</if> |
| | | <if test="num != null">num = #{num},</if> |
| | | <if test="alarmTime != null">alarm_time = #{alarmTime},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteImageResourceSecurityDetailById"> |
| | | delete |
| | | from t_image_resource_security_detail |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteImageResourceSecurityDetailByIds"> |
| | | delete from t_image_resource_security_detail where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.ImageResourceSecurityMapper"> |
| | | |
| | | <resultMap type="com.ycl.platform.domain.entity.ImageResourceSecurity" id="ImageResourceSecurityResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="platformOnline" column="platform_online" /> |
| | | <result property="propertyAccuracy" column="property_accuracy" /> |
| | | <result property="weakPassword" column="weak_password" /> |
| | | <result property="riskProperty" column="risk_property" /> |
| | | <result property="boundaryIntegrity" column="boundary_integrity" /> |
| | | <result property="createTime" column="create_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectImageResourceSecurityVo"> |
| | | select id, dept_id, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity, create_time from t_image_resource_security |
| | | </sql> |
| | | |
| | | <select id="selectImageResourceSecurityList" resultMap="ImageResourceSecurityResult"> |
| | | <include refid="selectImageResourceSecurityVo"/> |
| | | <where> |
| | | <if test="deptId != null "> and dept_id = #{deptId}</if> |
| | | <if test="platformOnline != null "> and platform_online = #{platformOnline}</if> |
| | | <if test="propertyAccuracy != null "> and property_accuracy = #{propertyAccuracy}</if> |
| | | <if test="weakPassword != null "> and weak_password = #{weakPassword}</if> |
| | | <if test="riskProperty != null "> and risk_property = #{riskProperty}</if> |
| | | <if test="boundaryIntegrity != null "> and boundary_integrity = #{boundaryIntegrity}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectImageResourceSecurityById" resultMap="ImageResourceSecurityResult"> |
| | | <include refid="selectImageResourceSecurityVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertImageResourceSecurity" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into t_image_resource_security |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="platformOnline != null">platform_online,</if> |
| | | <if test="propertyAccuracy != null">property_accuracy,</if> |
| | | <if test="weakPassword != null">weak_password,</if> |
| | | <if test="riskProperty != null">risk_property,</if> |
| | | <if test="boundaryIntegrity != null">boundary_integrity,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="platformOnline != null">#{platformOnline},</if> |
| | | <if test="propertyAccuracy != null">#{propertyAccuracy},</if> |
| | | <if test="weakPassword != null">#{weakPassword},</if> |
| | | <if test="riskProperty != null">#{riskProperty},</if> |
| | | <if test="boundaryIntegrity != null">#{boundaryIntegrity},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateImageResourceSecurity"> |
| | | update t_image_resource_security |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="platformOnline != null">platform_online = #{platformOnline},</if> |
| | | <if test="propertyAccuracy != null">property_accuracy = #{propertyAccuracy},</if> |
| | | <if test="weakPassword != null">weak_password = #{weakPassword},</if> |
| | | <if test="riskProperty != null">risk_property = #{riskProperty},</if> |
| | | <if test="boundaryIntegrity != null">boundary_integrity = #{boundaryIntegrity},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteImageResourceSecurityById"> |
| | | delete from t_image_resource_security where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteImageResourceSecurityByIds"> |
| | | delete from t_image_resource_security where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |