fix: 返回评论(最新and最热),回复
This commit is contained in:
@@ -13,7 +13,6 @@ import com.schisandra.share.common.utils.CaffeineUtil;
|
|||||||
import com.schisandra.share.domain.bo.SchisandraShareDetailBO;
|
import com.schisandra.share.domain.bo.SchisandraShareDetailBO;
|
||||||
import com.schisandra.share.domain.bo.SchisandraUserLikesDetailBO;
|
import com.schisandra.share.domain.bo.SchisandraUserLikesDetailBO;
|
||||||
import com.schisandra.share.domain.service.SchisandraShareDetailDomainService;
|
import com.schisandra.share.domain.service.SchisandraShareDetailDomainService;
|
||||||
import feign.form.FormData;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.rocketmq.client.producer.SendCallback;
|
import org.apache.rocketmq.client.producer.SendCallback;
|
||||||
import org.apache.rocketmq.client.producer.SendResult;
|
import org.apache.rocketmq.client.producer.SendResult;
|
||||||
@@ -176,7 +175,7 @@ public class SchisandraShareDetailController {
|
|||||||
* 查询分享详细信息
|
* 查询分享详细信息
|
||||||
*/
|
*/
|
||||||
@Cacheable(value = "getdetail", key = "#Id")
|
@Cacheable(value = "getdetail", key = "#Id")
|
||||||
@PostMapping("get_detail")
|
@GetMapping("get_detail")
|
||||||
public Result selectDetail(@RequestParam("Id") String Id) {
|
public Result selectDetail(@RequestParam("Id") String Id) {
|
||||||
try {
|
try {
|
||||||
SchisandraShareDetailBO resultList = schisandraShareDetailDomainService.getDetailsById(Id);
|
SchisandraShareDetailBO resultList = schisandraShareDetailDomainService.getDetailsById(Id);
|
||||||
@@ -197,7 +196,7 @@ public class SchisandraShareDetailController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return Result.ok(resultList);
|
return Result.ok(SchisandraShareDetailDTOConverter.INSTANCE.convertBOToDTO(resultList));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return Result.fail();
|
return Result.fail();
|
||||||
}
|
}
|
||||||
|
@@ -118,6 +118,12 @@ public class SchisandraShareCommentReplyDTO implements Serializable {
|
|||||||
|
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
private Boolean isLike;
|
private Boolean isLike = false;
|
||||||
|
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
private String browser;
|
||||||
|
|
||||||
|
private String browserVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -114,6 +114,12 @@ public class SchisandraShareCommentReplyBO implements Serializable {
|
|||||||
|
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
private Boolean isLike;
|
private Boolean isLike = false;
|
||||||
|
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
private String browser;
|
||||||
|
|
||||||
|
private String browserVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,11 +99,12 @@ public class SchisandraShareDetailBO implements Serializable {
|
|||||||
|
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
|
private Boolean isLike;
|
||||||
|
|
||||||
List<SchisandraShareTagsBO> tags;
|
List<SchisandraShareTagsBO> tags;
|
||||||
|
|
||||||
List<SchisandraShareUrlBO> urls;
|
List<SchisandraShareUrlBO> urls;
|
||||||
|
|
||||||
private Boolean isLike;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,5 @@
|
|||||||
package com.schisandra.share.domain.service.impl;
|
package com.schisandra.share.domain.service.impl;
|
||||||
|
|
||||||
import com.jd.platform.async.executor.Async;
|
|
||||||
import com.jd.platform.async.worker.WorkResult;
|
|
||||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
|
||||||
import com.schisandra.share.common.enums.IsDeletedFlagEnum;
|
import com.schisandra.share.common.enums.IsDeletedFlagEnum;
|
||||||
import com.schisandra.share.domain.convert.SchisandraShareCommentReplyBOConverter;
|
import com.schisandra.share.domain.convert.SchisandraShareCommentReplyBOConverter;
|
||||||
import com.schisandra.share.domain.bo.SchisandraShareCommentReplyBO;
|
import com.schisandra.share.domain.bo.SchisandraShareCommentReplyBO;
|
||||||
@@ -11,20 +8,17 @@ import com.schisandra.share.infra.basic.entity.SchisandraShareCommentReply;
|
|||||||
import com.schisandra.share.infra.basic.entity.SchisandraUserLikesComment;
|
import com.schisandra.share.infra.basic.entity.SchisandraUserLikesComment;
|
||||||
import com.schisandra.share.infra.basic.service.SchisandraShareCommentReplyService;
|
import com.schisandra.share.infra.basic.service.SchisandraShareCommentReplyService;
|
||||||
import com.schisandra.share.infra.basic.service.SchisandraUserLikesCommentService;
|
import com.schisandra.share.infra.basic.service.SchisandraUserLikesCommentService;
|
||||||
|
import com.schisandra.share.infra.entity.AuthUserAddressEntity;
|
||||||
import com.schisandra.share.infra.entity.AuthUserInfoEntity;
|
import com.schisandra.share.infra.entity.AuthUserInfoEntity;
|
||||||
|
import com.schisandra.share.infra.rpc.AddressRpc;
|
||||||
import com.schisandra.share.infra.rpc.UserRpc;
|
import com.schisandra.share.infra.rpc.UserRpc;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论回复表 领域service实现了
|
* 评论回复表 领域service实现了
|
||||||
@@ -41,6 +35,8 @@ public class SchisandraShareCommentReplyDomainServiceImpl implements SchisandraS
|
|||||||
@Resource
|
@Resource
|
||||||
UserRpc userRpc;
|
UserRpc userRpc;
|
||||||
@Resource
|
@Resource
|
||||||
|
AddressRpc addressRpc;
|
||||||
|
@Resource
|
||||||
private SchisandraUserLikesCommentService schisandraUserLikesCommentService;
|
private SchisandraUserLikesCommentService schisandraUserLikesCommentService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -97,48 +93,23 @@ public class SchisandraShareCommentReplyDomainServiceImpl implements SchisandraS
|
|||||||
public List<SchisandraShareCommentReplyBO> listComment(String detailId, String userId) {
|
public List<SchisandraShareCommentReplyBO> listComment(String detailId, String userId) {
|
||||||
List<SchisandraShareCommentReply> schisandraShareComments = schisandraShareCommentReplyService.listComment(detailId);
|
List<SchisandraShareCommentReply> schisandraShareComments = schisandraShareCommentReplyService.listComment(detailId);
|
||||||
List<SchisandraShareCommentReplyBO> schisandraShareCommentBOS = SchisandraShareCommentReplyBOConverter.INSTANCE.convertEntityToBOList(schisandraShareComments);
|
List<SchisandraShareCommentReplyBO> schisandraShareCommentBOS = SchisandraShareCommentReplyBOConverter.INSTANCE.convertEntityToBOList(schisandraShareComments);
|
||||||
List<WorkerWrapper> wrappers = new ArrayList<>();
|
|
||||||
schisandraShareCommentBOS.forEach(schisandraShareCommentReplyBO -> {
|
schisandraShareCommentBOS.forEach(schisandraShareCommentReplyBO -> {
|
||||||
WorkerWrapper<SchisandraShareCommentReplyBO,String > workerWrapper = new WorkerWrapper.Builder<SchisandraShareCommentReplyBO,String >()
|
SchisandraUserLikesComment schisandraUserLikesComment =
|
||||||
.worker((SchisandraShareCommentReplyBO object, Map<String, WorkerWrapper> allWrappers) -> {
|
schisandraUserLikesCommentService.queryByuserIdAndCommentId(schisandraShareCommentReplyBO.getId(), userId);
|
||||||
SchisandraUserLikesComment schisandraUserLikesComment =
|
if(schisandraUserLikesComment!=null){
|
||||||
schisandraUserLikesCommentService.queryByuserIdAndDetailId(object.getId(), userId);
|
schisandraShareCommentReplyBO.setIsLike(true);
|
||||||
if(schisandraUserLikesComment!=null){
|
}
|
||||||
object.setIsLike(true);
|
AuthUserInfoEntity userInfo = userRpc.getUserInfo(schisandraShareCommentReplyBO.getUserId());
|
||||||
}
|
schisandraShareCommentReplyBO.setNick(userInfo.getNickName());
|
||||||
AuthUserInfoEntity userInfo = userRpc.getUserInfo(object.getUserId());
|
schisandraShareCommentReplyBO.setAvatar(userInfo.getAvatar());
|
||||||
object.setNick(userInfo.getNickName());
|
|
||||||
object.setAvatar(userInfo.getAvatar());
|
|
||||||
return "success";
|
|
||||||
|
|
||||||
})
|
AuthUserAddressEntity userAddress = addressRpc.getUserAddress(schisandraShareCommentReplyBO.getUserId());
|
||||||
.param(schisandraShareCommentReplyBO)
|
if(userAddress!=null){
|
||||||
.id(schisandraShareCommentReplyBO.getId())
|
schisandraShareCommentReplyBO.setLocation(userAddress.getLocation());
|
||||||
.callback((boolean success, SchisandraShareCommentReplyBO param, WorkResult<String> workResult) ->
|
schisandraShareCommentReplyBO.setBrowser(userAddress.getBrowser());
|
||||||
System.out.println("该线程"+Thread.currentThread().getName()))
|
schisandraShareCommentReplyBO.setBrowserVersion(userAddress.getBrowserVersion());
|
||||||
.build();
|
}
|
||||||
|
|
||||||
wrappers.add(workerWrapper);
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// SchisandraUserLikesComment schisandraUserLikesComment =
|
|
||||||
// schisandraUserLikesCommentService.queryByuserIdAndDetailId(schisandraShareCommentReplyBO.getId(), userId);
|
|
||||||
// if(schisandraUserLikesComment!=null){
|
|
||||||
// schisandraShareCommentReplyBO.setIsLike(true);
|
|
||||||
// }
|
|
||||||
// AuthUserInfoEntity userInfo = userRpc.getUserInfo(schisandraShareCommentReplyBO.getUserId());
|
|
||||||
// schisandraShareCommentReplyBO.setNick(userInfo.getNickName());
|
|
||||||
// schisandraShareCommentReplyBO.setAvatar(userInfo.getAvatar());
|
|
||||||
});
|
});
|
||||||
try {
|
|
||||||
Async.beginWork(3500L,new ThreadPoolExecutor(10, 100, 5L,
|
|
||||||
TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()), wrappers);
|
|
||||||
} catch (ExecutionException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
return schisandraShareCommentBOS;
|
return schisandraShareCommentBOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,13 +119,19 @@ public class SchisandraShareCommentReplyDomainServiceImpl implements SchisandraS
|
|||||||
List<SchisandraShareCommentReplyBO> schisandraShareCommentBOS = SchisandraShareCommentReplyBOConverter.INSTANCE.convertEntityToBOList(schisandraShareComments);
|
List<SchisandraShareCommentReplyBO> schisandraShareCommentBOS = SchisandraShareCommentReplyBOConverter.INSTANCE.convertEntityToBOList(schisandraShareComments);
|
||||||
schisandraShareCommentBOS.forEach(schisandraShareCommentReplyBO -> {
|
schisandraShareCommentBOS.forEach(schisandraShareCommentReplyBO -> {
|
||||||
SchisandraUserLikesComment schisandraUserLikesComment =
|
SchisandraUserLikesComment schisandraUserLikesComment =
|
||||||
schisandraUserLikesCommentService.queryByuserIdAndDetailId(schisandraShareCommentReplyBO.getId(), userId);
|
schisandraUserLikesCommentService.queryByuserIdAndCommentId(schisandraShareCommentReplyBO.getId(), userId);
|
||||||
if(schisandraUserLikesComment!=null){
|
if(schisandraUserLikesComment!=null){
|
||||||
schisandraShareCommentReplyBO.setIsLike(true);
|
schisandraShareCommentReplyBO.setIsLike(true);
|
||||||
}
|
}
|
||||||
AuthUserInfoEntity userInfo = userRpc.getUserInfo(schisandraShareCommentReplyBO.getUserId());
|
AuthUserInfoEntity userInfo = userRpc.getUserInfo(schisandraShareCommentReplyBO.getUserId());
|
||||||
schisandraShareCommentReplyBO.setNick(userInfo.getNickName());
|
schisandraShareCommentReplyBO.setNick(userInfo.getNickName());
|
||||||
schisandraShareCommentReplyBO.setAvatar(userInfo.getAvatar());
|
schisandraShareCommentReplyBO.setAvatar(userInfo.getAvatar());
|
||||||
|
AuthUserAddressEntity userAddress = addressRpc.getUserAddress(schisandraShareCommentReplyBO.getUserId());
|
||||||
|
if(userAddress!=null){
|
||||||
|
schisandraShareCommentReplyBO.setLocation(userAddress.getLocation());
|
||||||
|
schisandraShareCommentReplyBO.setBrowser(userAddress.getBrowser());
|
||||||
|
schisandraShareCommentReplyBO.setBrowserVersion(userAddress.getBrowserVersion());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return schisandraShareCommentBOS;
|
return schisandraShareCommentBOS;
|
||||||
}
|
}
|
||||||
@@ -165,7 +142,7 @@ public class SchisandraShareCommentReplyDomainServiceImpl implements SchisandraS
|
|||||||
List<SchisandraShareCommentReplyBO> schisandraShareRepliesBO = SchisandraShareCommentReplyBOConverter.INSTANCE.convertEntityToBOList(schisandraShareReplies);
|
List<SchisandraShareCommentReplyBO> schisandraShareRepliesBO = SchisandraShareCommentReplyBOConverter.INSTANCE.convertEntityToBOList(schisandraShareReplies);
|
||||||
schisandraShareRepliesBO.forEach(schisandraShareReplyBO -> {
|
schisandraShareRepliesBO.forEach(schisandraShareReplyBO -> {
|
||||||
SchisandraUserLikesComment schisandraUserLikesComment =
|
SchisandraUserLikesComment schisandraUserLikesComment =
|
||||||
schisandraUserLikesCommentService.queryByuserIdAndDetailId(schisandraShareReplyBO.getId(), userId);
|
schisandraUserLikesCommentService.queryByuserIdAndCommentId(schisandraShareReplyBO.getId(), userId);
|
||||||
if(schisandraUserLikesComment!=null){
|
if(schisandraUserLikesComment!=null){
|
||||||
schisandraShareReplyBO.setIsLike(true);
|
schisandraShareReplyBO.setIsLike(true);
|
||||||
}
|
}
|
||||||
@@ -178,6 +155,13 @@ public class SchisandraShareCommentReplyDomainServiceImpl implements SchisandraS
|
|||||||
|
|
||||||
schisandraShareReplyBO.setNick(userInfo.getNickName());
|
schisandraShareReplyBO.setNick(userInfo.getNickName());
|
||||||
schisandraShareReplyBO.setAvatar(userInfo.getAvatar());
|
schisandraShareReplyBO.setAvatar(userInfo.getAvatar());
|
||||||
|
|
||||||
|
AuthUserAddressEntity userAddress = addressRpc.getUserAddress(schisandraShareReplyBO.getUserId());
|
||||||
|
if(userAddress!=null){
|
||||||
|
schisandraShareReplyBO.setLocation(userAddress.getLocation());
|
||||||
|
schisandraShareReplyBO.setBrowser(userAddress.getBrowser());
|
||||||
|
schisandraShareReplyBO.setBrowserVersion(userAddress.getBrowserVersion());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return schisandraShareRepliesBO;
|
return schisandraShareRepliesBO;
|
||||||
}
|
}
|
||||||
|
@@ -74,7 +74,7 @@ public class SchisandraShareDetailDomainServiceImpl implements SchisandraShareDe
|
|||||||
AuthUserInfoEntity userInfo = userRpc.getUserInfo(shareDetailBO.getUserId());
|
AuthUserInfoEntity userInfo = userRpc.getUserInfo(shareDetailBO.getUserId());
|
||||||
SchisandraShareDetailBO schisandraShareDetailBO = new SchisandraShareDetailBO();
|
SchisandraShareDetailBO schisandraShareDetailBO = new SchisandraShareDetailBO();
|
||||||
SchisandraUserLikesComment schisandraUserLikesComment =
|
SchisandraUserLikesComment schisandraUserLikesComment =
|
||||||
schisandraUserLikesCommentService.queryByuserIdAndDetailId(shareDetailBO.getId(), userId);
|
schisandraUserLikesCommentService.queryByuserIdAndCommentId(shareDetailBO.getId(), userId);
|
||||||
if(schisandraUserLikesComment!=null){
|
if(schisandraUserLikesComment!=null){
|
||||||
schisandraShareDetailBO.setIsLike(true);
|
schisandraShareDetailBO.setIsLike(true);
|
||||||
}
|
}
|
||||||
|
@@ -42,5 +42,5 @@ public interface SchisandraUserLikesCommentService {
|
|||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(Long id);
|
||||||
|
|
||||||
SchisandraUserLikesComment queryByuserIdAndDetailId(String commentId, String userId);
|
SchisandraUserLikesComment queryByuserIdAndCommentId(String commentId, String userId);
|
||||||
}
|
}
|
||||||
|
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import static com.mybatisflex.core.query.QueryMethods.count;
|
import static com.mybatisflex.core.query.QueryMethods.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论回复表 表服务实现类
|
* 评论回复表 表服务实现类
|
||||||
@@ -93,6 +93,7 @@ public class SchisandraShareCommentReplyServiceImpl implements SchisandraShareCo
|
|||||||
QueryWrapper wrapper = QueryWrapper.create()
|
QueryWrapper wrapper = QueryWrapper.create()
|
||||||
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
|
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.DETAIL_ID,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.PIC_URLS,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.PIC_URLS,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,
|
||||||
@@ -102,33 +103,34 @@ public class SchisandraShareCommentReplyServiceImpl implements SchisandraShareCo
|
|||||||
.from(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY)
|
.from(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY)
|
||||||
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.DETAIL_ID.eq(detailId))
|
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.DETAIL_ID.eq(detailId))
|
||||||
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_TYPE.eq(0))
|
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_TYPE.eq(0))
|
||||||
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,false)
|
|
||||||
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT,false);
|
|
||||||
return this.schisandraShareCommentReplyDao.selectListByQuery(wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SchisandraShareCommentReply> listCommenthot(String detailId) {
|
|
||||||
QueryWrapper wrapper = QueryWrapper.create()
|
|
||||||
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
|
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
|
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
|
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,
|
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT,
|
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLAY_AUTHOR,
|
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CREATED_TIME)
|
|
||||||
.from(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY)
|
|
||||||
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.DETAIL_ID.eq(detailId))
|
|
||||||
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_TYPE.eq(0))
|
|
||||||
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CREATED_TIME,false);
|
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CREATED_TIME,false);
|
||||||
return this.schisandraShareCommentReplyDao.selectListByQuery(wrapper);
|
return this.schisandraShareCommentReplyDao.selectListByQuery(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraShareCommentReply> listCommenthot(String detailId) {
|
||||||
|
QueryWrapper wrapper = QueryWrapper.create()
|
||||||
|
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.DETAIL_ID,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLAY_AUTHOR,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CREATED_TIME)
|
||||||
|
.from(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY)
|
||||||
|
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.DETAIL_ID.eq(detailId))
|
||||||
|
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_TYPE.eq(0))
|
||||||
|
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT.add(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES) ,false);
|
||||||
|
return this.schisandraShareCommentReplyDao.selectListByQuery(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SchisandraShareCommentReply> listReply(String commentId){
|
public List<SchisandraShareCommentReply> listReply(String commentId){
|
||||||
QueryWrapper wrapper = QueryWrapper.create()
|
QueryWrapper wrapper = QueryWrapper.create()
|
||||||
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
|
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
|
||||||
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.DETAIL_ID,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,
|
||||||
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT,
|
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT,
|
||||||
@@ -139,8 +141,7 @@ public class SchisandraShareCommentReplyServiceImpl implements SchisandraShareCo
|
|||||||
.from(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY)
|
.from(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY)
|
||||||
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.TO_ID.eq(commentId))
|
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.TO_ID.eq(commentId))
|
||||||
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_TYPE.eq(1))
|
.where(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_TYPE.eq(1))
|
||||||
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,false)
|
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT.add(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES) ,false);
|
||||||
.orderBy(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.REPLY_COUNT,false);
|
|
||||||
return this.schisandraShareCommentReplyDao.selectListByQuery(wrapper);
|
return this.schisandraShareCommentReplyDao.selectListByQuery(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ public class SchisandraUserLikesCommentServiceImpl implements SchisandraUserLike
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SchisandraUserLikesComment queryByuserIdAndDetailId(String commentId, String userId) {
|
public SchisandraUserLikesComment queryByuserIdAndCommentId(String commentId, String userId) {
|
||||||
QueryWrapper queryWrapper = QueryWrapper.create()
|
QueryWrapper queryWrapper = QueryWrapper.create()
|
||||||
.select(SchisandraUserLikesCommentTableDef.SCHISANDRA_USER_LIKES_COMMENT.ID)
|
.select(SchisandraUserLikesCommentTableDef.SCHISANDRA_USER_LIKES_COMMENT.ID)
|
||||||
.where(SchisandraUserLikesCommentTableDef.SCHISANDRA_USER_LIKES_COMMENT.COMMENT_ID.eq(commentId))
|
.where(SchisandraUserLikesCommentTableDef.SCHISANDRA_USER_LIKES_COMMENT.COMMENT_ID.eq(commentId))
|
||||||
|
@@ -31,10 +31,9 @@ public class AddressRpc {
|
|||||||
return authUserAddressEntity;
|
return authUserAddressEntity;
|
||||||
}
|
}
|
||||||
SchisandraAuthAddressDTO data = result.getData();
|
SchisandraAuthAddressDTO data = result.getData();
|
||||||
authUserAddressEntity.setId(data.getId());
|
|
||||||
authUserAddressEntity.setUserId(data.getUserId());
|
|
||||||
authUserAddressEntity.setLocation(data.getLocation());
|
authUserAddressEntity.setLocation(data.getLocation());
|
||||||
authUserAddressEntity.setBrowser(data.getBrowser());
|
authUserAddressEntity.setBrowser(data.getBrowser());
|
||||||
|
authUserAddressEntity.setBrowserVersion(data.getBrowserVersion());
|
||||||
return authUserAddressEntity;
|
return authUserAddressEntity;
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user