Files
guoju0808/ry-api/ruoyi-business/src/main/resources/mapper/business/BizExecutionIntentMapper.xml
T
郭庆泰 cf5790229a refactor: 合并 biz_support_unit/biz_execution_unit/biz_service_org 为 biz_org, 删除 2 张孤儿表, 改 biz_person.work_unit → org_id FK
主要改动:
- SQL: biz_support_unit → biz_org, 加 org_type, 加 business_nature; 删 biz_execution_unit, biz_service_org
- SQL: biz_project.support_unit_id/name + service_org_id/name → org_id/name/type
- SQL: biz_meeting.support_unit_name → org_name
- SQL: biz_person.work_unit → org_id (FK)
- 后端: 新 BizOrg entity/mapper/service/controller
- 后端: BizProject/BizMeeting 字段重命名
- 后端: 删 12 个 BizSupportUnit/BizExecutionUnit/BizServiceOrg Java 文件
- 后端: BizPersonImportVO.workUnit → orgName (导入时查 biz_org 取 org_id)
- 后端: BizAuthController.registerExecutor 完整实现 (原 registerSupplier stub)
- 前端: 新 admin/Orgs.vue + manager/Orgs.vue (原 SupportUnits)
- 前端: RegisterExecutor.vue (原 RegisterSupplier, 单页 2 步)
- 前端: sponsor/executor/manager 多个文件 workUnit → orgId/orgName 重命名
- 前端: 统一 supplier → executor, 业务命名 sponsor(赞助方) / executor(执行方=供应商)
- 前端: 全工程 execution → executor (company type / role / person unit_type)
2026-08-15 12:41:10 +08:00

92 lines
5.3 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.business.mapper.BizExecutionIntentMapper">
<resultMap type="BizExecutionIntent" id="BizExecutionIntentResult">
<id property="intentId" column="intent_id" />
<result property="userId" column="user_id" />
<result property="projectNo" column="project_no" />
<result property="projectName" column="project_name" />
<result property="name" column="name" />
<result property="workUnit" column="work_unit" />
<result property="department" column="department" />
<result property="position" column="position" />
<result property="phone" column="phone" />
<result property="onboardStatus" column="onboard_status" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectFields">
select intent_id, user_id, project_no, project_name, name, work_unit, department, position, phone, onboard_status, create_by, create_time, update_by, update_time
from biz_execution_intent
</sql>
<select id="selectByPrimaryKey" resultMap="BizExecutionIntentResult" parameterType="String">
<include refid="selectFields"/>
where intent_id = #{intentId}
</select>
<select id="selectList" resultMap="BizExecutionIntentResult" parameterType="BizExecutionIntent">
<include refid="selectFields"/>
<where>
<if test="userId != null"> and user_id = #{userId}</if>
<if test="projectNo != null and projectNo != ''"> and project_no = #{projectNo}</if>
<if test="projectName != null and projectName != ''"> and project_name = #{projectName}</if>
<if test="name != null and name != ''"> and name = #{name}</if>
<if test="department != null and department != ''"> and department = #{department}</if>
<if test="position != null and position != ''"> and position = #{position}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
</where>
order by intent_id desc
</select>
<insert id="insert" parameterType="BizExecutionIntent">
insert into biz_execution_intent
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="intentId != null and intentId != ''">intent_id,</if>
<if test="userId != null">user_id,</if>
<if test="projectNo != null and projectNo != ''">project_no,</if>
<if test="projectName != null and projectName != ''">project_name,</if>
<if test="workUnit != null and workUnit != ''">work_unit,</if>
<if test="onboardStatus != null and onboardStatus != ''">onboard_status,</if>
<if test="name != null">name,</if>
<if test="department != null">department,</if>
<if test="position != null">position,</if>
<if test="phone != null">phone,</if>
<if test="createBy != null">create_by,</if>
create_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="intentId != null and intentId != ''">#{intentId},</if>
<if test="userId != null">#{userId},</if>
<if test="projectNo != null and projectNo != ''">#{projectNo},</if>
<if test="projectName != null and projectName != ''">#{projectName},</if>
<if test="workUnit != null and workUnit != ''">#{workUnit},</if>
<if test="onboardStatus != null and onboardStatus != ''">#{onboardStatus},</if>
<if test="name != null">#{name},</if>
<if test="department != null">#{department},</if>
<if test="position != null">#{position},</if>
<if test="phone != null">#{phone},</if>
<if test="createBy != null">#{createBy},</if>
sysdate(),
</trim>
</insert>
<update id="updateByPrimaryKey" parameterType="BizExecutionIntent">
update biz_execution_intent
<trim prefix="SET" suffixOverrides=",">
<if test="projectNo != null and projectNo != ''">project_no = #{projectNo},</if>
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
<if test="workUnit != null and workUnit != ''">work_unit = #{workUnit},</if>
<if test="onboardStatus != null and onboardStatus != ''">onboard_status = #{onboardStatus},</if>
<if test="name != null">name = #{name},</if>
<if test="department != null">department = #{department},</if>
<if test="position != null">position = #{position},</if>
<if test="phone != null">phone = #{phone},</if>
</trim>
where intent_id = #{intentId}
</update>
<delete id="deleteByPrimaryKey" parameterType="String">
delete from biz_execution_intent where intent_id = #{intentId}
</delete>
<delete id="deleteByPrimaryKeys" parameterType="String">
delete from biz_execution_intent where intent_id in
<foreach collection="intentIds" item="intentId" open="(" separator="," close=")">
#{intentId}
</foreach>
</delete>
</mapper>