From 426e5e48951d27303ba8a83a61eeb0d4bf14bb37 Mon Sep 17 00:00:00 2001 From: zhangzhiqiang Date: Thu, 15 Dec 2022 09:50:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/nl/common/BaseQuery.java | 54 ++++++++++++ .../main/java/org/nl/common/LConsumer.java | 25 ++++++ .../main/java/org/nl/common/QueryType.java | 21 +++++ .../org/nl/config/mybatis/CodeGenerator.java | 6 +- .../system/service/convert/RedisConvert.java | 1 - .../system/service/dto/UserQueryCriteria.java | 8 +- .../service/mapstruct/DictDetailMapper.java | 31 ------- .../system/service/mapstruct/DictMapper.java | 32 ------- .../service/mapstruct/DictSmallMapper.java | 31 ------- .../system/service/mapstruct/MenuMapper.java | 30 ------- .../system/service/mapstruct/RoleMapper.java | 31 ------- .../service/mapstruct/RoleSmallMapper.java | 31 ------- .../controller/user/UserController.java | 29 +++++- .../nl/system/service/user/dto/UserQuery.java | 21 +++++ .../controller/dept/DeptController.java | 21 ----- .../nl/system/service/dept/DeptService.java | 16 ---- .../org/nl/system/service/dept/dao/Dept.java | 88 ------------------- .../service/dept/dao/mapper/DeptMapper.java | 16 ---- .../service/dept/dao/mapper/DeptMapper.xml | 5 -- .../service/dept/impl/DeptServiceImpl.java | 20 ----- 20 files changed, 151 insertions(+), 366 deletions(-) create mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/common/BaseQuery.java create mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/common/LConsumer.java create mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/common/QueryType.java delete mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictDetailMapper.java delete mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictMapper.java delete mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictSmallMapper.java delete mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/MenuMapper.java delete mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleMapper.java delete mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleSmallMapper.java create mode 100644 nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dto/UserQuery.java delete mode 100644 nladmin-system/src/main/java/org/nl/system/controller/dept/DeptController.java delete mode 100644 nladmin-system/src/main/java/org/nl/system/service/dept/DeptService.java delete mode 100644 nladmin-system/src/main/java/org/nl/system/service/dept/dao/Dept.java delete mode 100644 nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.java delete mode 100644 nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.xml delete mode 100644 nladmin-system/src/main/java/org/nl/system/service/dept/impl/DeptServiceImpl.java diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/common/BaseQuery.java b/nladmin-system/nlsso-server/src/main/java/org/nl/common/BaseQuery.java new file mode 100644 index 0000000..50d1a4c --- /dev/null +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/common/BaseQuery.java @@ -0,0 +1,54 @@ +package org.nl.common; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.Data; +import org.nl.modules.tools.MapOf; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.function.BiConsumer; +import java.util.function.Function; + +/* + * @author ZZQ + * @Date 2022/12/14 6:33 下午 + */ +@Data +public class BaseQuery { + + + private String blurry; + + private String isUsed; + + private Date startTime; + + private Date endTime; + + private String sort; + + private Integer page; + + private Integer size; + + public QueryWrapper convertQ(){ + QueryWrapper wrapper = new QueryWrapper<>(); + JSONObject json = (JSONObject)JSONObject.toJSON(this); + json.forEach(new BiConsumer() { + @Override + public void accept(String s, Object o) { + if (o instanceof Collection){ + wrapper.in(s,(Collection)o); + }else { + wrapper.eq(s,o); + } + wrapper.orderByAsc(true, String.valueOf(o)); + + } + }); + return wrapper; + } +} diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/common/LConsumer.java b/nladmin-system/nlsso-server/src/main/java/org/nl/common/LConsumer.java new file mode 100644 index 0000000..288c6b0 --- /dev/null +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/common/LConsumer.java @@ -0,0 +1,25 @@ +package org.nl.common; + +import org.apache.poi.ss.formula.functions.T; + +import java.util.Objects; +import java.util.function.BiConsumer; + +/* + * @author ZZQ + * @Date 2022/12/14 8:40 下午 + */ +@FunctionalInterface +public interface LConsumer { + + void accept(X x,Y y,Z z); + + default LConsumer andThen(LConsumer after) { + Objects.requireNonNull(after); + + return (x, y, z) -> { + accept(x, y, z); + after.accept(x, y, z); + }; + } +} diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/common/QueryType.java b/nladmin-system/nlsso-server/src/main/java/org/nl/common/QueryType.java new file mode 100644 index 0000000..605a9f6 --- /dev/null +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/common/QueryType.java @@ -0,0 +1,21 @@ +package org.nl.common; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; + +import java.util.function.BiConsumer; +import java.util.function.Function; + +/* + * @author ZZQ + * @Date 2022/12/14 8:26 下午 + */ +public enum QueryType { + EQ((q, k, v) -> { q.eq(k,v); }), + IN((q, k, v) -> { q.in(k,v); }), + LK((q, k, v) -> { q.eq(k,v); }); + private LConsumer doP; + + QueryType(LConsumer doP) { + this.doP = doP; + } +} diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/config/mybatis/CodeGenerator.java b/nladmin-system/nlsso-server/src/main/java/org/nl/config/mybatis/CodeGenerator.java index 6e589a7..51901a4 100644 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/config/mybatis/CodeGenerator.java +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/config/mybatis/CodeGenerator.java @@ -50,8 +50,8 @@ public class CodeGenerator { gc.setOpen(false); // gc.setSwagger2(true); gc.setEntityName("%s"); - gc.setServiceName("%sService"); - gc.setServiceImplName("%sServiceImpl"); + gc.setServiceName("I%sService"); + gc.setServiceImplName("I%sServiceImpl"); mpg.setGlobalConfig(gc); // 数据源配置 DataSourceConfig dsc = new DataSourceConfig(); @@ -91,7 +91,7 @@ public class CodeGenerator { // strategy.setSuperEntityColumns("id"); strategy.setInclude(scanner("表名,多个英文逗号分割").split(",")); strategy.setControllerMappingHyphenStyle(false); - strategy.setTablePrefix("sys_"); +// strategy.setTablePrefix("sys_"); mpg.setStrategy(strategy); // mpg.setTemplateEngine(new FreemarkerTemplateEngine()); mpg.execute(); diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/convert/RedisConvert.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/convert/RedisConvert.java index d03c815..7223c6a 100644 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/convert/RedisConvert.java +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/convert/RedisConvert.java @@ -13,7 +13,6 @@ import java.util.Properties; * @Description: redis---Spring Boot 对象转换 MapStruct * @Date: 2022-08-04 */ -@Mapper public interface RedisConvert { RedisConvert INSTANCE = Mappers.getMapper(RedisConvert.class); diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/UserQueryCriteria.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/UserQueryCriteria.java index 4a4a518..592a880 100644 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/UserQueryCriteria.java +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/UserQueryCriteria.java @@ -30,12 +30,6 @@ import java.util.Set; @Data public class UserQueryCriteria implements Serializable { - @Query - private Long id; - - @Query(propName = "id", type = Query.Type.IN, joinName = "dept") - private Set deptIds = new HashSet<>(); - @Query(blurry = "email,username,nickName") private String blurry; @@ -43,7 +37,7 @@ public class UserQueryCriteria implements Serializable { private String is_used; - private Long deptId; + private Date startTime; diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictDetailMapper.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictDetailMapper.java deleted file mode 100644 index cbab093..0000000 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictDetailMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.nl.modules.system.service.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; -import org.nl.modules.common.base.BaseMapper; -import org.nl.modules.system.domain.DictDetail; -import org.nl.modules.system.service.dto.DictDetailDto; - -/** -* @author Zheng Jie -* @date 2019-04-10 -*/ -@Mapper(componentModel = "spring", uses = {DictSmallMapper.class}, unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DictDetailMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictMapper.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictMapper.java deleted file mode 100644 index 03f167f..0000000 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictMapper.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.nl.modules.system.service.mapstruct; - - -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; -import org.nl.modules.common.base.BaseMapper; -import org.nl.modules.system.domain.Dict; -import org.nl.modules.system.service.dto.DictDto; - -/** -* @author Zheng Jie -* @date 2019-04-10 -*/ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DictMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictSmallMapper.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictSmallMapper.java deleted file mode 100644 index 65432fb..0000000 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/DictSmallMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.nl.modules.system.service.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; -import org.nl.modules.common.base.BaseMapper; -import org.nl.modules.system.domain.Dict; -import org.nl.modules.system.service.dto.DictSmallDto; - -/** -* @author Zheng Jie -* @date 2019-04-10 -*/ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DictSmallMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/MenuMapper.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/MenuMapper.java deleted file mode 100644 index 7827d46..0000000 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/MenuMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.nl.modules.system.service.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; -import org.nl.modules.common.base.BaseMapper; -import org.nl.modules.system.domain.Menu; -import org.nl.modules.system.service.dto.MenuDto; - -/** - * @author Zheng Jie - * @date 2018-12-17 - */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface MenuMapper extends BaseMapper { -} diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleMapper.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleMapper.java deleted file mode 100644 index 51a6bab..0000000 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.nl.modules.system.service.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; -import org.nl.modules.common.base.BaseMapper; -import org.nl.modules.system.domain.Role; -import org.nl.modules.system.service.dto.RoleDto; - -/** - * @author Zheng Jie - * @date 2018-11-23 - */ -@Mapper(componentModel = "spring", uses = {MenuMapper.class}, unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface RoleMapper extends BaseMapper { - -} diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleSmallMapper.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleSmallMapper.java deleted file mode 100644 index 25dba93..0000000 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/mapstruct/RoleSmallMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.nl.modules.system.service.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; -import org.nl.modules.common.base.BaseMapper; -import org.nl.modules.system.domain.Role; -import org.nl.modules.system.service.dto.RoleSmallDto; - -/** - * @author Zheng Jie - * @date 2019-5-23 - */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface RoleSmallMapper extends BaseMapper { - -} diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/UserController.java b/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/UserController.java index df0be5d..4c02a2e 100644 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/UserController.java +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/UserController.java @@ -18,8 +18,10 @@ package org.nl.system.controller.user; import cn.dev33.satoken.secure.SaSecureUtil; import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -33,6 +35,7 @@ import org.nl.modules.logging.annotation.Log; import org.nl.modules.system.service.dto.UserQueryCriteria; import org.nl.system.service.user.UserService; import org.nl.system.service.user.dao.User; +import org.nl.system.service.user.dto.UserQuery; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; @@ -41,7 +44,9 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import java.util.HashMap; import java.util.Set; +import java.util.function.BiPredicate; /** * @author Zheng Jie @@ -56,12 +61,30 @@ public class UserController { @Autowired UserService userService; + public static void main(String[] args) { + UserQuery query = new UserQuery(); + query.setDeptId(123L); + query.setBlurry("zzddfd"); + QueryWrapper userQueryWrapper = query.convertQ(); + + System.out.println(userQueryWrapper); + } + @ApiOperation("查询用户") @GetMapping // @SaCheckPermission("user:list") - public ResponseEntity query(UserQueryCriteria criteria, Page pageable){ - Page page = userService.page(pageable); - return new ResponseEntity<>(page,HttpStatus.OK); + public ResponseEntity query(UserQuery query){ + QueryWrapper query1 = new QueryWrapper(); + UpdateWrapper wrapper = new UpdateWrapper<>(); + +// query1.allEq(new BiPredicate() { +// @Override +// public boolean test(String s, Object o) { +// return false; +// } +// }, +// Page page = userService.page(new Page<>(query.getPage(),query.getSize()),) + return new ResponseEntity<>(null,HttpStatus.OK); } @Log("新增用户") diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dto/UserQuery.java b/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dto/UserQuery.java new file mode 100644 index 0000000..848375a --- /dev/null +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dto/UserQuery.java @@ -0,0 +1,21 @@ +package org.nl.system.service.user.dto; + +import lombok.Data; +import org.apache.poi.ss.formula.functions.T; +import org.nl.common.BaseQuery; +import org.nl.system.service.user.dao.User; + +import java.util.HashSet; +import java.util.Set; + +/* + * @author ZZQ + * @Date 2022/12/14 6:35 下午 + */ +@Data +public class UserQuery extends BaseQuery { + + private Set deptIds; + + private Long deptId; +} diff --git a/nladmin-system/src/main/java/org/nl/system/controller/dept/DeptController.java b/nladmin-system/src/main/java/org/nl/system/controller/dept/DeptController.java deleted file mode 100644 index 0599300..0000000 --- a/nladmin-system/src/main/java/org/nl/system/controller/dept/DeptController.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.nl.system.controller.dept; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; - -/** - *

- * 部门 前端控制器 - *

- * - * @author generator - * @since 2022-12-14 - */ -@RestController -@RequestMapping("/dept") -public class DeptController { - -} - diff --git a/nladmin-system/src/main/java/org/nl/system/service/dept/DeptService.java b/nladmin-system/src/main/java/org/nl/system/service/dept/DeptService.java deleted file mode 100644 index 9bc191a..0000000 --- a/nladmin-system/src/main/java/org/nl/system/service/dept/DeptService.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.nl.system.service.dept; - -import org.nl.system.service.dept.dao.Dept; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 部门 服务类 - *

- * - * @author generator - * @since 2022-12-14 - */ -public interface DeptService extends IService { - -} diff --git a/nladmin-system/src/main/java/org/nl/system/service/dept/dao/Dept.java b/nladmin-system/src/main/java/org/nl/system/service/dept/dao/Dept.java deleted file mode 100644 index a906efd..0000000 --- a/nladmin-system/src/main/java/org/nl/system/service/dept/dao/Dept.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.nl.system.service.dept.dao; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - *

- * 部门 - *

- * - * @author generator - * @since 2022-12-14 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@TableName("sys_dept") -public class Dept implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @TableId(value = "dept_id", type = IdType.AUTO) - private Long deptId; - - /** - * 上级部门 - */ - private Long pid; - - /** - * 子部门数目 - */ - private Integer subCount; - - /** - * 名称 - */ - private String name; - - /** - * 排序 - */ - private Integer deptSort; - - /** - * 状态 - */ - private String isUsed; - - private Long createId; - - /** - * 创建者 - */ - private String createName; - - private Long updateOptid; - - /** - * 更新者 - */ - private String updateOptname; - - /** - * 创建日期 - */ - private String createTime; - - /** - * 更新时间 - */ - private String updateTime; - - /** - * 部门编号 - */ - private String code; - - private String extId; - - -} diff --git a/nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.java b/nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.java deleted file mode 100644 index ad9752f..0000000 --- a/nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.nl.system.service.dept.dao.mapper; - -import org.nl.system.service.dept.dao.Dept; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * 部门 Mapper 接口 - *

- * - * @author generator - * @since 2022-12-14 - */ -public interface DeptMapper extends BaseMapper { - -} diff --git a/nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.xml b/nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.xml deleted file mode 100644 index 4874ec0..0000000 --- a/nladmin-system/src/main/java/org/nl/system/service/dept/dao/mapper/DeptMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/nladmin-system/src/main/java/org/nl/system/service/dept/impl/DeptServiceImpl.java b/nladmin-system/src/main/java/org/nl/system/service/dept/impl/DeptServiceImpl.java deleted file mode 100644 index 0f27397..0000000 --- a/nladmin-system/src/main/java/org/nl/system/service/dept/impl/DeptServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.nl.system.service.dept.impl; - -import org.nl.system.service.dept.dao.Dept; -import org.nl.system.service.dept.dao.mapper.DeptMapper; -import org.nl.system.service.dept.DeptService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 部门 服务实现类 - *

- * - * @author generator - * @since 2022-12-14 - */ -@Service -public class DeptServiceImpl extends ServiceImpl implements DeptService { - -}