333dfsfdfgfddfg
This commit is contained in:
parent
bbc53de701
commit
12ddc57bca
@ -13,7 +13,9 @@ import com.example.caseData.exception.BusinessException;
|
||||
import com.example.caseData.model.*;
|
||||
import com.example.caseData.request.caseExchangeRequest.addCaseExchangeComment;
|
||||
import com.example.caseData.request.caseExchangeRequest.getCaseExchangeCommentPage;
|
||||
import com.example.caseData.request.userCaseReadRequest.addUserCaseRead;
|
||||
import com.example.caseData.request.userCaseReadRequest.getUserCaseReadSearchPage;
|
||||
import com.example.caseData.service.UserCaseReadService;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -57,6 +59,9 @@ public class UserCaseReadController extends BaseController {
|
||||
@Resource
|
||||
private UserCaseReadDao userCaseReadDao;
|
||||
|
||||
@Resource
|
||||
private UserCaseReadService userCaseReadService;
|
||||
|
||||
/**
|
||||
* 浏览记录-搜索-分页
|
||||
*/
|
||||
@ -199,7 +204,7 @@ public class UserCaseReadController extends BaseController {
|
||||
@PostMapping("/user/case/read")
|
||||
public Response<T> AddUserCaseRead(
|
||||
@Validated()
|
||||
@RequestBody addCaseExchangeComment request
|
||||
@RequestBody addUserCaseRead request
|
||||
) {
|
||||
|
||||
String userId = (String) httpServletRequest.getAttribute("userId");
|
||||
@ -208,14 +213,14 @@ public class UserCaseReadController extends BaseController {
|
||||
return Response.error("操作失败");
|
||||
}
|
||||
|
||||
// try {
|
||||
// boolean res = caseExchangeService.AddCaseExchangeComment(exchangeId,userId,request);
|
||||
try {
|
||||
// boolean res = userCaseReadService.AddUserCaseRead(request,userId);
|
||||
// if (!res){
|
||||
// return Response.error("操作失败");
|
||||
// }
|
||||
// } catch (BusinessException e) {
|
||||
// return Response.error(e.getMessage());
|
||||
// }
|
||||
} catch (BusinessException e) {
|
||||
return Response.error(e.getMessage());
|
||||
}
|
||||
|
||||
return Response.success();
|
||||
}
|
||||
|
||||
@ -15,5 +15,4 @@ public class addUserCaseRead {
|
||||
@NotNull(message = "错误")
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
}
|
||||
|
||||
@ -47,6 +47,9 @@ public class RewardPointService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(LogRequestInterceptor.class);
|
||||
|
||||
/**
|
||||
* 打赏积分
|
||||
*/
|
||||
@Transactional
|
||||
public boolean RewardPoint(String userId, rewardPoint r){
|
||||
// 获取当前登录用户数据
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
package com.example.caseData.service;
|
||||
|
||||
import com.example.caseData.exception.BusinessException;
|
||||
import com.example.caseData.model.CaseClinicalArticleModel;
|
||||
import com.example.caseData.model.UserCommentClinicalArticleModel;
|
||||
import com.example.caseData.request.CaseClinicalArticleRequest.addClinicalArticleComment;
|
||||
import com.example.caseData.request.userCaseReadRequest.addUserCaseRead;
|
||||
import com.example.caseData.utils.Replace;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class UserCaseReadService {
|
||||
// /**
|
||||
// * 浏览记录-新增
|
||||
// * @return bool
|
||||
// */
|
||||
// @Transactional
|
||||
// public boolean AddUserCaseRead(addUserCaseRead request, String userId){
|
||||
// // 检测是否已存在
|
||||
//
|
||||
//
|
||||
// // 新增评论
|
||||
// UserCommentClinicalArticleModel userCommentClinicalArticleData = new UserCommentClinicalArticleModel();
|
||||
// userCommentClinicalArticleData.setUserId(Long.valueOf(userId));
|
||||
// userCommentClinicalArticleData.setArticleId(Long.valueOf(articleId));
|
||||
// userCommentClinicalArticleData.setStatus(1);
|
||||
// userCommentClinicalArticleData.setIsSensitive(0);
|
||||
// userCommentClinicalArticleData.setContent(request.getContent());
|
||||
// userCommentClinicalArticleData.setCommentImage(Replace.removeOssDomain(request.getCommentImage()));
|
||||
//
|
||||
// // 评论根id
|
||||
// if (request.getRootId() != null) {
|
||||
// userCommentClinicalArticleData.setRootId(Long.valueOf(request.getRootId()));
|
||||
// }
|
||||
//
|
||||
// // 评论父级id
|
||||
// if (request.getParentId() != null) {
|
||||
// userCommentClinicalArticleData.setParentId(Long.valueOf(request.getParentId()));
|
||||
// }
|
||||
//
|
||||
// int res = userCommentClinicalArticleDao.insert(userCommentClinicalArticleData);
|
||||
// return res > 0;
|
||||
// }
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user