2026-07-26 12:34:13 +08:00
|
|
|
|
package io.as.modules.daycard.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import io.as.common.exception.ASException;
|
|
|
|
|
|
import io.as.common.utils.PageUtils;
|
|
|
|
|
|
import io.as.common.utils.R;
|
|
|
|
|
|
import io.as.modules.daycard.entity.DayCardOrderEntity;
|
|
|
|
|
|
import io.as.modules.daycard.service.DayCardOrderService;
|
2026-08-11 15:50:36 +08:00
|
|
|
|
import io.as.modules.sys.controller.AbstractController;
|
2026-07-26 12:34:13 +08:00
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 天卡订单 Controller(管理后台用)
|
|
|
|
|
|
* <p>App 端接口已迁移至 /api/jst/** (ApiJstController),本 Controller 仅保留管理后台用的分页查询和详情接口</p>
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Api(tags = "天卡订单")
|
|
|
|
|
|
@RestController
|
|
|
|
|
|
@RequestMapping("/manage/daycard")
|
2026-08-11 15:50:36 +08:00
|
|
|
|
public class DayCardOrderController extends AbstractController {
|
2026-07-26 12:34:13 +08:00
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
private DayCardOrderService dayCardOrderService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 分页查询订单
|
|
|
|
|
|
*/
|
|
|
|
|
|
@ApiOperation("分页查询天卡订单")
|
|
|
|
|
|
@GetMapping("/list")
|
|
|
|
|
|
public R list(@RequestParam Map<String, Object> params) {
|
2026-08-11 15:50:36 +08:00
|
|
|
|
PageUtils page = dayCardOrderService.queryPage(params, getUserId());
|
2026-07-26 12:34:13 +08:00
|
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
|
|
|
data.put("page", page);
|
|
|
|
|
|
return R.dataSuccess(data);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询订单详情
|
|
|
|
|
|
*/
|
|
|
|
|
|
@ApiOperation("查询订单详情")
|
|
|
|
|
|
@GetMapping("/info/{orderNo}")
|
|
|
|
|
|
public R info(@PathVariable("orderNo") String orderNo) {
|
|
|
|
|
|
DayCardOrderEntity order = dayCardOrderService.getByOrderNo(orderNo);
|
|
|
|
|
|
if (order == null) {
|
|
|
|
|
|
throw new ASException("订单不存在");
|
|
|
|
|
|
}
|
|
|
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
|
|
|
data.put("order", order);
|
|
|
|
|
|
return R.dataSuccess(data);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|