Files
guoju0808/ry-api/ruoyi-business/src/main/resources/mapper/business/BizPublicityMapper.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

111 lines
5.4 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.BizPublicityMapper">
<resultMap id="BaseResultMap" type="BizPublicity">
<id property="id" column="id" />
<result property="projectId" column="project_id" />
<result property="projectNo" column="project_no" />
<result property="projectName" column="project_name" />
<result property="announceType" column="announce_type" />
<result property="title" column="title" />
<result property="fileUrl" column="file_url" />
<result property="remark" column="remark" />
<result property="status" column="status" />
<result property="ratingTime" column="rating_time" />
<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="selectFields">
select id, project_id, project_no, project_name, announce_type, title, file_url, remark, status, rating_time, create_by, create_time, update_by, update_time
from biz_publicity
</sql>
<select id="selectByPrimaryKey" parameterType="Long" resultMap="BaseResultMap">
<include refid="selectFields"/>
where id = #{id}
</select>
<select id="selectList" parameterType="BizPublicity" resultMap="BaseResultMap">
<include refid="selectFields"/>
<where>
<if test="projectId != null"> and project_id = #{projectId}</if>
<if test="announceType != null and announceType != ''"> and announce_type = #{announceType}</if>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectByProjectId" parameterType="Long" resultMap="BaseResultMap">
<include refid="selectFields"/>
where project_id = #{projectId}
order by create_time desc
</select>
<insert id="insert" parameterType="BizPublicity" useGeneratedKeys="true" keyProperty="id">
insert into biz_publicity
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectId != null">project_id,</if>
<if test="projectNo != null and projectNo != ''">project_no,</if>
<if test="projectName != null and projectName != ''">project_name,</if>
<if test="announceType != null and announceType != ''">announce_type,</if>
<if test="title != null and title != ''">title,</if>
<if test="fileUrl != null and fileUrl != ''">file_url,</if>
<if test="remark != null">remark,</if>
<if test="status != null">status,</if>
<if test="ratingTime != null">rating_time,</if>
<if test="createBy != null">create_by,</if>
create_time,
<if test="updateBy != null">update_by,</if>
update_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectId != null">#{projectId},</if>
<if test="projectNo != null and projectNo != ''">#{projectNo},</if>
<if test="projectName != null and projectName != ''">#{projectName},</if>
<if test="announceType != null and announceType != ''">#{announceType},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="fileUrl != null and fileUrl != ''">#{fileUrl},</if>
<if test="remark != null">#{remark},</if>
<if test="status != null">#{status},</if>
<if test="ratingTime != null">#{ratingTime},</if>
<if test="createBy != null">#{createBy},</if>
sysdate(),
<if test="updateBy != null">#{updateBy},</if>
sysdate(),
</trim>
</insert>
<update id="updateByPrimaryKey" parameterType="BizPublicity">
update biz_publicity
<trim prefix="SET" suffixOverrides=",">
<if test="projectId != null">project_id = #{projectId},</if>
<if test="projectNo != null and projectNo != ''">project_no = #{projectNo},</if>
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
<if test="announceType != null and announceType != ''">announce_type = #{announceType},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="fileUrl != null and fileUrl != ''">file_url = #{fileUrl},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="status != null">status = #{status},</if>
<if test="ratingTime != null">rating_time = #{ratingTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
update_time = sysdate(),
</trim>
where id = #{id}
</update>
<delete id="deleteByPrimaryKey" parameterType="Long">
delete from biz_publicity where id = #{id}
</delete>
<delete id="deleteByPrimaryKeys" parameterType="Long[]">
delete from biz_publicity where id in
<foreach collection="array" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>