88 lines
2.4 KiB
Java
Raw Normal View History

package com.cdzy.operations.controller;
2025-11-05 15:14:40 +08:00
import com.cdzy.common.model.request.PageParam;
2025-10-21 09:36:31 +08:00
import com.cdzy.common.model.response.JsonResult;
2025-11-05 16:34:54 +08:00
import com.cdzy.operations.model.dto.EbikeBikeInfoDto;
2025-11-05 15:14:40 +08:00
import com.cdzy.operations.model.vo.EbikeBatchLaunchVo;
import com.cdzy.operations.model.vo.EbikeBatchUnLaunchVo;
2025-10-21 09:51:07 +08:00
import com.cdzy.operations.model.vo.EbikeBikeBindVo;
2025-10-21 09:36:31 +08:00
import com.cdzy.operations.service.EbikeBikeInfoService;
2025-11-05 15:14:40 +08:00
import com.mybatisflex.core.paginate.Page;
2025-10-21 09:36:31 +08:00
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
2025-11-05 15:14:40 +08:00
import org.springframework.web.bind.annotation.*;
/**
2025-10-21 09:36:31 +08:00
* 车辆基本信息 控制层
*
* @author attiya
* @since 2025-10-17
*/
2025-10-21 09:36:31 +08:00
@Validated
@RestController
@RequestMapping("/ebikeBikeInfo")
public class EbikeBikeInfoController {
2025-10-21 09:36:31 +08:00
@Resource
private EbikeBikeInfoService ebikeBikeInfoService;
2025-10-21 09:51:51 +08:00
/**
* 整车绑定
2025-11-05 15:14:40 +08:00
*
2025-10-21 09:51:51 +08:00
* @param bindVo 绑定信息
* @return 绑定结果
*/
2025-10-21 09:36:31 +08:00
@PostMapping("bind")
2025-10-21 09:51:07 +08:00
public JsonResult<?> bind(@Validated @RequestBody EbikeBikeBindVo bindVo) {
ebikeBikeInfoService.bind(bindVo);
2025-10-21 09:36:31 +08:00
return JsonResult.success();
}
2025-11-05 15:14:40 +08:00
/**
* 未上架车辆分页查询
*
* @param pageParam 分页参数
* @return 结果
*/
@GetMapping("unLaunchPage")
public JsonResult<?> unLaunchPage(PageParam pageParam) {
2025-11-05 16:34:54 +08:00
Page<EbikeBikeInfoDto> page = ebikeBikeInfoService.unLaunchPage(pageParam);
2025-11-05 15:14:40 +08:00
return JsonResult.success(page);
}
/**
* 上架车辆分页查询
*
* @param pageParam 分页参数
* @return 结果
*/
@GetMapping("launchPage")
public JsonResult<?> launchPage(PageParam pageParam) {
2025-11-05 16:34:54 +08:00
Page<EbikeBikeInfoDto> page = ebikeBikeInfoService.launchPage(pageParam);
2025-11-05 15:14:40 +08:00
return JsonResult.success(page);
}
/**
* 批量上架
*
* @return 结果
*/
@PostMapping("batchLaunch")
public JsonResult<?> batchLaunch(@Validated @RequestBody EbikeBatchLaunchVo launchVo) {
ebikeBikeInfoService.batchLaunch(launchVo);
return JsonResult.success();
}
/**
* 批量下架
*
* @return 结果
*/
@PostMapping("batchUnLaunch")
public JsonResult<?> batchUnLaunch(@Validated @RequestBody EbikeBatchUnLaunchVo launchVo) {
ebikeBikeInfoService.batchUnLaunch(launchVo);
return JsonResult.success();
}
}