停车场-同步白名单
This commit is contained in:
parent
f4a240d8b3
commit
76a080268c
@ -23,4 +23,8 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode FIXED_VEHICLE_RENEWAL_RECORD_NOT_EXISTS = new ErrorCode(1_005_001_012, "固定车续费记录不存在");
|
ErrorCode FIXED_VEHICLE_RENEWAL_RECORD_NOT_EXISTS = new ErrorCode(1_005_001_012, "固定车续费记录不存在");
|
||||||
// ========== 远程抬杠 1_005_001_013 ==========
|
// ========== 远程抬杠 1_005_001_013 ==========
|
||||||
ErrorCode LIFTING_ROD_NOT_EXISTS = new ErrorCode(1_005_001_013, "远程抬杠不存在");
|
ErrorCode LIFTING_ROD_NOT_EXISTS = new ErrorCode(1_005_001_013, "远程抬杠不存在");
|
||||||
|
// ========== 同步白名单 1_005_001_014 ==========
|
||||||
|
ErrorCode SYNCHRONIZATION_OF_WHITELIST_INFORMATION_NOT_EXISTS = new ErrorCode(1_005_001_014, "同步白名单不存在");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,95 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation;
|
||||||
|
|
||||||
|
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.constraints.*;
|
||||||
|
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.PageResult;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.synchronizationofwhitelistinformation.SynchronizationOfWhitelistInformationDO;
|
||||||
|
import cn.iocoder.yudao.module.parking.service.synchronizationofwhitelistinformation.SynchronizationOfWhitelistInformationService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 同步白名单")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/parking/synchronization-of-whitelist-information")
|
||||||
|
@Validated
|
||||||
|
public class SynchronizationOfWhitelistInformationController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SynchronizationOfWhitelistInformationService synchronizationOfWhitelistInformationService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建同步白名单")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:synchronization-of-whitelist-information:create')")
|
||||||
|
public CommonResult<Long> createSynchronizationOfWhitelistInformation(@Valid @RequestBody SynchronizationOfWhitelistInformationSaveReqVO createReqVO) {
|
||||||
|
return success(synchronizationOfWhitelistInformationService.createSynchronizationOfWhitelistInformation(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新同步白名单")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:synchronization-of-whitelist-information:update')")
|
||||||
|
public CommonResult<Boolean> updateSynchronizationOfWhitelistInformation(@Valid @RequestBody SynchronizationOfWhitelistInformationSaveReqVO updateReqVO) {
|
||||||
|
synchronizationOfWhitelistInformationService.updateSynchronizationOfWhitelistInformation(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除同步白名单")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:synchronization-of-whitelist-information:delete')")
|
||||||
|
public CommonResult<Boolean> deleteSynchronizationOfWhitelistInformation(@RequestParam("id") Long id) {
|
||||||
|
synchronizationOfWhitelistInformationService.deleteSynchronizationOfWhitelistInformation(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得同步白名单")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:synchronization-of-whitelist-information:query')")
|
||||||
|
public CommonResult<SynchronizationOfWhitelistInformationRespVO> getSynchronizationOfWhitelistInformation(@RequestParam("id") Long id) {
|
||||||
|
SynchronizationOfWhitelistInformationDO synchronizationOfWhitelistInformation = synchronizationOfWhitelistInformationService.getSynchronizationOfWhitelistInformation(id);
|
||||||
|
return success(BeanUtils.toBean(synchronizationOfWhitelistInformation, SynchronizationOfWhitelistInformationRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得同步白名单分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:synchronization-of-whitelist-information:query')")
|
||||||
|
public CommonResult<PageResult<SynchronizationOfWhitelistInformationRespVO>> getSynchronizationOfWhitelistInformationPage(@Valid SynchronizationOfWhitelistInformationPageReqVO pageReqVO) {
|
||||||
|
PageResult<SynchronizationOfWhitelistInformationDO> pageResult = synchronizationOfWhitelistInformationService.getSynchronizationOfWhitelistInformationPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, SynchronizationOfWhitelistInformationRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出同步白名单 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:synchronization-of-whitelist-information:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportSynchronizationOfWhitelistInformationExcel(@Valid SynchronizationOfWhitelistInformationPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<SynchronizationOfWhitelistInformationDO> list = synchronizationOfWhitelistInformationService.getSynchronizationOfWhitelistInformationPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "同步白名单.xls", "数据", SynchronizationOfWhitelistInformationRespVO.class,
|
||||||
|
BeanUtils.toBean(list, SynchronizationOfWhitelistInformationRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation.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 SynchronizationOfWhitelistInformationPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "场库编号")
|
||||||
|
private String parkNumber;
|
||||||
|
|
||||||
|
@Schema(description = "接口名称")
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
@Schema(description = "集合大小")
|
||||||
|
private Integer size;
|
||||||
|
|
||||||
|
@Schema(description = "车牌号")
|
||||||
|
private String plate;
|
||||||
|
|
||||||
|
@Schema(description = "白名单记录流水号", example = "16361")
|
||||||
|
private Integer fixedId;
|
||||||
|
|
||||||
|
@Schema(description = "收费类型", example = "2")
|
||||||
|
private String chargeType;
|
||||||
|
|
||||||
|
@Schema(description = "车主姓名", example = "李四")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "身份证信息")
|
||||||
|
private String certificate;
|
||||||
|
|
||||||
|
@Schema(description = "车主联系地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Schema(description = "车主联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@Schema(description = "车牌颜色")
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
@Schema(description = "生效日期")
|
||||||
|
private String start;
|
||||||
|
|
||||||
|
@Schema(description = "失效日期")
|
||||||
|
private String end;
|
||||||
|
|
||||||
|
@Schema(description = "部门")
|
||||||
|
private String dept;
|
||||||
|
|
||||||
|
@Schema(description = "车辆类型", example = "2")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你猜")
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
@Schema(description = "时间戳")
|
||||||
|
private String timeStamp;
|
||||||
|
|
||||||
|
@Schema(description = "来源")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@Schema(description = "区域Id", example = "13326")
|
||||||
|
private Integer areaId;
|
||||||
|
|
||||||
|
@Schema(description = "生效日期")
|
||||||
|
private String areaStart;
|
||||||
|
|
||||||
|
@Schema(description = "失效日期")
|
||||||
|
private String areaEnd;
|
||||||
|
|
||||||
|
@Schema(description = "操作")
|
||||||
|
private String areaOperate;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 同步白名单 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class SynchronizationOfWhitelistInformationRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31270")
|
||||||
|
@ExcelProperty("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("场库编号")
|
||||||
|
private String parkNumber;
|
||||||
|
|
||||||
|
@Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("接口名称")
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
@Schema(description = "集合大小")
|
||||||
|
@ExcelProperty("集合大小")
|
||||||
|
private Integer size;
|
||||||
|
|
||||||
|
@Schema(description = "车牌号")
|
||||||
|
@ExcelProperty("车牌号")
|
||||||
|
private String plate;
|
||||||
|
|
||||||
|
@Schema(description = "白名单记录流水号", example = "16361")
|
||||||
|
@ExcelProperty("白名单记录流水号")
|
||||||
|
private Integer fixedId;
|
||||||
|
|
||||||
|
@Schema(description = "收费类型", example = "2")
|
||||||
|
@ExcelProperty("收费类型")
|
||||||
|
private String chargeType;
|
||||||
|
|
||||||
|
@Schema(description = "车主姓名", example = "李四")
|
||||||
|
@ExcelProperty("车主姓名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "身份证信息")
|
||||||
|
@ExcelProperty("身份证信息")
|
||||||
|
private String certificate;
|
||||||
|
|
||||||
|
@Schema(description = "车主联系地址")
|
||||||
|
@ExcelProperty("车主联系地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Schema(description = "车主联系电话")
|
||||||
|
@ExcelProperty("车主联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@Schema(description = "车牌颜色")
|
||||||
|
@ExcelProperty("车牌颜色")
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
@Schema(description = "生效日期")
|
||||||
|
@ExcelProperty("生效日期")
|
||||||
|
private String start;
|
||||||
|
|
||||||
|
@Schema(description = "失效日期")
|
||||||
|
@ExcelProperty("失效日期")
|
||||||
|
private String end;
|
||||||
|
|
||||||
|
@Schema(description = "部门")
|
||||||
|
@ExcelProperty("部门")
|
||||||
|
private String dept;
|
||||||
|
|
||||||
|
@Schema(description = "车辆类型", example = "2")
|
||||||
|
@ExcelProperty("车辆类型")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你猜")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
@Schema(description = "时间戳")
|
||||||
|
@ExcelProperty("时间戳")
|
||||||
|
private String timeStamp;
|
||||||
|
|
||||||
|
@Schema(description = "来源")
|
||||||
|
@ExcelProperty("来源")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@Schema(description = "区域Id", example = "13326")
|
||||||
|
@ExcelProperty("区域Id")
|
||||||
|
private Integer areaId;
|
||||||
|
|
||||||
|
@Schema(description = "生效日期")
|
||||||
|
@ExcelProperty("生效日期")
|
||||||
|
private String areaStart;
|
||||||
|
|
||||||
|
@Schema(description = "失效日期")
|
||||||
|
@ExcelProperty("失效日期")
|
||||||
|
private String areaEnd;
|
||||||
|
|
||||||
|
@Schema(description = "操作")
|
||||||
|
@ExcelProperty("操作")
|
||||||
|
private String areaOperate;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 同步白名单新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class SynchronizationOfWhitelistInformationSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31270")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "场库编号不能为空")
|
||||||
|
private String parkNumber;
|
||||||
|
|
||||||
|
@Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "接口名称不能为空")
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
@Schema(description = "集合大小")
|
||||||
|
private Integer size;
|
||||||
|
|
||||||
|
@Schema(description = "车牌号")
|
||||||
|
private String plate;
|
||||||
|
|
||||||
|
@Schema(description = "白名单记录流水号", example = "16361")
|
||||||
|
private Integer fixedId;
|
||||||
|
|
||||||
|
@Schema(description = "收费类型", example = "2")
|
||||||
|
private String chargeType;
|
||||||
|
|
||||||
|
@Schema(description = "车主姓名", example = "李四")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "身份证信息")
|
||||||
|
private String certificate;
|
||||||
|
|
||||||
|
@Schema(description = "车主联系地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Schema(description = "车主联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@Schema(description = "车牌颜色")
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
@Schema(description = "生效日期")
|
||||||
|
private String start;
|
||||||
|
|
||||||
|
@Schema(description = "失效日期")
|
||||||
|
private String end;
|
||||||
|
|
||||||
|
@Schema(description = "部门")
|
||||||
|
private String dept;
|
||||||
|
|
||||||
|
@Schema(description = "车辆类型", example = "2")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你猜")
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
@Schema(description = "时间戳")
|
||||||
|
private String timeStamp;
|
||||||
|
|
||||||
|
@Schema(description = "来源")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@Schema(description = "区域Id", example = "13326")
|
||||||
|
private Integer areaId;
|
||||||
|
|
||||||
|
@Schema(description = "生效日期")
|
||||||
|
private String areaStart;
|
||||||
|
|
||||||
|
@Schema(description = "失效日期")
|
||||||
|
private String areaEnd;
|
||||||
|
|
||||||
|
@Schema(description = "操作")
|
||||||
|
private String areaOperate;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,119 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.dal.dataobject.synchronizationofwhitelistinformation;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
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("synchronization_of_whitelist_information")
|
||||||
|
@KeySequence("synchronization_of_whitelist_information_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SynchronizationOfWhitelistInformationDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 场库编号
|
||||||
|
*/
|
||||||
|
private String parkNumber;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
private String method;
|
||||||
|
/**
|
||||||
|
* 集合大小
|
||||||
|
*/
|
||||||
|
private Integer size;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String plate;
|
||||||
|
/**
|
||||||
|
* 白名单记录流水号
|
||||||
|
*/
|
||||||
|
private Integer fixedId;
|
||||||
|
/**
|
||||||
|
* 收费类型
|
||||||
|
*/
|
||||||
|
private String chargeType;
|
||||||
|
/**
|
||||||
|
* 车主姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 身份证信息
|
||||||
|
*/
|
||||||
|
private String certificate;
|
||||||
|
/**
|
||||||
|
* 车主联系地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 车主联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
/**
|
||||||
|
* 车牌颜色
|
||||||
|
*/
|
||||||
|
private String plateColor;
|
||||||
|
/**
|
||||||
|
* 生效日期
|
||||||
|
*/
|
||||||
|
private String start;
|
||||||
|
/**
|
||||||
|
* 失效日期
|
||||||
|
*/
|
||||||
|
private String end;
|
||||||
|
/**
|
||||||
|
* 部门
|
||||||
|
*/
|
||||||
|
private String dept;
|
||||||
|
/**
|
||||||
|
* 车辆类型
|
||||||
|
*/
|
||||||
|
private String carType;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
/**
|
||||||
|
* 时间戳
|
||||||
|
*/
|
||||||
|
private String timeStamp;
|
||||||
|
/**
|
||||||
|
* 来源
|
||||||
|
*/
|
||||||
|
private String source;
|
||||||
|
/**
|
||||||
|
* 区域Id
|
||||||
|
*/
|
||||||
|
private Integer areaId;
|
||||||
|
/**
|
||||||
|
* 生效日期
|
||||||
|
*/
|
||||||
|
private String areaStart;
|
||||||
|
/**
|
||||||
|
* 失效日期
|
||||||
|
*/
|
||||||
|
private String areaEnd;
|
||||||
|
/**
|
||||||
|
* 操作
|
||||||
|
*/
|
||||||
|
private String areaOperate;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.dal.mysql.synchronizationofwhitelistinformation;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.synchronizationofwhitelistinformation.SynchronizationOfWhitelistInformationDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation.vo.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步白名单 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SynchronizationOfWhitelistInformationMapper extends BaseMapperX<SynchronizationOfWhitelistInformationDO> {
|
||||||
|
|
||||||
|
default PageResult<SynchronizationOfWhitelistInformationDO> selectPage(SynchronizationOfWhitelistInformationPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<SynchronizationOfWhitelistInformationDO>()
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getParkNumber, reqVO.getParkNumber())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getMethod, reqVO.getMethod())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getSize, reqVO.getSize())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getPlate, reqVO.getPlate())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getFixedId, reqVO.getFixedId())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getChargeType, reqVO.getChargeType())
|
||||||
|
.likeIfPresent(SynchronizationOfWhitelistInformationDO::getName, reqVO.getName())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getCertificate, reqVO.getCertificate())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getAddress, reqVO.getAddress())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getPhone, reqVO.getPhone())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getPlateColor, reqVO.getPlateColor())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getStart, reqVO.getStart())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getEnd, reqVO.getEnd())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getDept, reqVO.getDept())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getCarType, reqVO.getCarType())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getMemo, reqVO.getMemo())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getTimeStamp, reqVO.getTimeStamp())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getSource, reqVO.getSource())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getAreaId, reqVO.getAreaId())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getAreaStart, reqVO.getAreaStart())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getAreaEnd, reqVO.getAreaEnd())
|
||||||
|
.eqIfPresent(SynchronizationOfWhitelistInformationDO::getAreaOperate, reqVO.getAreaOperate())
|
||||||
|
.betweenIfPresent(SynchronizationOfWhitelistInformationDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(SynchronizationOfWhitelistInformationDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.service.synchronizationofwhitelistinformation;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.synchronizationofwhitelistinformation.SynchronizationOfWhitelistInformationDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步白名单 Service 接口
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public interface SynchronizationOfWhitelistInformationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建同步白名单
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createSynchronizationOfWhitelistInformation(@Valid SynchronizationOfWhitelistInformationSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新同步白名单
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateSynchronizationOfWhitelistInformation(@Valid SynchronizationOfWhitelistInformationSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除同步白名单
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteSynchronizationOfWhitelistInformation(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得同步白名单
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 同步白名单
|
||||||
|
*/
|
||||||
|
SynchronizationOfWhitelistInformationDO getSynchronizationOfWhitelistInformation(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得同步白名单分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 同步白名单分页
|
||||||
|
*/
|
||||||
|
PageResult<SynchronizationOfWhitelistInformationDO> getSynchronizationOfWhitelistInformationPage(SynchronizationOfWhitelistInformationPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.service.synchronizationofwhitelistinformation;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.synchronizationofwhitelistinformation.SynchronizationOfWhitelistInformationDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.mysql.synchronizationofwhitelistinformation.SynchronizationOfWhitelistInformationMapper;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static cn.iocoder.yudao.module.parking.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步白名单 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class SynchronizationOfWhitelistInformationServiceImpl implements SynchronizationOfWhitelistInformationService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SynchronizationOfWhitelistInformationMapper synchronizationOfWhitelistInformationMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createSynchronizationOfWhitelistInformation(SynchronizationOfWhitelistInformationSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
SynchronizationOfWhitelistInformationDO synchronizationOfWhitelistInformation = BeanUtils.toBean(createReqVO, SynchronizationOfWhitelistInformationDO.class);
|
||||||
|
synchronizationOfWhitelistInformationMapper.insert(synchronizationOfWhitelistInformation);
|
||||||
|
// 返回
|
||||||
|
return synchronizationOfWhitelistInformation.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateSynchronizationOfWhitelistInformation(SynchronizationOfWhitelistInformationSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateSynchronizationOfWhitelistInformationExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
SynchronizationOfWhitelistInformationDO updateObj = BeanUtils.toBean(updateReqVO, SynchronizationOfWhitelistInformationDO.class);
|
||||||
|
synchronizationOfWhitelistInformationMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSynchronizationOfWhitelistInformation(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateSynchronizationOfWhitelistInformationExists(id);
|
||||||
|
// 删除
|
||||||
|
synchronizationOfWhitelistInformationMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateSynchronizationOfWhitelistInformationExists(Long id) {
|
||||||
|
if (synchronizationOfWhitelistInformationMapper.selectById(id) == null) {
|
||||||
|
throw exception(SYNCHRONIZATION_OF_WHITELIST_INFORMATION_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SynchronizationOfWhitelistInformationDO getSynchronizationOfWhitelistInformation(Long id) {
|
||||||
|
return synchronizationOfWhitelistInformationMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<SynchronizationOfWhitelistInformationDO> getSynchronizationOfWhitelistInformationPage(SynchronizationOfWhitelistInformationPageReqVO pageReqVO) {
|
||||||
|
return synchronizationOfWhitelistInformationMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.iocoder.yudao.module.parking.dal.mysql.synchronizationofwhitelistinformation.SynchronizationOfWhitelistInformationMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user