35 lines
1.7 KiB
XML
35 lines
1.7 KiB
XML
<?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.mcwl.resource.mapper.ModelVersionMapper">
|
|
|
|
|
|
<insert id="addModelVersion">
|
|
INSERT INTO model_version (
|
|
model_id,version_name,version_description,model_version_type, file_path,file_name, trigger_words, sampling, high, vae, cfg,
|
|
is_free, is_public, is_encrypt, is_online_use, allow_download_image,
|
|
allow_software_use, allow_fusion, allow_commercial_use, allow_usage,
|
|
is_exclusive_model, sample_image_paths, hide_image_gen_info, del_flag
|
|
)
|
|
VALUES
|
|
<foreach collection="modelVersionList" item="item" separator=",">
|
|
(
|
|
#{modelProduct.id},#{item.versionName}, #{item.versionDescription},#{item.modelVersionType}, #{item.filePath},
|
|
#{item.fileName},#{item.triggerWords},#{item.sampling}, #{item.high}, #{item.vae}, #{item.cfg},
|
|
#{item.isFree}, #{item.isPublic}, #{item.isEncrypt}, #{item.isOnlineUse},
|
|
#{item.allowDownloadImage}, #{item.allowSoftwareUse}, #{item.allowFusion},
|
|
#{item.allowCommercialUse}, #{item.allowUsage}, #{item.isExclusiveModel},
|
|
#{item.sampleImagePaths}, #{item.hideImageGenInfo},'0'
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
|
|
<update id="updateByName">
|
|
update model_version set audit_status = #{auditStatus},
|
|
audit_text = #{auditText}
|
|
where version_name = #{versionName} and model_id = #{modelId}
|
|
</update>
|
|
|
|
</mapper>
|