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)
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
<?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.BizDepartmentMapper">
|
||||
<resultMap type="BizDepartment" id="BizDepartmentResult">
|
||||
<id property="deptId" column="dept_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="sort" column="sort" />
|
||||
<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 d.dept_id, d.name, d.sort, d.status,
|
||||
d.create_by, d.create_time, d.update_by, d.update_time
|
||||
from biz_department d
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BizDepartmentResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where d.dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BizDepartmentResult" parameterType="BizDepartment">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and d.name like concat('%', #{name}, '%')</if>
|
||||
<if test="status != null and status != ''"> and d.status = #{status}</if>
|
||||
</where>
|
||||
order by d.sort asc, d.dept_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectActive" resultMap="BizDepartmentResult">
|
||||
<include refid="selectFields"/>
|
||||
where d.status = '0'
|
||||
order by d.sort asc, d.dept_id asc
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizDepartment" useGeneratedKeys="true" keyProperty="deptId">
|
||||
insert into biz_department
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time,
|
||||
update_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate(),
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizDepartment">
|
||||
update biz_department
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where dept_id = #{deptId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="Long">
|
||||
delete from biz_department where dept_id = #{deptId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPrimaryKeys" parameterType="Long">
|
||||
delete from biz_department where dept_id in
|
||||
<foreach collection="array" item="deptId" open="(" separator="," close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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.BizDoctorTitleMapper">
|
||||
<resultMap type="BizDoctorTitle" id="BizDoctorTitleResult">
|
||||
<id property="titleId" column="title_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="sort" column="sort" />
|
||||
<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 t.title_id, t.name, t.sort, t.status,
|
||||
t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from biz_doctor_title t
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BizDoctorTitleResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where t.title_id = #{titleId}
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BizDoctorTitleResult" parameterType="BizDoctorTitle">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and t.name like concat('%', #{name}, '%')</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
</where>
|
||||
order by t.sort asc, t.title_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectActive" resultMap="BizDoctorTitleResult">
|
||||
<include refid="selectFields"/>
|
||||
where t.status = '0'
|
||||
order by t.sort asc, t.title_id asc
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizDoctorTitle" useGeneratedKeys="true" keyProperty="titleId">
|
||||
insert into biz_doctor_title
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time,
|
||||
update_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate(),
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizDoctorTitle">
|
||||
update biz_doctor_title
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where title_id = #{titleId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="Long">
|
||||
delete from biz_doctor_title where title_id = #{titleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPrimaryKeys" parameterType="Long">
|
||||
delete from biz_doctor_title where title_id in
|
||||
<foreach collection="array" item="titleId" open="(" separator="," close=")">
|
||||
#{titleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,218 @@
|
||||
<?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.BizExpertMapper">
|
||||
<resultMap type="BizExpert" id="BizExpertResult">
|
||||
<id property="expertId" column="expert_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="region" column="region" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="workUnit" column="work_unit" />
|
||||
<result property="department" column="department" />
|
||||
<result property="title" column="title" />
|
||||
<result property="practiceCertUrl" column="practice_cert_url" />
|
||||
<result property="titleCertUrl" column="title_cert_url" />
|
||||
<result property="bankCard" column="bank_card" />
|
||||
<result property="bankName" column="bank_name" />
|
||||
<result property="bankProvince" column="bank_province" />
|
||||
<result property="bankCity" column="bank_city" />
|
||||
<result property="bankAddress" column="bank_address" />
|
||||
<result property="idCardFrontUrl" column="id_card_front_url" />
|
||||
<result property="idCardBackUrl" column="id_card_back_url" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="auditBy" column="audit_by" />
|
||||
<result property="auditTime" column="audit_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 expert_id, user_id, name, phone, region, id_card, work_unit, department, title, practice_cert_url, title_cert_url, bank_card, bank_name, bank_province, bank_city, bank_address, id_card_front_url, id_card_back_url, audit_status, audit_by, audit_time, create_by, create_time, update_by, update_time
|
||||
from biz_expert
|
||||
</sql>
|
||||
<select id="selectByUserId" resultMap="BizExpertResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where user_id = #{userId} limit 1
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BizExpertResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where expert_id = #{expertId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizExpertResult" parameterType="BizExpert">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="department != null and department != ''"> and department = #{department}</if>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
</where>
|
||||
order by expert_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizExpert">
|
||||
insert into biz_expert
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="expertId != null and expertId != ''">expert_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="region != null">region,</if>
|
||||
<if test="idCard != null">id_card,</if>
|
||||
<if test="workUnit != null">work_unit,</if>
|
||||
<if test="department != null">department,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="idCardFrontUrl != null">id_card_front_url,</if>
|
||||
<if test="idCardBackUrl != null">id_card_back_url,</if>
|
||||
<if test="practiceCertUrl != null">practice_cert_url,</if>
|
||||
<if test="titleCertUrl != null">title_cert_url,</if>
|
||||
<if test="bankCard != null">bank_card,</if>
|
||||
<if test="bankName != null">bank_name,</if>
|
||||
<if test="bankProvince != null">bank_province,</if>
|
||||
<if test="bankCity != null">bank_city,</if>
|
||||
<if test="bankAddress != null">bank_address,</if>
|
||||
<if test="auditStatus != null">audit_status,</if>
|
||||
<if test="auditBy != null">audit_by,</if>
|
||||
<if test="auditTime != null">audit_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="expertId != null and expertId != ''">#{expertId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="region != null">#{region},</if>
|
||||
<if test="idCard != null">#{idCard},</if>
|
||||
<if test="workUnit != null">#{workUnit},</if>
|
||||
<if test="department != null">#{department},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="idCardFrontUrl != null">#{idCardFrontUrl},</if>
|
||||
<if test="idCardBackUrl != null">#{idCardBackUrl},</if>
|
||||
<if test="practiceCertUrl != null">#{practiceCertUrl},</if>
|
||||
<if test="titleCertUrl != null">#{titleCertUrl},</if>
|
||||
<if test="bankCard != null">#{bankCard},</if>
|
||||
<if test="bankName != null">#{bankName},</if>
|
||||
<if test="bankProvince != null">#{bankProvince},</if>
|
||||
<if test="bankCity != null">#{bankCity},</if>
|
||||
<if test="bankAddress != null">#{bankAddress},</if>
|
||||
<if test="auditStatus != null">#{auditStatus},</if>
|
||||
<if test="auditBy != null">#{auditBy},</if>
|
||||
<if test="auditTime != null">#{auditTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByUserId" parameterType="BizExpert">
|
||||
update biz_expert
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="workUnit != null">work_unit = #{workUnit},</if>
|
||||
<if test="department != null">department = #{department},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="region != null">region = #{region},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="bankCard != null">bank_card = #{bankCard},</if>
|
||||
<if test="bankName != null">bank_name = #{bankName},</if>
|
||||
<if test="bankProvince != null">bank_province = #{bankProvince},</if>
|
||||
<if test="bankCity != null">bank_city = #{bankCity},</if>
|
||||
<if test="bankAddress != null">bank_address = #{bankAddress},</if>
|
||||
<if test="idCardFrontUrl != null">id_card_front_url = #{idCardFrontUrl},</if>
|
||||
<if test="idCardBackUrl != null">id_card_back_url = #{idCardBackUrl},</if>
|
||||
<if test="practiceCertUrl != null">practice_cert_url = #{practiceCertUrl},</if>
|
||||
<if test="titleCertUrl != null">title_cert_url = #{titleCertUrl},</if>
|
||||
<if test="auditOpinion != null">audit_opinion = #{auditOpinion},</if>
|
||||
<if test="auditBy != null">audit_by = #{auditBy},</if>
|
||||
<if test="auditTime != null">audit_time = #{auditTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
<insert id="insertWithUserId" parameterType="BizExpert">
|
||||
insert into biz_expert
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="expertId != null">expert_id,</if>
|
||||
user_id,
|
||||
<if test="name != null">name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="workUnit != null">work_unit,</if>
|
||||
<if test="department != null">department,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="region != null">region,</if>
|
||||
<if test="idCard != null">id_card,</if>
|
||||
<if test="bankCard != null">bank_card,</if>
|
||||
<if test="bankName != null">bank_name,</if>
|
||||
<if test="bankProvince != null">bank_province,</if>
|
||||
<if test="bankCity != null">bank_city,</if>
|
||||
<if test="bankAddress != null">bank_address,</if>
|
||||
<if test="idCardFrontUrl != null">id_card_front_url,</if>
|
||||
<if test="idCardBackUrl != null">id_card_back_url,</if>
|
||||
<if test="practiceCertUrl != null">practice_cert_url,</if>
|
||||
<if test="titleCertUrl != null">title_cert_url,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="expertId != null">#{expertId},</if>
|
||||
#{userId},
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="workUnit != null">#{workUnit},</if>
|
||||
<if test="department != null">#{department},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="region != null">#{region},</if>
|
||||
<if test="idCard != null">#{idCard},</if>
|
||||
<if test="bankCard != null">#{bankCard},</if>
|
||||
<if test="bankName != null">#{bankName},</if>
|
||||
<if test="bankProvince != null">#{bankProvince},</if>
|
||||
<if test="bankCity != null">#{bankCity},</if>
|
||||
<if test="bankAddress != null">#{bankAddress},</if>
|
||||
<if test="idCardFrontUrl != null">#{idCardFrontUrl},</if>
|
||||
<if test="idCardBackUrl != null">#{idCardBackUrl},</if>
|
||||
<if test="practiceCertUrl != null">#{practiceCertUrl},</if>
|
||||
<if test="titleCertUrl != null">#{titleCertUrl},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizExpert">
|
||||
update biz_expert
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null and userId != ''">user_id = #{userId},</if>
|
||||
<if test="workUnit != null and workUnit != ''">work_unit = #{workUnit},</if>
|
||||
<if test="region != null and region != ''">region = #{region},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="bankCard != null and bankCard != ''">bank_card = #{bankCard},</if>
|
||||
<if test="bankName != null and bankName != ''">bank_name = #{bankName},</if>
|
||||
<if test="bankProvince != null and bankProvince != ''">bank_province = #{bankProvince},</if>
|
||||
<if test="bankCity != null and bankCity != ''">bank_city = #{bankCity},</if>
|
||||
<if test="bankAddress != null and bankAddress != ''">bank_address = #{bankAddress},</if>
|
||||
<if test="idCardFrontUrl != null and idCardFrontUrl != ''">id_card_front_url = #{idCardFrontUrl},</if>
|
||||
<if test="idCardBackUrl != null and idCardBackUrl != ''">id_card_back_url = #{idCardBackUrl},</if>
|
||||
<if test="practiceCertUrl != null and practiceCertUrl != ''">practice_cert_url = #{practiceCertUrl},</if>
|
||||
<if test="titleCertUrl != null and titleCertUrl != ''">title_cert_url = #{titleCertUrl},</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''">audit_opinion = #{auditOpinion},</if>
|
||||
<if test="auditBy != null and auditBy != ''">audit_by = #{auditBy},</if>
|
||||
<if test="auditTime != null and auditTime != ''">audit_time = #{auditTime},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="department != null">department = #{department},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
</trim>
|
||||
where expert_id = #{expertId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_expert where expert_id = #{expertId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_expert where expert_id in
|
||||
<foreach collection="expertIds" item="expertId" open="(" separator="," close=")">
|
||||
#{expertId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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.BizInvitationMapper">
|
||||
<resultMap type="BizInvitation" id="BizInvitationResult">
|
||||
<result property="title" column="title" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">select invite_id as ann_id, title from biz_invitation</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizInvitationResult" parameterType="String">
|
||||
<include refid="selectFields"/> where invite_id = #{annId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizInvitationResult" parameterType="BizInvitation">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test='title != null and title != ""'>title = #{title}</if>
|
||||
<if test='meetingName != null and meetingName != ""'>meeting_name = #{meetingName}</if>
|
||||
<if test='expertName != null and expertName != ""'>expert_name = #{expertName}</if>
|
||||
<if test='content != null and content != ""'>content = #{content}</if>
|
||||
<if test='createBy != null and createBy != ""'>create_by = #{createBy}</if>
|
||||
<if test='updateBy != null and updateBy != ""'>update_by = #{updateBy}</if>
|
||||
</where>
|
||||
order by invite_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizInvitation">
|
||||
insert into biz_invitation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="annId != null and annId != ''">ann_id,</if>
|
||||
<if test="title != null">title,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="annId != null and annId != ''">#{annId},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizInvitation">
|
||||
update biz_invitation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
|
||||
<if test="projectNo != null and projectNo != ''">project_no = #{projectNo},</if>
|
||||
<if test="templateUrl != null and templateUrl != ''">template_url = #{templateUrl},</if>
|
||||
<if test="qrCodeUrl != null and qrCodeUrl != ''">qr_code_url = #{qrCodeUrl},</if>
|
||||
<if test="shareUrl != null and shareUrl != ''">share_url = #{shareUrl},</if>
|
||||
<if test="publishTime != null and publishTime != ''">publish_time = #{publishTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
</trim>
|
||||
where invite_id = #{annId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_invitation where invite_id = #{annId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_invitation where invite_id in
|
||||
<foreach collection="annIds" item="annId" open="(" separator="," close=")">
|
||||
#{annId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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.BizLaborVoucherMapper">
|
||||
<resultMap type="BizLaborVoucher" id="BizLaborVoucherResult">
|
||||
<id property="voucherId" column="voucher_id" />
|
||||
<result property="voucherNo" column="voucher_no" />
|
||||
<result property="meetingName" column="meeting_name" />
|
||||
<result property="expertName" column="expert_name" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="bankAccount" column="bank_account" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="submitDate" column="submit_date" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">
|
||||
select voucher_id, voucher_no, meeting_name, expert_name, id_card, bank_account, amount, submit_date, audit_status, create_by, create_time, update_by, update_time
|
||||
from biz_labor_voucher
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizLaborVoucherResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where voucher_id = #{voucherId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizLaborVoucherResult" parameterType="BizLaborVoucher">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="amount != null"> and amount = #{amount}</if>
|
||||
</where>
|
||||
order by voucher_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizLaborVoucher">
|
||||
insert into biz_labor_voucher
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="voucherId != null and voucherId != ''">voucher_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="voucherId != null and voucherId != ''">#{voucherId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizLaborVoucher">
|
||||
update biz_labor_voucher
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="voucherNo != null and voucherNo != ''">voucher_no = #{voucherNo},</if>
|
||||
<if test="meetingId != null and meetingId != ''">meeting_id = #{meetingId},</if>
|
||||
<if test="meetingName != null and meetingName != ''">meeting_name = #{meetingName},</if>
|
||||
<if test="expertName != null and expertName != ''">expert_name = #{expertName},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">bank_account = #{bankAccount},</if>
|
||||
<if test="submitDate != null and submitDate != ''">submit_date = #{submitDate},</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''">audit_opinion = #{auditOpinion},</if>
|
||||
<if test="auditBy != null and auditBy != ''">audit_by = #{auditBy},</if>
|
||||
<if test="auditTime != null and auditTime != ''">audit_time = #{auditTime},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
</trim>
|
||||
where voucher_id = #{voucherId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_labor_voucher where voucher_id = #{voucherId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_labor_voucher where voucher_id in
|
||||
<foreach collection="voucherIds" item="voucherId" open="(" separator="," close=")">
|
||||
#{voucherId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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.BizMeetingMapper">
|
||||
<resultMap type="BizMeeting" id="BizMeetingResult">
|
||||
<id property="meetingId" column="meeting_id" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="projectForm" column="project_form" />
|
||||
<result property="meetingName" column="meeting_name" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="totalPeriods" column="total_periods" />
|
||||
<result property="periodNo" column="period_no" />
|
||||
<result property="currentStage" column="current_stage" />
|
||||
<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 meeting_id, project_no, business_id, project_form, meeting_name, start_time, end_time, total_periods, period_no, current_stage, create_by, create_time, update_by, update_time
|
||||
from biz_meeting
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizMeetingResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where meeting_id = #{meetingId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizMeetingResult" parameterType="BizMeeting">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
</where>
|
||||
order by meeting_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizMeeting">
|
||||
insert into biz_meeting
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="meetingId != null and meetingId != ''">meeting_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="meetingId != null and meetingId != ''">#{meetingId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizMeeting">
|
||||
update biz_meeting
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="businessId != null and businessId != ''">business_id = #{businessId},</if>
|
||||
<if test="projectId != null and projectId != ''">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="meetingName != null and meetingName != ''">meeting_name = #{meetingName},</if>
|
||||
<if test="periodNo != null and periodNo != ''">period_no = #{periodNo},</if>
|
||||
<if test="totalPeriods != null and totalPeriods != ''">total_periods = #{totalPeriods},</if>
|
||||
<if test="projectForm != null and projectForm != ''">project_form = #{projectForm},</if>
|
||||
<if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
|
||||
<if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
|
||||
<if test="orgName != null and orgName != ''">org_name = #{orgName},</if>
|
||||
<if test="currentStage != null and currentStage != ''">current_stage = #{currentStage},</if>
|
||||
<if test="supervisionOpinion != null and supervisionOpinion != ''">supervision_opinion = #{supervisionOpinion},</if>
|
||||
<if test="supervisionBy != null and supervisionBy != ''">supervision_by = #{supervisionBy},</if>
|
||||
<if test="supervisionTime != null and supervisionTime != ''">supervision_time = #{supervisionTime},</if>
|
||||
<if test="invitationUrl != null and invitationUrl != ''">invitation_url = #{invitationUrl},</if>
|
||||
<if test="scheduleUrl != null and scheduleUrl != ''">schedule_url = #{scheduleUrl},</if>
|
||||
<if test="laborSigned != null and laborSigned != ''">labor_signed = #{laborSigned},</if>
|
||||
</trim>
|
||||
where meeting_id = #{meetingId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_meeting where meeting_id = #{meetingId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_meeting where meeting_id in
|
||||
<foreach collection="meetingIds" item="meetingId" open="(" separator="," close=")">
|
||||
#{meetingId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
<?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.BizMeetingSettlementMapper">
|
||||
<resultMap type="BizMeetingSettlement" id="BizMeetingSettlementResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="meetingId" column="meeting_id" />
|
||||
<result property="feeType" column="fee_type" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="qty" column="qty" />
|
||||
<result property="subtotal" column="subtotal" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="settlementType" column="settlement_type" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">
|
||||
select id, project_no, meeting_id, fee_type, unit_price, qty, subtotal, remark, audit_status, settlement_type, create_by, create_time, update_by, update_time
|
||||
from biz_meeting_settlement
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizMeetingSettlementResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizMeetingSettlementResult" parameterType="BizMeetingSettlement">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="qty != null"> and qty = #{qty}</if>
|
||||
<if test="subtotal != null"> and subtotal = #{subtotal}</if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizMeetingSettlement">
|
||||
insert into biz_meeting_settlement
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="qty != null">qty,</if>
|
||||
<if test="subtotal != null">subtotal,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="qty != null">#{qty},</if>
|
||||
<if test="subtotal != null">#{subtotal},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizMeetingSettlement">
|
||||
update biz_meeting_settlement
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="meetingId != null and meetingId != ''">meeting_id = #{meetingId},</if>
|
||||
<if test="projectNo != null and projectNo != ''">project_no = #{projectNo},</if>
|
||||
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
|
||||
<if test="execUnit != null and execUnit != ''">exec_unit = #{execUnit},</if>
|
||||
<if test="feeType != null and feeType != ''">fee_type = #{feeType},</if>
|
||||
<if test="unitPrice != null and unitPrice != ''">unit_price = #{unitPrice},</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
|
||||
<if test="settlementType != null and settlementType != ''">settlement_type = #{settlementType},</if>
|
||||
<if test="qty != null">qty = #{qty},</if>
|
||||
<if test="subtotal != null">subtotal = #{subtotal},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_meeting_settlement where id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_meeting_settlement where id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,131 @@
|
||||
<?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.BizMessageMapper">
|
||||
<resultMap type="BizMessage" id="BizMessageResult">
|
||||
<id property="msgId" column="msg_id" />
|
||||
<result property="receiverUserId" column="receiver_user_id" />
|
||||
<result property="msgType" column="msg_type" />
|
||||
<result property="title" column="title" />
|
||||
<result property="content" column="content" />
|
||||
<result property="bizType" column="biz_type" />
|
||||
<result property="bizId" column="biz_id" />
|
||||
<result property="isRead" column="is_read" />
|
||||
<result property="readTime" column="read_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" />
|
||||
<result property="receiverName" column="receiver_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFields">
|
||||
select m.msg_id, m.receiver_user_id, m.msg_type, m.title, m.content, m.biz_type, m.biz_id,
|
||||
m.is_read, m.read_time, m.create_by, m.create_time, m.update_by, m.update_time,
|
||||
u.user_name as receiver_name
|
||||
from biz_message m
|
||||
left join sys_user u on u.user_id = m.receiver_user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BizMessageResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where m.msg_id = #{msgId}
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BizMessageResult" parameterType="BizMessage">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="receiverUserId != null"> and m.receiver_user_id = #{receiverUserId}</if>
|
||||
<if test="msgType != null and msgType != ''"> and m.msg_type = #{msgType}</if>
|
||||
<if test="isRead != null and isRead != ''"> and m.is_read = #{isRead}</if>
|
||||
<if test="bizType != null and bizType != ''"> and m.biz_type = #{bizType}</if>
|
||||
<if test="title != null and title != ''"> and m.title like concat('%', #{title}, '%')</if>
|
||||
</where>
|
||||
order by m.msg_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectMyRecent" resultMap="BizMessageResult" parameterType="BizMessage">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
m.receiver_user_id = #{receiverUserId}
|
||||
</where>
|
||||
order by m.is_read asc, m.msg_id desc
|
||||
<if test="params.limit != null">
|
||||
limit #{params.limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizMessage" useGeneratedKeys="true" keyProperty="msgId">
|
||||
insert into biz_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="msgId != null">msg_id,</if>
|
||||
<if test="receiverUserId != null">receiver_user_id,</if>
|
||||
<if test="msgType != null and msgType != ''">msg_type,</if>
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="bizType != null and bizType != ''">biz_type,</if>
|
||||
<if test="bizId != null">biz_id,</if>
|
||||
<if test="isRead != null and isRead != ''">is_read,</if>
|
||||
<if test="readTime != null">read_time,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
update_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="msgId != null">#{msgId},</if>
|
||||
<if test="receiverUserId != null">#{receiverUserId},</if>
|
||||
<if test="msgType != null and msgType != ''">#{msgType},</if>
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="bizType != null and bizType != ''">#{bizType},</if>
|
||||
<if test="bizId != null">#{bizId},</if>
|
||||
<if test="isRead != null and isRead != ''">#{isRead},</if>
|
||||
<if test="readTime != null">#{readTime},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizMessage">
|
||||
update biz_message
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="receiverUserId != null">receiver_user_id = #{receiverUserId},</if>
|
||||
<if test="msgType != null and msgType != ''">msg_type = #{msgType},</if>
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="bizType != null and bizType != ''">biz_type = #{bizType},</if>
|
||||
<if test="bizId != null">biz_id = #{bizId},</if>
|
||||
<if test="isRead != null and isRead != ''">is_read = #{isRead},</if>
|
||||
<if test="readTime != null">read_time = #{readTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where msg_id = #{msgId}
|
||||
</update>
|
||||
|
||||
<update id="markRead" parameterType="BizMessage">
|
||||
update biz_message
|
||||
set is_read = '1', read_time = sysdate(), update_time = sysdate()
|
||||
where msg_id = #{msgId}
|
||||
and receiver_user_id = #{receiverUserId}
|
||||
and is_read = '0'
|
||||
</update>
|
||||
|
||||
<update id="markAllRead" parameterType="Long">
|
||||
update biz_message
|
||||
set is_read = '1', read_time = sysdate(), update_time = sysdate()
|
||||
where receiver_user_id = #{receiverUserId}
|
||||
and is_read = '0'
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="Long">
|
||||
delete from biz_message where msg_id = #{msgId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPrimaryKeys" parameterType="Long">
|
||||
delete from biz_message where msg_id in
|
||||
<foreach collection="array" item="msgId" open="(" separator="," close=")">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?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.BizOrgMapper">
|
||||
<resultMap type="BizOrg" id="BizOrgResult">
|
||||
<id property="orgId" column="org_id" />
|
||||
<result property="orgName" column="org_name" />
|
||||
<result property="orgType" column="org_type" />
|
||||
<result property="businessNature" column="business_nature" />
|
||||
<result property="address" column="address" />
|
||||
<result property="taxNo" column="tax_no" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="contactPhone" column="contact_phone" />
|
||||
<result property="intentCount" column="intent_count" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFields">
|
||||
select org_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
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BizOrgResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where org_id = #{orgId}
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BizOrgResult" parameterType="BizOrg">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<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>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by org_id desc
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizOrg" useGeneratedKeys="true" keyProperty="orgId">
|
||||
insert into biz_org
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<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>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="taxNo != null and taxNo != ''">tax_no,</if>
|
||||
<if test="contactName != null and contactName != ''">contact_name,</if>
|
||||
<if test="contactPhone != null and contactPhone != ''">contact_phone,</if>
|
||||
<if test="intentCount != null">intent_count,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orgName != null and orgName != ''">#{orgName},</if>
|
||||
<if test="orgType != null and orgType != ''">#{orgType},</if>
|
||||
<if test="businessNature != null and businessNature != ''">#{businessNature},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="taxNo != null and taxNo != ''">#{taxNo},</if>
|
||||
<if test="contactName != null and contactName != ''">#{contactName},</if>
|
||||
<if test="contactPhone != null and contactPhone != ''">#{contactPhone},</if>
|
||||
<if test="intentCount != null">#{intentCount},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizOrg">
|
||||
update biz_org
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<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>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="taxNo != null">tax_no = #{taxNo},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
||||
<if test="intentCount != null">intent_count = #{intentCount},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where org_id = #{orgId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKeys" parameterType="Long">
|
||||
delete from biz_org where org_id in
|
||||
<foreach collection="array" item="orgId" open="(" separator="," close=")">
|
||||
#{orgId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,160 @@
|
||||
<?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.BizPersonMapper">
|
||||
<resultMap type="BizPerson" id="BizPersonResult">
|
||||
<id property="personId" column="person_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="orgId" column="org_id" />
|
||||
<result property="orgName" column="org_name" />
|
||||
<result property="orgType" column="org_type" />
|
||||
<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" />
|
||||
<result property="parentUserId" column="parent_user_id" />
|
||||
<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 person_id, name, phone, org_id, department, position, role, unit_type, status, del_flag, user_id, create_by, create_time, update_by, update_time
|
||||
from biz_person
|
||||
</sql>
|
||||
|
||||
<!-- 通用列表: LEFT JOIN biz_org 取公司名/类型, LEFT JOIN sys_user 取账号类型 -->
|
||||
<sql id="selectFieldsWithAccount">
|
||||
select p.person_id, p.name, p.phone, p.org_id, o.org_name, o.org_type,
|
||||
p.department, p.position, p.role, p.unit_type, p.status, p.del_flag, p.user_id,
|
||||
p.create_by, p.create_time, p.update_by, p.update_time,
|
||||
u.account_type, u.parent_user_id, u.del_flag as user_del_flag
|
||||
from biz_person p
|
||||
left join biz_org o on p.org_id = o.org_id
|
||||
left join sys_user u on p.user_id = u.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BizPersonResult" parameterType="String">
|
||||
<include refid="selectFieldsWithAccount"/>
|
||||
where p.person_id = #{personId}
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BizPersonResult" parameterType="BizPerson">
|
||||
<include refid="selectFieldsWithAccount"/>
|
||||
<where>
|
||||
p.del_flag = '0'
|
||||
<if test="unitType != null and unitType != ''"> and p.unit_type = #{unitType}</if>
|
||||
<if test="name != null and name != ''"> and p.name = #{name}</if>
|
||||
<if test="phone != null and phone != ''"> and p.phone = #{phone}</if>
|
||||
<if test="orgId != null"> and p.org_id = #{orgId}</if>
|
||||
<if test="orgType != null and orgType != ''"> and o.org_type = #{orgType}</if>
|
||||
<if test="department != null and department != ''"> and p.department = #{department}</if>
|
||||
<if test="position != null and position != ''"> and p.position = #{position}</if>
|
||||
<if test="role != null and role != ''"> and p.role = #{role}</if>
|
||||
<if test="status != null and status != ''"> and p.status = #{status}</if>
|
||||
<if test="parentUserId != null"> and u.parent_user_id = #{parentUserId}</if>
|
||||
</where>
|
||||
order by p.person_id desc
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizPerson">
|
||||
insert into biz_person
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="personId != null and personId != ''">person_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="orgId != null">org_id,</if>
|
||||
<if test="department != null">department,</if>
|
||||
<if test="position != null">position,</if>
|
||||
<if test="role != null">role,</if>
|
||||
<if test="unitType != null">unit_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time,
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
update_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="personId != null and personId != ''">#{personId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="orgId != null">#{orgId},</if>
|
||||
<if test="department != null">#{department},</if>
|
||||
<if test="position != null">#{position},</if>
|
||||
<if test="role != null">#{role},</if>
|
||||
<if test="unitType != null">#{unitType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate(),
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizPerson">
|
||||
update biz_person
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null and userId != ''">user_id = #{userId},</if>
|
||||
<if test="orgId != null">org_id = #{orgId},</if>
|
||||
<if test="unitType != null and unitType != ''">unit_type = #{unitType},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="department != null">department = #{department},</if>
|
||||
<if test="position != null">position = #{position},</if>
|
||||
<if test="role != null">role = #{role},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where person_id = #{personId}
|
||||
</update>
|
||||
|
||||
<!-- 逻辑删除: 设 del_flag='1', 同时联动把关联 sys_user 子账号也逻辑删除 -->
|
||||
<update id="deleteByPrimaryKey" parameterType="String">
|
||||
update biz_person set del_flag='1', update_time=sysdate()
|
||||
where person_id = #{personId} and del_flag='0'
|
||||
</update>
|
||||
<update id="deleteByPrimaryKeys" parameterType="String">
|
||||
update biz_person set del_flag='1', update_time=sysdate()
|
||||
where del_flag='0' and person_id in
|
||||
<foreach collection="personIds" item="personId" open="(" separator="," close=")">
|
||||
#{personId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 联动: 把 personIds 对应的 sys_user 子账号也逻辑删除 -->
|
||||
<update id="softDeleteSysUserByPersonIds" parameterType="String">
|
||||
update sys_user u inner join biz_person p on u.user_id = p.user_id
|
||||
set u.del_flag='1'
|
||||
where u.del_flag='0' and p.del_flag='1' and p.person_id in
|
||||
<foreach collection="personIds" item="personId" open="(" separator="," close=")">
|
||||
#{personId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- sponsor 专属: 通过 biz_person.user_id 关联 sys_user, 利用 sys_user.parent_user_id 过滤主账号归属 -->
|
||||
<!-- INNER JOIN 自然过滤掉 user_id=NULL 的游离 person (不算员工) -->
|
||||
<select id="selectSponsorList" resultMap="BizPersonResult" parameterType="BizPerson">
|
||||
<include refid="selectFieldsWithAccount"/>
|
||||
<where>
|
||||
p.del_flag = '0'
|
||||
and u.del_flag = '0'
|
||||
and p.unit_type = 'sponsor'
|
||||
and u.parent_user_id = #{params.sponsorOwnerUid}
|
||||
<if test="name != null and name != ''"> and p.name = #{name}</if>
|
||||
<if test="phone != null and phone != ''"> and p.phone = #{phone}</if>
|
||||
<if test="orgId != null"> and p.org_id = #{orgId}</if>
|
||||
<if test="department != null and department != ''"> and p.department = #{department}</if>
|
||||
<if test="position != null and position != ''"> and p.position = #{position}</if>
|
||||
<if test="role != null and role != ''"> and p.role = #{role}</if>
|
||||
<if test="status != null and status != ''"> and p.status = #{status}</if>
|
||||
</where>
|
||||
order by p.person_id desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?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.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" />
|
||||
</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
|
||||
from biz_project_assign
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BizProjectAssignResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where assign_id = #{assignId}
|
||||
</select>
|
||||
|
||||
<select id="selectByProjectId" resultMap="BizProjectAssignResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where project_id = #{projectId} and status = '0'
|
||||
order by assign_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BizProjectAssignResult" parameterType="BizProjectAssign">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="projectId != null"> and project_id = #{projectId}</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 id="insert" parameterType="BizProjectAssign">
|
||||
insert into biz_project_assign
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="assignId != null">assign_id,</if>
|
||||
<if test="projectId != null">project_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,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="assignId != null">#{assignId},</if>
|
||||
<if test="projectId != null">#{projectId},</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(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizProjectAssign">
|
||||
update biz_project_assign
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<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="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where assign_id = #{assignId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_project_assign where assign_id = #{assignId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByProjectId" parameterType="Long">
|
||||
delete from biz_project_assign where project_id = #{projectId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,256 @@
|
||||
<?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.BizProjectMapper">
|
||||
<resultMap type="BizProject" id="BizProjectResult">
|
||||
<id property="projectId" column="project_id" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="totalSessions" column="total_sessions" />
|
||||
<result property="doneSessions" column="done_sessions" />
|
||||
<result property="todoSessions" column="todo_sessions" />
|
||||
<result property="totalAmount" column="total_amount" />
|
||||
<result property="availableAmount" column="available_amount" />
|
||||
<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="orgName" column="org_name" />
|
||||
<result property="orgType" column="org_type" />
|
||||
<result property="projectForm" column="project_form" />
|
||||
<result property="isFinished" column="is_finished" />
|
||||
<result property="isSettled" column="is_settled" />
|
||||
<result property="orgId" column="org_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="manageFee" column="manage_fee" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="submitDeadlineDays" column="submit_deadline_days" />
|
||||
<result property="supportContractUrl" column="support_contract_url" />
|
||||
<result property="executeContractUrl" column="execute_contract_url" />
|
||||
<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, org_name, org_type, project_form, is_finished, is_settled, org_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
|
||||
</sql>
|
||||
|
||||
<!-- sponsor 端专属查询: 字段 = selectFields + LEFT JOIN 当前 login 用户对该项目的评分 -->
|
||||
<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.org_name, p.org_type, p.project_form, p.is_finished, p.is_settled,
|
||||
p.org_id,
|
||||
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
|
||||
from biz_project p
|
||||
left join biz_project_sponsor bps on bps.project_id = p.project_id and bps.user_id = #{params.loginUid}
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizProjectResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where project_id = #{projectId}
|
||||
</select>
|
||||
<!-- sponsor 专属列表 (走 params.projectIds + LEFT JOIN 当前 login 用户评分) -->
|
||||
<select id="selectSponsorList" resultMap="BizProjectResult" parameterType="BizProject">
|
||||
<include refid="selectFieldsForSponsor"/>
|
||||
<where>
|
||||
<if test="params.projectIds != null and params.projectIds.size() > 0">
|
||||
and p.project_id in
|
||||
<foreach collection="params.projectIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="projectNo != null and projectNo != ''">and p.project_no like concat('%', #{projectNo}, '%')</if>
|
||||
<if test="projectName != null and projectName != ''">and p.project_name like concat('%', #{projectName}, '%')</if>
|
||||
<if test="startTime != null and startTime != ''">and p.start_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''">and p.end_time <= #{endTime}</if>
|
||||
<if test="isFinished != null and isFinished != ''">and p.is_finished = #{isFinished}</if>
|
||||
</where>
|
||||
order by p.project_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BizProjectResult" parameterType="BizProject">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="params.projectIds != null and params.projectIds.size() > 0">
|
||||
and project_id in
|
||||
<foreach collection="params.projectIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.projectNos != null and params.projectNos.size() > 0">
|
||||
and project_no in
|
||||
<foreach collection="params.projectNos" item="no" open="(" separator="," close=")">
|
||||
#{no}
|
||||
</foreach>
|
||||
</if>
|
||||
<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="orgName != null and orgName != ''">and org_name like concat('%', #{orgName}, '%')</if>
|
||||
<if test="orgType != null and orgType != ''">and org_type = #{orgType}</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>
|
||||
<insert id="insert" parameterType="BizProject">
|
||||
insert into biz_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null and projectId != ''">project_id,</if>
|
||||
<if test="projectNo != null and projectNo != ''">project_no,</if>
|
||||
<if test="projectName != null and projectName != ''">project_name,</if>
|
||||
<if test="totalSessions != null">total_sessions,</if>
|
||||
<if test="doneSessions != null">done_sessions,</if>
|
||||
<if test="todoSessions != null">todo_sessions,</if>
|
||||
<if test="totalAmount != null">total_amount,</if>
|
||||
<if test="availableAmount != null">available_amount,</if>
|
||||
<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="orgName != null and orgName != ''">org_name,</if>
|
||||
<if test="orgType != null and orgType != ''">org_type,</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="orgId != null">org_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="manageFee != null">manage_fee,</if>
|
||||
<if test="startTime != null and startTime != ''">start_time,</if>
|
||||
<if test="endTime != null and endTime != ''">end_time,</if>
|
||||
<if test="submitDeadlineDays != null">submit_deadline_days,</if>
|
||||
<if test="supportContractUrl != null and supportContractUrl != ''">support_contract_url,</if>
|
||||
<if test="executeContractUrl != null and executeContractUrl != ''">execute_contract_url,</if>
|
||||
<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>
|
||||
<if test="projectNo != null and projectNo != ''">#{projectNo},</if>
|
||||
<if test="projectName != null and projectName != ''">#{projectName},</if>
|
||||
<if test="totalSessions != null">#{totalSessions},</if>
|
||||
<if test="doneSessions != null">#{doneSessions},</if>
|
||||
<if test="todoSessions != null">#{todoSessions},</if>
|
||||
<if test="totalAmount != null">#{totalAmount},</if>
|
||||
<if test="availableAmount != null">#{availableAmount},</if>
|
||||
<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="orgName != null and orgName != ''">#{orgName},</if>
|
||||
<if test="orgType != null and orgType != ''">#{orgType},</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="orgId != null">#{orgId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="manageFee != null">#{manageFee},</if>
|
||||
<if test="startTime != null and startTime != ''">#{startTime},</if>
|
||||
<if test="endTime != null and endTime != ''">#{endTime},</if>
|
||||
<if test="submitDeadlineDays != null">#{submitDeadlineDays},</if>
|
||||
<if test="supportContractUrl != null and supportContractUrl != ''">#{supportContractUrl},</if>
|
||||
<if test="executeContractUrl != null and executeContractUrl != ''">#{executeContractUrl},</if>
|
||||
<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">
|
||||
update biz_project
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="manageFee != null and manageFee != ''">manage_fee = #{manageFee},</if>
|
||||
<if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
|
||||
<if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
|
||||
<if test="submitDeadlineDays != null and submitDeadlineDays != ''">submit_deadline_days = #{submitDeadlineDays},</if>
|
||||
<if test="supportContractUrl != null and supportContractUrl != ''">support_contract_url = #{supportContractUrl},</if>
|
||||
<if test="executeContractUrl != null and executeContractUrl != ''">execute_contract_url = #{executeContractUrl},</if>
|
||||
<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>
|
||||
<if test="doneSessions != null">done_sessions = #{doneSessions},</if>
|
||||
<if test="todoSessions != null">todo_sessions = #{todoSessions},</if>
|
||||
<if test="totalAmount != null">total_amount = #{totalAmount},</if>
|
||||
<if test="availableAmount != null">available_amount = #{availableAmount},</if>
|
||||
<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="orgName != null and orgName != ''">org_name = #{orgName},</if>
|
||||
<if test="orgType != null and orgType != ''">org_type = #{orgType},</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="orgId != null">org_id = #{orgId},</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>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where project_id = #{projectId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_project where project_id = #{projectId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_project where project_id in
|
||||
<foreach collection="projectIds" item="projectId" open="(" separator="," close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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.BizProjectPlanMapper">
|
||||
<resultMap type="BizProjectPlan" id="BizProjectPlanResult">
|
||||
<id property="planId" column="plan_id" />
|
||||
<result property="planName" column="plan_name" />
|
||||
<result property="planDirection" column="plan_direction" />
|
||||
<result property="planCategory" column="plan_category" />
|
||||
<result property="projectForm" column="project_form" />
|
||||
<result property="designFileUrl" column="design_file_url" />
|
||||
<result property="status" column="status" />
|
||||
<result property="isSettled" column="is_settled" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<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>
|
||||
<sql id="selectFields">
|
||||
select plan_id, plan_name, plan_direction, plan_category, project_form, design_file_url, status, is_settled, project_no, remark, create_by, create_time, update_by, update_time
|
||||
from biz_project_plan
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizProjectPlanResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where plan_id = #{planId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizProjectPlanResult" parameterType="BizProjectPlan">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||
</where>
|
||||
order by plan_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizProjectPlan">
|
||||
insert into biz_project_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null and planId != ''">plan_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null and planId != ''">#{planId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizProjectPlan">
|
||||
update biz_project_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planName != null and planName != ''">plan_name = #{planName},</if>
|
||||
<if test="planDirection != null and planDirection != ''">plan_direction = #{planDirection},</if>
|
||||
<if test="planCategory != null and planCategory != ''">plan_category = #{planCategory},</if>
|
||||
<if test="projectForm != null and projectForm != ''">project_form = #{projectForm},</if>
|
||||
<if test="designFileUrl != null and designFileUrl != ''">design_file_url = #{designFileUrl},</if>
|
||||
<if test="isSettled != null and isSettled != ''">is_settled = #{isSettled},</if>
|
||||
<if test="projectNo != null and projectNo != ''">project_no = #{projectNo},</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''">audit_opinion = #{auditOpinion},</if>
|
||||
<if test="auditBy != null and auditBy != ''">audit_by = #{auditBy},</if>
|
||||
<if test="auditTime != null and auditTime != ''">audit_time = #{auditTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where plan_id = #{planId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_project_plan where plan_id = #{planId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_project_plan where plan_id in
|
||||
<foreach collection="planIds" item="planId" open="(" separator="," close=")">
|
||||
#{planId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?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.BizProjectRatingMapper">
|
||||
<resultMap type="BizProjectRating" id="BizProjectRatingResult">
|
||||
<id property="ratingId" column="rating_id" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="raterName" column="rater_name" />
|
||||
<result property="raterRole" column="rater_role" />
|
||||
<result property="qualityScore" column="quality_score" />
|
||||
<result property="responseScore" column="response_score" />
|
||||
<result property="cooperationScore" column="cooperation_score" />
|
||||
<result property="complianceScore" column="compliance_score" />
|
||||
<result property="totalScore" column="total_score" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">
|
||||
select rating_id, project_no, project_name, rater_name, rater_role, quality_score, response_score, cooperation_score, compliance_score, total_score, remark, create_by, create_time, update_by, update_time
|
||||
from biz_project_rating
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizProjectRatingResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where rating_id = #{ratingId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizProjectRatingResult" parameterType="BizProjectRating">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||
</where>
|
||||
order by rating_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizProjectRating">
|
||||
insert into biz_project_rating
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ratingId != null and ratingId != ''">rating_id,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ratingId != null and ratingId != ''">#{ratingId},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizProjectRating">
|
||||
update biz_project_rating
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null and projectId != ''">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="raterId != null and raterId != ''">rater_id = #{raterId},</if>
|
||||
<if test="raterName != null and raterName != ''">rater_name = #{raterName},</if>
|
||||
<if test="raterRole != null and raterRole != ''">rater_role = #{raterRole},</if>
|
||||
<if test="qualityScore != null and qualityScore != ''">quality_score = #{qualityScore},</if>
|
||||
<if test="responseScore != null and responseScore != ''">response_score = #{responseScore},</if>
|
||||
<if test="cooperationScore != null and cooperationScore != ''">cooperation_score = #{cooperationScore},</if>
|
||||
<if test="complianceScore != null and complianceScore != ''">compliance_score = #{complianceScore},</if>
|
||||
<if test="totalScore != null and totalScore != ''">total_score = #{totalScore},</if>
|
||||
<if test="ratingTime != null and ratingTime != ''">rating_time = #{ratingTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where rating_id = #{ratingId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_project_rating where rating_id = #{ratingId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_project_rating where rating_id in
|
||||
<foreach collection="ratingIds" item="ratingId" open="(" separator="," close=")">
|
||||
#{ratingId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 按 (project_id + rater_id + rater_role) upsert 评分 -->
|
||||
<insert id="upsertRating" parameterType="BizProjectRating">
|
||||
INSERT INTO biz_project_rating
|
||||
(project_id, project_no, project_name, rater_id, rater_name, rater_role,
|
||||
quality_score, response_score, cooperation_score, compliance_score, total_score,
|
||||
remark, create_by, create_time, update_by, update_time)
|
||||
VALUES
|
||||
(#{projectId}, #{projectNo}, #{projectName}, #{raterId}, #{raterName}, #{raterRole},
|
||||
#{qualityScore}, #{responseScore}, #{cooperationScore}, #{complianceScore}, #{totalScore},
|
||||
#{remark}, #{createBy}, sysdate(), #{updateBy}, sysdate())
|
||||
ON DUPLICATE KEY UPDATE
|
||||
project_no = VALUES(project_no),
|
||||
project_name = VALUES(project_name),
|
||||
rater_name = VALUES(rater_name),
|
||||
quality_score = VALUES(quality_score),
|
||||
response_score = VALUES(response_score),
|
||||
cooperation_score= VALUES(cooperation_score),
|
||||
compliance_score = VALUES(compliance_score),
|
||||
total_score = VALUES(total_score),
|
||||
remark = VALUES(remark),
|
||||
update_by = VALUES(update_by),
|
||||
update_time = sysdate()
|
||||
</insert>
|
||||
</mapper>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<?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.BizProjectSponsorAssignMapper">
|
||||
<resultMap id="BaseResultMap" type="BizProjectSponsorAssign">
|
||||
<id property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="sponsorUserId" column="sponsor_user_id" />
|
||||
<result property="monitorUserId" column="monitor_user_id" />
|
||||
<result property="assignDesc" column="assign_desc" />
|
||||
<result property="assignPoints" column="assign_points" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="sponsorUserName" column="sponsor_user_name" />
|
||||
<result property="monitorUserName" column="monitor_user_name" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertAssign" parameterType="BizProjectSponsorAssign" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO biz_project_sponsor_assign
|
||||
(project_id, sponsor_user_id, monitor_user_id, assign_desc, assign_points, create_by, create_time)
|
||||
VALUES
|
||||
(#{projectId}, #{sponsorUserId}, #{monitorUserId}, #{assignDesc}, #{assignPoints}, #{createBy}, sysdate())
|
||||
</insert>
|
||||
|
||||
<!-- 按 project_id 全删 (赞助方分配策略: 一个项目只分配一个 sponsor, 先删后插) -->
|
||||
<delete id="deleteByProjectId" parameterType="String">
|
||||
delete from biz_project_sponsor_assign where project_id = #{projectId}
|
||||
</delete>
|
||||
|
||||
<select id="selectByProjectId" resultMap="BaseResultMap">
|
||||
SELECT a.*,
|
||||
s.user_name AS sponsor_user_name,
|
||||
m.user_name AS monitor_user_name
|
||||
FROM biz_project_sponsor_assign a
|
||||
LEFT JOIN sys_user s ON a.sponsor_user_id = s.user_id
|
||||
LEFT JOIN sys_user m ON a.monitor_user_id = m.user_id
|
||||
WHERE a.project_id = #{projectId}
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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.BizResourceMapper">
|
||||
<resultMap type="BizResource" id="BizResourceResult">
|
||||
<id property="resourceId" column="resource_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="category" column="category" />
|
||||
<result property="fileSize" column="file_size" />
|
||||
<result property="uploaderName" column="uploader_name" />
|
||||
<result property="uploadTime" column="upload_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">
|
||||
select resource_id, name, category, file_size, uploader_name, upload_time, status, create_by, create_time, update_by, update_time
|
||||
from biz_resource
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizResourceResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where resource_id = #{resourceId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizResourceResult" parameterType="BizResource">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||
<if test="category != null and category != ''"> and category = #{category}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by resource_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizResource">
|
||||
insert into biz_resource
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="resourceId != null and resourceId != ''">resource_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="resourceId != null and resourceId != ''">#{resourceId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="category != null">#{category},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizResource">
|
||||
update biz_resource
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="category != null">category = #{category},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where resource_id = #{resourceId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_resource where resource_id = #{resourceId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_resource where resource_id in
|
||||
<foreach collection="resourceIds" item="resourceId" open="(" separator="," close=")">
|
||||
#{resourceId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?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.BizSubmissionMapper">
|
||||
<resultMap type="BizSubmission" id="BizSubmissionResult">
|
||||
<id property="subId" column="sub_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="direction" column="direction" />
|
||||
<result property="projectForm" column="project_form" />
|
||||
<result property="projectCategory" column="project_category" />
|
||||
<result property="designFileUrl" column="design_file_url" />
|
||||
<result property="submitterId" column="submitter_id" />
|
||||
<result property="submitterName" column="submitter_name" />
|
||||
<result property="status" column="status" />
|
||||
<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>
|
||||
<sql id="selectFields">
|
||||
select sub_id, title, direction, project_form, project_category, design_file_url, submitter_id, submitter_name, status, remark, create_by, create_time, update_by, update_time
|
||||
from biz_submission
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizSubmissionResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where sub_id = #{subId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizSubmissionResult" parameterType="BizSubmission">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="submitterId != null and submitterId != ''"> and submitter_id = #{submitterId}</if>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="direction != null and direction != ''"> and direction = #{direction}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||
</where>
|
||||
order by sub_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizSubmission">
|
||||
insert into biz_submission
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="subId != null and subId != ''">sub_id,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="direction != null">direction,</if>
|
||||
<if test="projectForm != null">project_form,</if>
|
||||
<if test="projectCategory != null">project_category,</if>
|
||||
<if test="designFileUrl != null">design_file_url,</if>
|
||||
<if test="submitterId != null">submitter_id,</if>
|
||||
<if test="submitterName != null">submitter_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time,
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
update_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="subId != null and subId != ''">#{subId},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="direction != null">#{direction},</if>
|
||||
<if test="projectForm != null">#{projectForm},</if>
|
||||
<if test="projectCategory != null">#{projectCategory},</if>
|
||||
<if test="designFileUrl != null">#{designFileUrl},</if>
|
||||
<if test="submitterId != null">#{submitterId},</if>
|
||||
<if test="submitterName != null">#{submitterName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate(),
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizSubmission">
|
||||
update biz_submission
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="submitterId != null and submitterId != ''">submitter_id = #{submitterId},</if>
|
||||
<if test="submitterName != null and submitterName != ''">submitter_name = #{submitterName},</if>
|
||||
<if test="projectForm != null and projectForm != ''">project_form = #{projectForm},</if>
|
||||
<if test="projectCategory != null and projectCategory != ''">project_category = #{projectCategory},</if>
|
||||
<if test="designFileUrl != null and designFileUrl != ''">design_file_url = #{designFileUrl},</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''">audit_opinion = #{auditOpinion},</if>
|
||||
<if test="auditBy != null and auditBy != ''">audit_by = #{auditBy},</if>
|
||||
<if test="auditTime != null and auditTime != ''">audit_time = #{auditTime},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="direction != null">direction = #{direction},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where sub_id = #{subId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_submission where sub_id = #{subId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_submission where sub_id in
|
||||
<foreach collection="subIds" item="subId" open="(" separator="," close=")">
|
||||
#{subId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?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.BizSupportIntentMapper">
|
||||
<resultMap type="BizSupportIntent" id="BizSupportIntentResult">
|
||||
<id property="intentId" column="intent_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="accountStatus" column="account_status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">
|
||||
select intent_id, project_no, project_name, name, work_unit, department, position, phone, account_status, create_by, create_time, update_by, update_time
|
||||
from biz_support_intent
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizSupportIntentResult" parameterType="String">
|
||||
<include refid="selectFields"/>
|
||||
where intent_id = #{intentId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizSupportIntentResult" parameterType="BizSupportIntent">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<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="BizSupportIntent">
|
||||
insert into biz_support_intent
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="intentId != null and intentId != ''">intent_id,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="intentId != null and intentId != ''">#{intentId},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizSupportIntent">
|
||||
update biz_support_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="accountStatus != null and accountStatus != ''">account_status = #{accountStatus},</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_support_intent where intent_id = #{intentId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_support_intent where intent_id in
|
||||
<foreach collection="intentIds" item="intentId" open="(" separator="," close=")">
|
||||
#{intentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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.BizSupportLetterMapper">
|
||||
<resultMap type="BizSupportLetter" id="BizSupportLetterResult">
|
||||
<result property="title" column="title" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">select letter_id as ann_id, title from biz_support_letter</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizSupportLetterResult" parameterType="String">
|
||||
<include refid="selectFields"/> where letter_id = #{annId}
|
||||
</select>
|
||||
<select id="selectList" resultMap="BizSupportLetterResult" parameterType="BizSupportLetter">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test='title != null and title != ""'>title = #{title}</if>
|
||||
<if test='content != null and content != ""'>content = #{content}</if>
|
||||
<if test='unitName != null and unitName != ""'>unit_name = #{unitName}</if>
|
||||
<if test='createBy != null and createBy != ""'>create_by = #{createBy}</if>
|
||||
<if test='updateBy != null and updateBy != ""'>update_by = #{updateBy}</if>
|
||||
</where>
|
||||
order by ann_id desc
|
||||
</select>
|
||||
<insert id="insert" parameterType="BizSupportLetter">
|
||||
insert into biz_support_letter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="annId != null and annId != ''">ann_id,</if>
|
||||
<if test="title != null">title,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="annId != null and annId != ''">#{annId},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizSupportLetter">
|
||||
update biz_support_letter
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
|
||||
<if test="projectNo != null and projectNo != ''">project_no = #{projectNo},</if>
|
||||
<if test="fileUrl != null and fileUrl != ''">file_url = #{fileUrl},</if>
|
||||
<if test="publishTime != null and publishTime != ''">publish_time = #{publishTime},</if>
|
||||
<if test="supportCount != null and supportCount != ''">support_count = #{supportCount},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
</trim>
|
||||
where letter_id = #{annId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
delete from biz_support_letter where letter_id = #{annId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
delete from biz_support_letter where letter_id in
|
||||
<foreach collection="annIds" item="annId" open="(" separator="," close=")">
|
||||
#{annId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user