| | |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.BeanUtils; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.order.service.IOrderService; |
| | | import com.ruoyi.system.api.domain.Order; |
| | | import com.ruoyi.system.api.domain.dto.OrderDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderUpdDTO; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | |
| | | R<List<Order>> getOrderByGroupPurchaseId(@PathVariable("id") Long id) { |
| | | return R.ok(orderService.getOrderByGroupPurchaseId(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量更新订单状态 |
| | | * |
| | | * @param orderUpdDTOS 订单更新数据传输对象列表 |
| | | */ |
| | | @PutMapping("/upd-batch") |
| | | R<?> updateOrderList(@RequestBody List<OrderUpdDTO> orderUpdDTOS) { |
| | | List<Order> orders = BeanUtils.copyList(orderUpdDTOS, Order.class); |
| | | orderService.updateBatchById(orders); |
| | | return R.ok(); |
| | | } |
| | | } |