| | |
| | | package com.xinquan.meditation.controller.client; |
| | | |
| | | |
| | | import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.C; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.xinquan.common.core.domain.R; |
| | | import com.xinquan.common.core.utils.page.CollUtils; |
| | | import com.xinquan.common.core.utils.page.PageDTO; |
| | | import com.xinquan.common.security.utils.SecurityUtils; |
| | | import com.xinquan.meditation.api.domain.Meditation; |
| | | import com.xinquan.meditation.api.domain.dto.MeditationQuestionDTO; |
| | | import com.xinquan.meditation.domain.MeditationCategory; |
| | |
| | | import com.xinquan.meditation.service.MeditationReportService; |
| | | import com.xinquan.meditation.service.MeditationService; |
| | | import com.xinquan.system.api.domain.AppUser; |
| | | import com.xinquan.system.api.domain.MeditationQuestion; |
| | | import com.xinquan.system.api.domain.MeditationReport; |
| | | import com.xinquan.meditation.api.domain.MeditationQuestion; |
| | | import com.xinquan.system.api.domain.MeditationReport; |
| | | import com.xinquan.user.api.feign.RemoteAppUserService; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | } |
| | | meditationLambdaQueryWrapper.in(MeditationReport::getReportUserId,data); |
| | | } |
| | | if (StringUtils.hasLength(dto.getName())){ |
| | | if (StringUtils.hasLength(dto.getMeditationName())){ |
| | | List<Long> collect = meditationService.lambdaQuery() |
| | | .like(Meditation::getMeditationTitle, dto.getName()) |
| | | .like(Meditation::getMeditationTitle, dto.getMeditationName()) |
| | | .list().stream().map(Meditation::getId).collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | collect.add(-1L); |
| | |
| | | record.setUid(record.getId()+""); |
| | | MeditationQuestion byId1 = meditationQuestionService.getById(record.getQuestionId()); |
| | | if (byId1!=null){ |
| | | record.setLikeCount(byId1.getLikeCount()); |
| | | record.setContent(byId1.getContent()); |
| | | LocalDateTime replyTime = byId1.getCreateTime(); |
| | | record.setContentTime(replyTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | |
| | | record.setAvatar(data.getAvatar()); |
| | | record.setCellPhone(data.getCellPhone()); |
| | | } |
| | | record.setShowFlag(byId1.getShowFlag()); |
| | | record.setReplyContent(byId1.getReplyContent()); |
| | | } |
| | | AppUser data = remoteAppUserService.getAppUserById(record.getReportUserId().toString()).getData(); |
| | | if (data!=null){ |
| | |
| | | Meditation byId = meditationService.getById(record.getMeditationId()); |
| | | if (byId!=null){ |
| | | record.setMeditationName(byId.getMeditationTitle()); |
| | | record.setChargeType(byId.getChargeType()); |
| | | MeditationCategory byId2 = meditationCategoryService.getById(byId.getCateId()); |
| | | if (byId2!=null){ |
| | | record.setMeditationCategoryName(byId2.getCategoryName()); |
| | | } |
| | | record.setCoverUrl(byId.getCoverUrl().split(",")[0]); |
| | | record.setMeditationName(byId.getMeditationTitle()); |
| | | |
| | | } |
| | | } |
| | | return R.ok(PageDTO.of(page, MeditationReport.class)); |
| | |
| | | byId.setAvatar(data.getAvatar()); |
| | | byId.setCellPhone(data.getCellPhone()); |
| | | } |
| | | byId.setReplyContent(byId3.getReplyContent()); |
| | | if (data1!=null){ |
| | | byId.setUserNameReport(data1.getNickname()); |
| | | byId.setAvatarReport(data1.getAvatar()); |
| | |
| | | Meditation byId1 = meditationService.getById(byId.getMeditationId()); |
| | | if (byId1!=null){ |
| | | byId.setMeditationName(byId1.getMeditationTitle()); |
| | | byId.setCoverUrl(byId1.getCoverUrl().split(",")[0]); |
| | | byId.setChargeType(byId1.getChargeType()); |
| | | } |
| | | MeditationCategory byId2 = meditationCategoryService.getById(byId1.getCateId()); |
| | | if (byId2!=null){ |
| | | byId.setMeditationCategoryName(byId2.getCategoryName()); |
| | | |
| | | } |
| | | return R.ok(); |
| | | return R.ok(byId); |
| | | } |
| | | |
| | | @PostMapping("/deleteMeditationReportQuestion") |