Browse Source

话题分享生成文件添加

master
zxc 5 years ago
parent
commit
8b6f4d399d
  1. 102
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkRecordDTO.java
  2. 96
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkVisitRecordDTO.java
  3. 67
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkRecordController.java
  4. 67
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkVisitRecordController.java
  5. 16
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicShareLinkRecordDao.java
  6. 16
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicShareLinkVisitRecordDao.java
  7. 68
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicShareLinkRecordEntity.java
  8. 66
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicShareLinkVisitRecordEntity.java
  9. 78
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicShareLinkRecordService.java
  10. 78
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicShareLinkVisitRecordService.java
  11. 82
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkRecordServiceImpl.java
  12. 82
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkVisitRecordServiceImpl.java
  13. 7
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicShareLinkRecordDao.xml
  14. 7
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicShareLinkVisitRecordDao.xml

102
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkRecordDTO.java

@ -0,0 +1,102 @@
/**
* 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.topic;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
public class TopicShareLinkRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 邀请ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 话题所属网格ID
*/
private String gridId;
/**
* 小组ID
*/
private String groupId;
/**
* 话题ID
*/
private String topicId;
/**
* 分享人ID当前登录用户
*/
private String shareUserId;
/**
* 邀请内容
*/
private String inviteContent;
/**
* 删除状态 0正常1:删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkVisitRecordDTO.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.topic;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
public class TopicShareLinkVisitRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 分享人邀请人ID
*/
private String shareUserId;
/**
* 被邀请人ID
*/
private String inviteeUserId;
/**
* 话题分享链接表id
*/
private String shareLinkRecId;
/**
* 是否邀请注册0:1:不是
*/
private Integer isInviteRegister;
/**
* 删除状态0:正常1删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

67
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkRecordController.java

@ -0,0 +1,67 @@
package com.epmet.modules.topic.controller;
import com.epmet.commons.tools.page.PageData;
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.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.topic.service.TopicShareLinkRecordService;
import com.epmet.resi.group.dto.topic.TopicShareLinkRecordDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@RestController
@RequestMapping("topicsharelinkrecord")
public class TopicShareLinkRecordController {
@Autowired
private TopicShareLinkRecordService topicShareLinkRecordService;
@GetMapping("page")
public Result<PageData<TopicShareLinkRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<TopicShareLinkRecordDTO> page = topicShareLinkRecordService.page(params);
return new Result<PageData<TopicShareLinkRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<TopicShareLinkRecordDTO> get(@PathVariable("id") String id){
TopicShareLinkRecordDTO data = topicShareLinkRecordService.get(id);
return new Result<TopicShareLinkRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody TopicShareLinkRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
topicShareLinkRecordService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody TopicShareLinkRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
topicShareLinkRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
topicShareLinkRecordService.delete(ids);
return new Result();
}
}

67
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkVisitRecordController.java

@ -0,0 +1,67 @@
package com.epmet.modules.topic.controller;
import com.epmet.commons.tools.page.PageData;
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.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.topic.service.TopicShareLinkVisitRecordService;
import com.epmet.resi.group.dto.topic.TopicShareLinkVisitRecordDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 话题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@RestController
@RequestMapping("topicsharelinkvisitrecord")
public class TopicShareLinkVisitRecordController {
@Autowired
private TopicShareLinkVisitRecordService topicShareLinkVisitRecordService;
@GetMapping("page")
public Result<PageData<TopicShareLinkVisitRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<TopicShareLinkVisitRecordDTO> page = topicShareLinkVisitRecordService.page(params);
return new Result<PageData<TopicShareLinkVisitRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<TopicShareLinkVisitRecordDTO> get(@PathVariable("id") String id){
TopicShareLinkVisitRecordDTO data = topicShareLinkVisitRecordService.get(id);
return new Result<TopicShareLinkVisitRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody TopicShareLinkVisitRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
topicShareLinkVisitRecordService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody TopicShareLinkVisitRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
topicShareLinkVisitRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
topicShareLinkVisitRecordService.delete(ids);
return new Result();
}
}

16
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicShareLinkRecordDao.java

@ -0,0 +1,16 @@
package com.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.TopicShareLinkRecordEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Mapper
public interface TopicShareLinkRecordDao extends BaseDao<TopicShareLinkRecordEntity> {
}

16
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicShareLinkVisitRecordDao.java

@ -0,0 +1,16 @@
package com.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.TopicShareLinkVisitRecordEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 话题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Mapper
public interface TopicShareLinkVisitRecordDao extends BaseDao<TopicShareLinkVisitRecordEntity> {
}

68
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicShareLinkRecordEntity.java

@ -0,0 +1,68 @@
/**
* 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.topic.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("topic_share_link_record")
public class TopicShareLinkRecordEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 话题所属网格ID
*/
private String gridId;
/**
* 小组ID
*/
private String groupId;
/**
* 话题ID
*/
private String topicId;
/**
* 分享人ID当前登录用户
*/
private String shareUserId;
/**
* 邀请内容
*/
private String inviteContent;
}

66
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicShareLinkVisitRecordEntity.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.topic.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-12-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("topic_share_link_visit_record")
public class TopicShareLinkVisitRecordEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 分享人邀请人ID
*/
private String shareUserId;
/**
* 被邀请人ID
*/
private String inviteeUserId;
/**
* 话题分享链接表id
*/
private String shareLinkRecId;
/**
* 是否邀请注册0:1:不是
*/
private Integer isInviteRegister;
}

78
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicShareLinkRecordService.java

@ -0,0 +1,78 @@
package com.epmet.modules.topic.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.topic.entity.TopicShareLinkRecordEntity;
import com.epmet.resi.group.dto.topic.TopicShareLinkRecordDTO;
import java.util.List;
import java.util.Map;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
public interface TopicShareLinkRecordService extends BaseService<TopicShareLinkRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<TopicShareLinkRecordDTO>
* @author generator
* @date 2020-12-18
*/
PageData<TopicShareLinkRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<TopicShareLinkRecordDTO>
* @author generator
* @date 2020-12-18
*/
List<TopicShareLinkRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return TopicShareLinkRecordDTO
* @author generator
* @date 2020-12-18
*/
TopicShareLinkRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void save(TopicShareLinkRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void update(TopicShareLinkRecordDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-12-18
*/
void delete(String[] ids);
}

78
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicShareLinkVisitRecordService.java

@ -0,0 +1,78 @@
package com.epmet.modules.topic.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.topic.entity.TopicShareLinkVisitRecordEntity;
import com.epmet.resi.group.dto.topic.TopicShareLinkVisitRecordDTO;
import java.util.List;
import java.util.Map;
/**
* 话题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
public interface TopicShareLinkVisitRecordService extends BaseService<TopicShareLinkVisitRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<TopicShareLinkVisitRecordDTO>
* @author generator
* @date 2020-12-18
*/
PageData<TopicShareLinkVisitRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<TopicShareLinkVisitRecordDTO>
* @author generator
* @date 2020-12-18
*/
List<TopicShareLinkVisitRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return TopicShareLinkVisitRecordDTO
* @author generator
* @date 2020-12-18
*/
TopicShareLinkVisitRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void save(TopicShareLinkVisitRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void update(TopicShareLinkVisitRecordDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-12-18
*/
void delete(String[] ids);
}

82
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkRecordServiceImpl.java

@ -0,0 +1,82 @@
package com.epmet.modules.topic.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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.modules.topic.dao.TopicShareLinkRecordDao;
import com.epmet.modules.topic.entity.TopicShareLinkRecordEntity;
import com.epmet.modules.topic.service.TopicShareLinkRecordService;
import com.epmet.resi.group.dto.topic.TopicShareLinkRecordDTO;
import org.apache.commons.lang3.StringUtils;
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-12-18
*/
@Service
public class TopicShareLinkRecordServiceImpl extends BaseServiceImpl<TopicShareLinkRecordDao, TopicShareLinkRecordEntity> implements TopicShareLinkRecordService {
@Override
public PageData<TopicShareLinkRecordDTO> page(Map<String, Object> params) {
IPage<TopicShareLinkRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, TopicShareLinkRecordDTO.class);
}
@Override
public List<TopicShareLinkRecordDTO> list(Map<String, Object> params) {
List<TopicShareLinkRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, TopicShareLinkRecordDTO.class);
}
private QueryWrapper<TopicShareLinkRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<TopicShareLinkRecordEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public TopicShareLinkRecordDTO get(String id) {
TopicShareLinkRecordEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, TopicShareLinkRecordDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(TopicShareLinkRecordDTO dto) {
TopicShareLinkRecordEntity entity = ConvertUtils.sourceToTarget(dto, TopicShareLinkRecordEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(TopicShareLinkRecordDTO dto) {
TopicShareLinkRecordEntity entity = ConvertUtils.sourceToTarget(dto, TopicShareLinkRecordEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

82
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkVisitRecordServiceImpl.java

@ -0,0 +1,82 @@
package com.epmet.modules.topic.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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.modules.topic.dao.TopicShareLinkVisitRecordDao;
import com.epmet.modules.topic.entity.TopicShareLinkVisitRecordEntity;
import com.epmet.modules.topic.service.TopicShareLinkVisitRecordService;
import com.epmet.resi.group.dto.topic.TopicShareLinkVisitRecordDTO;
import org.apache.commons.lang3.StringUtils;
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-12-18
*/
@Service
public class TopicShareLinkVisitRecordServiceImpl extends BaseServiceImpl<TopicShareLinkVisitRecordDao, TopicShareLinkVisitRecordEntity> implements TopicShareLinkVisitRecordService {
@Override
public PageData<TopicShareLinkVisitRecordDTO> page(Map<String, Object> params) {
IPage<TopicShareLinkVisitRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, TopicShareLinkVisitRecordDTO.class);
}
@Override
public List<TopicShareLinkVisitRecordDTO> list(Map<String, Object> params) {
List<TopicShareLinkVisitRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, TopicShareLinkVisitRecordDTO.class);
}
private QueryWrapper<TopicShareLinkVisitRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<TopicShareLinkVisitRecordEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public TopicShareLinkVisitRecordDTO get(String id) {
TopicShareLinkVisitRecordEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, TopicShareLinkVisitRecordDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(TopicShareLinkVisitRecordDTO dto) {
TopicShareLinkVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, TopicShareLinkVisitRecordEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(TopicShareLinkVisitRecordDTO dto) {
TopicShareLinkVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, TopicShareLinkVisitRecordEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

7
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicShareLinkRecordDao.xml

@ -0,0 +1,7 @@
<?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.topic.dao.TopicShareLinkRecordDao">
</mapper>

7
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicShareLinkVisitRecordDao.xml

@ -0,0 +1,7 @@
<?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.topic.dao.TopicShareLinkVisitRecordDao">
</mapper>
Loading…
Cancel
Save