| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情", response = ConvenientMerchantVO.class) |
| | |
| | | @ApiOperation(value = "保存评价") |
| | | @PostMapping("/saveEvaluate") |
| | | public R saveEvaluate(@RequestBody ComShopFlowerEvaluateDTO comShopFlowerEvaluateDTO) { |
| | | String evaluateContent = comShopFlowerEvaluateDTO.getEvaluateContent(); |
| | | if (StrUtil.isNotBlank(evaluateContent)) { |
| | | String result = checkService.checkMessageBy(evaluateContent,this.getLoginUserInfo().getOpenid(),this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail(501, "填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | return communityService.saveEvaluate(comShopFlowerEvaluateDTO); |
| | | } |
| | | |