Browse Source

党员管理

dev
王金鹏 6 years ago
parent
commit
11bceb3a56
  1. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PartyMembersDTO.java
  2. 54
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PartyTagRelationDTO.java
  3. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java
  4. 102
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java
  5. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java
  6. 33
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.java
  7. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java
  8. 53
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java
  9. 52
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java
  10. 47
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java
  11. 47
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java
  12. 24
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java
  13. 113
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTagRelationServiceImpl.java
  14. 18
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PartyMembersDao.xml

2
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PartyMembersDTO.java

@ -19,6 +19,8 @@ package com.elink.esua.epdc.dto;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;

54
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PartyTagRelationDTO.java

@ -0,0 +1,54 @@
/**
* 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.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;
}

2
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;

102
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
* <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.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<PageData<PartyTagRelationDTO>> page(@RequestParam Map<String, Object> params){
PageData<PartyTagRelationDTO> page = partyTagRelationService.page(params);
return new Result<PageData<PartyTagRelationDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PartyTagRelationDTO> get(@PathVariable("id") String id){
PartyTagRelationDTO data = partyTagRelationService.get(id);
return new Result<PartyTagRelationDTO>().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<String, Object> params, HttpServletResponse response) throws Exception {
List<PartyTagRelationDTO> list = partyTagRelationService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PartyTagRelationExcel.class);
}
}

2
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<PartyMembersEntity> {
List<PartyMembersDTO> pageDIY(Map<String, Object> params);
PartyMembersDTO selectByIdNew(String id);
}

33
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
* <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.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<PartyTagRelationEntity> {
}

4
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;
}

53
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
* <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.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;
}

52
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
* <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.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;
}

47
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
* <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.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;
}
}

47
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
* <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.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<PartyTagRelationEntity> {
PageData<PartyTagRelationDTO> page(Map<String, Object> params);
List<PartyTagRelationDTO> list(Map<String, Object> params);
PartyTagRelationDTO get(String id);
void save(PartyTagRelationDTO dto);
void update(PartyTagRelationDTO dto);
void delete(String[] ids);
}

24
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<PartyMembersDao, PartyMembersEntity> implements PartyMembersService {
@Autowired
private PartyMembersRedis partyMembersRedis;
@Autowired
private PartyTagRelationService partyTagRelationService;
@Override
public PageData<PartyMembersDTO> page(Map<String, Object> params) {
@ -87,17 +95,27 @@ public class PartyMembersServiceImpl extends BaseServiceImpl<PartyMembersDao, Pa
@Override
public PartyMembersDTO get(String id) {
PartyMembersEntity entity = baseDao.selectById(id);
PartyMembersDTO partyMembersDTO = baseDao.selectByIdNew(id);
return ConvertUtils.sourceToTarget(entity, PartyMembersDTO.class);
return partyMembersDTO;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PartyMembersDTO dto) {
PartyMembersEntity entity = ConvertUtils.sourceToTarget(dto, PartyMembersEntity.class);
insert(entity);
JSONArray jsonArray = JSON.parseArray(dto.getTagIds());
for (int i = 0; i<jsonArray.size(); i++){
String tagId = jsonArray.getString(i);
PartyTagRelationDTO partyTagRelationDTO = new PartyTagRelationDTO();
partyTagRelationDTO.setPartyId(entity.getId());
partyTagRelationDTO.setTagId(tagId);
partyTagRelationService.save(partyTagRelationDTO);
}
}
@Override

113
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTagRelationServiceImpl.java

@ -0,0 +1,113 @@
/**
* 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.elink.esua.epdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.enums.DelFlagEnum;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.dao.PartyTagRelationDao;
import com.elink.esua.epdc.dto.PartyTagRelationDTO;
import com.elink.esua.epdc.entity.PartyTagRelationEntity;
import com.elink.esua.epdc.redis.PartyTagRelationRedis;
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;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 党员标签关系表
*
* @author Mark sunlightcs@gmail.com
* @since v1.0.0 2019-09-04
*/
@Service
public class PartyTagRelationServiceImpl extends BaseServiceImpl<PartyTagRelationDao, PartyTagRelationEntity> implements PartyTagRelationService {
@Autowired
private PartyTagRelationRedis partyTagRelationRedis;
@Override
public PageData<PartyTagRelationDTO> page(Map<String, Object> params) {
IPage<PartyTagRelationEntity> page = baseDao.selectPage(
getPage(params, Constant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, PartyTagRelationDTO.class);
}
@Override
public List<PartyTagRelationDTO> list(Map<String, Object> params) {
List<PartyTagRelationEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PartyTagRelationDTO.class);
}
private QueryWrapper<PartyTagRelationEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PartyTagRelationEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
//wrapper.eq(Constant.DEL_FLAG, DelFlagEnum.NORMAL.value());
return wrapper;
}
@Override
public PartyTagRelationDTO get(String id) {
PartyTagRelationEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, PartyTagRelationDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PartyTagRelationDTO dto) {
PartyTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, PartyTagRelationEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PartyTagRelationDTO dto) {
PartyTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, PartyTagRelationEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
//逻辑删除
//logicDelete(ids, PartyTagRelationEntity.class);
//物理删除
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

18
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PartyMembersDao.xml

@ -30,7 +30,7 @@
<resultMap type="com.elink.esua.epdc.dto.PartyMembersDTO" id="partyMembersDtoMap">
<result property="tagName" column="TAG_NAME"/>
<result property="tagDesc" column="TAG_DESC"/>
<result property="tagIds" column="TAG_ID"/>
<result property="id" column="ID"/>
<result property="realName" column="REAL_NAME"/>
<result property="mobile" column="MOBILE"/>
@ -56,7 +56,7 @@
</resultMap>
<select id="pageDIY" resultMap="partyMembersDtoMap">
select pm.*,tag.TAG_NAME from epdc_party_members as pm, epdc_user_tag as tag,epdc_party_tag_relation as partytag
select pm.*,GROUP_CONCAT(DISTINCT(tag.TAG_NAME)) as TAG_NAME from epdc_party_members as pm, epdc_user_tag as tag,epdc_party_tag_relation as partytag
where 1 = 1
and pm.ID = partytag.PARTY_ID
and tag.ID = partytag.TAG_ID
@ -85,12 +85,22 @@
<if test="postId != null and postId != '' ">
and pm.POST_ID = #{postId}
</if>
<if test="startTime != null ">
<if test="startTime != null and startTime != '' ">
and pm.REGIST_TIME >= #{startTime}
</if>
<if test="endTime != null ">
<if test="endTime != null and endTime != '' ">
<![CDATA[ and pm.REGIST_TIME <= ]]> #{endTime}
</if>
GROUP BY pm.ID
</select>
<select id="selectByIdNew" resultMap="partyMembersDtoMap">
select pm.*,GROUP_CONCAT(DISTINCT(partytag.TAG_ID)) as TAG_ID from epdc_party_members as pm,epdc_party_tag_relation as partytag
where 1 = 1
and pm.ID = partytag.PARTY_ID
and pm.ID = #{id}
and pm.DEL_FLAG = '0'
</select>
</mapper>

Loading…
Cancel
Save