<?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.panzhihua.service_community.dao.ComEventMapper">
|
<resultMap id="baseResult" type="com.panzhihua.service_community.entity.ComEvent">
|
<id property="id" column="id" />
|
<result property="orderSn" column="order_sn" />
|
<result property="requestUserId" column="request_user_id" />
|
<result property="userEventStatus" column="user_event_status" />
|
<result property="requestUserEventDes" column="request_user_event_des" />
|
<result property="requestUserName" column="request_user_name" />
|
<result property="requestUserTel" column="request_user_tel" />
|
<result property="eventCategory" column="event_category" />
|
<result property="type" column="type" />
|
<result property="submitDate" column="submit_date" />
|
<result property="appointmentTime" column="appointment_time" />
|
<result property="requestUserCommunity" column="request_user_community" />
|
<result property="centerId" column="center_id" />
|
<result property="centerTel" column="center_tel" />
|
<result property="specialistOrg" column="specialist_org" />
|
<result property="specialistLevel" column="specialist_level" />
|
<result property="specialistId" column="specialist_id" />
|
<result property="specialistName" column="specialist_name" />
|
<result property="specialistTel" column="specialist_tel" />
|
<result property="specialistAcceptTime" column="specialist_accept_time" />
|
<result property="revokeType" column="revoke_type" />
|
<result property="eventProcessStatus" column="event_process_status" />
|
<result property="currentProcessType" column="current_process_type" />
|
<result property="currentOrgId" column="current_org_id" />
|
<result property="currentOrgName" column="current_org_name" />
|
<result property="currentProcessUserId" column="current_process_user_id" />
|
<result property="currentProcessUserName" column="current_process_user_name" />
|
<result property="revokeDes" column="revoke_des" />
|
<result property="eventResult" column="event_result" />
|
<result property="eventSucceed" column="event_succeed" />
|
<result property="currentEventProcessResult" column="current_event_process_result" />
|
<result property="reportSuperior" column="report_superior" />
|
<result property="result" column="result" />
|
<result property="resultDate" column="result_date" />
|
<result property="urgent" column="urgent" />
|
<result property="difficult" column="difficult" />
|
<result property="urgentDell" column="urgent_dell" />
|
<result property="invalid" column="invalid" />
|
<result property="major" column="major" />
|
<result property="requestUserResponse" column="request_user_response" />
|
<result property="createBy" column="create_by" />
|
<result property="createAt" column="create_at" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateAt" column="update_at" />
|
|
</resultMap>
|
<sql id="columns">
|
id,order_sn,request_user_id,user_event_status,request_user_event_des,event_succeed,current_event_process_result,request_user_name,request_user_tel,event_category,type,submit_date,appointment_time,request_user_community,center_id,center_tel,specialist_org,specialist_level,specialist_id,specialist_name,specialist_tel,specialist_accept_time,revoke_type,event_process_status,current_process_type,current_org_id,current_org_name,current_process_user_id,current_process_user_name,revoke_des,event_result,report_superior,result,result_date,urgent,difficult,urgent_dell,invalid,major,request_user_response,create_by,create_at,update_by,update_at,report_level,report_community,report_street,report_center,report_hall,is_end
|
</sql>
|
|
<select id="pageByComEvent" resultType="com.panzhihua.service_community.entity.ComEvent">
|
SELECT <include refid="columns" />
|
FROM com_sanshuo_event_info
|
<where>
|
event_process_status !=9
|
AND app_id=#{comEvent.appId}
|
<if test="comEvent.communityId != null and comEvent.userType != 9">
|
AND request_user_community=#{comEvent.communityId}
|
</if>
|
<if test="comEvent.keyword != null and comEvent.keyword!=''" >
|
AND ( order_sn like concat ('%',#{comEvent.keyword},'%') or request_user_tel like concat ('%',#{comEvent.keyword},'%') or current_org_name like concat ('%',#{comEvent.keyword},'%'))
|
</if>
|
<if test="comEvent.startTime != null and comEvent.startTime != ''">
|
AND create_at between DATE_FORMAT(#{comEvent.startTime},'%Y-%m-%d 00:00:00') and DATE_FORMAT(#{comEvent.endTime},'%Y-%m-%d 00:00:00')
|
</if>
|
<if test="comEvent.createBy != null and comEvent.createBy!=''" >
|
AND create_by = #{comEvent.createBy}
|
</if>
|
<if test="comEvent.eventCategory != null">
|
AND event_category = #{comEvent.eventCategory}
|
</if>
|
<if test="comEvent.eventProcessStatus != null">
|
AND event_process_status = #{comEvent.eventProcessStatus}
|
</if>
|
<if test="comEvent.orderSn != null">
|
AND order_sn = #{comEvent.orderSn}
|
</if>
|
<if test="comEvent.requestUserTel != null">
|
AND request_user_tel = #{comEvent.requestUserTel}
|
</if>
|
<if test="comEvent.currentOrgName != null">
|
AND current_org_name = #{comEvent.currentOrgName}
|
</if>
|
<if test="comEvent.userType == 1">
|
AND request_user_id=#{comEvent.requestUserId}
|
</if>
|
<if test="comEvent.userType == 2">
|
AND specialist_id=#{comEvent.specialistId}
|
</if>
|
<if test="comEvent.userType == 3">
|
AND center_id=#{comEvent.centerId}
|
</if>
|
<if test="comEvent.userType == 4">
|
AND request_user_community=#{comEvent.communityId}
|
</if>
|
<if test="comEvent.userType == 5">
|
AND request_user_community in
|
<foreach collection="comEvent.communityIds" item="id" separator="," open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
<if test="comEvent.level != null and comEvent.level != ''">
|
<if test="comEvent.level == 1">
|
AND type=4 OR current_process_type=4
|
</if>
|
<if test="comEvent.searchId != null and comEvent.searchId != ''">
|
<if test="comEvent.level == 2">
|
AND center_id=#{comEvent.searchId} AND current_process_type in(1,5)
|
</if>
|
<if test="comEvent.level == 3">
|
AND request_user_community in (select community_id from com_act where street_id=#{comEvent.searchId})
|
AND current_process_type in (3,5)
|
</if>
|
<if test="comEvent.level == 4">
|
AND request_user_community=#{comEvent.searchId} AND current_process_type in (2,5)
|
</if>
|
</if>
|
</if>
|
</where>
|
order by create_at desc
|
</select>
|
<select id="pageByComEventExpert" resultType="com.panzhihua.service_community.entity.ComEvent">
|
SELECT <include refid="columns" />
|
FROM com_sanshuo_event_info
|
<where>
|
event_process_status !=9
|
AND app_id=#{comEvent.appId}
|
<if test="eventIds != null">
|
AND id in
|
<foreach collection="eventIds" item="id" separator="," open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
<if test="eventIds == null and comEvent.userType != 9">
|
AND request_user_community=#{comEvent.communityId}
|
</if>
|
<if test="comEvent.keyword != null and comEvent.keyword!=''" >
|
AND ( order_sn = #{comEvent.keyword} or request_user_tel =#{comEvent.keyword} or current_org_name=#{comEvent.keyword})
|
</if>
|
<if test="comEvent.createBy != null and comEvent.createBy!=''" >
|
AND create_by = #{comEvent.createBy}
|
</if>
|
<if test="comEvent.eventCategory != null">
|
AND event_category = #{comEvent.eventCategory}
|
</if>
|
<if test="comEvent.eventProcessStatus != null">
|
AND event_process_status = #{comEvent.eventProcessStatus}
|
</if>
|
<if test="comEvent.orderSn != null">
|
AND order_sn = #{comEvent.orderSn}
|
</if>
|
<if test="comEvent.requestUserTel != null">
|
AND request_user_tel = #{comEvent.requestUserTel}
|
</if>
|
<if test="comEvent.currentOrgName != null">
|
AND current_org_name = #{comEvent.currentOrgName}
|
</if>
|
<!--<if test="comEvent.userType == 1">-->
|
<!--AND request_user_id=#{comEvent.requestUserId}-->
|
<!--</if>-->
|
<!--<if test="comEvent.userType == 2">-->
|
<!--AND specialist_id=#{comEvent.specialistId}-->
|
<!--</if>-->
|
<!--<if test="comEvent.userType == 3">-->
|
<!--AND center_id=#{comEvent.centerId}-->
|
<!--</if>-->
|
<!--<if test="comEvent.userType == 4">-->
|
<!--AND request_user_community=#{comEvent.communityId}-->
|
<!--</if>-->
|
</where>
|
order by create_at desc
|
</select>
|
<select id="listEventIds" resultType="java.lang.Long">
|
select event_id from com_sanshuo_expert_event where expert_id=#{expertId} and (status=0 or status=1)
|
</select>
|
<select id="listByComEvent" resultType="com.panzhihua.service_community.entity.ComEvent">
|
SELECT <include refid="columns" />
|
FROM com_sanshuo_event_info
|
<if test="requestUserId != null and requestUserId != ''">
|
where request_user_id=#{requestUserId}
|
</if>
|
</select>
|
|
<select id="calculate" resultType="com.panzhihua.common.model.vos.sanshuo.ComEventCalculateVO">
|
select event_process_status as status ,count(1) as sum
|
from com_sanshuo_event_info
|
<where>
|
event_process_status not in (9)
|
AND app_id=#{comEvent.appId}
|
<if test="comEvent.userType == 1">
|
AND request_user_id=#{comEvent.requestUserId}
|
</if>
|
<if test="comEvent.userType == 2">
|
<if test="comEvent.eventIds != null">
|
AND id in
|
<foreach collection="comEvent.eventIds" item="id" separator="," open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
<if test="comEvent.eventIds == null">
|
AND request_user_community=#{comEvent.communityId}
|
</if>
|
|
</if>
|
<if test="comEvent.userType == 3">
|
AND center_id=#{comEvent.centerId}
|
</if>
|
<if test="comEvent.userType == 4">
|
AND request_user_community=#{comEvent.communityId}
|
</if>
|
<if test="comEvent.userType == 5">
|
AND request_user_community in
|
<foreach collection="comEvent.communityIds" item="id" separator="," open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
<if test="comEvent.level != null and comEvent.level != ''">
|
<if test="comEvent.level == 1">
|
AND current_process_type=4
|
</if>
|
<if test="comEvent.searchId != null and comEvent.searchId != ''">
|
<if test="comEvent.level == 2">
|
AND center_id=#{comEvent.searchId} AND current_process_type in(1,5)
|
</if>
|
<if test="comEvent.level == 3">
|
AND request_user_community in (select community_id from com_act where street_id=#{comEvent.searchId})
|
AND current_process_type in (3,5)
|
</if>
|
<if test="comEvent.level == 4">
|
AND request_user_community=#{comEvent.searchId} AND current_process_type in (2,5)
|
</if>
|
</if>
|
</if>
|
</where>
|
group by event_process_status
|
</select>
|
|
|
<select id="caculateSum" resultType="int">
|
select count(id) as sum
|
from com_sanshuo_event_info
|
<where>
|
event_process_status not in (9)
|
AND app_id=#{comEvent.appId}
|
<if test="comEvent.userType == 1">
|
AND request_user_id=#{comEvent.requestUserId}
|
</if>
|
<if test="comEvent.userType == 2">
|
<if test="comEvent.eventIds != null">
|
AND id in
|
<foreach collection="comEvent.eventIds" item="id" separator="," open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
<if test="comEvent.eventIds == null">
|
AND request_user_community=#{comEvent.communityId}
|
</if>
|
</if>
|
<if test="comEvent.userType == 3">
|
AND center_id=#{comEvent.centerId}
|
</if>
|
<if test="comEvent.userType == 4">
|
AND request_user_community=#{comEvent.communityId}
|
</if>
|
<if test="comEvent.userType == 5">
|
AND request_user_community in
|
<foreach collection="comEvent.communityIds" item="id" separator="," open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
<if test="comEvent.level != null and comEvent.level != ''">
|
<if test="comEvent.level == 1">
|
AND current_process_type=4
|
</if>
|
<if test="comEvent.searchId != null and comEvent.searchId != ''">
|
<if test="comEvent.level == 2">
|
AND center_id=#{comEvent.searchId} AND current_process_type in(1,5)
|
</if>
|
<if test="comEvent.level == 3">
|
AND request_user_community in (select community_id from com_act where street_id=#{comEvent.searchId})
|
AND current_process_type in (3,5)
|
</if>
|
<if test="comEvent.level == 4">
|
AND request_user_community=#{comEvent.searchId} AND current_process_type in (2,5)
|
</if>
|
</if>
|
</if>
|
</where>
|
</select>
|
<select id="dateAnalysis" resultType="com.panzhihua.common.model.vos.sanshuo.IndexDateVO">
|
SELECT
|
(SELECT count(id) FROM com_sanshuo_event_info
|
where event_process_status in (2,3,5,6)
|
AND user_event_status not in(3,4)
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>
|
) as accept,
|
(SELECT count(id) FROM com_sanshuo_event_info
|
where is_end <> 1
|
AND user_event_status not in(3,4)
|
AND event_process_status not in (1,9)
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>) as accepting,
|
(SELECT count(id) FROM com_sanshuo_event_info
|
where event_process_status = 6
|
AND is_end=1
|
AND user_event_status not in(3)
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>) as accepted,
|
(SELECT count(t.id) FROM com_sanshuo_event_info as t
|
left join com_sanshuo_event_transfer_record as t1
|
on t.id=t1.event_id
|
where t.event_process_status in (6,7)
|
AND t.user_event_status not in(3,4)
|
AND t1.event_status=7
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND t.current_process_type in (1,5)
|
AND t.center_id is not null
|
<if test="dto.id != null">
|
AND t.center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND t.current_process_type=3
|
<if test="dto.id != null">
|
AND t.request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND t.current_process_type in(2,5)
|
AND t.center_id is null
|
<if test="dto.id != null">
|
AND t.request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND t.current_process_type=4
|
</if>) as expirences,
|
(select count(id) FROM com_sanshuo_event_info
|
where event_result=2
|
AND user_event_status not in(3,4)
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>) as success,
|
(select count(id) FROM com_sanshuo_event_info
|
where event_result=1
|
AND is_end=1
|
AND user_event_status not in(3,4)
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>) as fail,
|
(select count(id) from com_sanshuo_event_info WHERE
|
create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
|
AND event_process_status not in (8)
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>) as monthIncrease,
|
(select count(id) from com_sanshuo_event_info WHERE
|
create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
|
AND event_process_status not in (8)
|
AND event_process_status = 6
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>) as monthFinish
|
FROM com_sanshuo_event_info limit 1
|
</select>
|
<select id="dateAnalysisY" resultType="java.lang.Integer">
|
SELECT COUNT(id) FROM com_sanshuo_event_info
|
WHERE create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
|
AND event_process_status not in (9)
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>
|
</select>
|
<select id="dateAnalysisYTwo" resultType="java.lang.Integer">
|
SELECT COUNT(id) FROM com_sanshuo_event_info
|
WHERE create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
|
AND event_process_status=6
|
AND is_end=1
|
AND app_id='wx0cef797390444b75'
|
<if test="dto.type == 2">
|
AND current_process_type in (1,5)
|
AND center_id is not null
|
<if test="dto.id != null">
|
AND center_id=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 3">
|
AND current_process_type=3
|
<if test="dto.id != null">
|
AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
|
</if>
|
</if>
|
<if test="dto.type == 4">
|
AND current_process_type in(2,5)
|
AND center_id is null
|
<if test="dto.id != null">
|
AND request_user_community=#{dto.id}
|
</if>
|
</if>
|
<if test="dto.type == 1">
|
AND current_process_type=4
|
</if>
|
</select>
|
<select id="eventRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
|
select count(id) as count,type from com_sanshuo_event_info
|
where event_process_status not in(7,8,9)
|
AND app_id='wx0cef797390444b75'
|
group by type
|
having type not in (5)
|
</select>
|
|
<select id="expertRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
|
select count(id) as count,level as type from com_sanshuo_expert where app_id='wx0cef797390444b75'
|
group by level
|
</select>
|
<select id="mediateTypeRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
|
select count(t.id) as count,t1.name from com_sanshuo_event_info t
|
left join com_mediate_type t1 on t.event_category=t1.id
|
where t.event_process_status not in(7,8,9)
|
AND t.app_id='wx0cef797390444b75'
|
group by t.event_category
|
</select>
|
|
<select id="getUserAvatar" resultType="String">
|
select image_url from sys_user where user_id = #{userId}
|
</select>
|
<select id="insertEventAndExpertRecord">
|
insert into com_sanshuo_expert_event values(#{eventId},#{expertId},#{status})
|
</select>
|
<select id="expertSolveCountCommunity" resultType="java.lang.Integer">
|
select count(t.id) from com_sanshuo_event_info t
|
left join com_sanshuo_expert t1 on t.specialist_id=t1.id
|
where t.event_process_status not in (9)
|
AND t.current_process_type=5
|
and t1.level=4
|
AND t.app_id='wx0cef797390444b75'
|
</select>
|
<select id="expertSolveCountCenter" resultType="java.lang.Integer">
|
select count(t.id) from com_sanshuo_event_info t
|
left join com_sanshuo_expert t1 on t.specialist_id=t1.id
|
where t.event_process_status not in (9)
|
and t1.level=2
|
AND t.current_process_type=5
|
AND t.app_id='wx0cef797390444b75'
|
</select>
|
<update id="updateLog">
|
update com_sanshuo_expert_event set status = 2
|
where event_id=#{eventId} and expert_id=#{expertId} and status=0
|
</update>
|
|
</mapper>
|