|
|
@@ -1,6 +1,8 @@
|
|
|
package com.sqx.modules.order.controller.app;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import com.sqx.common.exception.SqxException;
|
|
|
import com.sqx.common.utils.Result;
|
|
|
import com.sqx.modules.app.annotation.Login;
|
|
|
import com.sqx.modules.order.entity.Evaluate;
|
|
|
@@ -13,7 +15,12 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestAttribute;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
@@ -41,6 +48,9 @@ public class AppOrderController {
|
|
|
@PostMapping("/updateOrdersRemark")
|
|
|
public Result updateOrdersRemark(Long orderId,String remark){
|
|
|
TbOrder tbOrder = appOrderService.getById(orderId);
|
|
|
+ if (ObjectUtil.isNull(tbOrder)) {
|
|
|
+ throw new SqxException("无效的订单id");
|
|
|
+ }
|
|
|
tbOrder.setRemark(remark);
|
|
|
appOrderService.updateById(tbOrder);
|
|
|
return Result.success();
|