From 28ebd0e0ddfb8f7b677ec9137ee054e795d24f9c Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 19 Mar 2020 17:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4gov=E4=B8=8B=E7=9A=84PdManDbV?= =?UTF-8?q?ersion=E6=A8=A1=E5=9D=97=EF=BC=8C=E4=BF=AE=E6=94=B9strangerAcce?= =?UTF-8?q?ssRecordController=E7=9A=84RequestMapping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/PdmanDbVersionDTO.java | 51 --------- .../controller/PdmanDbVersionController.java | 94 ---------------- .../java/com/epmet/dao/PdmanDbVersionDao.java | 33 ------ .../epmet/entity/PdmanDbVersionEntity.java | 51 --------- .../com/epmet/excel/PdmanDbVersionExcel.java | 44 -------- .../com/epmet/redis/PdmanDbVersionRedis.java | 47 -------- .../epmet/service/PdmanDbVersionService.java | 95 ---------------- .../service/impl/CustomerGridServiceImpl.java | 2 +- .../impl/PdmanDbVersionServiceImpl.java | 104 ------------------ .../resources/mapper/PdmanDbVersionDao.xml | 13 --- .../StrangerAccessRecordController.java | 2 +- 11 files changed, 2 insertions(+), 534 deletions(-) delete mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PdmanDbVersionDTO.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PdmanDbVersionController.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PdmanDbVersionDao.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PdmanDbVersionEntity.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PdmanDbVersionExcel.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/PdmanDbVersionRedis.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PdmanDbVersionService.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PdmanDbVersionServiceImpl.java delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PdmanDbVersionDao.xml diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PdmanDbVersionDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PdmanDbVersionDTO.java deleted file mode 100644 index 7b6008323b..0000000000 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PdmanDbVersionDTO.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto; - -import java.io.Serializable; -import java.util.Date; -import lombok.Data; - - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Data -public class PdmanDbVersionDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * - */ - private String dbVersion; - - /** - * - */ - private String versionDesc; - - /** - * - */ - private String createdTime; - -} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PdmanDbVersionController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PdmanDbVersionController.java deleted file mode 100644 index 00851cdb80..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PdmanDbVersionController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.PdmanDbVersionDTO; -import com.epmet.excel.PdmanDbVersionExcel; -import com.epmet.service.PdmanDbVersionService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@RestController -@RequestMapping("pdmandbversion") -public class PdmanDbVersionController { - - @Autowired - private PdmanDbVersionService pdmanDbVersionService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = pdmanDbVersionService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - PdmanDbVersionDTO data = pdmanDbVersionService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody PdmanDbVersionDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - pdmanDbVersionService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody PdmanDbVersionDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - pdmanDbVersionService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - pdmanDbVersionService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = pdmanDbVersionService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, PdmanDbVersionExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PdmanDbVersionDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PdmanDbVersionDao.java deleted file mode 100644 index 44b4dc43da..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PdmanDbVersionDao.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PdmanDbVersionEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Mapper -public interface PdmanDbVersionDao extends BaseDao { - -} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PdmanDbVersionEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PdmanDbVersionEntity.java deleted file mode 100644 index 9a9e181918..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PdmanDbVersionEntity.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.entity; - -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("pdman_db_version") -public class PdmanDbVersionEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * - */ - private String dbVersion; - - /** - * - */ - private String versionDesc; - -} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PdmanDbVersionExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PdmanDbVersionExcel.java deleted file mode 100644 index 1bb5b05b13..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PdmanDbVersionExcel.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.excel; - -import cn.afterturn.easypoi.excel.annotation.Excel; -import lombok.Data; - -import java.util.Date; - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Data -public class PdmanDbVersionExcel { - - @Excel(name = "") - private String dbVersion; - - @Excel(name = "") - private String versionDesc; - - @Excel(name = "") - private String createdTime; - - -} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/PdmanDbVersionRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/PdmanDbVersionRedis.java deleted file mode 100644 index df050721f3..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/PdmanDbVersionRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Component -public class PdmanDbVersionRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PdmanDbVersionService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PdmanDbVersionService.java deleted file mode 100644 index 2b869d27c9..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PdmanDbVersionService.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.service; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.PdmanDbVersionDTO; -import com.epmet.entity.PdmanDbVersionEntity; - -import java.util.List; -import java.util.Map; - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -public interface PdmanDbVersionService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2020-03-16 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2020-03-16 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return PdmanDbVersionDTO - * @author generator - * @date 2020-03-16 - */ - PdmanDbVersionDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2020-03-16 - */ - void save(PdmanDbVersionDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2020-03-16 - */ - void update(PdmanDbVersionDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2020-03-16 - */ - void delete(String[] ids); -} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index 36435deb2d..20122eca59 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -145,7 +145,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl getCustomerGridByGridId(CustomerGridFormDTO formDTO) { return new Result().ok(baseDao.getCustomerGridByGridId(formDTO)); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PdmanDbVersionServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PdmanDbVersionServiceImpl.java deleted file mode 100644 index 59143774d9..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PdmanDbVersionServiceImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.PdmanDbVersionDao; -import com.epmet.dto.PdmanDbVersionDTO; -import com.epmet.entity.PdmanDbVersionEntity; -import com.epmet.redis.PdmanDbVersionRedis; -import com.epmet.service.PdmanDbVersionService; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -/** - * - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Service -public class PdmanDbVersionServiceImpl extends BaseServiceImpl implements PdmanDbVersionService { - - @Autowired - private PdmanDbVersionRedis pdmanDbVersionRedis; - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, PdmanDbVersionDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, PdmanDbVersionDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public PdmanDbVersionDTO get(String id) { - PdmanDbVersionEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, PdmanDbVersionDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(PdmanDbVersionDTO dto) { - PdmanDbVersionEntity entity = ConvertUtils.sourceToTarget(dto, PdmanDbVersionEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(PdmanDbVersionDTO dto) { - PdmanDbVersionEntity entity = ConvertUtils.sourceToTarget(dto, PdmanDbVersionEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PdmanDbVersionDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PdmanDbVersionDao.xml deleted file mode 100644 index f265a47684..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PdmanDbVersionDao.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerAccessRecordController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerAccessRecordController.java index 38a4f1674a..e2a164c48f 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerAccessRecordController.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerAccessRecordController.java @@ -27,7 +27,7 @@ import java.util.Map; * @date 2020.03.17 11:33 */ @RestController -@RequestMapping("strangerAccessRecordController") +@RequestMapping("strangerAccessRecord") public class StrangerAccessRecordController { @Autowired