|
@@ -50,7 +50,8 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectVolunteerInfoSimple" resultType="com.leromro.core.domain.vo.VolunteerInfoVO">
|
|
|
- select volunteer_id, skill_describe,age ,service_category,name,volunteer_picture,score,business_management_id ,business_price,business_tier_name , business_unit,business_describe,business_describe
|
|
|
+ select volunteer_id, skill_describe,age ,service_category,name,volunteer_picture,score,business_management_id ,
|
|
|
+ business_price,business_tier_name , business_unit,business_describe
|
|
|
from l_volunteer_info lvi
|
|
|
where app_status = 2
|
|
|
AND EXISTS (
|
|
@@ -65,10 +66,14 @@
|
|
|
<if test="info.score != null "> and lvi.score = #{info.score}</if>
|
|
|
<if test="info.serviceCategory != null and info.serviceCategory != ''"> and lvi.service_category = #{info.serviceCategory}</if>
|
|
|
<if test="info.skillDescribe != null and info.skillDescribe != ''"> and lvi.skill_describe = #{info.skillDescribe}</if>
|
|
|
-<!-- <if test="info.provinceCode != null and info.provinceCode != ''">and lvi.province_code = #{info.provinceCode}</if>-->
|
|
|
-<!-- <if test="info.cityCode != null and info.cityCode != ''">and lvi.city_code = #{info.cityCode}</if>-->
|
|
|
-<!-- <if test="info.districtCode != null and info.districtCode != ''">and lvi.district_code = #{info.districtCode}</if>-->
|
|
|
- <if test="info.businessTierName != null and info.businessTierName != ''">and lvi.business_tier_name like concat('%', #{info.businessTierName}, '%')</if>
|
|
|
+ <!-- <if test="info.provinceCode != null and info.provinceCode != ''">and lvi.province_code = #{info.provinceCode}</if>-->
|
|
|
+ <!-- <if test="info.cityCode != null and info.cityCode != ''">and lvi.city_code = #{info.cityCode}</if>-->
|
|
|
+ <!-- <if test="info.districtCode != null and info.districtCode != ''">and lvi.district_code = #{info.districtCode}</if>-->
|
|
|
+ <if test="info.businessTierName != null and info.businessTierName != ''">
|
|
|
+ and lvi.business_tier_name like concat('%', #{info.businessTierName}, '%') or
|
|
|
+ lvi.name like concat('%', #{info.businessTierName}, '%') or
|
|
|
+ lvi.business_describe like concat('%', #{info.businessTierName}, '%')
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getCurrentOrgVolunteerList" resultType="com.leromro.core.domain.VolunteerInfo">
|
|
@@ -77,12 +82,38 @@
|
|
|
</select>
|
|
|
<select id="selectVolunteerGroupByUserId" resultType="com.leromro.core.domain.VolunteerInfo">
|
|
|
select lvi.volunteer_id ,s.create_time from sys_user s left join l_volunteer_info lvi on s.user_id = lvi.volunteer_id
|
|
|
- where s.del_flag = 0 and s.user_platform = 0 and lvi.volunteer_id
|
|
|
+ where s.del_flag = 0 and s.user_platform = 0 and lvi.volunteer_id and s.service_centre_id = #{user.serviceCentreId}
|
|
|
group by lvi.volunteer_id
|
|
|
</select>
|
|
|
<select id="selectVolunteerPictureList" resultType="java.lang.String" parameterType="java.lang.Long">
|
|
|
select volunteer_picture from l_volunteer_info where volunteer_id = #{userId}
|
|
|
</select>
|
|
|
-
|
|
|
+ <select id="searchBusinessTypeList" resultType="com.leromro.core.domain.vo.BusinessManagementVO"
|
|
|
+ parameterType="com.leromro.core.domain.dto.VolunteerListDTO">
|
|
|
+ select lbm2.business_management_id as id,lbm2.parent_id,lbm2.business_name,lbm2.business_tier_name,lbm2.business_icon,lvi.project_type_name
|
|
|
+ from l_volunteer_info lvi left join l_business_management lbm2 on lvi.business_management_id = lbm2.business_management_id
|
|
|
+ where lvi.app_status = 2 and lvi.name like '%刘%'
|
|
|
+ AND EXISTS (
|
|
|
+ SELECT 1
|
|
|
+ FROM l_volunteer_work_date lvw
|
|
|
+ WHERE lvw.volunteer_id = lvi.volunteer_id
|
|
|
+ and lvw.work_date >= curdate()
|
|
|
+ )
|
|
|
+ and lvi.business_management_id in (select lbm.business_management_id from l_business_management lbm
|
|
|
+ where find_in_set(#{info.businessManagementId},lbm.ancestors) or lbm.business_management_id = #{info.businessManagementId})
|
|
|
+ <if test="info.name != null and info.name != ''"> and lvi.name like concat('%', #{info.name}, '%')</if>
|
|
|
+ <if test="info.score != null "> and lvi.score = #{info.score}</if>
|
|
|
+ <if test="info.serviceCategory != null and info.serviceCategory != ''"> and lvi.service_category = #{info.serviceCategory}</if>
|
|
|
+ <if test="info.skillDescribe != null and info.skillDescribe != ''"> and lvi.skill_describe = #{info.skillDescribe}</if>
|
|
|
+ <if test="info.businessTierName != null and info.businessTierName != ''">
|
|
|
+ and lvi.business_tier_name like concat('%', #{info.businessTierName}, '%') or
|
|
|
+ lvi.name like concat('%', #{info.businessTierName}, '%') or
|
|
|
+ lvi.business_describe like concat('%', #{info.businessTierName}, '%')
|
|
|
+ </if>
|
|
|
+ group by lbm2.business_tier_name
|
|
|
+ <!-- <if test="info.provinceCode != null and info.provinceCode != ''">and lvi.province_code = #{info.provinceCode}</if>-->
|
|
|
+ <!-- <if test="info.cityCode != null and info.cityCode != ''">and lvi.city_code = #{info.cityCode}</if>-->
|
|
|
+ <!-- <if test="info.districtCode != null and info.districtCode != ''">and lvi.district_code = #{info.districtCode}</if>-->
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|