批量推送
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
<?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.BizArticleMapper">
|
||||
<resultMap id="BaseResultMap" type="BizArticle">
|
||||
<id property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="type" column="type" />
|
||||
<result property="content" column="content" />
|
||||
<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" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFields">
|
||||
select id, title, type, content, status, create_by, create_time, update_by, update_time, remark
|
||||
from biz_article
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="Long" resultMap="BaseResultMap">
|
||||
<include refid="selectFields"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectList" parameterType="BizArticle" resultMap="BaseResultMap">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by type asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectByType" parameterType="String" resultMap="BaseResultMap">
|
||||
<include refid="selectFields"/>
|
||||
where type = #{type} and status = '0'
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizArticle" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into biz_article
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
create_time,
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
update_time,
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
sysdate(),
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
sysdate(),
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizArticle">
|
||||
update biz_article
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="Long">
|
||||
delete from biz_article where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPrimaryKeys" parameterType="Long[]">
|
||||
delete from biz_article where id in
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -17,12 +17,12 @@
|
||||
<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="sponsorAdminUserName" column="sponsor_admin_user_name" />
|
||||
<result property="sponsorAdminUserId" column="sponsor_admin_user_id" />
|
||||
<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="sponsorAdminUserId" column="sponsor_admin_user_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@@ -43,7 +43,7 @@
|
||||
<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
|
||||
select project_id, project_no, project_name, total_sessions, done_sessions, todo_sessions, total_amount, available_amount, paid_labor_amount, paid_meeting_amount, rating_score, rating_q1, rating_q2, rating_q3, rating_q4, sponsor_admin_user_name, project_form, is_finished, is_settled, sponsor_admin_user_id, create_by, create_time, update_by, update_time, manage_fee, start_time, end_time, submit_deadline_days, support_contract_url, execute_contract_url, invitation_url, support_letter_url, publish_url, notice_url, schedule_url, is_published, publish_time, announcement_type
|
||||
from biz_project
|
||||
</sql>
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
<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.sponsor_admin_user_name, p.project_form, p.is_finished, p.is_settled,
|
||||
p.sponsor_admin_user_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,
|
||||
@@ -107,8 +107,26 @@
|
||||
<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="sponsorAdminUserName != null and sponsorAdminUserName != ''">
|
||||
and exists (
|
||||
select 1 from sys_user su
|
||||
where su.user_id = sponsor_admin_user_id
|
||||
and su.role_type = 'sponsor'
|
||||
and (su.user_name like concat('%', #{sponsorAdminUserName}, '%')
|
||||
or su.nick_name like concat('%', #{sponsorAdminUserName}, '%'))
|
||||
)
|
||||
</if>
|
||||
<if test="execOrgName != null and execOrgName != ''">
|
||||
and exists (
|
||||
select 1 from biz_project_assign bpa
|
||||
join sys_user su on su.user_id = bpa.exec_user_id
|
||||
where bpa.project_id = project_id
|
||||
and su.role_type = 'executor'
|
||||
and (su.user_name like concat('%', #{execOrgName}, '%')
|
||||
or su.nick_name like concat('%', #{execOrgName}, '%')
|
||||
or bpa.exec_org like concat('%', #{execOrgName}, '%'))
|
||||
)
|
||||
</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>
|
||||
@@ -133,12 +151,11 @@
|
||||
<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="sponsorAdminUserName != null and sponsorAdminUserName != ''">sponsor_admin_user_name,</if>
|
||||
<if test="projectForm != null and projectForm != ''">project_form,</if>
|
||||
<if test="isFinished != null and isFinished != ''">is_finished,</if>
|
||||
<if test="isSettled != null and isSettled != ''">is_settled,</if>
|
||||
<if test="orgId != null">org_id,</if>
|
||||
<if test="sponsorAdminUserId != null">sponsor_admin_user_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@@ -174,12 +191,11 @@
|
||||
<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="sponsorAdminUserName != null and sponsorAdminUserName != ''">#{sponsorAdminUserName},</if>
|
||||
<if test="projectForm != null and projectForm != ''">#{projectForm},</if>
|
||||
<if test="isFinished != null and isFinished != ''">#{isFinished},</if>
|
||||
<if test="isSettled != null and isSettled != ''">#{isSettled},</if>
|
||||
<if test="orgId != null">#{orgId},</if>
|
||||
<if test="sponsorAdminUserId != null">#{sponsorAdminUserId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@@ -231,12 +247,11 @@
|
||||
<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="sponsorAdminUserName != null and sponsorAdminUserName != ''">sponsor_admin_user_name = #{sponsorAdminUserName},</if>
|
||||
<if test="projectForm != null and projectForm != ''">project_form = #{projectForm},</if>
|
||||
<if test="isFinished != null and isFinished != ''">is_finished = #{isFinished},</if>
|
||||
<if test="isSettled != null and isSettled != ''">is_settled = #{isSettled},</if>
|
||||
<if test="orgId != null">org_id = #{orgId},</if>
|
||||
<if test="sponsorAdminUserId != null">sponsor_admin_user_id = #{sponsorAdminUserId},</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>
|
||||
|
||||
@@ -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.BizSpecialPlanMapper">
|
||||
<resultMap id="BaseResultMap" type="BizSpecialPlan">
|
||||
<id property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="contentType" column="content_type" />
|
||||
<result property="content" column="content" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="sortOrder" column="sort_order" />
|
||||
<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" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFields">
|
||||
select id, title, content_type, content, file_url, sort_order, status,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from biz_special_plan
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="Long" resultMap="BaseResultMap">
|
||||
<include refid="selectFields"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 公开: 仅启用 (status=0), 按 sort_order 升序 -->
|
||||
<select id="selectPublicList" resultMap="BaseResultMap">
|
||||
<include refid="selectFields"/>
|
||||
where status = '0'
|
||||
order by sort_order asc, create_time asc
|
||||
</select>
|
||||
|
||||
<!-- 后台管理: 支持 title/status 模糊/精确 -->
|
||||
<select id="selectList" parameterType="BizSpecialPlan" resultMap="BaseResultMap">
|
||||
<include refid="selectFields"/>
|
||||
<where>
|
||||
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
|
||||
<if test="contentType != null and contentType != ''"> and content_type = #{contentType}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by sort_order asc, id asc
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizSpecialPlan" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into biz_special_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="contentType != null and contentType != ''">content_type,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="sortOrder != null">sort_order,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
create_time,
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
update_time,
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="contentType != null and contentType != ''">#{contentType},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="sortOrder != null">#{sortOrder},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
sysdate(),
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
sysdate(),
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizSpecialPlan">
|
||||
update biz_special_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="contentType != null and contentType != ''">content_type = #{contentType},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="Long">
|
||||
delete from biz_special_plan where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPrimaryKeys" parameterType="Long[]">
|
||||
delete from biz_special_plan where id in
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user