PC端订单评价

This commit is contained in:
曹磊 2024-11-06 16:09:05 +08:00
parent b6009e0c59
commit ad959443ab
2 changed files with 10 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package com.sqx.modules.taking.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sqx.common.utils.DateUtils; import com.sqx.common.utils.DateUtils;
import com.sqx.common.utils.Result; import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.bl.order.entity.UserPackageOrder; import com.sqx.modules.bl.order.entity.UserPackageOrder;
import com.sqx.modules.taking.entity.TakingCommnt; import com.sqx.modules.taking.entity.TakingCommnt;
import com.sqx.modules.taking.service.OrderTakingCommentService; import com.sqx.modules.taking.service.OrderTakingCommentService;
@ -57,5 +58,13 @@ public class OrderTakingCommentController {
return Result.success(); return Result.success();
} }
/**
* 添加评论
*/
@PostMapping("/addGoodsNum")
@ApiOperation("添加评论")
public Result addGoodsNum(Long orderId, String content, Integer score,Long artificerId) {
return orderTakingCommentService.addGoodsNum(orderId, 0L, content, score,artificerId);
}
} }

View File

@ -90,7 +90,7 @@ public class OrderTakingCommentServiceImpl extends ServiceImpl<OrderTakingCommen
} }
Orders orders = ordersService.getById(orderId); Orders orders = ordersService.getById(orderId);
if(!orders.getStatus().equals(3)){ if(!orders.getStatus().equals(3)){
return Result.success("当前订单未完成或已经评价过了!"); return Result.error("当前订单未完成或已经评价过了!");
} }
String value = commonInfoService.findOne(323).getValue(); String value = commonInfoService.findOne(323).getValue();
if(value.contains(content)){ if(value.contains(content)){