Browse Source

完善

master
lichao 1 year ago
parent
commit
d5ca2eef14
  1. 111
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcGovernActDTO.java
  2. 106
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcGovernUserDTO.java
  3. 94
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcGovernActController.java
  4. 94
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcGovernUserController.java
  5. 33
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcGovernActDao.java
  6. 33
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcGovernUserDao.java
  7. 81
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcGovernActEntity.java
  8. 76
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcGovernUserEntity.java
  9. 80
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcGovernActExcel.java
  10. 77
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcGovernUserExcel.java
  11. 47
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/redis/IcGovernActRedis.java
  12. 47
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/redis/IcGovernUserRedis.java
  13. 96
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcGovernActService.java
  14. 96
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcGovernUserService.java
  15. 100
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcGovernActServiceImpl.java
  16. 101
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcGovernUserServiceImpl.java
  17. 25
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcGovernActDao.xml
  18. 24
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcGovernUserDao.xml

111
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcGovernActDTO.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.partymember.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 善治活动
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Data
public class IcGovernActDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 活动主题
*/
private String topic;
/**
* 活动地点
*/
private String address;
/**
* 举办活动时间
*/
private Date holdTime;
/**
* 举办活动user
*/
private String holdUser;
/**
* 活动类型
*/
private Integer type;
/**
* 活动介绍
*/
private String introduce;
/**
* 封面
*/
private String cover;
/**
* 0未删除1已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

106
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcGovernUserDTO.java

@ -0,0 +1,106 @@
/**
* 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.partymember.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 善治调解员
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Data
public class IcGovernUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String idCard;
/**
*
*/
private String headPhoto;
/**
*
*/
private String gender;
/**
* 介绍
*/
private String introduce;
/**
* 0未删除1已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

94
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcGovernActController.java

@ -0,0 +1,94 @@
/**
* 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.partymember.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.partymember.excel.IcGovernActExcel;
import com.epmet.modules.partymember.service.IcGovernActService;
import com.epmet.resi.partymember.dto.IcGovernActDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 善治活动
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@RestController
@RequestMapping("icgovernact")
public class IcGovernActController {
@Autowired
private IcGovernActService icGovernActService;
@GetMapping("page")
public Result<PageData<IcGovernActDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcGovernActDTO> page = icGovernActService.page(params);
return new Result<PageData<IcGovernActDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<IcGovernActDTO> get(@PathVariable("id") String id){
IcGovernActDTO data = icGovernActService.get(id);
return new Result<IcGovernActDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody IcGovernActDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icGovernActService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody IcGovernActDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icGovernActService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icGovernActService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<IcGovernActDTO> list = icGovernActService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, IcGovernActExcel.class);
}
}

94
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcGovernUserController.java

@ -0,0 +1,94 @@
/**
* 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.partymember.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.partymember.excel.IcGovernUserExcel;
import com.epmet.modules.partymember.service.IcGovernUserService;
import com.epmet.resi.partymember.dto.IcGovernUserDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 善治调解员
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@RestController
@RequestMapping("icgovernuser")
public class IcGovernUserController {
@Autowired
private IcGovernUserService icGovernUserService;
@GetMapping("page")
public Result<PageData<IcGovernUserDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcGovernUserDTO> page = icGovernUserService.page(params);
return new Result<PageData<IcGovernUserDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<IcGovernUserDTO> get(@PathVariable("id") String id){
IcGovernUserDTO data = icGovernUserService.get(id);
return new Result<IcGovernUserDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody IcGovernUserDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icGovernUserService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody IcGovernUserDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icGovernUserService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icGovernUserService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<IcGovernUserDTO> list = icGovernUserService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, IcGovernUserExcel.class);
}
}

33
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcGovernActDao.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.partymember.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.partymember.entity.IcGovernActEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 善治活动
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Mapper
public interface IcGovernActDao extends BaseDao<IcGovernActEntity> {
}

33
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcGovernUserDao.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.partymember.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.partymember.entity.IcGovernUserEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 善治调解员
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Mapper
public interface IcGovernUserDao extends BaseDao<IcGovernUserEntity> {
}

81
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcGovernActEntity.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.partymember.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 qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_govern_act")
public class IcGovernActEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 活动主题
*/
private String topic;
/**
* 活动地点
*/
private String address;
/**
* 举办活动时间
*/
private Date holdTime;
/**
* 举办活动user
*/
private String holdUser;
/**
* 活动类型
*/
private Integer type;
/**
* 活动介绍
*/
private String introduce;
/**
* 封面
*/
private String cover;
}

76
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcGovernUserEntity.java

@ -0,0 +1,76 @@
/**
* 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.partymember.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 qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_govern_user")
public class IcGovernUserEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String idCard;
/**
*
*/
private String headPhoto;
/**
*
*/
private String gender;
/**
* 介绍
*/
private String introduce;
}

80
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcGovernActExcel.java

@ -0,0 +1,80 @@
/**
* 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.partymember.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 善治活动
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Data
public class IcGovernActExcel {
@Excel(name = "唯一标识")
private String id;
@Excel(name = "客户Id customer.id")
private String customerId;
@Excel(name = "活动主题")
private String topic;
@Excel(name = "活动地点")
private String address;
@Excel(name = "举办活动时间")
private Date holdTime;
@Excel(name = "举办活动user")
private String holdUser;
@Excel(name = "活动类型")
private Integer type;
@Excel(name = "活动介绍")
private String introduce;
@Excel(name = "封面")
private String cover;
@Excel(name = "0未删除;1:已删除")
private Integer delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

77
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcGovernUserExcel.java

@ -0,0 +1,77 @@
/**
* 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.partymember.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 善治调解员
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Data
public class IcGovernUserExcel {
@Excel(name = "唯一标识")
private String id;
@Excel(name = "客户Id customer.id")
private String customerId;
@Excel(name = "姓名")
private String name;
@Excel(name = "手机号")
private String mobile;
@Excel(name = "身份证号")
private String idCard;
@Excel(name = "")
private String headPhoto;
@Excel(name = "")
private String gender;
@Excel(name = "介绍")
private String introduce;
@Excel(name = "0未删除;1:已删除")
private Integer delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

47
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/redis/IcGovernActRedis.java

@ -0,0 +1,47 @@
/**
* 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.partymember.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 善治活动
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Component
public class IcGovernActRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/redis/IcGovernUserRedis.java

@ -0,0 +1,47 @@
/**
* 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.partymember.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 善治调解员
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Component
public class IcGovernUserRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

96
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcGovernActService.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.modules.partymember.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.partymember.entity.IcGovernActEntity;
import com.epmet.resi.partymember.dto.IcGovernActDTO;
import java.util.List;
import java.util.Map;
/**
* 善治活动
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
public interface IcGovernActService extends BaseService<IcGovernActEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcGovernActDTO>
* @author generator
* @date 2024-03-29
*/
PageData<IcGovernActDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcGovernActDTO>
* @author generator
* @date 2024-03-29
*/
List<IcGovernActDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcGovernActDTO
* @author generator
* @date 2024-03-29
*/
IcGovernActDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2024-03-29
*/
void save(IcGovernActDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2024-03-29
*/
void update(IcGovernActDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2024-03-29
*/
void delete(String[] ids);
}

96
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcGovernUserService.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.modules.partymember.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.partymember.entity.IcGovernUserEntity;
import com.epmet.resi.partymember.dto.IcGovernUserDTO;
import java.util.List;
import java.util.Map;
/**
* 善治调解员
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
public interface IcGovernUserService extends BaseService<IcGovernUserEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcGovernUserDTO>
* @author generator
* @date 2024-03-29
*/
PageData<IcGovernUserDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcGovernUserDTO>
* @author generator
* @date 2024-03-29
*/
List<IcGovernUserDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcGovernUserDTO
* @author generator
* @date 2024-03-29
*/
IcGovernUserDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2024-03-29
*/
void save(IcGovernUserDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2024-03-29
*/
void update(IcGovernUserDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2024-03-29
*/
void delete(String[] ids);
}

100
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcGovernActServiceImpl.java

@ -0,0 +1,100 @@
/**
* 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.partymember.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.partymember.dao.IcGovernActDao;
import com.epmet.modules.partymember.entity.IcGovernActEntity;
import com.epmet.modules.partymember.service.IcGovernActService;
import com.epmet.resi.partymember.dto.IcGovernActDTO;
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 qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Service
public class IcGovernActServiceImpl extends BaseServiceImpl<IcGovernActDao, IcGovernActEntity> implements IcGovernActService {
@Override
public PageData<IcGovernActDTO> page(Map<String, Object> params) {
IPage<IcGovernActEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcGovernActDTO.class);
}
@Override
public List<IcGovernActDTO> list(Map<String, Object> params) {
List<IcGovernActEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcGovernActDTO.class);
}
private QueryWrapper<IcGovernActEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcGovernActEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcGovernActDTO get(String id) {
IcGovernActEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcGovernActDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcGovernActDTO dto) {
IcGovernActEntity entity = ConvertUtils.sourceToTarget(dto, IcGovernActEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcGovernActDTO dto) {
IcGovernActEntity entity = ConvertUtils.sourceToTarget(dto, IcGovernActEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

101
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcGovernUserServiceImpl.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.partymember.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.partymember.dao.IcGovernUserDao;
import com.epmet.modules.partymember.entity.IcGovernUserEntity;
import com.epmet.modules.partymember.service.IcGovernUserService;
import com.epmet.resi.partymember.dto.IcGovernUserDTO;
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 qu qu@elink-cn.com
* @since v1.0.0 2024-03-29
*/
@Service
public class IcGovernUserServiceImpl extends BaseServiceImpl<IcGovernUserDao, IcGovernUserEntity> implements IcGovernUserService {
@Override
public PageData<IcGovernUserDTO> page(Map<String, Object> params) {
IPage<IcGovernUserEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcGovernUserDTO.class);
}
@Override
public List<IcGovernUserDTO> list(Map<String, Object> params) {
List<IcGovernUserEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcGovernUserDTO.class);
}
private QueryWrapper<IcGovernUserEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcGovernUserEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcGovernUserDTO get(String id) {
IcGovernUserEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcGovernUserDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcGovernUserDTO dto) {
IcGovernUserEntity entity = ConvertUtils.sourceToTarget(dto, IcGovernUserEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcGovernUserDTO dto) {
IcGovernUserEntity entity = ConvertUtils.sourceToTarget(dto, IcGovernUserEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

25
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcGovernActDao.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.partymember.dao.IcGovernActDao">
<resultMap type="com.epmet.modules.partymember.entity.IcGovernActEntity" id="icGovernActMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="topic" column="TOPIC"/>
<result property="address" column="ADDRESS"/>
<result property="holdTime" column="HOLD_TIME"/>
<result property="holdUser" column="HOLD_USER"/>
<result property="type" column="TYPE"/>
<result property="introduce" column="INTRODUCE"/>
<result property="cover" column="COVER"/>
<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>

24
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcGovernUserDao.xml

@ -0,0 +1,24 @@
<?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.partymember.dao.IcGovernUserDao">
<resultMap type="com.epmet.modules.partymember.entity.IcGovernUserEntity" id="icGovernUserMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="name" column="NAME"/>
<result property="mobile" column="MOBILE"/>
<result property="idCard" column="ID_CARD"/>
<result property="headPhoto" column="HEAD_PHOTO"/>
<result property="gender" column="GENDER"/>
<result property="introduce" column="INTRODUCE"/>
<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