删除订单
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.OrderDto;
|
||||
import com.chaozhanggui.system.cashierservice.service.OrderService;
|
||||
@@ -10,6 +11,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.Map;
|
||||
|
||||
@CrossOrigin(origins = "*")
|
||||
@RestController
|
||||
@@ -51,6 +53,14 @@ public class OrderController {
|
||||
return orderService.orderList(userId,page,size,status);
|
||||
}
|
||||
|
||||
@PostMapping("/rmOrder")
|
||||
private Result rmOrder(@RequestBody Map<String, Object> map){
|
||||
if (ObjectUtil.isEmpty(map) || map.size() <= 0 || !map.containsKey("orderId") || ObjectUtil.isEmpty(map.get("orderId"))) {
|
||||
return Result.fail("订单号不允许为空");
|
||||
}
|
||||
return orderService.rmOrder(Integer.valueOf(map.get("orderId").toString()));
|
||||
}
|
||||
|
||||
@GetMapping("/tradeIntegral")
|
||||
private Result tradeIntegral(@RequestParam("userId") String userId, @RequestParam("id") String id) throws IOException, ParseException {
|
||||
return orderService.tradeIntegral(userId,id);
|
||||
|
||||
Reference in New Issue
Block a user