diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneConfigDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneConfigDTO.java new file mode 100644 index 0000000000..5e7ea7a3f8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneConfigDTO.java @@ -0,0 +1,96 @@ +/** + * 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.resi.group.dto.group; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 小组成就配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class ResiGroupMilestoneConfigDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 里程名称 + */ + private String mileageName; + + /** + * 前一个里程值 + */ + private Integer preValue; + + /** + * 目标值 + */ + private Integer targetValue; + + /** + * 里程类型:小组人数:member;topic:话题数;转议题数:toIssue;话题解决数:resloveTopic + */ + private String mileageType; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneStatsDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneStatsDTO.java new file mode 100644 index 0000000000..43883314d1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneStatsDTO.java @@ -0,0 +1,111 @@ +/** + * 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.resi.group.dto.group; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 小组成就统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class ResiGroupMilestoneStatsDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 小组Id + */ + private String groupId; + + /** + * 里程ID + */ + private String mileageId; + + /** + * 里程名称 + */ + private String mileageName; + + /** + * 实现时间 + */ + private Date arriveTime; + + /** + * 当前值 + */ + private Integer currentValue; + + /** + * 目标值 + */ + private Integer targetValue; + + /** + * 目标是否实现,是:1;否:0 + */ + private Integer isArrive; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneConfigDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneConfigDao.java new file mode 100644 index 0000000000..95a922301c --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneConfigDao.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.modules.group.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.group.entity.ResiGroupMilestoneConfigEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 小组成就配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface ResiGroupMilestoneConfigDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneStatsDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneStatsDao.java new file mode 100644 index 0000000000..a4772a09f5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneStatsDao.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.modules.group.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.group.entity.ResiGroupMilestoneStatsEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 小组成就统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface ResiGroupMilestoneStatsDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneConfigEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneConfigEntity.java new file mode 100644 index 0000000000..f0e2a9f078 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneConfigEntity.java @@ -0,0 +1,66 @@ +/** + * 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.modules.group.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 2021-04-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("resi_group_milestone_config") +public class ResiGroupMilestoneConfigEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 里程名称 + */ + private String mileageName; + + /** + * 前一个里程值 + */ + private Integer preValue; + + /** + * 目标值 + */ + private Integer targetValue; + + /** + * 里程类型:小组人数:member;topic:话题数;转议题数:toIssue;话题解决数:resloveTopic + */ + private String mileageType; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneStatsEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneStatsEntity.java new file mode 100644 index 0000000000..a1bfc86c7e --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneStatsEntity.java @@ -0,0 +1,81 @@ +/** + * 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.modules.group.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 2021-04-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("resi_group_milestone_stats") +public class ResiGroupMilestoneStatsEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 小组Id + */ + private String groupId; + + /** + * 里程ID + */ + private String mileageId; + + /** + * 里程名称 + */ + private String mileageName; + + /** + * 实现时间 + */ + private Date arriveTime; + + /** + * 当前值 + */ + private Integer currentValue; + + /** + * 目标值 + */ + private Integer targetValue; + + /** + * 目标是否实现,是:1;否:0 + */ + private Integer isArrive; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneConfigService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneConfigService.java new file mode 100644 index 0000000000..e10cb0bd2a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneConfigService.java @@ -0,0 +1,95 @@ +/** + * 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.modules.group.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.group.entity.ResiGroupMilestoneConfigEntity; +import com.epmet.resi.group.dto.group.ResiGroupMilestoneConfigDTO; + +import java.util.List; +import java.util.Map; + +/** + * 小组成就配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +public interface ResiGroupMilestoneConfigService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-04-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-04-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ResiGroupMilestoneConfigDTO + * @author generator + * @date 2021-04-19 + */ + ResiGroupMilestoneConfigDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void save(ResiGroupMilestoneConfigDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void update(ResiGroupMilestoneConfigDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-04-19 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneStatsService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneStatsService.java new file mode 100644 index 0000000000..64ce84523e --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneStatsService.java @@ -0,0 +1,95 @@ +/** + * 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.modules.group.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.group.entity.ResiGroupMilestoneStatsEntity; +import com.epmet.resi.group.dto.group.ResiGroupMilestoneStatsDTO; + +import java.util.List; +import java.util.Map; + +/** + * 小组成就统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +public interface ResiGroupMilestoneStatsService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-04-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-04-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ResiGroupMilestoneStatsDTO + * @author generator + * @date 2021-04-19 + */ + ResiGroupMilestoneStatsDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void save(ResiGroupMilestoneStatsDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void update(ResiGroupMilestoneStatsDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-04-19 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneConfigServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneConfigServiceImpl.java new file mode 100644 index 0000000000..85735fa5ff --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneConfigServiceImpl.java @@ -0,0 +1,101 @@ +/** + * 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.modules.group.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.modules.group.dao.ResiGroupMilestoneConfigDao; +import com.epmet.modules.group.entity.ResiGroupMilestoneConfigEntity; +import com.epmet.modules.group.service.ResiGroupMilestoneConfigService; +import com.epmet.resi.group.dto.group.ResiGroupMilestoneConfigDTO; +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 2021-04-19 + */ +@Service +public class ResiGroupMilestoneConfigServiceImpl extends BaseServiceImpl implements ResiGroupMilestoneConfigService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ResiGroupMilestoneConfigDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ResiGroupMilestoneConfigDTO.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 ResiGroupMilestoneConfigDTO get(String id) { + ResiGroupMilestoneConfigEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ResiGroupMilestoneConfigDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ResiGroupMilestoneConfigDTO dto) { + ResiGroupMilestoneConfigEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMilestoneConfigEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ResiGroupMilestoneConfigDTO dto) { + ResiGroupMilestoneConfigEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMilestoneConfigEntity.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/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneStatsServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneStatsServiceImpl.java new file mode 100644 index 0000000000..48c32bad71 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneStatsServiceImpl.java @@ -0,0 +1,101 @@ +/** + * 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.modules.group.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.modules.group.dao.ResiGroupMilestoneStatsDao; +import com.epmet.modules.group.entity.ResiGroupMilestoneStatsEntity; +import com.epmet.modules.group.service.ResiGroupMilestoneStatsService; +import com.epmet.resi.group.dto.group.ResiGroupMilestoneStatsDTO; +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 2021-04-19 + */ +@Service +public class ResiGroupMilestoneStatsServiceImpl extends BaseServiceImpl implements ResiGroupMilestoneStatsService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ResiGroupMilestoneStatsDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ResiGroupMilestoneStatsDTO.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 ResiGroupMilestoneStatsDTO get(String id) { + ResiGroupMilestoneStatsEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ResiGroupMilestoneStatsDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ResiGroupMilestoneStatsDTO dto) { + ResiGroupMilestoneStatsEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMilestoneStatsEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ResiGroupMilestoneStatsDTO dto) { + ResiGroupMilestoneStatsEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMilestoneStatsEntity.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/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneConfigDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneConfigDao.xml new file mode 100644 index 0000000000..7340b2f1d9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneConfigDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneStatsDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneStatsDao.xml new file mode 100644 index 0000000000..3de4a16d99 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneStatsDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file