New file |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |