提交 bac4527f 作者: zhenjie

商品评价修改

上级 db0e42d2
...@@ -58,4 +58,6 @@ public interface UavOrderDao { ...@@ -58,4 +58,6 @@ public interface UavOrderDao {
BigDecimal getSaleOrderGMV(); BigDecimal getSaleOrderGMV();
List<UavOrderRemarkDO> listGoodsRemark(Integer remarkType, Integer goodsId); List<UavOrderRemarkDO> listGoodsRemark(Integer remarkType, Integer goodsId);
void updateUavOrderRemarkStatus(Integer id);
} }
...@@ -9,6 +9,7 @@ import lombok.Data; ...@@ -9,6 +9,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* @author: zj * @author: zj
...@@ -34,11 +35,13 @@ public class UavOrderRemarkDO implements Serializable { ...@@ -34,11 +35,13 @@ public class UavOrderRemarkDO implements Serializable {
private String uavImages; private String uavImages;
@ApiModelProperty(value = "评论内容") @ApiModelProperty(value = "评论内容")
private String content; private String content;
@ApiModelProperty(value = "生成时间")
private Date createTime;
public UavOrderRemarkDTO buildUavOrderRemarkDTO() { public UavOrderRemarkDTO buildUavOrderRemarkDTO() {
return UavOrderRemarkDTO.builder().id(this.id).remarkType(this.remarkType).mallGoodsId(this.mallGoodsId) return UavOrderRemarkDTO.builder().id(this.id).remarkType(this.remarkType).mallGoodsId(this.mallGoodsId)
.uavOrderId(this.uavOrderId).remarkLevel(this.remarkLevel).content(this.content).uavImages(this.uavImages) .uavOrderId(this.uavOrderId).remarkLevel(this.remarkLevel).content(this.content).uavImages(this.uavImages)
.build(); .createTime(this.createTime).build();
} }
public UavOrderRemarkDO(UavOrderRemarkVO uavOrderRemarkVO){ public UavOrderRemarkDO(UavOrderRemarkVO uavOrderRemarkVO){
......
package com.mmc.oms.model.dto.uav; package com.mmc.oms.model.dto.uav;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -7,6 +8,7 @@ import lombok.Data; ...@@ -7,6 +8,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* @author: zj * @author: zj
...@@ -32,4 +34,7 @@ public class UavOrderRemarkDTO implements Serializable { ...@@ -32,4 +34,7 @@ public class UavOrderRemarkDTO implements Serializable {
private String uavImages; private String uavImages;
@ApiModelProperty(value = "评论内容") @ApiModelProperty(value = "评论内容")
private String content; private String content;
@ApiModelProperty(value = "生成时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date createTime;
} }
...@@ -458,6 +458,7 @@ public class UavOrderServiceImpl implements UavOrderService { ...@@ -458,6 +458,7 @@ public class UavOrderServiceImpl implements UavOrderService {
} }
// 修改订单状态 // 修改订单状态
this.updateUavOrderStatus(uavOrderRemarkVO.getUavOrderId(), UavOrderStatus.WAITING_REMARK); this.updateUavOrderStatus(uavOrderRemarkVO.getUavOrderId(), UavOrderStatus.WAITING_REMARK);
uavOrderDao.updateUavOrderRemarkStatus(uavOrderDO.getId());
List<UavOrderSkuDO> uavOrderSkuDOS = uavOrderDao.listUavOrderSkuDO(uavOrderDO.getId()); List<UavOrderSkuDO> uavOrderSkuDOS = uavOrderDao.listUavOrderSkuDO(uavOrderDO.getId());
List<Integer> mallGoodsIds = uavOrderSkuDOS.stream().map(i -> i.getMallGoodsId()).distinct().collect(Collectors.toList()); List<Integer> mallGoodsIds = uavOrderSkuDOS.stream().map(i -> i.getMallGoodsId()).distinct().collect(Collectors.toList());
List<UavOrderRemarkDO> uavOrderRemarkDOS = new ArrayList<UavOrderRemarkDO>(); List<UavOrderRemarkDO> uavOrderRemarkDOS = new ArrayList<UavOrderRemarkDO>();
......
...@@ -181,6 +181,12 @@ ...@@ -181,6 +181,12 @@
where id = #{id} where id = #{id}
</update> </update>
<update id="updateUavOrderRemarkStatus">
update uav_order
set remark_status = 1
where id = #{id}
</update>
<select id="detail" resultType="com.mmc.oms.entity.uav.UavOrderDO"> <select id="detail" resultType="com.mmc.oms.entity.uav.UavOrderDO">
select select
<include refid="uav_order_column"/> <include refid="uav_order_column"/>
...@@ -314,5 +320,6 @@ ...@@ -314,5 +320,6 @@
select id, remark_type, mall_goods_id, uav_order_id, remark_level, uav_images, content, create_time select id, remark_type, mall_goods_id, uav_order_id, remark_level, uav_images, content, create_time
from uav_order_remark from uav_order_remark
where mall_goods_id = #{goodsId} and remark_type = #{remarkType} where mall_goods_id = #{goodsId} and remark_type = #{remarkType}
order by id desc
</select> </select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论