中控协议更改为根据品牌决定
This commit is contained in:
parent
0716ebb135
commit
2c6ccdf0fc
@ -1,38 +0,0 @@
|
||||
package com.cdzy.operations.controller;
|
||||
|
||||
import com.cdzy.common.model.response.JsonResult;
|
||||
import com.cdzy.operations.model.entity.EbikeAgreement;
|
||||
import com.cdzy.operations.service.EbikeAgreementService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中控协议控制层。
|
||||
*
|
||||
* @author attiya
|
||||
* @since 2025-10-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ebikeAgreement")
|
||||
public class EbikeAgreementController {
|
||||
|
||||
@Resource
|
||||
private EbikeAgreementService ebikeAgreementService;
|
||||
|
||||
|
||||
/**
|
||||
* 协议列表。
|
||||
*
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping("list")
|
||||
public JsonResult<?> list() {
|
||||
List<EbikeAgreement> list = ebikeAgreementService.list();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package com.cdzy.operations.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.cdzy.operations.model.entity.EbikeAgreement;
|
||||
|
||||
/**
|
||||
* 映射层。
|
||||
*
|
||||
* @author attiya
|
||||
* @since 2025-10-13
|
||||
*/
|
||||
public interface EbikeAgreementMapper extends BaseMapper<EbikeAgreement> {
|
||||
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
package com.cdzy.operations.model.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 实体类。
|
||||
*
|
||||
* @author attiya
|
||||
* @since 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("ebike_agreement")
|
||||
public class EbikeAgreement implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 协议id
|
||||
*/
|
||||
@Id
|
||||
private Long agreementId;
|
||||
|
||||
/**
|
||||
* 协议名称
|
||||
*/
|
||||
private String agreementName;
|
||||
|
||||
/**
|
||||
* 协议标识
|
||||
*/
|
||||
private String agreementCode;
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package com.cdzy.operations.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.cdzy.operations.model.entity.EbikeAgreement;
|
||||
|
||||
/**
|
||||
* 服务层。
|
||||
*
|
||||
* @author attiya
|
||||
* @since 2025-10-13
|
||||
*/
|
||||
public interface EbikeAgreementService extends IService<EbikeAgreement> {
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package com.cdzy.operations.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.cdzy.operations.model.entity.EbikeAgreement;
|
||||
import com.cdzy.operations.mapper.EbikeAgreementMapper;
|
||||
import com.cdzy.operations.service.EbikeAgreementService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 服务层实现。
|
||||
*
|
||||
* @author attiya
|
||||
* @since 2025-10-13
|
||||
*/
|
||||
@Service
|
||||
public class EbikeAgreementServiceImpl extends ServiceImpl<EbikeAgreementMapper, EbikeAgreement> implements EbikeAgreementService{
|
||||
|
||||
}
|
||||
@ -1,23 +1,13 @@
|
||||
package com.cdzy.operations;
|
||||
|
||||
import com.cdzy.operations.model.entity.EbikeAgreement;
|
||||
import com.cdzy.operations.service.EbikeAgreementService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class EbikeOperationsApplicationTests {
|
||||
|
||||
@Resource
|
||||
EbikeAgreementService agreementService;
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
EbikeAgreement agreement = new EbikeAgreement();
|
||||
agreement.setAgreementName("默认协议");
|
||||
agreement.setAgreementCode("default");
|
||||
agreementService.save(agreement);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user