From 689440364e45d515966f908506ec66dc5ccb8d62 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期三, 15 十一月 2023 14:42:30 +0800 Subject: [PATCH] 1、*Mapper.java继承泛型错误修改 2、行政区实体中增加编号属性 3、行政区级别枚举去掉组 4、实现系统启动后初始化数据库数据监听器 --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java index f841907..edc4a10 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java @@ -12,8 +12,7 @@ City((byte)1, "甯�"), County((byte)2, "鍘�"), Town((byte)3, "闀�"), - Village((byte)4, "鏉�"), - Group((byte)5, "缁�"); + Village((byte)4, "鏉�") ; @EnumValue public Byte code ; @@ -33,4 +32,17 @@ public String getName() { return this.name ; } + + public static DistrictLevel get(Byte code){ + if(code.byteValue() == City.code.byteValue()){ + return City ; + }else if(code.byteValue() == County.code.byteValue()){ + return County ; + }else if(code.byteValue() == Town.code.byteValue()){ + return Town ; + }else if(code.byteValue() == Village.code.byteValue()){ + return Village ; + } + return null ; + } } -- Gitblit v1.8.0