- 新增审批配置主子表(biz_approval_config / biz_approval_config_user),支持或签 - 5 个业务模块接入审批: 采购订单/客户报价/供应商报价/发货单/订单异议 - 统一审批动作接口(提交/通过/驳回),status=10 表示审批中 - 新增"待我审批"聚合页面,按业务类型筛选 - 修复 logback 写本地路径报错,去除文件 appender - 修复 Redis SSL 配置在 Spring Boot 4 下需对象格式 - 补齐部分业务表缺失的 update_by/update_time 审计列 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
78 lines
3.1 KiB
XML
78 lines
3.1 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.system.mapper.bid.BizApprovalConfigMapper">
|
|
|
|
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizApprovalConfig">
|
|
<id property="id" column="id"/>
|
|
<result property="bizType" column="biz_type"/>
|
|
<result property="bizName" column="biz_name"/>
|
|
<result property="signType" column="sign_type"/>
|
|
<result property="enabled" column="enabled"/>
|
|
<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"/>
|
|
</resultMap>
|
|
|
|
<select id="selectList" resultMap="BaseRM">
|
|
SELECT * FROM biz_approval_config
|
|
<where>
|
|
<if test="bizType != null and bizType != ''"> AND biz_type LIKE CONCAT('%',#{bizType},'%')</if>
|
|
<if test="bizName != null and bizName != ''"> AND biz_name LIKE CONCAT('%',#{bizName},'%')</if>
|
|
<if test="enabled != null and enabled != ''"> AND enabled=#{enabled}</if>
|
|
</where>
|
|
ORDER BY id ASC
|
|
</select>
|
|
|
|
<select id="selectById" resultMap="BaseRM">
|
|
SELECT * FROM biz_approval_config WHERE id=#{id}
|
|
</select>
|
|
|
|
<select id="selectByBizType" resultMap="BaseRM">
|
|
SELECT * FROM biz_approval_config WHERE biz_type=#{bizType}
|
|
</select>
|
|
|
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
|
INSERT INTO biz_approval_config(biz_type,biz_name,sign_type,enabled,remark,create_by,create_time)
|
|
VALUES(#{bizType},#{bizName},#{signType},#{enabled},#{remark},#{createBy},NOW())
|
|
</insert>
|
|
|
|
<update id="update">
|
|
UPDATE biz_approval_config
|
|
<set>
|
|
<if test="bizName != null">biz_name=#{bizName},</if>
|
|
<if test="signType != null">sign_type=#{signType},</if>
|
|
<if test="enabled != null">enabled=#{enabled},</if>
|
|
<if test="remark != null">remark=#{remark},</if>
|
|
update_by=#{updateBy}, update_time=NOW()
|
|
</set>
|
|
WHERE id=#{id}
|
|
</update>
|
|
|
|
<delete id="deleteById">DELETE FROM biz_approval_config WHERE id=#{id}</delete>
|
|
|
|
<select id="selectUserIds" resultType="java.lang.Long">
|
|
SELECT user_id FROM biz_approval_config_user WHERE config_id=#{configId} ORDER BY sort_no, id
|
|
</select>
|
|
|
|
<select id="selectUserNames" resultType="java.lang.String">
|
|
SELECT u.nick_name FROM biz_approval_config_user cu
|
|
JOIN sys_user u ON u.user_id=cu.user_id
|
|
WHERE cu.config_id=#{configId} ORDER BY cu.sort_no, cu.id
|
|
</select>
|
|
|
|
<delete id="deleteUsers">DELETE FROM biz_approval_config_user WHERE config_id=#{configId}</delete>
|
|
|
|
<insert id="insertUser">
|
|
INSERT INTO biz_approval_config_user(config_id,user_id,sort_no)
|
|
VALUES(#{configId},#{userId},#{sortNo})
|
|
</insert>
|
|
|
|
<select id="existsUser" resultType="int">
|
|
SELECT COUNT(1) FROM biz_approval_config c
|
|
JOIN biz_approval_config_user cu ON cu.config_id=c.id
|
|
WHERE c.biz_type=#{bizType} AND c.enabled='1' AND cu.user_id=#{userId}
|
|
</select>
|
|
</mapper>
|