Merge remote-tracking branch 'origin/main' into dc-feature
# Conflicts: # doc/WorkReport/2025-05-杜冲.md # pom.xml # src/main/java/com/bipt/intelligentapplicationorchestrationservice/IntelligentApplicationOrchestrationServiceApplication.java # src/main/resources/application.properties
This commit is contained in:
10
src/main/resources/bootstrap.properties
Normal file
10
src/main/resources/bootstrap.properties
Normal file
@ -0,0 +1,10 @@
|
||||
# 应用名称(必须与Nacos配置的dataId前缀一致)
|
||||
spring.application.name=intelligent-application-orchestration-service
|
||||
|
||||
# Nacos配置中心地址(引导阶段加载配置)
|
||||
spring.cloud.nacos.config.server-addr=192.168.100.1:8848
|
||||
spring.cloud.nacos.config.data-id=${spring.application.name}.properties
|
||||
spring.cloud.nacos.config.group=DEFAULT_GROUP
|
||||
|
||||
# Nacos服务注册地址(引导阶段注册服务)
|
||||
spring.cloud.nacos.discovery.server-addr=192.168.100.1:8848
|
67
src/main/resources/mapper/DatasetMapper.xml
Normal file
67
src/main/resources/mapper/DatasetMapper.xml
Normal file
@ -0,0 +1,67 @@
|
||||
<?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.bipt.intelligentapplicationorchestrationservice.mapper.DatasetMapper">
|
||||
<insert id="insert">
|
||||
INSERT INTO dataset
|
||||
(dataset_name,dataset_type,dataset_status,ds_path,args,create_time,update_time)
|
||||
values (#{datasetName}, #{datasetType}, #{datasetStatus}, #{dsPath}, #{args},#{createTime},#{updateTime})
|
||||
</insert>
|
||||
|
||||
<update id="updata">
|
||||
update dataset
|
||||
<set>
|
||||
<if test="datasetName != null">
|
||||
dataset_name=#{datasetName},
|
||||
</if>
|
||||
<if test="datasetType != null">
|
||||
dataset_type=#{datasetType},
|
||||
</if>
|
||||
<if test="datasetStatus != null">
|
||||
dataset_status=#{datasetStatus},
|
||||
</if>
|
||||
<if test="dsPath != null">
|
||||
ds_path=#{dsPath},
|
||||
</if>
|
||||
<if test="args != null">
|
||||
args=#{args},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime}
|
||||
</if>
|
||||
</set>
|
||||
where dataset_id = #{datasetId}
|
||||
</update>
|
||||
<delete id="deleteBatch">
|
||||
DELETE FROM dataset
|
||||
WHERE dataset_id IN
|
||||
<foreach collection="datasetIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="pageQuery" resultType="com.bipt.intelligentapplicationorchestrationservice.pojo.DatasetVO">
|
||||
SELECT * FROM dataset
|
||||
<where>
|
||||
<if test="datasetName != null and datasetName!=''">
|
||||
dataset_name LIKE CONCAT('%', #{datasetName}, '%')
|
||||
</if>
|
||||
<if test="datasetType != null">
|
||||
and dataset_type=#{datasetType}
|
||||
</if>
|
||||
<if test="datasetStatus != null">
|
||||
and dataset_status=#{datasetStatus}
|
||||
</if>
|
||||
<if test="dsPath != null">
|
||||
and ds_path=#{dsPath}
|
||||
</if>
|
||||
<if test="args != null">
|
||||
and args=#{args}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time=#{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time=#{updateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
23
src/main/resources/mapper/EvaluationMapper.xml
Normal file
23
src/main/resources/mapper/EvaluationMapper.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?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.bipt.intelligentapplicationorchestrationservice.mapper.EvaluationMapper">
|
||||
<!--查询模型日志详细信息-->
|
||||
<select id="selectLogDetail" resultType="modelLogVO">
|
||||
select m1.*,
|
||||
m2.model_name,
|
||||
m3.model_config, m3.version
|
||||
from model_log m1,
|
||||
model_info m2,
|
||||
model_version m3
|
||||
where m1.model_id=m2.id and m3.model_id=m2.id and m1.model_id = #{id}
|
||||
</select>
|
||||
|
||||
<!--更新模型信息(目前只更新模型是否上线,后续如果更多需求可优化>-->
|
||||
<update id="update">
|
||||
update model_version set
|
||||
<if test="status != null">
|
||||
status=#{status}
|
||||
</if>
|
||||
where model_id=#{id}
|
||||
</update>
|
||||
</mapper>
|
59
src/main/resources/mapper/ModelMapper.xml
Normal file
59
src/main/resources/mapper/ModelMapper.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?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.bipt.intelligentapplicationorchestrationservice.mapper.ModelMapper">
|
||||
|
||||
<!--(新增新的模型)插入模型版本信息-->
|
||||
<insert id="insertModelVersion">
|
||||
insert into model_version (
|
||||
model_id, version, dataset_id, model_config,
|
||||
model_path, status, create_time, update_time, model_size,
|
||||
data_pre_handle_file, model_super_args, model_args_size, model_source_code_url, model_file,
|
||||
model_design_document, life_cycle, operate_user
|
||||
)
|
||||
values (
|
||||
#{modelId}, #{version}, #{datasetId}, #{modelConfig},
|
||||
#{modelPath}, #{status}, #{createTime}, #{updateTime}, #{modelSize},
|
||||
#{dataPreHandleFile}, #{modelSuperArgs}, #{modelArgsSize}, #{modelSourceCodeUrl}, #{modelFile},
|
||||
#{modelDesignDocument}, #{lifeCycle}, #{operateUser}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--查询模型列表-->
|
||||
<select id="list" resultType="modelVO">
|
||||
select t1.*,
|
||||
t2.id as versionId,t2.version, t2.version, t2.data_pre_handle_file, t2.operate_user, t2.update_time,
|
||||
t2.status
|
||||
from model_info t1
|
||||
left join model_version t2 on t1.id = t2.model_id
|
||||
order by t2.update_time desc
|
||||
</select>
|
||||
|
||||
<!--查询模型详细信息-->
|
||||
<select id="selectById" resultType="modelVersion">
|
||||
SELECT
|
||||
t1.model_name,
|
||||
t2.version, t2.dataset_id, t2.model_config,
|
||||
t2.model_path, t2.status, t2.create_time, t2.update_time, t2.model_size,
|
||||
t2.data_pre_handle_file, t2.model_super_args, t2.model_args_size, t2.model_source_code_url, t2.model_file,
|
||||
t2.model_design_document, t2.life_cycle, t2.operate_user
|
||||
FROM model_info t1 JOIN model_version t2 ON t1.id = t2.model_id
|
||||
where t2.id = #{id}
|
||||
</select>
|
||||
|
||||
<!--更新模型信息-->
|
||||
<update id="update">
|
||||
UPDATE model_version
|
||||
<set>
|
||||
<if test="modelSize != null">
|
||||
model_size = #{modelSize},
|
||||
</if>
|
||||
<if test="modelSuperArgs != null">
|
||||
model_super_args = #{modelSuperArgs},
|
||||
</if>
|
||||
<if test="modelArgsSize != null">
|
||||
model_args_size = #{modelArgsSize},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id
|
||||
</update>
|
||||
</mapper>
|
20
src/main/resources/mapper/PublishMapper.xml
Normal file
20
src/main/resources/mapper/PublishMapper.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?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.bipt.intelligentapplicationorchestrationservice.mapper.PublishMapper">
|
||||
<insert id="insert">
|
||||
INSERT INTO service_publish
|
||||
(id,model_id,api_url,create_time)
|
||||
values (#{id}, #{modelId}, #{apiUrl}, #{createTime})
|
||||
</insert>
|
||||
|
||||
<select id="getByApiUrl" resultType="java.lang.Long">
|
||||
SELECT id FROM service_publish WHERE api_url = #{apiUrl};
|
||||
</select>
|
||||
<select id="getByModelId"
|
||||
resultType="com.bipt.intelligentapplicationorchestrationservice.pojo.ServicePublishVO">
|
||||
select
|
||||
sp.api_url,
|
||||
mv.*
|
||||
from model_version mv join service_publish sp on mv.model_id = sp.model_id
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user