xiangpei
2024-08-02 1fc5877f61c9b15f5daa5f328f9deae2e8a50e84
考核规则表增加apiUrl字段
3个文件已修改
23 ■■■■ 已修改文件
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckRule.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/DataCenterController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckRuleMapper.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckRule.java
@@ -62,4 +62,7 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /** 数据中心对应的接口地址 */
    private String apiUrl;
}
ycl-server/src/main/java/com/ycl/platform/controller/DataCenterController.java
@@ -1,17 +1,12 @@
package com.ycl.platform.controller;
import com.ycl.platform.domain.query.DataCenterQuery;
import com.ycl.platform.domain.result.HK.*;
import com.ycl.platform.domain.result.UY.OneMachineFileResult;
import com.ycl.platform.domain.result.UY.RecordMetaDSumResult;
import com.ycl.platform.service.DataCenterService;
import com.ycl.system.Result;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * 数据中心接口
ycl-server/src/main/resources/mapper/zgyw/CheckRuleMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ycl.platform.mapper.CheckRuleMapper">
    <resultMap type="com.ycl.platform.domain.entity.CheckRule" id="CheckRuleResult">
        <result property="id"    column="id"    />
        <result property="ruleName"    column="rule_name"    />
@@ -15,6 +15,7 @@
        <result property="updateTime"    column="update_time"    />
        <result property="state"    column="state"    />
        <result property="deleted"    column="deleted"    />
        <result property="apiUrl"    column="api_url"    />
    </resultMap>
    <sql id="selectCheckRuleVo">
@@ -25,9 +26,9 @@
    <select id="selectCheckRuleList" resultMap="CheckRuleResult">
        select cr.id, cr.rule_name, cr.rule_index, cr.rule_category, cr.rule_condition, cr.rule_description,
        cr.update_time, cr.state, cr.deleted,cr.icon
        cr.update_time, cr.state, cr.deleted,cr.icon, cr.api_url
        from t_check_rule cr
        <where>
        <where>
            <if test="ruleName != null  and ruleName != ''"> and rule_name like concat('%', #{ruleName}, '%')</if>
            <if test="ruleIndex != null  and ruleIndex != ''"> and rule_index = #{ruleIndex}</if>
            <if test="ruleCategory != null "> and rule_category = #{ruleCategory}</if>
@@ -37,12 +38,12 @@
            <if test="deleted != null  and deleted != ''"> and deleted = #{deleted}</if>
        </where>
    </select>
    <select id="selectCheckRuleById"  resultMap="CheckRuleResult">
        <include refid="selectCheckRuleVo"/>
        where id = #{id}
    </select>
    <insert id="insertCheckRule" useGeneratedKeys="true" keyProperty="id">
        insert into t_check_rule
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -87,9 +88,9 @@
    </delete>
    <delete id="deleteCheckRuleByIds" >
        delete from t_check_rule where id in
        delete from t_check_rule where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
</mapper>