Browse Source

小组成就相关表代码生成

dev_shibei_match
zhaoqifeng 4 years ago
parent
commit
2c49647fee
  1. 96
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneConfigDTO.java
  2. 111
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupMilestoneStatsDTO.java
  3. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneConfigDao.java
  4. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupMilestoneStatsDao.java
  5. 66
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneConfigEntity.java
  6. 81
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupMilestoneStatsEntity.java
  7. 95
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneConfigService.java
  8. 95
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupMilestoneStatsService.java
  9. 101
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneConfigServiceImpl.java
  10. 101
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupMilestoneStatsServiceImpl.java
  11. 22
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneConfigDao.xml
  12. 25
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneStatsDao.xml

96
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
/**
* 里程类型小组人数membertopic话题数转议题数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;
}

111
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
/**
* 目标是否实现10
*/
private Integer isArrive;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<ResiGroupMilestoneConfigEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<ResiGroupMilestoneStatsEntity> {
}

66
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
/**
* 里程类型小组人数membertopic话题数转议题数toIssue话题解决数resloveTopic
*/
private String mileageType;
}

81
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
/**
* 目标是否实现10
*/
private Integer isArrive;
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<ResiGroupMilestoneConfigEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ResiGroupMilestoneConfigDTO>
* @author generator
* @date 2021-04-19
*/
PageData<ResiGroupMilestoneConfigDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ResiGroupMilestoneConfigDTO>
* @author generator
* @date 2021-04-19
*/
List<ResiGroupMilestoneConfigDTO> list(Map<String, Object> 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);
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<ResiGroupMilestoneStatsEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ResiGroupMilestoneStatsDTO>
* @author generator
* @date 2021-04-19
*/
PageData<ResiGroupMilestoneStatsDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ResiGroupMilestoneStatsDTO>
* @author generator
* @date 2021-04-19
*/
List<ResiGroupMilestoneStatsDTO> list(Map<String, Object> 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);
}

101
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<ResiGroupMilestoneConfigDao, ResiGroupMilestoneConfigEntity> implements ResiGroupMilestoneConfigService {
@Override
public PageData<ResiGroupMilestoneConfigDTO> page(Map<String, Object> params) {
IPage<ResiGroupMilestoneConfigEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ResiGroupMilestoneConfigDTO.class);
}
@Override
public List<ResiGroupMilestoneConfigDTO> list(Map<String, Object> params) {
List<ResiGroupMilestoneConfigEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ResiGroupMilestoneConfigDTO.class);
}
private QueryWrapper<ResiGroupMilestoneConfigEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ResiGroupMilestoneConfigEntity> 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));
}
}

101
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<ResiGroupMilestoneStatsDao, ResiGroupMilestoneStatsEntity> implements ResiGroupMilestoneStatsService {
@Override
public PageData<ResiGroupMilestoneStatsDTO> page(Map<String, Object> params) {
IPage<ResiGroupMilestoneStatsEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ResiGroupMilestoneStatsDTO.class);
}
@Override
public List<ResiGroupMilestoneStatsDTO> list(Map<String, Object> params) {
List<ResiGroupMilestoneStatsEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ResiGroupMilestoneStatsDTO.class);
}
private QueryWrapper<ResiGroupMilestoneStatsEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ResiGroupMilestoneStatsEntity> 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));
}
}

22
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneConfigDao.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.modules.group.dao.ResiGroupMilestoneConfigDao">
<resultMap type="com.epmet.modules.group.entity.ResiGroupMilestoneConfigEntity" id="resiGroupMilestoneConfigMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="mileageName" column="MILEAGE_NAME"/>
<result property="preValue" column="PRE_VALUE"/>
<result property="targetValue" column="TARGET_VALUE"/>
<result property="mileageType" column="MILEAGE_TYPE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

25
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupMilestoneStatsDao.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.modules.group.dao.ResiGroupMilestoneStatsDao">
<resultMap type="com.epmet.modules.group.entity.ResiGroupMilestoneStatsEntity" id="resiGroupMilestoneStatsMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="groupId" column="GROUP_ID"/>
<result property="mileageId" column="MILEAGE_ID"/>
<result property="mileageName" column="MILEAGE_NAME"/>
<result property="arriveTime" column="ARRIVE_TIME"/>
<result property="currentValue" column="CURRENT_VALUE"/>
<result property="targetValue" column="TARGET_VALUE"/>
<result property="isArrive" column="IS_ARRIVE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>
Loading…
Cancel
Save