Selaa lähdekoodia

举报信息管理调整接口

jichaobo 2 vuotta sitten
vanhempi
commit
b0a715e798

+ 21 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/DemEnforceReportLabelAttributeController.java

@@ -0,0 +1,21 @@
+package com.usky.fire.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-10-08
+ */
+@Controller
+@RequestMapping("/demEnforceReportLabelAttribute")
+public class DemEnforceReportLabelAttributeController {
+
+}
+

+ 40 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/DemEnforceReportLabelAttribute.java

@@ -0,0 +1,40 @@
+package com.usky.fire.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-10-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class DemEnforceReportLabelAttribute implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 标签ID
+     */
+    private Integer labelId;
+
+    /**
+     * 属性
+     */
+    private String attribute;
+
+
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/DemEnforceReportLabelAttributeMapper.java

@@ -0,0 +1,16 @@
+package com.usky.fire.mapper;
+
+import com.usky.fire.domain.DemEnforceReportLabelAttribute;
+import com.usky.common.mybatis.core.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-10-08
+ */
+public interface DemEnforceReportLabelAttributeMapper extends CrudMapper<DemEnforceReportLabelAttribute> {
+
+}

+ 21 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/DemEnforceReportLabelAttributeService.java

@@ -0,0 +1,21 @@
+package com.usky.fire.service;
+
+import com.usky.fire.domain.DemEnforceReportLabelAttribute;
+import com.usky.common.mybatis.core.CrudService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-10-08
+ */
+public interface DemEnforceReportLabelAttributeService extends CrudService<DemEnforceReportLabelAttribute> {
+
+    List<DemEnforceReportLabelAttribute> enforceReportLabelAttributeList(Integer labelId);
+
+    void delEnforceReportLabelAttribute(Integer id);
+}

+ 37 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/DemEnforceReportLabelAttributeServiceImpl.java

@@ -0,0 +1,37 @@
+package com.usky.fire.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.usky.fire.domain.DemEnforceReportLabelAttribute;
+import com.usky.fire.domain.DemFireLabelAttribute;
+import com.usky.fire.mapper.DemEnforceReportLabelAttributeMapper;
+import com.usky.fire.service.DemEnforceReportLabelAttributeService;
+import com.usky.common.mybatis.core.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-10-08
+ */
+@Service
+public class DemEnforceReportLabelAttributeServiceImpl extends AbstractCrudService<DemEnforceReportLabelAttributeMapper, DemEnforceReportLabelAttribute> implements DemEnforceReportLabelAttributeService {
+
+    @Override
+    public List<DemEnforceReportLabelAttribute> enforceReportLabelAttributeList(Integer labelId) {
+        LambdaQueryWrapper<DemEnforceReportLabelAttribute> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.eq(labelId != null && labelId != 0, DemEnforceReportLabelAttribute::getLabelId, labelId);
+        List<DemEnforceReportLabelAttribute> list = this.list(queryWrapper);
+        return list;
+    }
+
+    @Override
+    public void delEnforceReportLabelAttribute(Integer id){
+        this.removeById(id);
+    }
+}

+ 12 - 0
service-fire/service-fire-biz/src/main/resources/mapper/fire/DemEnforceReportLabelAttributeMapper.xml

@@ -0,0 +1,12 @@
+<?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.usky.fire.mapper.DemEnforceReportLabelAttributeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.fire.domain.DemEnforceReportLabelAttribute">
+        <id column="id" property="id" />
+        <result column="label_id" property="labelId" />
+        <result column="attribute" property="attribute" />
+    </resultMap>
+
+</mapper>