| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?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.takai.bigmodel.mapper.BmApplicationMapper">
- <resultMap type="BmApplication" id="BmApplicationResult">
- <id property="appId" column="appId" />
- <result property="name" column="name" />
- <result property="desc" column="description" />
- <result property="prompt" column="prompt" />
- <result property="topP" column="top_p" />
- <result property="temperature" column="temperature" />
- <result property="knowledgeIds" column="knowledge_ids" />
- <result property="sliceCount" column="slice_count" />
- <result property="model" column="model" />
- <result property="iconColor" column="icon_color" />
- <result property="iconType" column="icon_type" />
- <result property="maxToken" column="max_token" />
- <result property="paramDesc" column="param_desc"/>
- <result property="remark" column="remark" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="knowledgeInfo" column="knowledge_info" />
- </resultMap>
- <sql id="selectSql">
- select appId, name, description, prompt, top_p, temperature, knowledge_ids, slice_count,model,icon_color,icon_type,
- max_token, create_by, create_time, remark, knowledge_info
- from bm_application
- </sql>
- <select id="selectApplicationList" parameterType="BmApplication" resultMap="BmApplicationResult">
- <include refid="selectSql"/>
- <where>
- <if test="appId != null and appId != ''">
- AND appId = #{appId}
- </if>
- </where>
- order by create_time asc
- </select>
- <select id="selectTargetApplication" parameterType="BmApplication" resultMap="BmApplicationResult">
- <include refid="selectSql"/>
- where appId = #{appId}
- </select>
- <insert id="insertApplication" parameterType="BmApplication">
- insert into bm_application(
- <if test="appId != null">appId,</if>
- <if test="name != null and name != ''">name,</if>
- <if test="desc != null and desc != ''">description,</if>
- <if test="prompt != null and prompt != ''">prompt,</if>
- <if test="topP != null and topP != ''">top_p,</if>
- <if test="temperature != null and temperature != ''">temperature,</if>
- <if test="knowledgeIds != null and knowledgeIds != ''">knowledge_ids,</if>
- <if test="sliceCount != null">slice_count,</if>
- <if test="model != null and model != ''">model,</if>
- <if test="iconColor != null and iconColor != ''">icon_color,</if>
- <if test="iconType != null and iconType != ''">icon_type,</if>
- <if test="remark != null and remark != ''">remark,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="knowledgeInfo != null and knowledgeInfo != ''">knowledge_info,</if>
- <if test="maxToken != null and maxToken != ''">max_token,</if>
- create_time
- )values(
- <if test="appId != null">#{appId},</if>
- <if test="name != null and name != ''">#{name},</if>
- <if test="desc != null and desc != ''">#{desc},</if>
- <if test="prompt != null and prompt != ''">#{prompt},</if>
- <if test="topP != null and topP != ''">#{topP},</if>
- <if test="temperature != null and temperature != ''">#{temperature},</if>
- <if test="knowledgeIds != null and knowledgeIds != ''">#{knowledgeIds},</if>
- <if test="sliceCount != null">#{sliceCount},</if>
- <if test="model != null and model != ''">#{model},</if>
- <if test="iconColor != null and iconColor != ''">#{iconColor},</if>
- <if test="iconType != null and iconType != ''">#{iconType},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="knowledgeInfo != null and knowledgeInfo != ''">#{knowledgeInfo},</if>
- <if test="maxToken != null and maxToken != ''">#{maxToken},</if>
- sysdate()
- )
- </insert>
- <update id="updateApplication" parameterType="BmApplication">
- update bm_application
- <set>
- <if test="name != null and name != ''">name = #{name},</if>
- <if test="desc != null and desc != ''">description = #{desc},</if>
- <if test="prompt != null and prompt != ''">prompt = #{prompt},</if>
- <if test="topP != null and topP != ''">top_p = #{topP},</if>
- <if test="temperature != null and temperature != ''">temperature = #{temperature},</if>
- <if test="knowledgeIds != null and knowledgeIds != ''">knowledge_ids = #{knowledgeIds},</if>
- <if test="sliceCount != null">slice_count = #{sliceCount},</if>
- <if test="model != null and model != ''">model = #{model},</if>
- <if test="iconColor != null and iconColor != ''">icon_color = #{iconColor},</if>
- <if test="iconType != null and iconType != ''">icon_type = #{iconType},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="knowledgeInfo != null and knowledgeInfo != ''">knowledge_info = #{knowledgeInfo},</if>
- <if test="maxToken != null">max_token = #{maxToken},</if>
- update_time = sysdate()
- </set>
- where appId = #{appId}
- </update>
- <delete id="delApplication" parameterType="String">
- delete from bm_application where appId = #{appId}
- </delete>
- </mapper>
|