整车绑定
This commit is contained in:
parent
68298d0bef
commit
5eb1d5e49d
@ -1,7 +1,7 @@
|
||||
package com.cdzy.operations.controller;
|
||||
|
||||
import com.cdzy.common.model.response.JsonResult;
|
||||
import com.cdzy.operations.model.entity.EbikeBikeInfo;
|
||||
import com.cdzy.operations.model.vo.EbikeBikeBindVo;
|
||||
import com.cdzy.operations.service.EbikeBikeInfoService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -25,7 +25,8 @@ public class EbikeBikeInfoController {
|
||||
private EbikeBikeInfoService ebikeBikeInfoService;
|
||||
|
||||
@PostMapping("bind")
|
||||
public JsonResult<?> bind(@Validated @RequestBody EbikeBikeInfo ebikeBikeInfo) {
|
||||
public JsonResult<?> bind(@Validated @RequestBody EbikeBikeBindVo bindVo) {
|
||||
ebikeBikeInfoService.bind(bindVo);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
package com.cdzy.operations.model.vo;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类。
|
||||
*
|
||||
* @author attiya
|
||||
* @since 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EbikeBikeBindVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 运营商ID
|
||||
*/
|
||||
@NotNull(message = "运营商ID不能为空")
|
||||
private Long operatorId;
|
||||
|
||||
|
||||
/**
|
||||
* 电池ID
|
||||
*/
|
||||
@NotNull(message = "电池ID不能为空")
|
||||
private Long batteryId;
|
||||
|
||||
/**
|
||||
* 中控ID
|
||||
*/
|
||||
@NotNull(message = "中控ID不能为空")
|
||||
private Long ecuId;
|
||||
|
||||
/**
|
||||
* 头盔ID
|
||||
*/
|
||||
private Long helmetId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 是否包含头盔
|
||||
*/
|
||||
@NotNull(message = "是否包含头盔不能为空")
|
||||
private Boolean hasHelme;
|
||||
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.cdzy.operations.service;
|
||||
|
||||
import com.cdzy.operations.model.vo.EbikeBikeBindVo;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.cdzy.operations.model.entity.EbikeBikeInfo;
|
||||
|
||||
@ -11,4 +12,9 @@ import com.cdzy.operations.model.entity.EbikeBikeInfo;
|
||||
*/
|
||||
public interface EbikeBikeInfoService extends IService<EbikeBikeInfo> {
|
||||
|
||||
/**
|
||||
* 整车绑定同时生成车辆编号
|
||||
* @param bindVo 绑定信息
|
||||
*/
|
||||
void bind(EbikeBikeBindVo bindVo);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.cdzy.operations.service.impl;
|
||||
|
||||
import com.cdzy.operations.model.vo.EbikeBikeBindVo;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.cdzy.operations.model.entity.EbikeBikeInfo;
|
||||
import com.cdzy.operations.mapper.EbikeBikeInfoMapper;
|
||||
@ -15,4 +16,8 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, EbikeBikeInfo> implements EbikeBikeInfoService{
|
||||
|
||||
@Override
|
||||
public void bind(EbikeBikeBindVo bindVo) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user