feat(项目管理): 招标字段/负责人/导出/下拉/登录短信 完整链路

后端 (ruoyi-business)
- BizProject: +is_bid_project, +execOrgNames(GROUP_CONCAT派生), +leadUserName
- BizProjectMapper.xml: 上述字段全部贯通 selectFields/insert/update, 列表加 exec_org_names 子查询 + lead_user_name JOIN
- BizSysUserQueryMapper (新): 干净查 sys_user by role_type, 避开 @DataScope 切面污染, 用于项目负责人下拉
- BizOrgMapper.selectExecutorOrgOptions (新): JOIN sys_user (parent_user_id IS NULL) 限定 MAIN 账号, 排除同公司普通员工子账号
- BizOrgController: +/business/org/executorOptions 端点
- BizExecutionIntentController: +exportSignupExperts 端点 (POST /business/executionIntent/export)
- BizSignupExpertExportVo (新): 中文列头 Excel 导出 VO (专家姓名/科室/医院/职称/报名时间/手机号)
- BizProjectAssign / SponsorAssign 重命名 + Service 实现调整
- 删除 sql/ 下所有迁移脚本 (按用户要求不再保存 SQL 文件)

前端 (ry-vue3)
- api/system.js: +listExecutorOrgs 走新接口, listExecutor/listSupporters/listManagers 保持 listByRole 兼容
- views/manager/Projects.vue: 执行方下拉改 label=u.orgName / value=u.userId, 数据源走 listExecutorOrgs
  +execOrgNames 列展示 +导出报名专家 dropdown 项 +is_bid_project 表单字段
- views/manager/ProjectsNew.vue + ManagerProjectDetail.vue: +is_bid_project 表单/展示
- views/auth/Login.vue: +手机号验证码登录 tab (复用 SysSmsService, dev 模式 10 开头手机号固定码 1234)
- 路由/布局/角色视角多页面整理 (SponsorOrgs/People/SponsorPersonNew 等)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
郭庆泰
2026-08-17 00:34:13 +08:00
co-authored by Claude
parent ccfd03a6eb
commit e099211cbd
70 changed files with 1378 additions and 1505 deletions
@@ -3,6 +3,7 @@
<mapper namespace="com.ruoyi.business.mapper.BizOrgMapper">
<resultMap type="BizOrg" id="BizOrgResult">
<id property="orgId" column="org_id" />
<result property="userId" column="user_id" />
<result property="orgName" column="org_name" />
<result property="orgType" column="org_type" />
<result property="businessNature" column="business_nature" />
@@ -19,7 +20,7 @@
</resultMap>
<sql id="selectFields">
select org_id, org_name, org_type, business_nature, address, tax_no, status, create_time,
select org_id, user_id, org_name, org_type, business_nature, address, tax_no, status, create_time,
contact_name, contact_phone, intent_count,
create_by, update_by, update_time
from biz_org
@@ -33,6 +34,7 @@
<select id="selectList" resultMap="BizOrgResult" parameterType="BizOrg">
<include refid="selectFields"/>
<where>
<if test="userId != null"> and user_id = #{userId}</if>
<if test="orgType != null and orgType != ''"> and org_type = #{orgType}</if>
<if test="orgName != null and orgName != ''"> and org_name like concat('%', #{orgName}, '%')</if>
<if test="taxNo != null and taxNo != ''"> and tax_no = #{taxNo}</if>
@@ -44,6 +46,7 @@
<insert id="insert" parameterType="BizOrg" useGeneratedKeys="true" keyProperty="orgId">
insert into biz_org
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="orgName != null and orgName != ''">org_name,</if>
<if test="orgType != null and orgType != ''">org_type,</if>
<if test="businessNature != null and businessNature != ''">business_nature,</if>
@@ -57,6 +60,7 @@
create_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="orgName != null and orgName != ''">#{orgName},</if>
<if test="orgType != null and orgType != ''">#{orgType},</if>
<if test="businessNature != null and businessNature != ''">#{businessNature},</if>
@@ -74,6 +78,7 @@
<update id="updateByPrimaryKey" parameterType="BizOrg">
update biz_org
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="orgName != null and orgName != ''">org_name = #{orgName},</if>
<if test="orgType != null and orgType != ''">org_type = #{orgType},</if>
<if test="businessNature != null and businessNature != ''">business_nature = #{businessNature},</if>
@@ -95,4 +100,46 @@
#{orgId}
</foreach>
</delete>
<!--
支持方下拉选项: JOIN sys_user 取主账号 user_name (供分配弹窗缓存 biz_project.sponsor_admin_user_name 用)
返回 Map: userId / orgName / userName
走 idx_org_user_type_name 索引 (user_id, org_type, org_name)
过滤条件: orgName 模糊匹配 (主用) / userId 精确匹配 (拉回已选项)
-->
<select id="selectSponsorOrgOptions" parameterType="BizOrg" resultType="java.util.LinkedHashMap">
select o.user_id as userId,
o.org_name as orgName,
u.user_name as userName
from biz_org o
join sys_user u on u.user_id = o.user_id
where o.org_type = 'sponsor'
and u.del_flag = '0'
<if test="userId != null">and o.user_id = #{userId}</if>
<if test="orgName != null and orgName != ''">and o.org_name like concat('%', #{orgName}, '%')</if>
order by o.org_id desc
</select>
<!--
执行方下拉选项: JOIN sys_user 取 MAIN 账号 user_name (parent_user_id IS NULL 限定主账号)
返回 Map: userId / orgName / userName
走 idx_org_user_type_name 索引 (user_id, org_type, org_name)
关键: 只查 MAIN 账号 (parent_user_id IS NULL), 过滤掉同一公司下的普通员工子账号
value=userId (MAIN 账号 sys_user.user_id, 直接写 biz_project_assign.exec_user_id)
label=orgName (执行单位名称, 不带 user_name 避免人名/昵称混淆)
过滤条件: orgName 模糊匹配 (主用) / userId 精确匹配 (拉回已选项)
-->
<select id="selectExecutorOrgOptions" parameterType="BizOrg" resultType="java.util.LinkedHashMap">
select o.user_id as userId,
o.org_name as orgName,
u.user_name as userName
from biz_org o
join sys_user u on u.user_id = o.user_id
where o.org_type = 'executor'
and u.del_flag = '0'
and u.parent_user_id is null
<if test="userId != null">and o.user_id = #{userId}</if>
<if test="orgName != null and orgName != ''">and o.org_name like concat('%', #{orgName}, '%')</if>
order by o.org_id desc
</select>
</mapper>
@@ -11,7 +11,6 @@
<result property="department" column="department" />
<result property="position" column="position" />
<result property="role" column="role" />
<result property="status" column="status" />
<result property="userId" column="user_id" />
<result property="unitType" column="unit_type" />
<result property="accountType" column="account_type" />
@@ -2,25 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.business.mapper.BizProjectAssignMapper">
<resultMap type="BizProjectAssign" id="BizProjectAssignResult">
<id property="assignId" column="assign_id" />
<result property="projectId" column="project_id" />
<result property="execUserId" column="exec_user_id" />
<result property="execUserName" column="exec_user_name" />
<result property="execNickName" column="exec_nick_name" />
<result property="execOrg" column="exec_org" />
<result property="sessions" column="sessions" />
<result property="amount" column="amount" />
<result property="remark" column="remark" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<id property="assignId" column="assign_id" />
<result property="projectId" column="project_id" />
<result property="executionUnitId" column="execution_unit_id" />
<result property="execUserId" column="exec_user_id" />
<result property="sessions" column="sessions" />
<result property="amount" column="amount" />
<result property="remark" column="remark" />
<result property="status" column="status" />
<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 assign_id, project_id, exec_user_id, exec_user_name, exec_nick_name, exec_org,
sessions, amount, remark, status, create_by, create_time, update_by, update_time
select assign_id, project_id, execution_unit_id, exec_user_id,
sessions, amount, remark, status,
create_by, create_time, update_by, update_time
from biz_project_assign
</sql>
@@ -39,57 +38,60 @@
<include refid="selectFields"/>
<where>
<if test="projectId != null"> and project_id = #{projectId}</if>
<if test="executionUnitId != null"> and execution_unit_id = #{executionUnitId}</if>
<if test="execUserId != null"> and exec_user_id = #{execUserId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
order by assign_id desc
</select>
<!--
INSERT: execution_unit_id 由 service 层从 exec_user_id 反查 biz_org 写入 (NOT NULL)
audit 字段 createBy/createTime/updateBy/updateTime 由 service 层从 SecurityUtils 写入
-->
<insert id="insert" parameterType="BizProjectAssign">
insert into biz_project_assign
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="assignId != null">assign_id,</if>
<if test="assignId != null and assignId != ''">assign_id,</if>
<if test="projectId != null">project_id,</if>
<if test="executionUnitId != null">execution_unit_id,</if>
<if test="execUserId != null">exec_user_id,</if>
<if test="execUserName != null and execUserName != ''">exec_user_name,</if>
<if test="execNickName != null and execNickName != ''">exec_nick_name,</if>
<if test="execOrg != null and execOrg != ''">exec_org,</if>
<if test="sessions != null">sessions,</if>
<if test="amount != null">amount,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time,
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assignId != null">#{assignId},</if>
<if test="assignId != null and assignId != ''">#{assignId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="executionUnitId != null">#{executionUnitId},</if>
<if test="execUserId != null">#{execUserId},</if>
<if test="execUserName != null and execUserName != ''">#{execUserName},</if>
<if test="execNickName != null and execNickName != ''">#{execNickName},</if>
<if test="execOrg != null and execOrg != ''">#{execOrg},</if>
<if test="sessions != null">#{sessions},</if>
<if test="amount != null">#{amount},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate(),
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateByPrimaryKey" parameterType="BizProjectAssign">
update biz_project_assign
<trim prefix="SET" suffixOverrides=",">
<if test="executionUnitId != null">execution_unit_id = #{executionUnitId},</if>
<if test="execUserId != null">exec_user_id = #{execUserId},</if>
<if test="execUserName != null and execUserName != ''">exec_user_name = #{execUserName},</if>
<if test="execNickName != null and execNickName != ''">exec_nick_name = #{execNickName},</if>
<if test="execOrg != null and execOrg != ''">exec_org = #{execOrg},</if>
<if test="sessions != null">sessions = #{sessions},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate(),
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where assign_id = #{assignId}
</update>
@@ -101,4 +103,4 @@
<delete id="deleteByProjectId" parameterType="Long">
delete from biz_project_assign where project_id = #{projectId}
</delete>
</mapper>
</mapper>
@@ -13,16 +13,16 @@
<result property="paidLaborAmount" column="paid_labor_amount" />
<result property="paidMeetingAmount" column="paid_meeting_amount" />
<result property="ratingScore" column="rating_score" />
<result property="ratingQ1" column="rating_q1" />
<result property="ratingQ2" column="rating_q2" />
<result property="ratingQ3" column="rating_q3" />
<result property="ratingQ4" column="rating_q4" />
<result property="sponsorAdminUserName" column="sponsor_admin_user_name" />
<result property="sponsorAdminUserId" column="sponsor_admin_user_id" />
<result property="leadUserId" column="lead_user_id" />
<result property="leadUserName" column="lead_user_name" />
<result property="isBidProject" column="is_bid_project" />
<result property="sponsorOrgName" column="sponsor_org_name" />
<result property="execOrgNames" column="exec_org_names" />
<result property="projectForm" column="project_form" />
<result property="isFinished" column="is_finished" />
<result property="isSettled" column="is_settled" />
<result property="sponsorAdminUserId" column="sponsor_admin_user_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
@@ -36,35 +36,39 @@
<result property="invitationUrl" column="invitation_url" />
<result property="supportLetterUrl" column="support_letter_url" />
<result property="publishUrl" column="publish_url" />
<result property="noticeUrl" column="notice_url" />
<result property="scheduleUrl" column="schedule_url" />
<result property="isPublished" column="is_published" />
<result property="publishTime" column="publish_time" />
<result property="announcementType" column="announcement_type" />
</resultMap>
<sql id="selectFields">
select project_id, project_no, project_name, total_sessions, done_sessions, todo_sessions, total_amount, available_amount, paid_labor_amount, paid_meeting_amount, rating_score, rating_q1, rating_q2, rating_q3, rating_q4, sponsor_admin_user_name, project_form, is_finished, is_settled, sponsor_admin_user_id, create_by, create_time, update_by, update_time, manage_fee, start_time, end_time, submit_deadline_days, support_contract_url, execute_contract_url, invitation_url, support_letter_url, publish_url, notice_url, schedule_url, is_published, publish_time, announcement_type
from biz_project
select p.project_id, p.project_no, p.project_name, p.total_sessions, p.done_sessions, p.todo_sessions, p.total_amount, p.available_amount, p.paid_labor_amount, p.paid_meeting_amount, p.rating_score, p.sponsor_admin_user_name, p.project_form, p.is_finished, p.is_settled, p.sponsor_admin_user_id, p.lead_user_id, p.is_bid_project, p.create_by, p.create_time, p.update_by, p.update_time, p.manage_fee, p.start_time, p.end_time, p.submit_deadline_days, p.support_contract_url, p.execute_contract_url, p.invitation_url, p.support_letter_url, p.publish_url,
o.org_name as sponsor_org_name,
lu.user_name as lead_user_name,
(select group_concat(distinct o2.org_name separator ',')
from biz_project_assign bpa
join biz_org o2 on o2.org_id = bpa.execution_unit_id and o2.org_type = 'executor'
where bpa.project_id = p.project_id) as exec_org_names
from biz_project p
left join biz_org o on o.user_id = p.sponsor_admin_user_id and o.org_type = 'sponsor'
left join sys_user lu on lu.user_id = p.lead_user_id
</sql>
<!-- sponsor 端专属查询: 字段 = selectFields + LEFT JOIN 当前 login 用户对该项目的评分 -->
<!-- sponsor 端专属查询: selectFields 等价 (sponsor 评分改走 biz_project_rating 子表, 这里只查项目本体) -->
<sql id="selectFieldsForSponsor">
select p.project_id, p.project_no, p.project_name, p.total_sessions, p.done_sessions, p.todo_sessions,
p.total_amount, p.available_amount, p.paid_labor_amount, p.paid_meeting_amount,
p.sponsor_admin_user_name, p.project_form, p.is_finished, p.is_settled,
p.sponsor_admin_user_id,
p.rating_score, p.sponsor_admin_user_name, p.project_form, p.is_finished, p.is_settled,
p.sponsor_admin_user_id, p.lead_user_id, p.is_bid_project,
p.create_by, p.create_time, p.update_by, p.update_time, p.manage_fee,
p.start_time, p.end_time, p.submit_deadline_days,
p.support_contract_url, p.execute_contract_url, p.invitation_url, p.support_letter_url,
p.publish_url, p.notice_url, p.schedule_url, p.is_published, p.publish_time, p.announcement_type,
bps.sponsor_rating as sponsor_rating,
bps.sponsor_q1 as sponsor_q1,
bps.sponsor_q2 as sponsor_q2,
bps.sponsor_q3 as sponsor_q3,
bps.sponsor_q4 as sponsor_q4,
bps.sponsor_remark as sponsor_remark
p.publish_url,
o.org_name as sponsor_org_name,
lu.user_name as lead_user_name,
(select group_concat(distinct o2.org_name separator ',')
from biz_project_assign bpa
join biz_org o2 on o2.org_id = bpa.execution_unit_id and o2.org_type = 'executor'
where bpa.project_id = p.project_id) as exec_org_names
from biz_project p
left join biz_project_sponsor bps on bps.project_id = p.project_id and bps.user_id = #{params.loginUid}
left join biz_org o on o.user_id = p.sponsor_admin_user_id and o.org_type = 'sponsor'
left join sys_user lu on lu.user_id = p.lead_user_id
</sql>
<select id="selectByPrimaryKey" resultMap="BizProjectResult" parameterType="String">
<include refid="selectFields"/>
@@ -107,29 +111,28 @@
<if test="projectNo != null and projectNo != ''">and project_no like concat('%', #{projectNo}, '%')</if>
<if test="projectName != null and projectName != ''">and project_name like concat('%', #{projectName}, '%')</if>
<if test="projectForm != null and projectForm != ''">and project_form = #{projectForm}</if>
<if test="sponsorAdminUserName != null and sponsorAdminUserName != ''">
<if test="sponsorOrgName != null and sponsorOrgName != ''">
and exists (
select 1 from sys_user su
where su.user_id = sponsor_admin_user_id
and su.role_type = 'sponsor'
and (su.user_name like concat('%', #{sponsorAdminUserName}, '%')
or su.nick_name like concat('%', #{sponsorAdminUserName}, '%'))
select 1 from biz_org o
where o.user_id = sponsor_admin_user_id
and o.org_type = 'sponsor'
and o.org_name like concat('%', #{sponsorOrgName}, '%')
)
</if>
<if test="execOrgName != null and execOrgName != ''">
and exists (
select 1 from biz_project_assign bpa
join biz_org o2 on o2.org_id = bpa.execution_unit_id and o2.org_type = 'executor'
join sys_user su on su.user_id = bpa.exec_user_id
where bpa.project_id = project_id
and su.role_type = 'executor'
and (su.user_name like concat('%', #{execOrgName}, '%')
or su.nick_name like concat('%', #{execOrgName}, '%')
or bpa.exec_org like concat('%', #{execOrgName}, '%'))
and (o2.org_name like concat('%', #{execOrgName}, '%')
or su.user_name like concat('%', #{execOrgName}, '%')
or su.nick_name like concat('%', #{execOrgName}, '%'))
)
</if>
<if test="isFinished != null and isFinished != ''">and is_finished = #{isFinished}</if>
<if test="isSettled != null and isSettled != ''">and is_settled = #{isSettled}</if>
<if test="isPublished != null and isPublished != ''">and is_published = #{isPublished}</if>
</where>
order by project_id desc
</select>
@@ -147,15 +150,13 @@
<if test="paidLaborAmount != null">paid_labor_amount,</if>
<if test="paidMeetingAmount != null">paid_meeting_amount,</if>
<if test="ratingScore != null">rating_score,</if>
<if test="ratingQ1 != null">rating_q1,</if>
<if test="ratingQ2 != null">rating_q2,</if>
<if test="ratingQ3 != null">rating_q3,</if>
<if test="ratingQ4 != null">rating_q4,</if>
<if test="sponsorAdminUserName != null and sponsorAdminUserName != ''">sponsor_admin_user_name,</if>
<if test="projectForm != null and projectForm != ''">project_form,</if>
<if test="isFinished != null and isFinished != ''">is_finished,</if>
<if test="isSettled != null and isSettled != ''">is_settled,</if>
<if test="sponsorAdminUserId != null">sponsor_admin_user_id,</if>
<if test="leadUserId != null">lead_user_id,</if>
<if test="isBidProject != null and isBidProject != ''">is_bid_project,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@@ -169,11 +170,6 @@
<if test="invitationUrl != null and invitationUrl != ''">invitation_url,</if>
<if test="supportLetterUrl != null and supportLetterUrl != ''">support_letter_url,</if>
<if test="publishUrl != null and publishUrl != ''">publish_url,</if>
<if test="noticeUrl != null and noticeUrl != ''">notice_url,</if>
<if test="scheduleUrl != null and scheduleUrl != ''">schedule_url,</if>
<if test="isPublished != null and isPublished != ''">is_published,</if>
<if test="publishTime != null">publish_time,</if>
<if test="announcementType != null and announcementType != ''">announcement_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectId != null and projectId != ''">#{projectId},</if>
@@ -187,15 +183,13 @@
<if test="paidLaborAmount != null">#{paidLaborAmount},</if>
<if test="paidMeetingAmount != null">#{paidMeetingAmount},</if>
<if test="ratingScore != null">#{ratingScore},</if>
<if test="ratingQ1 != null">#{ratingQ1},</if>
<if test="ratingQ2 != null">#{ratingQ2},</if>
<if test="ratingQ3 != null">#{ratingQ3},</if>
<if test="ratingQ4 != null">#{ratingQ4},</if>
<if test="sponsorAdminUserName != null and sponsorAdminUserName != ''">#{sponsorAdminUserName},</if>
<if test="projectForm != null and projectForm != ''">#{projectForm},</if>
<if test="isFinished != null and isFinished != ''">#{isFinished},</if>
<if test="isSettled != null and isSettled != ''">#{isSettled},</if>
<if test="sponsorAdminUserId != null">#{sponsorAdminUserId},</if>
<if test="leadUserId != null">#{leadUserId},</if>
<if test="isBidProject != null and isBidProject != ''">#{isBidProject},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
@@ -209,11 +203,6 @@
<if test="invitationUrl != null and invitationUrl != ''">#{invitationUrl},</if>
<if test="supportLetterUrl != null and supportLetterUrl != ''">#{supportLetterUrl},</if>
<if test="publishUrl != null and publishUrl != ''">#{publishUrl},</if>
<if test="noticeUrl != null and noticeUrl != ''">#{noticeUrl},</if>
<if test="scheduleUrl != null and scheduleUrl != ''">#{scheduleUrl},</if>
<if test="isPublished != null and isPublished != ''">#{isPublished},</if>
<if test="publishTime != null">#{publishTime},</if>
<if test="announcementType != null and announcementType != ''">#{announcementType},</if>
</trim>
</insert>
<update id="updateByPrimaryKey" parameterType="BizProject">
@@ -228,11 +217,6 @@
<if test="invitationUrl != null and invitationUrl != ''">invitation_url = #{invitationUrl},</if>
<if test="supportLetterUrl != null and supportLetterUrl != ''">support_letter_url = #{supportLetterUrl},</if>
<if test="publishUrl != null and publishUrl != ''">publish_url = #{publishUrl},</if>
<if test="noticeUrl != null and noticeUrl != ''">notice_url = #{noticeUrl},</if>
<if test="scheduleUrl != null and scheduleUrl != ''">schedule_url = #{scheduleUrl},</if>
<if test="isPublished != null and isPublished != ''">is_published = #{isPublished},</if>
<if test="publishTime != null">publish_time = #{publishTime},</if>
<if test="announcementType != null and announcementType != ''">announcement_type = #{announcementType},</if>
<if test="projectNo != null and projectNo != ''">project_no = #{projectNo},</if>
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
<if test="totalSessions != null">total_sessions = #{totalSessions},</if>
@@ -243,15 +227,13 @@
<if test="paidLaborAmount != null">paid_labor_amount = #{paidLaborAmount},</if>
<if test="paidMeetingAmount != null">paid_meeting_amount = #{paidMeetingAmount},</if>
<if test="ratingScore != null">rating_score = #{ratingScore},</if>
<if test="ratingQ1 != null">rating_q1 = #{ratingQ1},</if>
<if test="ratingQ2 != null">rating_q2 = #{ratingQ2},</if>
<if test="ratingQ3 != null">rating_q3 = #{ratingQ3},</if>
<if test="ratingQ4 != null">rating_q4 = #{ratingQ4},</if>
<if test="sponsorAdminUserName != null and sponsorAdminUserName != ''">sponsor_admin_user_name = #{sponsorAdminUserName},</if>
<if test="projectForm != null and projectForm != ''">project_form = #{projectForm},</if>
<if test="isFinished != null and isFinished != ''">is_finished = #{isFinished},</if>
<if test="isSettled != null and isSettled != ''">is_settled = #{isSettled},</if>
<if test="sponsorAdminUserId != null">sponsor_admin_user_id = #{sponsorAdminUserId},</if>
<if test="leadUserId != null">lead_user_id = #{leadUserId},</if>
<if test="isBidProject != null and isBidProject != ''">is_bid_project = #{isBidProject},</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>
@@ -22,7 +22,7 @@
(#{projectId}, #{sponsorUserId}, #{monitorUserId}, #{assignDesc}, #{assignPoints}, #{createBy}, sysdate())
</insert>
<!-- 按 project_id 全删 (赞助方分配策略: 一个项目只分配一个 sponsor, 先删后插) -->
<!-- 按 project_id 全删 (支持方分配策略: 一个项目只分配一个 sponsor, 先删后插) -->
<delete id="deleteByProjectId" parameterType="String">
delete from biz_project_sponsor_assign where project_id = #{projectId}
</delete>
@@ -0,0 +1,37 @@
<?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.BizSysUserQueryMapper">
<resultMap type="SysUserExtendVo" id="BizSysUserResult">
<id property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="nickName" column="nick_name" />
<result property="accountType" column="account_type" />
<result property="roleType" column="role_type" />
<result property="phonenumber" column="phonenumber" />
<result property="email" column="email" />
<result property="status" column="status" />
</resultMap>
<!--
业务模块专用: 按 sys_user.role_type 查用户列表 (项目负责人 / 执行方 下拉)
不注入 ${params.dataScope}, 避免被当前用户权限过滤 (manager 没 system:user:list 会被清空)
限定 status='0' + del_flag='0', 排除停用/删除账号
-->
<select id="selectActiveByRole" parameterType="SysUserExtendVo" resultMap="BizSysUserResult">
select u.user_id, u.user_name, u.nick_name, u.account_type, u.role_type,
u.phonenumber, u.email, u.status
from sys_user u
where u.del_flag = '0'
and u.status = '0'
and u.role_type = #{roleType}
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
</if>
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
order by u.user_id asc
</select>
</mapper>