Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
4f506054
提交
4f506054
authored
6月 01, 2019
作者:
wangtongzhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加评论回复接口和评论列表接口实现以及部分实体调整
上级
685a3733
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
285 行增加
和
26 行删除
+285
-26
OrderApplication.java
...a/cn/iocoder/mall/order/application/OrderApplication.java
+28
-0
OrderCommentController.java
.../application/controller/users/OrderCommentController.java
+11
-6
OrderCommentReplyController.java
...ication/controller/users/OrderCommentReplyController.java
+42
-0
application.yaml
order/order-application/src/main/resources/application.yaml
+5
-1
OrderCommentPageBO.java
...java/cn/iocoder/mall/order/api/bo/OrderCommentPageBO.java
+4
-2
OrderCommentReplyCreateBO.java
.../iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java
+14
-1
OrderCommentRelpyTypeEnum.java
...er/mall/order/api/constant/OrderCommentRelpyTypeEnum.java
+35
-0
OrderReplyUserTypeEnum.java
...coder/mall/order/api/constant/OrderReplyUserTypeEnum.java
+2
-2
OrderCommentConvert.java
...n/iocoder/mall/order/biz/convert/OrderCommentConvert.java
+3
-2
OrderCommentReplyConvert.java
...oder/mall/order/biz/convert/OrderCommentReplyConvert.java
+27
-0
OrderCommentMapper.java
...ava/cn/iocoder/mall/order/biz/dao/OrderCommentMapper.java
+6
-2
OrderCommentReplyDO.java
...ocoder/mall/order/biz/dataobject/OrderCommentReplyDO.java
+1
-1
OrderCommentReplyServiceImpl.java
.../mall/order/biz/service/OrderCommentReplyServiceImpl.java
+58
-0
OrderCommentServiceImpl.java
...coder/mall/order/biz/service/OrderCommentServiceImpl.java
+23
-3
OrderCommentMapper.xml
...ice-impl/src/main/resources/mapper/OrderCommentMapper.xml
+4
-3
OrderCommentReplayMapper.xml
...pl/src/main/resources/mapper/OrderCommentReplayMapper.xml
+22
-3
没有找到文件。
order/order-application/src/main/java/cn/iocoder/mall/order/application/OrderApplication.java
浏览文件 @
4f506054
package
cn
.
iocoder
.
mall
.
order
.
application
;
import
org.apache.catalina.connector.Connector
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
;
import
org.springframework.context.annotation.Bean
;
@SpringBootApplication
(
scanBasePackages
=
{
"cn.iocoder.mall.order"
})
public
class
OrderApplication
{
...
...
@@ -10,4 +15,26 @@ public class OrderApplication {
SpringApplication
.
run
(
OrderApplication
.
class
,
args
);
}
/**
* 解决异常信息:
* java.lang.IllegalArgumentException:
* Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
* @return
*/
@Bean
public
ConfigurableServletWebServerFactory
webServerFactory
()
{
TomcatServletWebServerFactory
factory
=
new
TomcatServletWebServerFactory
();
factory
.
addConnectorCustomizers
(
new
TomcatConnectorCustomizer
()
{
@Override
public
void
customize
(
Connector
connector
)
{
connector
.
setProperty
(
"relaxedQueryChars"
,
"|{}[]"
);
}
});
return
factory
;
}
}
\ No newline at end of file
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderCommentController.java
浏览文件 @
4f506054
...
...
@@ -4,17 +4,14 @@ import cn.iocoder.common.framework.constant.MallConstants;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.mall.order.api.OrderCommentService
;
import
cn.iocoder.mall.order.api.bo.OrderCommentCreateBO
;
import
cn.iocoder.mall.order.api.bo.OrderCommentPageBO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO
;
import
cn.iocoder.mall.
user.sdk.annotation.RequiresLogin
;
import
cn.iocoder.mall.
order.api.dto.OrderCommentPageDTO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.dubbo.config.annotation.Reference
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
static
cn
.
iocoder
.
common
.
framework
.
vo
.
CommonResult
.
success
;
...
...
@@ -41,4 +38,12 @@ public class OrderCommentController {
public
CommonResult
<
OrderCommentCreateBO
>
createOrder
(
@RequestBody
@Validated
OrderCommentCreateDTO
orderCommentCreateDTO
)
{
return
success
(
orderCommentService
.
createOrderComment
(
orderCommentCreateDTO
));
}
@GetMapping
(
"getOrderCommentPage"
)
//@RequiresLogin
@ApiOperation
(
value
=
"获取评论分页"
)
public
CommonResult
<
OrderCommentPageBO
>
getOrderCommentPage
(
@Validated
OrderCommentPageDTO
orderCommentPageDTO
){
return
success
(
orderCommentService
.
getOrderCommentPage
(
orderCommentPageDTO
));
}
}
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderCommentReplyController.java
0 → 100644
浏览文件 @
4f506054
package
cn
.
iocoder
.
mall
.
order
.
application
.
controller
.
users
;
import
cn.iocoder.common.framework.constant.MallConstants
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.mall.order.api.OrderCommentReplyService
;
import
cn.iocoder.mall.order.api.bo.OrderCommentCreateBO
;
import
cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.dubbo.config.annotation.Reference
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
static
cn
.
iocoder
.
common
.
framework
.
vo
.
CommonResult
.
success
;
/**
*
* 评论回复模块 Api(user)
*
* @author wtz
* @time 2019-05-31 18:00
*/
@RestController
@RequestMapping
(
MallConstants
.
ROOT_PATH_USER
+
"/order_comment_reply"
)
@Api
(
"用户评论回复模块 "
)
public
class
OrderCommentReplyController
{
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.provider.OrderCommentService.version}"
)
private
OrderCommentReplyService
orderCommentReplyService
;
@PostMapping
(
"create_order_comment"
)
//@RequiresLogin
@ApiOperation
(
value
=
"创建订单"
)
public
CommonResult
<
OrderCommentReplyCreateBO
>
createOrderCommentReply
(
@RequestBody
@Validated
OrderCommentReplyCreateDTO
orderCommentReplyCreateDTO
){
return
success
(
orderCommentReplyService
.
createOrderCommentReply
(
orderCommentReplyCreateDTO
));
}
}
order/order-application/src/main/resources/application.yaml
浏览文件 @
4f506054
...
...
@@ -17,7 +17,11 @@ server:
context-path
:
/order-api/
swagger
:
enable
:
false
enable
:
true
# 暂时不去掉
title
:
订单子系统
description
:
订单子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.order.application.controller
management
:
endpoints
:
...
...
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentPageBO.java
浏览文件 @
4f506054
package
cn
.
iocoder
.
mall
.
order
.
api
.
bo
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
...
...
@@ -48,6 +49,7 @@ public class OrderCommentPageBO implements Serializable {
@Data
@Accessors
(
chain
=
true
)
@AllArgsConstructor
public
static
class
OrderCommentItem
{
/**
* 评论 id
...
...
@@ -87,7 +89,7 @@ public class OrderCommentPageBO implements Serializable {
/**
* 点赞数
*/
private
Integer
collect
Count
;
private
Integer
like
Count
;
/**
* 创建时间
...
...
@@ -98,7 +100,7 @@ public class OrderCommentPageBO implements Serializable {
* 商家回复列表
* 只展示最近的一条
*/
private
String
MerchantRapla
yContent
;
private
String
repl
yContent
;
}
...
...
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java
浏览文件 @
4f506054
package
cn
.
iocoder
.
mall
.
order
.
api
.
bo
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
*
* 订单回复创建
...
...
@@ -7,5 +12,13 @@ package cn.iocoder.mall.order.api.bo;
* @author wtz
* @time 2019-05-19 18:35
*/
public
class
OrderCommentReplyCreateBO
{
@Data
@Accessors
(
chain
=
true
)
public
class
OrderCommentReplyCreateBO
implements
Serializable
{
/**
* 评论回复 id
*/
private
Integer
id
;
}
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderCommentRelpyTypeEnum.java
0 → 100644
浏览文件 @
4f506054
package
cn
.
iocoder
.
mall
.
order
.
api
.
constant
;
/**
*
* 评论回复类型
*
* @author wtz
* @time 2019-06-01 10:30:00
*/
public
enum
OrderCommentRelpyTypeEnum
{
REPLY_REPLY
(
0
,
"回复的回复"
),
COMMENT_REPLY
(
1
,
"评论的回复"
);
/**
* 状态值
*/
private
Integer
value
;
/**
* 状态名
*/
private
String
name
;
OrderCommentRelpyTypeEnum
(
Integer
value
,
String
name
)
{
this
.
value
=
value
;
this
.
name
=
name
;
}
public
Integer
getValue
()
{
return
value
;
}
public
String
getName
()
{
return
name
;
}
}
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderReplyUserTypeEnum.java
浏览文件 @
4f506054
...
...
@@ -9,8 +9,8 @@ package cn.iocoder.mall.order.api.constant;
*/
public
enum
OrderReplyUserTypeEnum
{
USER
(
1
,
"普通用户"
),
MERCHANT
(
2
,
"商家"
);
USER
(
0
,
"普通用户"
),
MERCHANT
(
1
,
"商家"
);
/**
* 状态值
*/
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/convert/OrderCommentConvert.java
浏览文件 @
4f506054
...
...
@@ -12,6 +12,9 @@ import java.util.List;
/**
* 订单评论 convert
*
* @author wtz
* @time 2019-05-30 18:30
*/
@Mapper
public
interface
OrderCommentConvert
{
...
...
@@ -24,6 +27,4 @@ public interface OrderCommentConvert {
@Mappings
({})
OrderCommentCreateBO
convert
(
OrderCommentDO
orderCommentDO
);
@Mappings
({})
List
<
OrderCommentPageBO
.
OrderCommentItem
>
convert
(
List
<
OrderCommentDO
>
orderCommentDOList
);
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/convert/OrderCommentReplyConvert.java
0 → 100644
浏览文件 @
4f506054
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
/**
*
* 评论回复 convert
*
* @author wtz
* @time 2019-05-31 18:30
*/
@Mapper
public
interface
OrderCommentReplyConvert
{
OrderCommentReplyConvert
INSTANCE
=
Mappers
.
getMapper
(
OrderCommentReplyConvert
.
class
);
@Mappings
({})
OrderCommentReplyDO
convert
(
OrderCommentReplyCreateDTO
orderCommentReplyCreateDTO
);
@Mappings
({})
OrderCommentReplyCreateBO
convert
(
OrderCommentReplyDO
orderCommentReplyDO
);
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderCommentMapper.java
浏览文件 @
4f506054
...
...
@@ -39,10 +39,14 @@ public interface OrderCommentMapper{
/**
* 根据 sku id 分页查询评论
* @param orderCommentPageDTO
* @param productSkuId
* @param offset
* @param limit
* @return
*/
List
<
OrderCommentDO
>
selectCommentPage
(
OrderCommentPageDTO
orderCommentPageDTO
);
List
<
OrderCommentDO
>
selectCommentPage
(
@Param
(
"productSkuId"
)
Integer
productSkuId
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"limit"
)
Integer
limit
);
/**
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderCommentReplyDO.java
浏览文件 @
4f506054
...
...
@@ -55,7 +55,7 @@ public class OrderCommentReplyDO extends BaseDO {
private
String
parentUserAvatar
;
/**
* 回复的
数量
* 回复的
内容
*/
private
String
replyContent
;
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderCommentReplyServiceImpl.java
0 → 100644
浏览文件 @
4f506054
package
cn
.
iocoder
.
mall
.
order
.
biz
.
service
;
import
cn.iocoder.mall.order.api.OrderCommentReplyService
;
import
cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO
;
import
cn.iocoder.mall.order.api.bo.OrderCommentReplyPageBO
;
import
cn.iocoder.mall.order.api.constant.OrderCommentRelpyTypeEnum
;
import
cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentReplyPageDTO
;
import
cn.iocoder.mall.order.biz.convert.OrderCommentReplyConvert
;
import
cn.iocoder.mall.order.biz.dao.OrderCommentReplayMapper
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
/**
*
* 订单评论回复 service impl
*
* @author wtz
* @time 2019-05-31 18:30
*/
@Service
@org
.
apache
.
dubbo
.
config
.
annotation
.
Service
(
validation
=
"true"
,
version
=
"${dubbo.provider.OrderCommentReplyService.version}"
)
public
class
OrderCommentReplyServiceImpl
implements
OrderCommentReplyService
{
@Autowired
private
OrderCommentReplayMapper
orderCommentReplayMapper
;
@Override
public
List
<
OrderCommentReplyPageBO
>
getOrderCommentReplyPage
(
OrderCommentReplyPageDTO
orderCommentReplyPageDTO
)
{
return
null
;
}
/**
* 创建评论回复
* @param orderCommentReplyCreateDTO
* @return
*/
@Override
public
OrderCommentReplyCreateBO
createOrderCommentReply
(
OrderCommentReplyCreateDTO
orderCommentReplyCreateDTO
)
{
OrderCommentReplyDO
orderCommentReplyDO
=
OrderCommentReplyConvert
.
INSTANCE
.
convert
(
orderCommentReplyCreateDTO
);
orderCommentReplyDO
.
setCreateTime
(
new
Date
());
orderCommentReplyDO
.
setUpdateTime
(
new
Date
());
Integer
replyType
=
orderCommentReplyCreateDTO
.
getCommentId
()==
orderCommentReplyCreateDTO
.
getParentId
()?
OrderCommentRelpyTypeEnum
.
COMMENT_REPLY
.
getValue
():
OrderCommentRelpyTypeEnum
.
REPLY_REPLY
.
getValue
();
orderCommentReplyDO
.
setReplyType
(
replyType
);
orderCommentReplayMapper
.
insert
(
orderCommentReplyDO
);
return
OrderCommentReplyConvert
.
INSTANCE
.
convert
(
orderCommentReplyDO
);
}
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderCommentServiceImpl.java
浏览文件 @
4f506054
...
...
@@ -4,17 +4,21 @@ import cn.iocoder.mall.order.api.OrderCommentService;
import
cn.iocoder.mall.order.api.bo.OrderCommentCreateBO
;
import
cn.iocoder.mall.order.api.bo.OrderCommentInfoAndMerchantReplyBO
;
import
cn.iocoder.mall.order.api.bo.OrderCommentPageBO
;
import
cn.iocoder.mall.order.api.constant.OrderReplyUserTypeEnum
;
import
cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentPageDTO
;
import
cn.iocoder.mall.order.biz.convert.OrderCommentConvert
;
import
cn.iocoder.mall.order.biz.dao.OrderCommentMapper
;
import
cn.iocoder.mall.order.biz.dao.OrderCommentReplayMapper
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentDO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
*
...
...
@@ -30,6 +34,9 @@ public class OrderCommentServiceImpl implements OrderCommentService {
@Autowired
private
OrderCommentMapper
orderCommentMapper
;
@Autowired
private
OrderCommentReplayMapper
orderCommentReplayMapper
;
@Autowired
private
OrderCommentService
orderCommentService
;
...
...
@@ -50,11 +57,24 @@ public class OrderCommentServiceImpl implements OrderCommentService {
public
OrderCommentPageBO
getOrderCommentPage
(
OrderCommentPageDTO
orderCommentPageDTO
)
{
OrderCommentPageBO
orderCommentPageBO
=
new
OrderCommentPageBO
();
//分页内容
List
<
OrderCommentDO
>
orderCommentDOList
=
orderCommentMapper
.
selectCommentPage
(
orderCommentPageDTO
);
//查询商家的回复
int
offset
=
(
orderCommentPageDTO
.
getPageNo
()
-
1
)
*
orderCommentPageDTO
.
getPageSize
();
List
<
OrderCommentDO
>
orderCommentDOList
=
orderCommentMapper
.
selectCommentPage
(
orderCommentPageDTO
.
getProductSkuId
(),
offset
,
orderCommentPageDTO
.
getPageSize
());
//分页评论的 id
List
<
Integer
>
commentIds
=
orderCommentDOList
.
stream
().
map
(
x
->
x
.
getId
()).
collect
(
Collectors
.
toList
());
//获取商家最新的评论回复
List
<
OrderCommentReplyDO
>
orderCommentReplyDOList
=
orderCommentReplayMapper
.
selectCommentNewMerchantReplyByCommentIds
(
commentIds
,
OrderReplyUserTypeEnum
.
MERCHANT
.
getValue
());
//评论组装
List
<
OrderCommentPageBO
.
OrderCommentItem
>
orderCommentItemList
=
orderCommentDOList
.
stream
()
.
flatMap
(
x
->
orderCommentReplyDOList
.
stream
()
.
filter
(
y
->
x
.
getId
()==
y
.
getCommentId
())
.
map
(
y
->
new
OrderCommentPageBO
.
OrderCommentItem
(
x
.
getId
(),
x
.
getUserAvatar
(),
x
.
getUserNickName
(),
x
.
getStar
(),
x
.
getCommentContent
(),
x
.
getCommentPics
(),
x
.
getReplayCount
(),
x
.
getLikeCount
(),
x
.
getCreateTime
(),
y
.
getReplyContent
()))
).
collect
(
Collectors
.
toList
());
//总数
int
totalCount
=
orderCommentMapper
.
selectCommentTotalCountByProductSkuId
(
orderCommentPageDTO
.
getProductSkuId
());
orderCommentPageBO
.
setOrderCommentItems
(
OrderCommentConvert
.
INSTANCE
.
convert
(
orderCommentDOList
)
);
orderCommentPageBO
.
setOrderCommentItems
(
orderCommentItemList
);
orderCommentPageBO
.
setTotal
(
totalCount
);
return
orderCommentPageBO
;
}
...
...
order/order-service-impl/src/main/resources/mapper/OrderCommentMapper.xml
浏览文件 @
4f506054
...
...
@@ -21,7 +21,7 @@
<!--根据 sku id 获取评论总数-->
<select
id=
"selectCommentTotalCountByProductSkuId"
parameterType=
"Integer"
resultType=
"java.lang.Integer"
>
SELECT
COUNT
(*)
COUNT(*)
FROM order_comment
WHERE
product_sku_id = #{productSkuId}
...
...
@@ -35,7 +35,7 @@
WHERE
product_sku_id = #{productSkuId}
ORDER BY create_time DESC
LIMIT
${pageNo * pageSize}, ${pageSize
}
LIMIT
#{offset}, #{limit
}
</select>
<!--根据评论 id 获取用户详情-->
...
...
@@ -46,7 +46,7 @@
WHERE
id = #{id}
ORDER BY create_time DESC
LIMIT ${
pageNo * pageSize}, ${pageSize
}
LIMIT ${
pageNo * pageSize },${ pageSize
}
</select>
</mapper>
\ No newline at end of file
order/order-service-impl/src/main/resources/mapper/OrderCommentReplayMapper.xml
浏览文件 @
4f506054
...
...
@@ -9,7 +9,7 @@
<!--插入-->
<insert
id=
"insert"
parameterType=
"OrderCommentReplyDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO order_comment_replay(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,reply_user_id
INSERT INTO order_comment_replay(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,reply_user_id
,
reply_user_nick_name,reply_user_avatar,user_type,create_time,update_time)
VALUES (#{commentId},#{replyType},#{parentId},#{parentUserId},#{parentUserNickName},#{parentUserAvatar},#{replyContent},#{replyUserId},
#{replyUserNickName},#{replyUserAvatar},#{userType},#{createTime},#{updateTime})
...
...
@@ -51,10 +51,29 @@
LIMIT ${pageNo * pageSize}, ${pageSize}
</select>
<!--根据评论 id 查询商家最新的评论列表-->
<select
id=
"selectCommentNewMerchantReplyByCommentIds"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_comment_replay
WHERE
create_time=(SELECT
a.maxtime
FROM
(SELECT
MAX(create_time) AS maxtime,comment_id
FROM order_comment_replay
WHERE
comment_id IN
<foreach
collection=
"commentIds"
item=
"commentId"
separator=
","
open=
"("
close=
")"
>
#{commentId}
</foreach>
GROUP BY comment_id ) AS a)
AND
comment_id IN
<foreach
collection=
"commentIds"
item=
"commentId"
separator=
","
open=
"("
close=
")"
>
#{commentId}
</foreach>
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论