|
@@ -0,0 +1,128 @@
|
|
|
+<?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.ruoyi.tool.mapper.TMoonshotRecordMapper">
|
|
|
+
|
|
|
+ <resultMap type="TMoonshotRecord" id="TMoonshotRecordResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="corpId" column="corp_id" />
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
+ <result property="model" column="model" />
|
|
|
+ <result property="maxTokens" column="max_tokens" />
|
|
|
+ <result property="temperature" column="temperature" />
|
|
|
+ <result property="topP" column="top_p" />
|
|
|
+ <result property="n" column="n" />
|
|
|
+ <result property="presencePenalty" column="presence_penalty" />
|
|
|
+ <result property="frequencyPenalty" column="frequency_penalty" />
|
|
|
+ <result property="stop" column="stop" />
|
|
|
+ <result property="stream" column="stream" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTMoonshotRecordVo">
|
|
|
+ select id, corp_id, user_id, model, max_tokens, temperature, top_p, n, presence_penalty, frequency_penalty, stop, stream, del_flag, create_by, create_time, update_by, update_time from t_moonshot_record
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTMoonshotRecordList" parameterType="TMoonshotRecord" resultMap="TMoonshotRecordResult">
|
|
|
+ <include refid="selectTMoonshotRecordVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="corpId != null and corpId != ''"> and corp_id = #{corpId}</if>
|
|
|
+ <if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
|
|
+ <if test="model != null and model != ''"> and model = #{model}</if>
|
|
|
+ <if test="maxTokens != null "> and max_tokens = #{maxTokens}</if>
|
|
|
+ <if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
|
|
|
+ <if test="topP != null and topP != ''"> and top_p = #{topP}</if>
|
|
|
+ <if test="n != null "> and n = #{n}</if>
|
|
|
+ <if test="presencePenalty != null and presencePenalty != ''"> and presence_penalty = #{presencePenalty}</if>
|
|
|
+ <if test="frequencyPenalty != null and frequencyPenalty != ''"> and frequency_penalty = #{frequencyPenalty}</if>
|
|
|
+ <if test="stop != null and stop != ''"> and stop = #{stop}</if>
|
|
|
+ <if test="stream != null and stream != ''"> and stream = #{stream}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTMoonshotRecordById" parameterType="String" resultMap="TMoonshotRecordResult">
|
|
|
+ <include refid="selectTMoonshotRecordVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTMoonshotRecord" parameterType="TMoonshotRecord">
|
|
|
+ insert into t_moonshot_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="corpId != null">corp_id,</if>
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="model != null">model,</if>
|
|
|
+ <if test="maxTokens != null">max_tokens,</if>
|
|
|
+ <if test="temperature != null">temperature,</if>
|
|
|
+ <if test="topP != null">top_p,</if>
|
|
|
+ <if test="n != null">n,</if>
|
|
|
+ <if test="presencePenalty != null">presence_penalty,</if>
|
|
|
+ <if test="frequencyPenalty != null">frequency_penalty,</if>
|
|
|
+ <if test="stop != null">stop,</if>
|
|
|
+ <if test="stream != null">stream,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="corpId != null">#{corpId},</if>
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="model != null">#{model},</if>
|
|
|
+ <if test="maxTokens != null">#{maxTokens},</if>
|
|
|
+ <if test="temperature != null">#{temperature},</if>
|
|
|
+ <if test="topP != null">#{topP},</if>
|
|
|
+ <if test="n != null">#{n},</if>
|
|
|
+ <if test="presencePenalty != null">#{presencePenalty},</if>
|
|
|
+ <if test="frequencyPenalty != null">#{frequencyPenalty},</if>
|
|
|
+ <if test="stop != null">#{stop},</if>
|
|
|
+ <if test="stream != null">#{stream},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTMoonshotRecord" parameterType="TMoonshotRecord">
|
|
|
+ update t_moonshot_record
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="corpId != null">corp_id = #{corpId},</if>
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="model != null">model = #{model},</if>
|
|
|
+ <if test="maxTokens != null">max_tokens = #{maxTokens},</if>
|
|
|
+ <if test="temperature != null">temperature = #{temperature},</if>
|
|
|
+ <if test="topP != null">top_p = #{topP},</if>
|
|
|
+ <if test="n != null">n = #{n},</if>
|
|
|
+ <if test="presencePenalty != null">presence_penalty = #{presencePenalty},</if>
|
|
|
+ <if test="frequencyPenalty != null">frequency_penalty = #{frequencyPenalty},</if>
|
|
|
+ <if test="stop != null">stop = #{stop},</if>
|
|
|
+ <if test="stream != null">stream = #{stream},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTMoonshotRecordById" parameterType="String">
|
|
|
+ delete from t_moonshot_record where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTMoonshotRecordByIds" parameterType="String">
|
|
|
+ delete from t_moonshot_record where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|