From f8f7f64ed0e7595ba988c906ffd73bd739c019d4 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期四, 31 八月 2023 15:43:53 +0800 Subject: [PATCH] 新增后台商家批量启用禁用 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/XmostBeautifulApi.java | 95 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/XmostBeautifulApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/XmostBeautifulApi.java index b692892..78ac6aa 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/XmostBeautifulApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/XmostBeautifulApi.java @@ -4,7 +4,9 @@ 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; @@ -21,6 +23,10 @@ @Resource private CommunityService communityService; + + + @Resource + private UserService userService; /** * 查询单个 @@ -129,7 +135,7 @@ /** - * 更新商家 + * 更新商家订单 * @param item * @return */ @@ -248,6 +254,16 @@ return communityService.volunteerTypeGetList(pageNum,pageSize,"2"); } + /** + * 修改商家 + * @param vtvo + * @return + */ + @PostMapping("/VolunteerMerchant/update") + public R updateVolunteerMerchant(@RequestBody VolunteerMerchantVO vtvo) + { + return communityService.updateVolunteerMerchant(vtvo); + } /** * 获取商家详情 @@ -261,8 +277,85 @@ } + /** + * 是否是商家 + * @return + */ + @GetMapping("/VolunteerMerchant/isMerchant") + public R isMerchant(@RequestParam("userId") String userId) + { + return communityService.isMerchant(userId); + } + /** + * 社区取消订单 + * @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("密码错误"); + } } -- Gitblit v1.7.1