lidongdong
2023-08-24 c854bc6643e5e971546829c6669f38ee5ddbaeaa
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
package com.panzhihua.applets.api;
 
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.utlis.StringUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
@Slf4j
@RestController
@RequestMapping("/XmostBeautiful")
@Api(tags = {"小程序志愿者活动"})
public class XmostBeautifulApi
{
 
    @Resource
    private CommunityService communityService;
 
    /**
     * 查询单个
     * @param Id
     * @return
     */
    @GetMapping("/queryById")
    public R queryById(@RequestParam("id") String Id)
    {
        if(StringUtils.isEmpty(Id))
        {
            return R.fail("id不能为空");
        }
        return communityService.queryById2(Id);
    }
 
 
    /**
     * 分页查询
     * @param name
     * @param unmountType
     * @return
     */
    @GetMapping("/getqueryList")
    public R queryList(@RequestParam("pageNum") int pageNum,
                       @RequestParam("pageSize")int pageSize,
                       @RequestParam(value = "name", required = false) String name,
                       @RequestParam(value = "unmountType", required = false) String unmountType)
    {
        return communityService.queryList(pageNum,pageSize,name,unmountType);
    }
 
 
    /**
     * 查询单个志愿者活动详情
     * @param Id
     * @return
     */
    @GetMapping("/volunteerQueryById")
    public R volunteerQueryById(@RequestParam("id") String Id)
    {
        if(StringUtils.isEmpty(Id))
        {
            return R.fail("id不能为空");
        }
        return communityService.volunteerQueryById(Id);
    }
 
 
}