| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerCreditsExchangeVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 查询单个 |
| | |
| | | |
| | | |
| | | /** |
| | | * 更新商家 |
| | | * 更新商家订单 |
| | | * @param item |
| | | * @return |
| | | */ |
| | |
| | | return communityService.volunteerTypeGetList(pageNum,pageSize,"2"); |
| | | } |
| | | |
| | | /** |
| | | * 修改商家 |
| | | * @param vtvo |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerMerchant/update") |
| | | public R updateVolunteerMerchant(@RequestBody VolunteerMerchantVO vtvo) |
| | | { |
| | | return communityService.updateVolunteerMerchant(vtvo); |
| | | } |
| | | |
| | | /** |
| | | * 获取商家详情 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 社区取消订单 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/order/communityCancellation") |
| | | public R communityCancellation(@RequestParam("id") String id) |
| | | { |
| | | return communityService.communityCancellation(id); |
| | | } |
| | | |
| | | /** |
| | | * 用户设置积分支付密码 |
| | | * @param userId |
| | | * @param pwd |
| | | * @return |
| | | */ |
| | | @GetMapping("/setUserPlayPwd") |
| | | public R setUserPlayPwd(@RequestParam("userId") String userId,@RequestParam("pwd") String pwd) |
| | | { |
| | | if (StringUtils.isEmpty(userId)) |
| | | { |
| | | return R.fail("userId不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(pwd)) |
| | | { |
| | | return R.fail("密码不能为空"); |
| | | } |
| | | |
| | | LoginUserInfoVO loginUserInfoVO=new LoginUserInfoVO(); |
| | | loginUserInfoVO.setUserId(Long.valueOf(userId)); |
| | | loginUserInfoVO.setPlayPwd(pwd); |
| | | return userService.putUser(loginUserInfoVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断密码是否正确 |
| | | * @param userId |
| | | * @param pwd |
| | | * @return |
| | | */ |
| | | @GetMapping("/passwordIsCorrect") |
| | | public R passwordIsCorrect(@RequestParam("userId") String userId,@RequestParam("pwd") String pwd) |
| | | { |
| | | if (StringUtils.isEmpty(userId)) |
| | | { |
| | | return R.fail("userId不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(pwd)) |
| | | { |
| | | return R.fail("密码不能为空"); |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO=userService.getUserInfoByUserId(userId).getData(); |
| | | if(StringUtils.isEmpty(loginUserInfoVO.getPlayPwd())) |
| | | { |
| | | return R.fail(304,"您还未设置密码!"); |
| | | } |
| | | |
| | | |
| | | if(StringUtils.equals(pwd,loginUserInfoVO.getPlayPwd())) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("密码错误"); |
| | | } |
| | | |
| | | |
| | | } |