+ * 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.elink.esua.epdc.dto;
+
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 党员标签关系表
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since v1.0.0 2019-09-04
+ */
+@Data
+public class PartyTagRelationDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String id;
+
+ private String partyId;
+
+ private String tagId;
+
+ private Integer revision;
+
+ private String createdBy;
+
+ private Date createdTime;
+
+ private String updatedBy;
+
+ private Date updatedTime;
+
+ private String delFlag;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java
index 40d479dea..c18a36440 100755
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java
@@ -30,6 +30,7 @@ import com.elink.esua.epdc.dto.PartyMembersDTO;
import com.elink.esua.epdc.excel.PartyMembersExcel;
import com.elink.esua.epdc.service.PartyMembersService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -46,6 +47,7 @@ import java.util.Map;
@RestController
@RequestMapping("/partymembers")
public class PartyMembersController {
+
@Autowired
private PartyMembersService partyMembersService;
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java
new file mode 100755
index 000000000..afb401335
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java
@@ -0,0 +1,102 @@
+/**
+ * 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.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.PartyTagRelationDTO;
+import com.elink.esua.epdc.excel.PartyTagRelationExcel;
+import com.elink.esua.epdc.service.PartyTagRelationService;
+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 Mark sunlightcs@gmail.com
+ * @since v1.0.0 2019-09-04
+ */
+@RestController
+@RequestMapping("/partytagrelation")
+public class PartyTagRelationController {
+ @Autowired
+ private PartyTagRelationService partyTagRelationService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = partyTagRelationService.page(params);
+
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ PartyTagRelationDTO data = partyTagRelationService.get(id);
+
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody PartyTagRelationDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+
+ partyTagRelationService.save(dto);
+
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody PartyTagRelationDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+
+ partyTagRelationService.update(dto);
+
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+
+ partyTagRelationService.delete(ids);
+
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = partyTagRelationService.list(params);
+
+ ExcelUtils.exportExcelToTarget(response, null, list, PartyTagRelationExcel.class);
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java
index 1106eff31..8ad93f7d1 100755
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java
@@ -22,6 +22,7 @@ import com.elink.esua.epdc.dto.PartyMembersDTO;
import com.elink.esua.epdc.entity.PartyMembersEntity;
import org.apache.ibatis.annotations.Mapper;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
@@ -36,4 +37,5 @@ public interface PartyMembersDao extends BaseDao {
List pageDIY(Map params);
+ PartyMembersDTO selectByIdNew(String id);
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.java
new file mode 100755
index 000000000..8329ec861
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.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.elink.esua.epdc.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.entity.PartyTagRelationEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 党员标签关系表
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since v1.0.0 2019-09-04
+ */
+@Mapper
+public interface PartyTagRelationDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java
index 63351f1dd..3eb40dd29 100755
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java
@@ -96,10 +96,10 @@ public class PartyMembersEntity extends BaseEpdcEntity {
/**
* 网格ID
*/
- private String gridId;
+ private long gridId;
/**
* 部门ID
*/
- private String deptId;
+ private long deptId;
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java
new file mode 100755
index 000000000..a5231fec1
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java
@@ -0,0 +1,53 @@
+/**
+ * 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.elink.esua.epdc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEntity;
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 党员标签关系表
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since v1.0.0 2019-09-04
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_party_tag_relation")
+public class PartyTagRelationEntity extends BaseEpdcEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 党员ID
+ */
+ private String partyId;
+ /**
+ * 标签ID
+ */
+ private String tagId;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java
new file mode 100755
index 000000000..9b7a9cc94
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 党员标签关系表
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since v1.0.0 2019-09-04
+ */
+@Data
+public class PartyTagRelationExcel {
+ @Excel(name = "主键")
+ private String id;
+ @Excel(name = "党员ID")
+ private String partyId;
+ @Excel(name = "标签ID")
+ private String tagId;
+ @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;
+ @Excel(name = "删除标记")
+ private String delFlag;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java
new file mode 100755
index 000000000..e2bde59e9
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java
@@ -0,0 +1,47 @@
+/**
+ * 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.elink.esua.epdc.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 党员标签关系表
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since v1.0.0 2019-09-04
+ */
+@Component
+public class PartyTagRelationRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java
new file mode 100755
index 000000000..2a82e316e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java
@@ -0,0 +1,47 @@
+/**
+ * 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.elink.esua.epdc.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.dto.PartyTagRelationDTO;
+import com.elink.esua.epdc.entity.PartyTagRelationEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员标签关系表
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since v1.0.0 2019-09-04
+ */
+public interface PartyTagRelationService extends BaseService {
+
+ PageData page(Map params);
+
+ List list(Map params);
+
+ PartyTagRelationDTO get(String id);
+
+ void save(PartyTagRelationDTO dto);
+
+ void update(PartyTagRelationDTO dto);
+
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java
index a5ec41068..e442eee5c 100755
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java
@@ -17,6 +17,9 @@
package com.elink.esua.epdc.service.impl;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.enums.DelFlagEnum;
@@ -28,9 +31,11 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dao.PartyMembersDao;
import com.elink.esua.epdc.dto.PartyMembersDTO;
+import com.elink.esua.epdc.dto.PartyTagRelationDTO;
import com.elink.esua.epdc.entity.PartyMembersEntity;
import com.elink.esua.epdc.redis.PartyMembersRedis;
import com.elink.esua.epdc.service.PartyMembersService;
+import com.elink.esua.epdc.service.PartyTagRelationService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -48,8 +53,11 @@ import java.util.Map;
*/
@Service
public class PartyMembersServiceImpl extends BaseServiceImpl implements PartyMembersService {
+
@Autowired
private PartyMembersRedis partyMembersRedis;
+ @Autowired
+ private PartyTagRelationService partyTagRelationService;
@Override
public PageData page(Map params) {
@@ -87,17 +95,27 @@ public class PartyMembersServiceImpl extends BaseServiceImpl
+ * 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.
+ *