From b2fce0dc7dc4ea5dec9792a2bc3ceb9d33d6e07b Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期一, 04 九月 2023 13:59:52 +0800 Subject: [PATCH] 修改后台社区动态加载不出来 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/XmostBeautifulApi.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 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 1c68f65..cafe5a4 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 @@ -378,6 +378,14 @@ @RequestParam("communityId") String communityId, @RequestParam("merchantId") String merchantId) { + if(StringUtils.isEmpty(communityId)) + { + communityId=getCommunityId()+""; + } + if(StringUtils.isEmpty(merchantId)) + { + return R.fail("商家id不能为空"); + } return communityService.volunteerMerchantGetList(pageNum,pageSize,communityId,merchantId); } @@ -399,6 +407,31 @@ @PostMapping("/evaluate/insert") public R volunteerMerchantInsert(@RequestBody VolunteerMerchantEvaluateVO item) { + if(item==null) + { + return R.fail("参数不能为空"); + } + + if(StringUtils.isEmpty(item.getCommunityId())) + { + item.setCommunityId(getCommunityId()+""); + } + + if(StringUtils.isEmpty(item.getMerchantId())) + { + return R.fail("商家id不能为空"); + } + + if(StringUtils.isEmpty(item.getUserId())) + { + return R.fail("评论人id不能为空"); + } + + if(StringUtils.isEmpty(item.getEvaluateGrade())) + { + return R.fail("评论分数不能为空"); + } + return communityService.volunteerMerchantInsert(item); } -- Gitblit v1.7.1