From ebbb4539bc6386c91cc39e24235acbe2f53d30b3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 17 Jan 2022 09:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=20=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=A1=B6=E9=83=A8renren=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/template/Controller.java.vm | 17 ---- .../src/main/resources/template/DTO.java.vm | 17 ---- .../src/main/resources/template/Dao.java.vm | 17 ---- .../main/resources/template/Entity.java.vm | 17 ---- .../src/main/resources/template/Excel.java.vm | 17 ---- .../src/main/resources/template/Redis.java.vm | 17 ---- .../main/resources/template/Service.java.vm | 17 ---- .../resources/template/ServiceImpl.java.vm | 17 ---- .../com/epmet/dto/IcOftenUseFunctionDTO.java | 91 +++++++++++++++++++ .../IcOftenUseFunctionController.java | 42 +++++++++ .../com/epmet/dao/IcOftenUseFunctionDao.java | 33 +++++++ .../entity/IcOftenUseFunctionEntity.java | 61 +++++++++++++ .../service/IcOftenUseFunctionService.java | 51 +++++++++++ .../impl/IcOftenUseFunctionServiceImpl.java | 52 +++++++++++ .../mapper/IcOftenUseFunctionDao.xml | 7 ++ .../dto/IcIndividualCategoryManageDTO.java | 74 +++++++++++++++ .../IcIndividualCategoryManageController.java | 42 +++++++++ .../dao/IcIndividualCategoryManageDao.java | 16 ++++ .../IcIndividualCategoryManageEntity.java | 44 +++++++++ .../IcIndividualCategoryManageService.java | 38 ++++++++ ...IcIndividualCategoryManageServiceImpl.java | 45 +++++++++ .../mapper/IcIndividualCategoryManageDao.xml | 7 ++ 22 files changed, 603 insertions(+), 136 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml diff --git a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm index 387cdc6961..e7d642a3ca 100644 --- a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.controller; import ${main}.commons.tools.page.PageData; diff --git a/epmet-cloud-generator/src/main/resources/template/DTO.java.vm b/epmet-cloud-generator/src/main/resources/template/DTO.java.vm index 83d0e1db5a..f444c74181 100644 --- a/epmet-cloud-generator/src/main/resources/template/DTO.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/DTO.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.dto; import java.io.Serializable; diff --git a/epmet-cloud-generator/src/main/resources/template/Dao.java.vm b/epmet-cloud-generator/src/main/resources/template/Dao.java.vm index 43af398afa..a894ab59a7 100644 --- a/epmet-cloud-generator/src/main/resources/template/Dao.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Dao.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.dao; import ${main}.commons.mybatis.dao.BaseDao; diff --git a/epmet-cloud-generator/src/main/resources/template/Entity.java.vm b/epmet-cloud-generator/src/main/resources/template/Entity.java.vm index 8822676ab2..5a8de66500 100644 --- a/epmet-cloud-generator/src/main/resources/template/Entity.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Entity.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.entity; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/epmet-cloud-generator/src/main/resources/template/Excel.java.vm b/epmet-cloud-generator/src/main/resources/template/Excel.java.vm index eee8847471..3590e88559 100644 --- a/epmet-cloud-generator/src/main/resources/template/Excel.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Excel.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.excel; import cn.afterturn.easypoi.excel.annotation.Excel; diff --git a/epmet-cloud-generator/src/main/resources/template/Redis.java.vm b/epmet-cloud-generator/src/main/resources/template/Redis.java.vm index 22ab9f82f4..abe1ff0c2e 100644 --- a/epmet-cloud-generator/src/main/resources/template/Redis.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Redis.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.redis; import ${main}.commons.tools.redis.RedisUtils; diff --git a/epmet-cloud-generator/src/main/resources/template/Service.java.vm b/epmet-cloud-generator/src/main/resources/template/Service.java.vm index 388dba62cf..59e490572d 100644 --- a/epmet-cloud-generator/src/main/resources/template/Service.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Service.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.service; import ${main}.commons.mybatis.service.BaseService; diff --git a/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm b/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm index e0e34c5a3a..f0bcfe2a7e 100644 --- a/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm @@ -1,20 +1,3 @@ -/** - * 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 ${package}.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java new file mode 100644 index 0000000000..83e458ceb6 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java @@ -0,0 +1,91 @@ +/** + * 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 2022-01-17 + */ +@Data +public class IcOftenUseFunctionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * 菜单ID + */ + private String menuId; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标记 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java new file mode 100644 index 0000000000..b852a732f2 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java @@ -0,0 +1,42 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +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.IcOftenUseFunctionDTO; +import com.epmet.service.IcOftenUseFunctionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@RestController +@RequestMapping("icoftenusefunction") +public class IcOftenUseFunctionController { + + @Autowired + private IcOftenUseFunctionService icOftenUseFunctionService; + + @PostMapping + public Result save(@RequestBody IcOftenUseFunctionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icOftenUseFunctionService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcOftenUseFunctionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icOftenUseFunctionService.update(dto); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java new file mode 100644 index 0000000000..9c1a1e4a21 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java @@ -0,0 +1,33 @@ +/** + * 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.IcOftenUseFunctionEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Mapper +public interface IcOftenUseFunctionDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java new file mode 100644 index 0000000000..9c0e1cf9f0 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java @@ -0,0 +1,61 @@ +/** + * 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 2022-01-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_often_use_function") +public class IcOftenUseFunctionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * 菜单ID + */ + private String menuId; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java new file mode 100644 index 0000000000..440e229478 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java @@ -0,0 +1,51 @@ +/** + * 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.dto.IcOftenUseFunctionDTO; +import com.epmet.entity.IcOftenUseFunctionEntity; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +public interface IcOftenUseFunctionService extends BaseService { + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void save(IcOftenUseFunctionDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void update(IcOftenUseFunctionDTO dto); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java new file mode 100644 index 0000000000..b695a925ff --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java @@ -0,0 +1,52 @@ +/** + * 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.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcOftenUseFunctionDao; +import com.epmet.dto.IcOftenUseFunctionDTO; +import com.epmet.entity.IcOftenUseFunctionEntity; +import com.epmet.service.IcOftenUseFunctionService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Service +public class IcOftenUseFunctionServiceImpl extends BaseServiceImpl implements IcOftenUseFunctionService { + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcOftenUseFunctionDTO dto) { + IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcOftenUseFunctionDTO dto) { + IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class); + updateById(entity); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml new file mode 100644 index 0000000000..78574bd371 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java new file mode 100644 index 0000000000..372864b7f0 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java @@ -0,0 +1,74 @@ +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 2022-01-17 + */ +@Data +public class IcIndividualCategoryManageDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * + */ + private String columnId; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标记 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java new file mode 100644 index 0000000000..44fe329111 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java @@ -0,0 +1,42 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +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.IcIndividualCategoryManageDTO; +import com.epmet.service.IcIndividualCategoryManageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@RestController +@RequestMapping("icindividualcategorymanage") +public class IcIndividualCategoryManageController { + + @Autowired + private IcIndividualCategoryManageService icIndividualCategoryManageService; + + @PostMapping + public Result save(@RequestBody IcIndividualCategoryManageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icIndividualCategoryManageService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcIndividualCategoryManageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icIndividualCategoryManageService.update(dto); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java new file mode 100644 index 0000000000..cdc466058b --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcIndividualCategoryManageEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Mapper +public interface IcIndividualCategoryManageDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java new file mode 100644 index 0000000000..008cc40fd1 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java @@ -0,0 +1,44 @@ +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 2022-01-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_individual_category_manage") +public class IcIndividualCategoryManageEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * + */ + private String columnId; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java new file mode 100644 index 0000000000..e21285817c --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java @@ -0,0 +1,38 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.entity.IcIndividualCategoryManageEntity; + +import java.util.List; +import java.util.Map; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +public interface IcIndividualCategoryManageService extends BaseService { + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void save(IcIndividualCategoryManageDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void update(IcIndividualCategoryManageDTO dto); +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java new file mode 100644 index 0000000000..073cbc82b4 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java @@ -0,0 +1,45 @@ +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.IcIndividualCategoryManageDao; +import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.entity.IcIndividualCategoryManageEntity; +import com.epmet.service.IcIndividualCategoryManageService; +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 2022-01-17 + */ +@Service +public class IcIndividualCategoryManageServiceImpl extends BaseServiceImpl implements IcIndividualCategoryManageService { + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcIndividualCategoryManageDTO dto) { + IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcIndividualCategoryManageDTO dto) { + IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class); + updateById(entity); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml new file mode 100644 index 0000000000..abb3d01e4a --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file