会销组+会销
This commit is contained in:
@@ -20,15 +20,33 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_exhibition_group
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="listByCreator" resultType="com.cool.store.dto.exhibition.MyExhibitionGroupDTO">
|
||||
select
|
||||
eg.id as id ,
|
||||
eg.exhibition_group_name as exhibitionGroupName,
|
||||
eg.closed as closed,
|
||||
eg.creator as createId,
|
||||
eu.name as createName,
|
||||
eu.mobile as mobile
|
||||
from hy_exhibition_group eg
|
||||
left join enterprise_user eu on eg.creator = eu.user_id
|
||||
where eg.deleted = 0
|
||||
<if test="userId!=null and userId!=''">
|
||||
and eg.creator = #{userId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
order by eg.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from hy_exhibition_group
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyExhibitionGroupDO">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyExhibitionGroupDO" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into hy_exhibition_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="exhibitionGroupName != null">
|
||||
|
||||
@@ -125,6 +125,34 @@
|
||||
#{collaborators,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="records.id" useGeneratedKeys="true">
|
||||
insert into hy_exhibition
|
||||
(
|
||||
exhibition_group_id,
|
||||
exhibition_code,
|
||||
exhibition_name,
|
||||
start_date,
|
||||
location,
|
||||
collaborators,
|
||||
creator
|
||||
)
|
||||
values
|
||||
<foreach collection="records" item="record" separator=",">
|
||||
(
|
||||
#{record.exhibitionGroupId},
|
||||
#{record.exhibitionCode},
|
||||
#{record.exhibitionName},
|
||||
#{record.startDate},
|
||||
#{record.location},
|
||||
#{record.collaborators},
|
||||
#{record.creator}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
|
||||
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyExhibitionDO">
|
||||
update hy_exhibition
|
||||
@@ -171,6 +199,102 @@
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="batchUpdate">
|
||||
update hy_exhibition
|
||||
set
|
||||
exhibition_name = CASE id
|
||||
<foreach collection="records" item="record">
|
||||
WHEN #{record.id} THEN #{record.exhibitionName}
|
||||
</foreach>
|
||||
END,
|
||||
location = CASE id
|
||||
<foreach collection="records" item="record">
|
||||
WHEN #{record.id} THEN #{record.location}
|
||||
</foreach>
|
||||
END,
|
||||
updater = CASE id
|
||||
<foreach collection="records" item="record">
|
||||
WHEN #{record.id} THEN #{record.updater}
|
||||
</foreach>
|
||||
END,
|
||||
collaborators = CASE id
|
||||
<foreach collection="records" item="record">
|
||||
WHEN #{record.id} THEN #{record.collaborators}
|
||||
</foreach>
|
||||
END
|
||||
where id in
|
||||
<foreach collection="records" item="record" open="(" separator="," close=")">
|
||||
#{record.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getExhibitionListByUserId" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
,
|
||||
TIMESTAMPDIFF(second,now(),start_date) AS tst
|
||||
from hy_exhibition
|
||||
<where>
|
||||
<if test="startDate != null and startDate!='' ">
|
||||
and start_date = #{startDate}
|
||||
</if>
|
||||
<if test="closedType != null and closedType==0 ">
|
||||
and closed_type = #{closedType}
|
||||
</if>
|
||||
<if test="closedType != null and closedType==1 ">
|
||||
and closed_type in (1,2)
|
||||
</if>
|
||||
<if test="userId != null and userId!='' ">
|
||||
and (creator = #{userId} or collaborators like CONCAT('%,', #{userId} ,',%'))
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
if(tst >= 0, 0, 1),
|
||||
if(tst <![CDATA[ < ]]> 0, abs(tst), tst ),id desc
|
||||
</select>
|
||||
|
||||
<select id="listByExhibitionGroupIds" resultType="com.cool.store.dto.exhibition.ExhibitionDTO">
|
||||
select
|
||||
id as id ,
|
||||
exhibition_group_id as exhibitionGroupId,
|
||||
start_date as startDate,
|
||||
close_time as closeTime,
|
||||
location as location,
|
||||
exhibition_name as exhibitionName,
|
||||
collaborators as collaboratorStr
|
||||
from hy_exhibition
|
||||
<where>
|
||||
<foreach collection="list" item="groupId" open="and exhibition_group_id in (" separator="," close=")">
|
||||
#{groupId}
|
||||
</foreach>
|
||||
</where>
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="exhibitionStatistic" resultType="com.cool.store.dto.exhibition.ExhibitionStatisticsDTO">
|
||||
select
|
||||
exhibition_code as exhibitionCode,
|
||||
COALESCE(count(1),0) as signUpCount,
|
||||
COALESCE(sum( CASE WHEN participation_status = 1 THEN 1 ELSE 0 END ),0) as checkInCount,
|
||||
COALESCE(sum( CASE WHEN participation_status = 2 THEN 1 ELSE 0 END ),0) as formFillCount,
|
||||
COALESCE(sum( CASE WHEN participation_status in (3,4,5,6) THEN 1 ELSE 0 END ),0) as interviewCount
|
||||
from hy_partner_exhibition
|
||||
<where>
|
||||
<foreach collection="list" item="code" open="and exhibition_code in (" separator="," close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</where>
|
||||
group by exhibition_code
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<sql id="dynamicQuery">
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||
<if test="null != id">
|
||||
|
||||
@@ -33,6 +33,20 @@
|
||||
delete from hy_partner_exhibition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
|
||||
<select id="getExhibitionLine" resultType="com.cool.store.dto.exhibition.ExhibitionLineDTO">
|
||||
select
|
||||
hpe.partner_id as partnerId,
|
||||
hpe.exhibition_code as exhibitionCode,
|
||||
pu.username as partnerName,
|
||||
pu.mobile as mobile
|
||||
from hy_partner_exhibition hpe left join hy_partner_user_info pu on hpe.partner_id = pu.partner_id
|
||||
where hpe.participation_status != 7
|
||||
<if test="exhibitionCode != null and exhibitionCode!=''">
|
||||
and hpe.exhibition_code = #{exhibitionCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyPartnerExhibitionDO">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
|
||||
Reference in New Issue
Block a user