cmvr-wms/ruoyi-system/src/main/resources/mapper/warehouse/AiCommandMapper.xml
lixiaolong a82258561b feat(auth): 添加认证cookie名称配置并优化表单布局
- 在 .env.production 中新增 VITE_AUTH_COOKIE_NAME 配置项用于设置认证cookie名称
- 将 AcceptanceException.vue 中的表单标签宽度从固定90px改为自动适配
- 在 ActionDialog.vue 中将多个表单项标记为必填项并调整标签宽度为自动适配
- 重构 ActionHistory.vue 中的按钮布局结构并添加表格列样式类名
- 更新 api-contract-audit.cjs 添加生产任务和BOM相关接口的契约测试
- 修改 auth.js 使用动态认证cookie键名替换硬编码的Admin-Token
- 调整系统角色授权用户页面的表单布局和表格样式类名
- 优化 ReceiptDialog Batch 组件的对话框尺寸、表单验证和分页功能
2026-10-16 15:30:10 +08:00

56 lines
3.0 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.ruoyi.warehouse.mapper.AiCommandMapper">
<resultMap id="AiCommandResult" type="com.ruoyi.warehouse.domain.AiCommand">
<id property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="username" column="username"/>
<result property="action" column="action"/>
<result property="requiredPermission" column="required_permission"/>
<result property="requestText" column="request_text"/>
<result property="planJson" column="plan_json"/>
<result property="resultJson" column="result_json"/>
<result property="commandStatus" column="command_status"/>
<result property="expiresAt" column="expires_at"/>
<result property="confirmedAt" column="confirmed_at"/>
<result property="executedAt" column="executed_at"/>
<result property="errorMessage" column="error_message"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<insert id="insertAiCommand" parameterType="com.ruoyi.warehouse.domain.AiCommand" useGeneratedKeys="true" keyProperty="id">
insert into ai_command(user_id, username, action, required_permission, request_text, plan_json,
command_status, expires_at, create_time)
values(#{userId}, #{username}, #{action}, #{requiredPermission}, #{requestText}, cast(#{planJson} as json),
#{commandStatus}, #{expiresAt}, sysdate())
</insert>
<select id="selectAiCommandForUpdate" resultMap="AiCommandResult">
select * from ai_command where id = #{id} and user_id = #{userId} for update
</select>
<update id="markExecuting">
update ai_command set command_status = 'EXECUTING', confirmed_at = sysdate(), update_time = sysdate()
where id = #{id} and user_id = #{userId} and command_status = 'WAIT_CONFIRM' and expires_at > sysdate()
</update>
<update id="markSucceeded">
update ai_command set command_status = 'SUCCEEDED', result_json = cast(#{resultJson} as json),
executed_at = sysdate(), update_time = sysdate()
where id = #{id} and command_status = 'EXECUTING'
</update>
<select id="selectAssistantCommand" resultMap="AiCommandResult">
select * from ai_command where id = #{id} and user_id = #{userId}
</select>
<update id="updateAssistantCommand" parameterType="com.ruoyi.warehouse.domain.AiCommand">
update ai_command set plan_json = cast(#{planJson} as json),
result_json = cast(#{resultJson} as json), command_status = #{commandStatus},
confirmed_at = #{confirmedAt}, executed_at = #{executedAt},
error_message = #{errorMessage}, expires_at = #{expiresAt}, update_time = sysdate()
where id = #{id} and user_id = #{userId}
</update>
</mapper>