diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..3502ea1
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/cloud-market-server/src/main/java/com/muyu/cloud/market/controller/OrdersController.java b/cloud-market-server/src/main/java/com/muyu/cloud/market/controller/OrdersController.java
index 013953d..5ef077f 100644
--- a/cloud-market-server/src/main/java/com/muyu/cloud/market/controller/OrdersController.java
+++ b/cloud-market-server/src/main/java/com/muyu/cloud/market/controller/OrdersController.java
@@ -155,18 +155,16 @@ public class OrdersController {
//订单修改支付状
@GetMapping("/updateByordersState1")
@Operation(summary = "订单修改支付状态=1,更改该商品的销量", description = "根据orderid修改数据库字段支付状态为1,根据productId修改数据库销量")
- public Result updateByordersState1ANDproductSales(@RequestParam("ordersId")Integer ordersId,@RequestParam("productId")Integer productId){
+ Result updateByordersState1ANDproductSales(@RequestParam("ordersId")Integer ordersId,@RequestParam("productId")Integer productId){
return orderShowService.updateByordersState1ANDproductSales(ordersId, productId);
}
@PostMapping("/updateByordersState2/{ordersId}")
@Operation(summary = "订单修改支付状态=2", description = "根据orderid修改数据库字段支付状态为2")
- public Result updateByordersState2(@Validated @PathVariable("ordersId") Integer ordersId) {
- try {
+ Result updateByordersState2(@Validated @PathVariable("ordersId") Integer ordersId) {
+
return orderShowService.updateByordersState2(ordersId);
- } catch (Exception e) {
- return Result.error("更新订单状态失败:" + e.getMessage());
- }
+
}
diff --git a/cloud-market-server/src/main/resources/mapper/market/OrderShowMapper.xml b/cloud-market-server/src/main/resources/mapper/market/OrderShowMapper.xml
index 67cbefc..659c782 100644
--- a/cloud-market-server/src/main/resources/mapper/market/OrderShowMapper.xml
+++ b/cloud-market-server/src/main/resources/mapper/market/OrderShowMapper.xml
@@ -86,31 +86,31 @@
*/-->
UPDATE `product`
- SET `product_sales` = product_sales + 1
- WHERE `product_id` = #{productId}
+ SET `product`.`product_sales` = `product`.`product_sales` + 1
+ WHERE `product`.`product_id` = #{productId}