From a9fe1187de4ab432f6db7a7f3581b0fbcc6b07c7 Mon Sep 17 00:00:00 2001 From: PQZ Date: Thu, 1 Aug 2024 17:23:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/common/DictBaseConstants.java | 21 ++++ .../cn/iocoder/yudao/common/TestCommon.java | 4 - .../admin/CustomerMainController.java | 95 ++++++++++++------- .../module/custom/entity/CustomerMain.java | 20 ++-- .../custom/mapper/CustomerMainMapper.java | 18 ++++ .../custom/service/CustomerMainService.java | 27 +++++- .../service/impl/CustomerMainServiceImpl.java | 37 ++++++++ .../custom/vo/CustomerMainPageReqVO.java | 68 ++----------- .../module/custom/vo/CustomerMainRespVO.java | 90 ++++-------------- .../mapper/custom/CustomerMainMapper.xml | 45 ++++++++- .../src/main/resources/application-local.yaml | 3 +- 11 files changed, 244 insertions(+), 184 deletions(-) create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/common/DictBaseConstants.java delete mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/common/TestCommon.java diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/DictBaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/DictBaseConstants.java new file mode 100644 index 00000000..35db1e49 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/DictBaseConstants.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.common; + + +/** + * 字典编码常量类 + * @author PQZ + * @date 16:20 2024/8/1 +**/ +public class DictBaseConstants { + /**客户类型字典编码*/ + public static final String DICT_CUS_TYPE = "cus_type"; + /**客户初始来源字典编码*/ + public static final String DICT_CUS_DATA_FROM = "cus_data_from"; + /**业务分类字典编码*/ + public static final String DICT_CUS_BUSI_TYPE = "cus_busi_type"; + /**客户注册方式字典编码*/ + public static final String DICT_SIGN_TYPE = "cus_sign_type"; + /**性别*/ + public static final String DICT_SYS_USER_SEX = "system_user_sex"; + +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/TestCommon.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/TestCommon.java deleted file mode 100644 index 9fb906a9..00000000 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/TestCommon.java +++ /dev/null @@ -1,4 +0,0 @@ -package cn.iocoder.yudao.common; - -public interface TestCommon { -} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java index ca707160..36151aa8 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java @@ -1,15 +1,6 @@ package cn.iocoder.yudao.module.custom.controller.admin; -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.module.company.entity.DlCompany; -import cn.iocoder.yudao.module.company.service.DlCompanyService; -import cn.iocoder.yudao.module.company.vo.CompanyReqVO; -import cn.iocoder.yudao.module.custom.entity.CustomerMain; import cn.iocoder.yudao.module.custom.service.CustomerMainService; import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; @@ -24,17 +15,13 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.IOException; -import java.util.List; - -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** - * 客户管理(每个租户的下属客户信息) + * 客户管理(每个租户的下的客户信息) + * * @author : http://www.chiner.pro * @date : 2024-7-31 */ @@ -43,20 +30,67 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "管理后台 - BASE 企业管理") @Validated public class CustomerMainController { + @Autowired + private CustomerMainService customerMainService; + + /** + * 客户管理分页列表查询 + * + * @param pageReqVO 客户管理查询条件封装实体 + * @param pageNo 分页参数 + * @param pageSize 分页参数 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult> + * @author PQZ + * @date 14:56 2024/8/1 + **/ + @GetMapping("/page") + @Operation(summary = "获得客户管理分页") + @PreAuthorize("@ss.hasPermission('base:customer-main:query')") + public CommonResult> getCustomerMainPage(CustomerMainPageReqVO pageReqVO, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { + Page page = new Page<>(pageNo, pageSize); + return success(customerMainService.queryListPage(pageReqVO, page)); + } + + /** + * 新增客户 + * + * @param saveReqVO 保存客户信息扩展实体 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 15:42 2024/8/1 + **/ @PostMapping("/create") @Operation(summary = "创建客户管理") @PreAuthorize("@ss.hasPermission('base:customer-main:create')") - public CommonResult createCustomerMain(@Valid @RequestBody CustomerMainSaveReqVO createReqVO) { + public CommonResult createCustomerMain(@Valid @RequestBody CustomerMainSaveReqVO saveReqVO) { return success(true); } + /** + * 编辑客户 + * + * @param saveReqVO 保存客户信息扩展实体 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 15:44 2024/8/1 + **/ @PutMapping("/update") @Operation(summary = "更新客户管理") @PreAuthorize("@ss.hasPermission('base:customer-main:update')") - public CommonResult updateCustomerMain(@Valid @RequestBody CustomerMainSaveReqVO updateReqVO) { + public CommonResult updateCustomerMain(@Valid @RequestBody CustomerMainSaveReqVO saveReqVO) { return success(true); } + /** + * 删除客户 + * + * @param id 保存客户信息扩展实体 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 15:44 2024/8/1 + **/ @DeleteMapping("/delete") @Operation(summary = "删除客户管理") @Parameter(name = "id", description = "编号", required = true) @@ -65,6 +99,14 @@ public class CustomerMainController { return success(true); } + /** + * 通过客户id查询客户信息 + * + * @param id 客户id + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 15:44 2024/8/1 + **/ @GetMapping("/get") @Operation(summary = "获得客户管理") @Parameter(name = "id", description = "编号", required = true, example = "1024") @@ -73,23 +115,4 @@ public class CustomerMainController { return success(true); } - @GetMapping("/page") - @Operation(summary = "获得客户管理分页") - @PreAuthorize("@ss.hasPermission('base:customer-main:query')") - public CommonResult getCustomerMainPage(@Valid CustomerMainPageReqVO pageReqVO) { - return success(true); - } - - @GetMapping("/export-excel") - @Operation(summary = "导出客户管理 Excel") - @PreAuthorize("@ss.hasPermission('base:customer-main:export')") - @ApiAccessLog(operateType = EXPORT) - public void exportCustomerMainExcel(@Valid CustomerMainPageReqVO pageReqVO, - HttpServletResponse response) throws IOException { - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); -// List list = customerMainService.getCustomerMainPage(pageReqVO).getList(); -// // 导出 Excel -// ExcelUtils.write(response, "客户管理.xls", "数据", CustomerMainRespVO.class, -// BeanUtils.toBean(list, CustomerMainRespVO.class)); - } } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java index 303bbf52..836af398 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java @@ -1,11 +1,15 @@ package cn.iocoder.yudao.module.custom.entity; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; -import java.time.LocalDateTime; +import java.util.Date; -import com.baomidou.mybatisplus.annotation.*; +import static cn.iocoder.yudao.common.DictBaseConstants.*; /** * 客户管理 DO @@ -13,7 +17,6 @@ import com.baomidou.mybatisplus.annotation.*; * @author pqz */ @TableName("base_customer_main") -@KeySequence("base_customer_main_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -25,7 +28,7 @@ public class CustomerMain extends TenantBaseDO { /** * uuid */ - @TableId(type = IdType.INPUT) + @TableId(type = IdType.ASSIGN_UUID) private String id; /** * sys_user表id @@ -34,6 +37,7 @@ public class CustomerMain extends TenantBaseDO { /** * 用户类型 */ + @DictFormat(DICT_CUS_TYPE) private String typeCode; /** * 所属企业code(部门表code) @@ -50,7 +54,7 @@ public class CustomerMain extends TenantBaseDO { /** * 生日 */ - private LocalDateTime birthday; + private Date birthday; /** * 住址 */ @@ -58,6 +62,7 @@ public class CustomerMain extends TenantBaseDO { /** * 性别 */ + @DictFormat(DICT_SYS_USER_SEX) private String sex; /** * 身份证号 @@ -70,14 +75,16 @@ public class CustomerMain extends TenantBaseDO { /** * 客户初始来源 */ + @DictFormat(DICT_CUS_DATA_FROM) private String dataFrom; /** * 最近业务办理时间 */ - private LocalDateTime nearDoTime; + private Date nearDoTime; /** * 最近办理业务(数据字典业务标识) */ + @DictFormat(DICT_CUS_BUSI_TYPE) private String nearDoContent; /** * 邀请者user_id @@ -86,6 +93,7 @@ public class CustomerMain extends TenantBaseDO { /** * 邀请者类型 */ + @DictFormat(DICT_SIGN_TYPE) private String inviterType; /** * 客户状态 diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java index badc804a..32730c7b 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java @@ -1,8 +1,15 @@ package cn.iocoder.yudao.module.custom.mapper; +import cn.iocoder.yudao.module.company.entity.DlCompany; +import cn.iocoder.yudao.module.company.vo.CompanyReqVO; import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO; +import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 客户管理 Mapper @@ -12,5 +19,16 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface CustomerMainMapper extends BaseMapper { + /** + * 客户管理分页列表查询 + * + * @param pageReqVO 客户管理查询条件封装实体 + * @param page 分页参数 + * @return com.baomidou.mybatisplus.core.metadata.IPage + * @author PQZ + * @date 15:01 2024/8/1 + **/ + IPage selectListPage(@Param("entity") CustomerMainPageReqVO pageReqVO, Page page); + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java index 037e121b..37f554e0 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java @@ -1,7 +1,13 @@ package cn.iocoder.yudao.module.custom.service; import cn.iocoder.yudao.module.company.entity.DlCompany; +import cn.iocoder.yudao.module.company.vo.CompanyReqVO; import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO; +import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; +import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; /** @@ -9,8 +15,27 @@ import com.baomidou.mybatisplus.extension.service.IService; * * @author pqz */ -public interface CustomerMainService extends IService { +public interface CustomerMainService extends IService { + /** + * 客户管理分页列表查询 + * + * @param pageReqVO 客户管理查询条件封装实体 + * @param page 分页参数 + * @return com.baomidou.mybatisplus.core.metadata.IPage + * @author PQZ + * @date 14:57 2024/8/1 + **/ + IPage queryListPage(CustomerMainPageReqVO pageReqVO, Page page); + /** + * 保存客户信息 + * + * @param saveReqVO 保存客户信息扩展实体 + * @return void + * @author PQZ + * @date 15:46 2024/8/1 + **/ + void saveCustomer(CustomerMainSaveReqVO saveReqVO); } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java index d7737995..5adda5e2 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java @@ -1,9 +1,16 @@ package cn.iocoder.yudao.module.custom.service.impl; +import cn.hutool.json.JSONUtil; import cn.iocoder.yudao.module.custom.entity.CustomerMain; import cn.iocoder.yudao.module.custom.mapper.CustomerMainMapper; import cn.iocoder.yudao.module.custom.service.CustomerMainService; +import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO; +import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; +import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -16,4 +23,34 @@ import org.springframework.validation.annotation.Validated; @Validated public class CustomerMainServiceImpl extends ServiceImpl implements CustomerMainService { + @Autowired + private CustomerMainMapper customerMainMapper; + + /** + * 客户管理分页列表查询 + * + * @param pageReqVO 客户管理查询条件封装实体 + * @param page 分页参数 + * @return com.baomidou.mybatisplus.core.metadata.IPage + * @author PQZ + * @date 14:57 2024/8/1 + **/ + @Override + public IPage queryListPage(CustomerMainPageReqVO pageReqVO, Page page) { + return customerMainMapper.selectListPage(pageReqVO,page); + } + + /** + * 保存客户信息 + * + * @param saveReqVO 保存客户信息扩展实体 + * @return void + * @author PQZ + * @date 15:46 2024/8/1 + **/ + @Override + public void saveCustomer(CustomerMainSaveReqVO saveReqVO) { + CustomerMain main = JSONUtil.toBean(JSONUtil.parseObj(saveReqVO).toJSONString(0), CustomerMain.class); + this.saveOrUpdate(main); + } } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainPageReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainPageReqVO.java index d9b3b4a6..2f61d4be 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainPageReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainPageReqVO.java @@ -1,71 +1,17 @@ package cn.iocoder.yudao.module.custom.vo; -import lombok.*; -import java.util.*; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; import io.swagger.v3.oas.annotations.media.Schema; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; -import java.time.LocalDateTime; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; @Schema(description = "管理后台 - 客户管理分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class CustomerMainPageReqVO extends PageParam { - - @Schema(description = "sys_user表id", example = "17679") - private String userId; - - @Schema(description = "用户类型") - private String typeCode; - - @Schema(description = "所属企业code(部门表code)") - private String deptCode; - - @Schema(description = "客户名称(政企客户填企业名称)", example = "赵六") - private String cusName; - - @Schema(description = "联系方式") - private String phoneNumber; - - @Schema(description = "生日") - private LocalDateTime birthday; - - @Schema(description = "住址") - private String address; - - @Schema(description = "性别") - private String sex; - - @Schema(description = "身份证号") - private String idCard; - - @Schema(description = "身份证照片") - private String idCardImage; - - @Schema(description = "客户初始来源") - private String dataFrom; - - @Schema(description = "最近业务办理时间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime[] nearDoTime; - - @Schema(description = "最近办理业务(数据字典业务标识)") - private String nearDoContent; - - @Schema(description = "邀请者user_id") - private String inviter; - - @Schema(description = "邀请者类型", example = "2") - private String inviterType; - - @Schema(description = "客户状态", example = "1") - private String status; - - @Schema(description = "创建时间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime[] createTime; +public class CustomerMainPageReqVO extends CustomerMain { + /**系统标识*/ + private String systemCode; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java index 05f60aec..16033b48 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.custom.vo; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -10,78 +11,19 @@ import com.alibaba.excel.annotation.*; @Schema(description = "管理后台 - 客户管理 Response VO") @Data @ExcelIgnoreUnannotated -public class CustomerMainRespVO { - - @Schema(description = "uuid", requiredMode = Schema.RequiredMode.REQUIRED, example = "29951") - @ExcelProperty("uuid") - private String id; - - @Schema(description = "sys_user表id", example = "17679") - @ExcelProperty("sys_user表id") - private String userId; - - @Schema(description = "用户类型") - @ExcelProperty("用户类型") - private String typeCode; - - @Schema(description = "所属企业code(部门表code)") - @ExcelProperty("所属企业code(部门表code)") - private String deptCode; - - @Schema(description = "客户名称(政企客户填企业名称)", example = "赵六") - @ExcelProperty("客户名称(政企客户填企业名称)") - private String cusName; - - @Schema(description = "联系方式") - @ExcelProperty("联系方式") - private String phoneNumber; - - @Schema(description = "生日") - @ExcelProperty("生日") - private LocalDateTime birthday; - - @Schema(description = "住址") - @ExcelProperty("住址") - private String address; - - @Schema(description = "性别") - @ExcelProperty("性别") - private String sex; - - @Schema(description = "身份证号") - @ExcelProperty("身份证号") - private String idCard; - - @Schema(description = "身份证照片") - @ExcelProperty("身份证照片") - private String idCardImage; - - @Schema(description = "客户初始来源") - @ExcelProperty("客户初始来源") - private String dataFrom; - - @Schema(description = "最近业务办理时间") - @ExcelProperty("最近业务办理时间") - private LocalDateTime nearDoTime; - - @Schema(description = "最近办理业务(数据字典业务标识)") - @ExcelProperty("最近办理业务(数据字典业务标识)") - private String nearDoContent; - - @Schema(description = "邀请者user_id") - @ExcelProperty("邀请者user_id") - private String inviter; - - @Schema(description = "邀请者类型", example = "2") - @ExcelProperty("邀请者类型") - private String inviterType; - - @Schema(description = "客户状态", example = "1") - @ExcelProperty("客户状态") - private String status; - - @Schema(description = "创建时间") - @ExcelProperty("创建时间") - private LocalDateTime createTime; - +public class CustomerMainRespVO extends CustomerMain { + /**客户管理子表id*/ + private String itemId; + /**系统标识*/ + private String systemCode; + /**用户等级*/ + private String userLevel; + /**服务内容*/ + private String serContent; + /**服务开始时间*/ + private Date serTimeStart; + /**服务结束时间*/ + private Date serTimeEnd; + /**大json*/ + private String bigJson; } \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml index 69ca8114..cd85ccdb 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml @@ -2,11 +2,54 @@ + - + \ No newline at end of file diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 14a7ea55..9f10ab39 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -175,7 +175,8 @@ logging: cn.iocoder.yudao.module.crm.dal.mysql: debug cn.iocoder.yudao.module.erp.dal.mysql: debug org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示 - cn.iocoder.yudao.module.custom.mapper.DlCompanyMapper: debug # + cn.iocoder.yudao.module.custom.mapper: debug # + cn.iocoder.yudao.module.company.mapper: debug # debug: false From 387de8d1c6086fb4d5623d9e6f51d2289a790202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chhk=E2=80=9D?= <“hhk@mail.com”> Date: Thu, 1 Aug 2024 17:24:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/CarMainController.java | 99 ++++++++++++++ .../yudao/module/custom/entity/CarMain.java | 121 ++++++++++++++++++ .../module/custom/mapper/CarMainMapper.java | 24 ++++ .../module/custom/service/CarMainService.java | 60 +++++++++ .../service/impl/CarMainServiceImpl.java | 58 +++++++++ .../yudao/module/custom/vo/CarMainReqVO.java | 79 ++++++++++++ .../yudao/module/custom/vo/CarMainRespVO.java | 89 +++++++++++++ .../resources/mapper/custom/CarMainMapper.xml | 71 ++++++++++ 8 files changed, 601 insertions(+) create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarMain.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java create mode 100644 dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java new file mode 100644 index 00000000..04a36af0 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java @@ -0,0 +1,99 @@ +package cn.iocoder.yudao.module.custom.controller.admin; + +import cn.iocoder.yudao.module.custom.entity.CarMain; +import cn.iocoder.yudao.module.custom.service.CarMainService; +import cn.iocoder.yudao.module.custom.vo.CarMainReqVO; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + + +@Tag(name = "管理后台 - 车辆信息") +@RestController +@RequestMapping("/base/car-main") +@Validated +public class CarMainController { + + @Resource + private CarMainService carMainService; + + @PostMapping("/create") + @Operation(summary = "创建车辆信息") + @PreAuthorize("@ss.hasPermission('base:car-main:create')") + public CommonResult createCarMain(@RequestBody CarMainReqVO createReqVO) { + return success(carMainService.createCarMain(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新车辆信息") + @PreAuthorize("@ss.hasPermission('base:car-main:update')") + public CommonResult updateCarMain(@RequestBody CarMainReqVO updateReqVO) { + carMainService.updateCarMain(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除车辆信息") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('base:car-main:delete')") + public CommonResult deleteCarMain(@RequestParam("id") String id) { + carMainService.deleteCarMain(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得车辆信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('base:car-main:query')") + public CommonResult getCarMain(@RequestParam("id") String id) { + CarMain carMain = carMainService.getCarMain(id); + return success(BeanUtils.toBean(carMain, CarMainRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得车辆信息分页") + @PreAuthorize("@ss.hasPermission('base:car-main:query')") + public CommonResult> getCarMainPage(CarMainReqVO pageReqVO) { + + IPage pageResult = carMainService.getCarMainPage(pageReqVO); + return success(pageResult); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出车辆信息 Excel") + @PreAuthorize("@ss.hasPermission('base:car-main:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportCarMainExcel(CarMainReqVO pageReqVO, HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = carMainService.getCarMainPage(pageReqVO).getRecords(); + // 导出 Excel + ExcelUtils.write(response, "车辆信息.xls", "数据", CarMainRespVO.class, + BeanUtils.toBean(list, CarMainRespVO.class)); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarMain.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarMain.java new file mode 100644 index 00000000..384a95e9 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarMain.java @@ -0,0 +1,121 @@ +package cn.iocoder.yudao.module.custom.entity; + +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 车辆信息 DO + * + * @author 后台管理员 + */ +@TableName("base_car_main") +@Data +@EqualsAndHashCode(callSuper = true) +public class CarMain extends TenantBaseDO { + + /** + * 主键标识 + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + /** + * 发动机号码 + */ + private String engineNumber; + /** + * 车架号 + */ + private String vin; + /** + * 车牌号 + */ + private String licenseNumber; + /** + * 车辆型号 + */ + private String carModel; + /** + * 保养日期 + */ + private LocalDateTime maintenanceDate; + /** + * 保养里程 + */ + private String maintenanceMileage; + /** + * 年检日期 + */ + private LocalDateTime inspectionDate; + /** + * 保险日期 + */ + private LocalDateTime insuranceDate; + /** + * 二级维护时间 + */ + private LocalDateTime checkDate; + /** + * 下次保养日期 + */ + private LocalDateTime nextMaintenanceDate; + /** + * 下次保养里程 + */ + private Integer nextMaintenanceMileage; + /** + * 下次年检日期 + */ + private LocalDateTime nextInspectionDate; + /** + * 保险到期日期 + */ + private LocalDateTime insuranceExpiryDate; + /** + * 下次二级维护时间 + */ + private LocalDateTime nextCheckDate; + /** + * 车辆品牌 + */ + private String carBrand; + /** + * 车辆性质:营运 非营运等 + */ + private String carNature; + /** + * 车辆类别:私家车 货车 教练车 公务车 出租车 + */ + private String carCategory; + /** + * 车辆注册日期 + */ + private LocalDateTime carRegisterDate; + /** + * 行驶证图片 + */ + private String carLicenseImg; + /** + * 最近办理业务 + */ + private String recentlyHandledBusiness; + /** + * 最近办理业务的时间 + */ + private LocalDateTime recentlyHandleBusinessTime; + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java new file mode 100644 index 00000000..0aaef5bc --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.custom.mapper; + + +import cn.iocoder.yudao.module.custom.entity.CarMain; +import cn.iocoder.yudao.module.custom.vo.CarMainReqVO; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 车辆信息 Mapper + * + * @author 后台管理员 + */ +@Mapper +public interface CarMainMapper extends BaseMapper { + + + IPage findPage(Page page, @Param("dto") CarMainReqVO pageReqVO); + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java new file mode 100644 index 00000000..1c8b1e29 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.custom.service; + + +import javax.validation.*; + +import cn.iocoder.yudao.module.custom.entity.CarMain; +import cn.iocoder.yudao.module.custom.vo.CarMainReqVO; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * 车辆信息 Service 接口 + * + * @author 后台管理员 + */ +public interface CarMainService extends IService { + + /** + * 创建车辆信息 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createCarMain(CarMainReqVO createReqVO); + + /** + * 更新车辆信息 + * + * @param updateReqVO 更新信息 + */ + void updateCarMain(CarMainReqVO updateReqVO); + + /** + * 删除车辆信息 + * + * @param id 编号 + */ + void deleteCarMain(String id); + + /** + * 获得车辆信息 + * + * @param id 编号 + * @return 车辆信息 + */ + CarMain getCarMain(String id); + + /** + * 获得车辆信息分页 + * + * @param pageReqVO 分页查询 + * @return 车辆信息分页 + */ + IPage getCarMainPage(CarMainReqVO pageReqVO); + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java new file mode 100644 index 00000000..71c16261 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.custom.service.impl; + +import cn.iocoder.yudao.module.custom.entity.CarMain; +import cn.iocoder.yudao.module.custom.mapper.CarMainMapper; +import cn.iocoder.yudao.module.custom.service.CarMainService; +import cn.iocoder.yudao.module.custom.vo.CarMainReqVO; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +/** + * 车辆信息 Service 实现类 + * + * @author 后台管理员 + */ +@Service +public class CarMainServiceImpl extends ServiceImpl implements CarMainService{ + + + @Override + public String createCarMain(CarMainReqVO createReqVO) { + // 插入 + CarMain carMain = BeanUtils.toBean(createReqVO, CarMain.class); + baseMapper.insert(carMain); + // 返回 + return carMain.getId(); + } + + @Override + public void updateCarMain(CarMainReqVO updateReqVO){ + // 更新 + CarMain updateObj = BeanUtils.toBean(updateReqVO, CarMain.class); + baseMapper.updateById(updateObj); + } + + @Override + public void deleteCarMain(String id) { + // 删除 + baseMapper.deleteById(id); + } + + + @Override + public CarMain getCarMain(String id) { + return baseMapper.selectById(id); + } + + @Override + public IPage getCarMainPage(CarMainReqVO pageReqVO) { + Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); + return baseMapper.findPage(page,pageReqVO); + } + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java new file mode 100644 index 00000000..fc09e8d6 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java @@ -0,0 +1,79 @@ +package cn.iocoder.yudao.module.custom.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 车辆信息分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CarMainReqVO extends PageParam { + + @Schema(description = "发动机号码") + private String engineNumber; + + @Schema(description = "车架号") + private String vin; + + @Schema(description = "车牌号") + private String licenseNumber; + + @Schema(description = "车辆型号") + private String carModel; + + @Schema(description = "保养日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime maintenanceDate; + + @Schema(description = "保养里程") + private String maintenanceMileage; + + @Schema(description = "年检日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime inspectionDate; + + @Schema(description = "保险日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime insuranceDate; + + @Schema(description = "二级维护时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime checkDate; + + @Schema(description = "车辆品牌") + private String carBrand; + + @Schema(description = "车辆性质:营运 非营运等") + private String carNature; + + @Schema(description = "车辆类别:私家车 货车 教练车 公务车 出租车") + private String carCategory; + + @Schema(description = "车辆注册日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime carRegisterDate; + + @Schema(description = "行驶证图片") + private String carLicenseImg; + + @Schema(description = "最近办理业务") + private String recentlyHandledBusiness; + + @Schema(description = "最近办理业务的时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime recentlyHandleBusinessTime; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + + + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java new file mode 100644 index 00000000..2d0ae7bf --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.custom.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 车辆信息 Response VO") +@Data +@ExcelIgnoreUnannotated +public class CarMainRespVO { + + @Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "8714") + @ExcelProperty("主键标识") + private String id; + + @Schema(description = "发动机号码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("发动机号码") + private String engineNumber; + + @Schema(description = "车架号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车架号") + private String vin; + + @Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车牌号") + private String licenseNumber; + + @Schema(description = "车辆型号") + @ExcelProperty("车辆型号") + private String carModel; + + @Schema(description = "保养日期") + @ExcelProperty("保养日期") + private LocalDateTime maintenanceDate; + + @Schema(description = "保养里程") + @ExcelProperty("保养里程") + private String maintenanceMileage; + + @Schema(description = "年检日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("年检日期") + private LocalDateTime inspectionDate; + + @Schema(description = "保险日期") + @ExcelProperty("保险日期") + private LocalDateTime insuranceDate; + + @Schema(description = "二级维护时间") + @ExcelProperty("二级维护时间") + private LocalDateTime checkDate; + + @Schema(description = "车辆品牌", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车辆品牌") + private String carBrand; + + @Schema(description = "车辆性质:营运 非营运等", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车辆性质") + private String carNature; + + @Schema(description = "车辆类别:私家车 货车 教练车 公务车 出租车") + @ExcelProperty("车辆类别") + private String carCategory; + + @Schema(description = "车辆注册日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车辆注册日期") + private LocalDateTime carRegisterDate; + + @Schema(description = "行驶证图片") + @ExcelProperty("行驶证图片") + private String carLicenseImg; + + @Schema(description = "最近办理业务") + @ExcelProperty("最近办理业务") + private String recentlyHandledBusiness; + + @Schema(description = "最近办理业务的时间") + @ExcelProperty("最近办理业务的时间") + private LocalDateTime recentlyHandleBusinessTime; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml new file mode 100644 index 00000000..fcefc423 --- /dev/null +++ b/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml @@ -0,0 +1,71 @@ + + + + + + + id, + engine_number, + vin, + license_number, + car_model, + maintenance_date, + maintenance_mileage, + inspection_date, + insurance_date, + check_date, + next_maintenance_date, + next_maintenance_mileage, + next_inspection_date, + insurance_expiry_date, + next_check_date, + car_brand, + car_nature, + car_category, + car_register_date, + car_license_img, + recently_handled_business, + recently_handle_business_time, + deleted, + creator, + create_time, + updater, + update_time + + + + + \ No newline at end of file From 92e6cac8a1776f5c098781eece362d85a1dcdf4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chhk=E2=80=9D?= <“hhk@mail.com”> Date: Thu, 1 Aug 2024 17:24:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=BC=8F=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/custom/controller/admin/CarMainController.java | 2 +- .../cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java index 04a36af0..851a62ab 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java @@ -35,7 +35,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; @Tag(name = "管理后台 - 车辆信息") @RestController -@RequestMapping("/base/car-main") +@RequestMapping("/base/carMain") @Validated public class CarMainController { diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java index fc09e8d6..adcb899d 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java @@ -14,6 +14,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CarMainReqVO extends PageParam { + @Schema(description = "主键ID") + private String id; @Schema(description = "发动机号码") private String engineNumber; @@ -72,7 +74,9 @@ public class CarMainReqVO extends PageParam { @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime createTime; - + + @Schema(description = "租户ID") + private String tenantId;