mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package com.panzhihua.service_community.dao;
 
import java.util.List;
 
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenVolunteerStatisticsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO;
import com.panzhihua.common.model.vos.community.TodoEventsVO;
import com.panzhihua.service_community.model.dos.ComMngVolunteerMngDO;
 
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 志愿者
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2020-12-15 09:50
 **/
@Mapper
public interface ComMngVolunteerMngDAO extends BaseMapper<ComMngVolunteerMngDO> {
 
    /**
     * 分页查询志愿者列表
     * @param page  分页参数
     * @param comMngVolunteerMngVO  请求参数
     * @return  志愿者列表
     */
    IPage<ComMngVolunteerMngVO> pageVolunteer(Page page,
        @Param("comMngVolunteerMngVO") ComMngVolunteerMngVO comMngVolunteerMngVO);
 
    IPage<ComMngVolunteerMngVO> pageVolunteerExamine(Page page,
        @Param("comMngVolunteerMngVO") ComMngVolunteerMngVO comMngVolunteerMngVO);
 
    @Select("SELECT\n" + "'4' type\n" + "FROM\n" + "com_mng_volunteer_mng v \n" + "WHERE\n" + "v.state = 1 \n"
        + "AND v.`community_id` = #{communityId} \n")
    List<TodoEventsVO> selectNeedToDo(Long communityId);
 
    @Select("select user_id from sys_user where type=1 and phone=#{phone}")
    Long selectUserIdByPhone(String phone);
 
    @Select("select id_card from sys_user where type=1 and phone=#{idCard}")
    Long selectUserIdByIdCard(String idCard);
 
    /**
     * 志愿者-组织直方图数据
     * @param communityId
     * @return
     */
    List<StatisticsCommVO> retrieveVolunteerOrgHistogram(@Param("communityId") Long communityId);
 
    /**
     * 获取杨家坪定制页面-志愿服务基础数据
     * @param communityId
     * @return
     */
    BigScreenVolunteerStatisticsInfo getVolunteerBaseData(@Param("communityId") Long communityId);
 
    /**
     * 获取志愿者数据
     * @param communityId
     * @return
     */
    List<ComMngVolunteerMngVO> retrieveVolunteerServiceTypeCircleData(@Param("communityId") Long communityId);
 
    /**
     * 志愿者年龄段占比圆形图数据
     * @param communityId
     * @return
     */
    List<StatisticsCommVO> retrieveVolunteerAgeCircleData(@Param("communityId") Long communityId);
 
    /**
     * 志愿者技能占比圆形图
     * @param communityId
     * @return
     */
    List<ComMngVolunteerMngVO> retrieveVolunteerSkillCircleData(@Param("communityId") Long communityId);
 
    /**
     * 根据社区id查询志愿者
     * @param communityId
     * @return
     */
    List<ComMngVolunteerMngVO> selectVolunteerByCommunityId(@Param("communityId") Long communityId);
 
    /**
     * 志愿者审核详情
     * @param id
     * @return
     */
    ComMngVolunteerMngVO detailVolunteerExamine(@Param("id") Long id);
}