Merge branch 'dev2'
# Conflicts: # cloud-market-server/src/main/java/com/muyu/cloud/market/controller/OrdersController.javadev2
commit
423747d53a
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="AliAccessStaticViaInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
|
@ -155,18 +155,16 @@ public class OrdersController {
|
||||||
//订单修改支付状
|
//订单修改支付状
|
||||||
@GetMapping("/updateByordersState1")
|
@GetMapping("/updateByordersState1")
|
||||||
@Operation(summary = "订单修改支付状态=1,更改该商品的销量", description = "根据orderid修改数据库字段支付状态为1,根据productId修改数据库销量")
|
@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);
|
return orderShowService.updateByordersState1ANDproductSales(ordersId, productId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/updateByordersState2/{ordersId}")
|
@PostMapping("/updateByordersState2/{ordersId}")
|
||||||
@Operation(summary = "订单修改支付状态=2", description = "根据orderid修改数据库字段支付状态为2")
|
@Operation(summary = "订单修改支付状态=2", description = "根据orderid修改数据库字段支付状态为2")
|
||||||
public Result updateByordersState2(@Validated @PathVariable("ordersId") Integer ordersId) {
|
Result updateByordersState2(@Validated @PathVariable("ordersId") Integer ordersId) {
|
||||||
try {
|
|
||||||
return orderShowService.updateByordersState2(ordersId);
|
return orderShowService.updateByordersState2(ordersId);
|
||||||
} catch (Exception e) {
|
|
||||||
return Result.error("更新订单状态失败:" + e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -86,31 +86,31 @@
|
||||||
*/-->
|
*/-->
|
||||||
<update id="updateByordersState1">
|
<update id="updateByordersState1">
|
||||||
UPDATE `orders`
|
UPDATE `orders`
|
||||||
SET `orders_state` = 1,
|
SET `orders`.`orders_state` = 1
|
||||||
WHERE `orders_id` = #{ordersId}
|
WHERE `orders`.`orders_id` = #{ordersId}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByproductSales">
|
<update id="updateByproductSales">
|
||||||
UPDATE `product`
|
UPDATE `product`
|
||||||
SET `product_sales` = product_sales + 1
|
SET `product`.`product_sales` = `product`.`product_sales` + 1
|
||||||
WHERE `product_id` = #{productId}
|
WHERE `product`.`product_id` = #{productId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<update id="updateByordersState2">
|
<update id="updateByordersState2">
|
||||||
UPDATE `orders`
|
UPDATE `orders`
|
||||||
SET `orders_state`= 2
|
SET `orders`.`orders_state`= 2
|
||||||
WHERE `orders_id`= #{ordersId}
|
WHERE `orders`.`orders_id`= #{ordersId}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByordersState3">
|
<update id="updateByordersState3">
|
||||||
UPDATE `orders`
|
UPDATE `orders`
|
||||||
SET `orders_state`= 3
|
SET `orders`.`orders_state`= 3
|
||||||
WHERE `orders_id`= #{ordersId}
|
WHERE `orders`.`orders_id`= #{ordersId}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByordersState4">
|
<update id="updateByordersState4">
|
||||||
UPDATE `orders`
|
UPDATE `orders`
|
||||||
SET `orders_state`= 4
|
SET `orders`.`orders_state`= 4
|
||||||
WHERE `orders_id`= #{ordersId}
|
WHERE `orders`.`orders_id`= #{ordersId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 彻底删除(根据orderid删除数据库字段)-->
|
<!-- 彻底删除(根据orderid删除数据库字段)-->
|
||||||
|
|
Loading…
Reference in New Issue