修改部分规则代码

This commit is contained in:
zouju
2026-02-09 11:15:26 +08:00
parent a78781782e
commit e07b11ef95
3 changed files with 74 additions and 3 deletions

View File

@@ -34,6 +34,10 @@ public class Algorithm
@Excel(name = "算法描述")
private String description;
/** 算法配置 */
@Excel(name = "算法配置")
private String algoConfig;
/** 算法参数定义信息 */
private List<AlgorithmParam> algorithmParamList;
@@ -87,6 +91,16 @@ public class Algorithm
return description;
}
public void setAlgoConfig(String algoConfig)
{
this.algoConfig = algoConfig;
}
public String getAlgoConfig()
{
return algoConfig;
}
public List<AlgorithmParam> getAlgorithmParamList()
{
return algorithmParamList;
@@ -105,6 +119,7 @@ public class Algorithm
.append("type", getType())
.append("codePath", getCodePath())
.append("description", getDescription())
.append("algoConfig", getAlgoConfig())
.append("algorithmParamList", getAlgorithmParamList())
.toString();
}

View File

@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="type" column="type" />
<result property="codePath" column="code_path" />
<result property="description" column="description" />
<result property="algoConfig" column="algo_config" />
</resultMap>
<resultMap id="AlgorithmAlgorithmParamResult" type="Algorithm" extends="AlgorithmResult">
@@ -25,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectAlgorithmVo">
select id, name, type, code_path, description from algorithm
select id, name, type, code_path, description, algo_config from algorithm
</sql>
<select id="selectAlgorithmList" parameterType="Algorithm" resultMap="AlgorithmAlgorithmParamResult">
@@ -35,11 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="codePath != null and codePath != ''"> and code_path = #{codePath}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="algoConfig != null and algoConfig != ''"> and algo_config = #{algoConfig}</if>
</where>
</select>
<select id="selectAlgorithmById" parameterType="Long" resultMap="AlgorithmAlgorithmParamResult">
select id, name, type, code_path, description
select id, name, type, code_path, description, algo_config
from algorithm
where id = #{id}
</select>
@@ -57,12 +59,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''">type,</if>
<if test="codePath != null">code_path,</if>
<if test="description != null">description,</if>
<if test="algoConfig != null">algo_config,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="codePath != null">#{codePath},</if>
<if test="description != null">#{description},</if>
<if test="algoConfig != null">#{algoConfig},</if>
</trim>
</insert>
@@ -73,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''">type = #{type},</if>
<if test="codePath != null">code_path = #{codePath},</if>
<if test="description != null">description = #{description},</if>
<if test="algoConfig != null">algo_config = #{algoConfig},</if>
</trim>
where id = #{id}
</update>