Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
6cdb7e59
提交
6cdb7e59
authored
5月 19, 2019
作者:
wangtongzhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
实现了一下增加接口订单评论和评论的部分方法调整一下参数
上级
862c139c
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
130 行增加
和
8 行删除
+130
-8
OrderCommentService.java
...n/java/cn/iocoder/mall/order/api/OrderCommentService.java
+2
-1
OrderCommentCreateBO.java
...va/cn/iocoder/mall/order/api/bo/OrderCommentCreateBO.java
+17
-0
OrderCommentReplyCreateBO.java
.../iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java
+11
-0
OrderCommentConvert.java
...n/iocoder/mall/order/biz/convert/OrderCommentConvert.java
+24
-0
OrderCommentMapper.java
...ava/cn/iocoder/mall/order/biz/dao/OrderCommentMapper.java
+4
-3
OrderCommentReplayMapper.java
.../iocoder/mall/order/biz/dao/OrderCommentReplayMapper.java
+4
-2
OrderCommentServiceImpl.java
...coder/mall/order/biz/service/OrderCommentServiceImpl.java
+66
-0
OrderCommentMapper.xml
...ice-impl/src/main/resources/mapper/OrderCommentMapper.xml
+1
-1
OrderCommentReplayMapper.xml
...pl/src/main/resources/mapper/OrderCommentReplayMapper.xml
+1
-1
没有找到文件。
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/OrderCommentService.java
浏览文件 @
6cdb7e59
package
cn
.
iocoder
.
mall
.
order
.
api
;
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
;
...
...
@@ -20,7 +21,7 @@ public interface OrderCommentService {
* @param orderCommentCreateDTO
* @return
*/
Boolean
createOrderComment
(
OrderCommentCreateDTO
orderCommentCreateDTO
);
OrderCommentCreateBO
createOrderComment
(
OrderCommentCreateDTO
orderCommentCreateDTO
);
/**
...
...
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentCreateBO.java
0 → 100644
浏览文件 @
6cdb7e59
package
cn
.
iocoder
.
mall
.
order
.
api
.
bo
;
/**
*
* 订单评论创建
*
* @author wtz
* @time 2019-05-19 18:32
*
*/
public
class
OrderCommentCreateBO
{
/**
* 订单评论 id
*/
private
Integer
commentId
;
}
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java
0 → 100644
浏览文件 @
6cdb7e59
package
cn
.
iocoder
.
mall
.
order
.
api
.
bo
;
/**
*
* 订单回复创建
*
* @author wtz
* @time 2019-05-19 18:35
*/
public
class
OrderCommentReplyCreateBO
{
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/convert/OrderCommentConvert.java
0 → 100644
浏览文件 @
6cdb7e59
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderCommentBO
;
import
cn.iocoder.mall.order.api.bo.OrderCommentCreateBO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentDO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
/**
* 订单评论 convert
*/
@Mapper
public
interface
OrderCommentConvert
{
OrderCommentConvert
INSTANCE
=
Mappers
.
getMapper
(
OrderCommentConvert
.
class
);
@Mappings
({})
OrderCommentDO
convert
(
OrderCommentCreateDTO
orderCommentCreateDTO
);
@Mappings
({})
OrderCommentCreateBO
convert
(
OrderCommentDO
orderCommentDO
);
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderCommentMapper.java
浏览文件 @
6cdb7e59
package
cn
.
iocoder
.
mall
.
order
.
biz
.
dao
;
import
cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentPageDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentDO
;
...
...
@@ -17,15 +18,15 @@ import java.util.List;
* @time 2019-05-16 20:52
*/
@Repository
public
interface
OrderCommentMapper
extends
BaseMapper
<
OrderCommentDO
>
{
public
interface
OrderCommentMapper
{
/**
* 插入订单评论
* @param orderComment
CreateDT
O
* @param orderComment
D
O
* @return
*/
int
insert
(
OrderCommentCreateDTO
orderCommentCreateDT
O
);
void
insert
(
OrderCommentDO
orderCommentD
O
);
/**
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderCommentReplayMapper.java
浏览文件 @
6cdb7e59
...
...
@@ -5,6 +5,7 @@ import cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO;
import
cn.iocoder.mall.order.api.dto.OrderCommentReplyPageDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -14,14 +15,15 @@ import java.util.List;
* @author wtz
* @time 2019-05-16 21:33
*/
@Repository
public
interface
OrderCommentReplayMapper
{
/**
* 插入订单评论回复
* @param orderCommentReply
CreateDT
O
* @param orderCommentReply
D
O
* @return
*/
int
insert
(
OrderCommentReplyCreateDTO
orderCommentReplyCreateDT
O
);
void
insert
(
OrderCommentReplyDO
orderCommentReplyD
O
);
/**
* 根据评论 id 和用户类型获取商家回复
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderCommentServiceImpl.java
0 → 100644
浏览文件 @
6cdb7e59
package
cn
.
iocoder
.
mall
.
order
.
biz
.
service
;
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.dto.OrderCommentCreateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentPageDTO
;
import
cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO
;
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
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
*
* 订单评论 service impl
*
* @author wtz
* @time 2019
*/
@Service
@org
.
apache
.
dubbo
.
config
.
annotation
.
Service
(
validation
=
"true"
,
version
=
"${dubbo.provider.OrderService.version}"
)
public
class
OrderCommentServiceImpl
implements
OrderCommentService
{
@Autowired
private
OrderCommentMapper
orderCommentMapper
;
@Autowired
private
OrderCommentReplayMapper
orderCommentReplayMapper
;
@Override
public
OrderCommentCreateBO
createOrderComment
(
OrderCommentCreateDTO
orderCommentCreateDTO
)
{
//首先判断订单状态是否处于待评价状态
//接下来就是入库
OrderCommentDO
orderCommentDO
=
OrderCommentConvert
.
INSTANCE
.
convert
(
orderCommentCreateDTO
);
orderCommentDO
.
setCreateTime
(
new
Date
());
orderCommentMapper
.
insert
(
orderCommentDO
);
return
OrderCommentConvert
.
INSTANCE
.
convert
(
orderCommentDO
);
}
@Override
public
Boolean
createOrderCommentReply
(
OrderCommentReplyCreateDTO
orderCommentReplyCreateDTO
)
{
return
null
;
}
@Override
public
OrderCommentPageBO
getOrderCommentPage
(
OrderCommentPageDTO
orderCommentPageDTO
)
{
return
null
;
}
@Override
public
OrderCommentInfoAndMerchantReplyBO
getOrderCommentInfo
(
Integer
commentId
,
Integer
userType
)
{
return
null
;
}
@Override
public
Boolean
OrderCommentTimeOutProductCommentTask
()
{
return
null
;
}
}
order/order-service-impl/src/main/resources/mapper/OrderCommentMapper.xml
浏览文件 @
6cdb7e59
...
...
@@ -9,7 +9,7 @@
</sql>
<!--插入-->
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<insert
id=
"insert"
parameterType=
"OrderCommentDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO order_comment(order_id,order_no,product_spu_id,product_spu_name,product_sku_id,
product_sku_attrs,product_sku_price,product_sku_pic_url,user_id,user_avatar,user_nick_name,star,
product_description_star,logistics_star,merchant_star,comment_content,comment_pics,create_time,update_time)
...
...
order/order-service-impl/src/main/resources/mapper/OrderCommentReplayMapper.xml
浏览文件 @
6cdb7e59
...
...
@@ -8,7 +8,7 @@
</sql>
<!--插入-->
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<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
reply_user_nick_name,reply_user_avatar,user_type,create_time,update_time)
VALUES (#{commentId},#{replyType},#{parentId},#{parentUserId},#{parentUserNickName},#{parentUserAvatar},#{replyContent},#{replyUserId},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论