88 lines
2.4 KiB
Java
88 lines
2.4 KiB
Java
package com.cdzy.operations.controller;
|
|
|
|
import com.cdzy.common.model.request.PageParam;
|
|
import com.cdzy.common.model.response.JsonResult;
|
|
import com.cdzy.operations.model.dto.EbikeBikeInfoDto;
|
|
import com.cdzy.operations.model.vo.EbikeBatchLaunchVo;
|
|
import com.cdzy.operations.model.vo.EbikeBatchUnLaunchVo;
|
|
import com.cdzy.operations.model.vo.EbikeBikeBindVo;
|
|
import com.cdzy.operations.service.EbikeBikeInfoService;
|
|
import com.mybatisflex.core.paginate.Page;
|
|
import jakarta.annotation.Resource;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
/**
|
|
* 车辆基本信息 控制层。
|
|
*
|
|
* @author attiya
|
|
* @since 2025-10-17
|
|
*/
|
|
@Validated
|
|
@RestController
|
|
@RequestMapping("/ebikeBikeInfo")
|
|
public class EbikeBikeInfoController {
|
|
|
|
@Resource
|
|
private EbikeBikeInfoService ebikeBikeInfoService;
|
|
|
|
/**
|
|
* 整车绑定
|
|
*
|
|
* @param bindVo 绑定信息
|
|
* @return 绑定结果
|
|
*/
|
|
@PostMapping("bind")
|
|
public JsonResult<?> bind(@Validated @RequestBody EbikeBikeBindVo bindVo) {
|
|
ebikeBikeInfoService.bind(bindVo);
|
|
return JsonResult.success();
|
|
}
|
|
|
|
/**
|
|
* 未上架车辆分页查询
|
|
*
|
|
* @param pageParam 分页参数
|
|
* @return 结果
|
|
*/
|
|
@GetMapping("unLaunchPage")
|
|
public JsonResult<?> unLaunchPage(PageParam pageParam) {
|
|
Page<EbikeBikeInfoDto> page = ebikeBikeInfoService.unLaunchPage(pageParam);
|
|
return JsonResult.success(page);
|
|
}
|
|
|
|
/**
|
|
* 上架车辆分页查询
|
|
*
|
|
* @param pageParam 分页参数
|
|
* @return 结果
|
|
*/
|
|
@GetMapping("launchPage")
|
|
public JsonResult<?> launchPage(PageParam pageParam) {
|
|
Page<EbikeBikeInfoDto> page = ebikeBikeInfoService.launchPage(pageParam);
|
|
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();
|
|
}
|
|
}
|