| 对比新文件 |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.OrderLog; |
| | | import com.doumee.service.business.OrderLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 璁㈠崟鎿嶄綔鏃ュ織 |
| | | * @author rk |
| | | * @date 2026/04/13 |
| | | */ |
| | | @Api(tags = "璁㈠崟鎿嶄綔鏃ュ織") |
| | | @RestController |
| | | @RequestMapping("/business/orderLog") |
| | | public class OrderLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private OrderLogService orderLogService; |
| | | |
| | | @ApiOperation("鏍规嵁ID鍒犻櫎") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:orderLog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | orderLogService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("鎵归噺鍒犻櫎") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:orderLog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | orderLogService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("鍒嗛〉鏌ヨ") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:orderLog:query") |
| | | public ApiResponse<PageData<OrderLog>> findPage(@RequestBody PageWrap<OrderLog> pageWrap) { |
| | | return ApiResponse.success(orderLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("鏍规嵁ID鏌ヨ") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:orderLog:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(orderLogService.findById(id)); |
| | | } |
| | | } |