| | |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Resource |
| | | private VolunteerMerchantService vtService; |
| | | |
| | | |
| | | |
| | | @GetMapping("/getById") |
| | | public R volunteerMerchantGetById(@RequestParam("id") String id) |
| | | { |
| | | return vtService.getById(id); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/getList") |
| | | public R volunteerMerchantGetList(@RequestParam("pageNum") int pageNum, |
| | | public R volunteerMerchantGetList( int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "merchantState", required = false) String merchantState, |
| | | @RequestParam(value = "merchantType", required = false) String merchantType, |
| | |
| | | |
| | | @GetMapping("/getUser") |
| | | public R volunteerMerchantGetUser(@RequestParam("communityId") String communityId, |
| | | @RequestParam("userName") String userName, |
| | | @RequestParam("userPhone") String userPhone) |
| | | @RequestParam(value = "userName", required = false) String userName, |
| | | @RequestParam(value = "userPhone", required = false) String userPhone) |
| | | { |
| | | return R.ok(vtService.getUser(communityId,userName,userPhone)); |
| | | return vtService.getUser(communityId,userName,userPhone); |
| | | } |
| | | |
| | | /** |
| | | * 是否是商家 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/isMerchant") |
| | | public R isMerchant(@RequestParam("userId") String userId) |
| | | { |
| | | if(StringUtils.isEmpty(userId)) |
| | | { |
| | | return R.fail("用户id不能为空"); |
| | | } |
| | | return vtService.isMerchant(userId); |
| | | } |
| | | |
| | | |