Browse Source

党群1+1 修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
986a6685eb
  1. 6
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/PartyGroupDTO.java
  2. 25
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyUserNewInfoFormDTO.java
  3. 4
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/AllUsers.java
  4. 4
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/CurrentUser.java
  5. 51
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyTopicSupportResultDTO.java
  6. 14
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/TopicList.java
  7. 7
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/PartyGroupController.java
  8. 2
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java
  9. 37
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java
  10. 34
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java
  11. 2
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml
  12. 25
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml
  13. 101
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml

6
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/PartyGroupDTO.java

@ -21,6 +21,7 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
@ -132,4 +133,9 @@ public class PartyGroupDTO implements Serializable {
*/ */
private Integer sort; private Integer sort;
/**
* 部门回显
*/
private List<String> deptIdList;
} }

25
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyUserNewInfoFormDTO.java

@ -37,5 +37,30 @@ public class PartyUserNewInfoFormDTO implements Serializable {
* 党员标识 * 党员标识
*/ */
private String partyMember; private String partyMember;
/**
* 父所有部门ID
*/
private String parentDeptIds;
/**
* 父所有部门
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门
*/
private String allDeptNames;
/**
* 网格
*/
private String grid;
/**
* 网格ID
*/
private Long gridId;
} }

4
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/AllUsers.java

@ -38,6 +38,10 @@ public class AllUsers implements Serializable {
* 身份标识 0:群员 1:群主 2:副群主 * 身份标识 0:群员 1:群主 2:副群主
*/ */
private String identityFlag; private String identityFlag;
/**
* 是否是本社区居民0-1-
*/
private String thisCommunity;
/** /**
* 禁言状态0-未禁言1-禁言1天2-禁言1周3-禁言一个月4-永久禁言 * 禁言状态0-未禁言1-禁言1天2-禁言1周3-禁言一个月4-永久禁言

4
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/CurrentUser.java

@ -38,6 +38,10 @@ public class CurrentUser implements Serializable {
* 身份标识 0:群员 1:群主 2:副群主 * 身份标识 0:群员 1:群主 2:副群主
*/ */
private String identityFlag; private String identityFlag;
/**
* 是否是本社区居民0-1-
*/
private String thisCommunity;
/** /**
* 禁言状态0-未禁言1-禁言1天2-禁言1周3-禁言一个月4-永久禁言 * 禁言状态0-未禁言1-禁言1天2-禁言1周3-禁言一个月4-永久禁言

51
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyTopicSupportResultDTO.java

@ -0,0 +1,51 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
/**
* 话题点赞表
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2020-05-29
*/
@Data
public class PartyTopicSupportResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户ID
*/
private String userId;
/**
* 评论人昵称
*/
private String nickname;
/**
* 评论人头像
*/
private String userAvatar;
}

14
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/TopicList.java

@ -97,10 +97,24 @@ public class TopicList implements Serializable {
* 是否点赞 * 是否点赞
*/ */
private String likeFlag; private String likeFlag;
/**
* 身份标识 - 话题发布人所在话题所属党群
*/
private String identityFlag;
/**
* 是否是本社区居民
*/
private String thisCommunity;
/** /**
* 评论列表 * 评论列表
*/ */
private List<PartyTopicCommentResultDTO> comments; private List<PartyTopicCommentResultDTO> comments;
/**
* 点赞列表
*/
private List<PartyTopicSupportResultDTO> likes;
} }

7
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/PartyGroupController.java

@ -34,8 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.*;
import java.util.Map;
/** /**
@ -60,6 +59,10 @@ public class PartyGroupController {
@GetMapping("{id}") @GetMapping("{id}")
public Result<PartyGroupDTO> get(@PathVariable("id") String id){ public Result<PartyGroupDTO> get(@PathVariable("id") String id){
PartyGroupDTO data = partyGroupService.get(id); PartyGroupDTO data = partyGroupService.get(id);
String[] allDeptIds = data.getAllDeptIds().split(",");
List<String> deptIdList = new ArrayList<>(2);
Collections.addAll(deptIdList,allDeptIds[1],allDeptIds[2]);
data.setDeptIdList(deptIdList);
return new Result<PartyGroupDTO>().ok(data); return new Result<PartyGroupDTO>().ok(data);
} }

2
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java

@ -65,7 +65,7 @@ public interface PartyGroupDao extends BaseDao<PartyGroupEntity> {
* @Param [] * @Param []
* @return java.util.List<com.elink.esua.epdc.dto.result.PartyGroupResultDTO> * @return java.util.List<com.elink.esua.epdc.dto.result.PartyGroupResultDTO>
**/ **/
List<PartyGroupResultDTO> getAllPartyGroup(String userId,String streetId); List<PartyGroupResultDTO> getAllPartyGroup(String userId);
/** /**
* @Description 根据党群名获取党群 * @Description 根据党群名获取党群
* @Author songyunpeng * @Author songyunpeng

37
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java

@ -258,15 +258,7 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
@Override @Override
public List<PartyGroupResultDTO> getAllPartyGroup(PartyGroupListFormDTO partyGroupListFormDTO) { public List<PartyGroupResultDTO> getAllPartyGroup(PartyGroupListFormDTO partyGroupListFormDTO) {
//根据网格ID获取街道ID return baseDao.getAllPartyGroup(partyGroupListFormDTO.getUserId());
Result<ParentAndAllDeptDTO> parentResult = adminFeignClient.getParentAndAllDept(partyGroupListFormDTO.getGridId());
if (!parentResult.success() || parentResult.getData() == null) {
throw new RenException("获取用户部门信息失败");
}
ParentAndAllDeptDTO parentAndAllDeptDTO = parentResult.getData();
String allDeptIds = parentAndAllDeptDTO.getAllDeptIds();
String[] allDeptIdList = allDeptIds.split(",");
return baseDao.getAllPartyGroup(partyGroupListFormDTO.getUserId(),allDeptIdList[1]);
} }
@Override @Override
@ -277,6 +269,33 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
return new Result().error("用户已加入此群!"); return new Result().error("用户已加入此群!");
} }
PartyUserGroupDTO partyUserGroupDTO = ConvertUtils.sourceToTarget(partyUserJoinGroupFormDTO, PartyUserGroupDTO.class); PartyUserGroupDTO partyUserGroupDTO = ConvertUtils.sourceToTarget(partyUserJoinGroupFormDTO, PartyUserGroupDTO.class);
//获取用户基本信息
Result<UserDTO> userInfoById = userFeignClient.getUserInfoById(partyUserJoinGroupFormDTO.getUserId());
if (!userInfoById.success() || userInfoById.getData() == null) {
throw new RenException("获取用户信息失败");
}
UserDTO userDto = userInfoById.getData();
//网格信息
if (userDto.getGridId() != null && userDto.getGridId() != 0) {
partyUserGroupDTO.setGrid(userDto.getGrid());
partyUserGroupDTO.setGridId(userDto.getGridId());
partyUserGroupDTO.setAllDeptIds(userDto.getAllDeptIds());
partyUserGroupDTO.setAllDeptNames(userDto.getAllDeptNames());
partyUserGroupDTO.setParentDeptIds(userDto.getParentDeptIds());
partyUserGroupDTO.setParentDeptNames(userDto.getParentDeptNames());
} else {
Result<UserGridRelationDTO> userFirstScanGird = userFeignClient.getUserFirstScanGird(partyUserJoinGroupFormDTO.getUserId());
if (!userFirstScanGird.success() || userFirstScanGird.getData() == null) {
throw new RenException("获取用户网格关联信息失败");
}
UserGridRelationDTO userGridRelationDTO = userFirstScanGird.getData();
partyUserGroupDTO.setGrid(userGridRelationDTO.getGrid());
partyUserGroupDTO.setGridId(userGridRelationDTO.getGridId());
partyUserGroupDTO.setAllDeptIds(userGridRelationDTO.getAllDeptIds());
partyUserGroupDTO.setAllDeptNames(userGridRelationDTO.getAllDeptNames());
partyUserGroupDTO.setParentDeptIds(userGridRelationDTO.getParentDeptIds());
partyUserGroupDTO.setParentDeptNames(userGridRelationDTO.getParentDeptNames());
}
//身份标识为群成员 //身份标识为群成员
partyUserGroupDTO.setIdentityFlag("2"); partyUserGroupDTO.setIdentityFlag("2");
partyUserGroupDTO.setState(0); partyUserGroupDTO.setState(0);

34
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java

@ -28,9 +28,7 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.DateUtils; import com.elink.esua.epdc.commons.tools.utils.DateUtils;
import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dao.PartyUserGroupDao; import com.elink.esua.epdc.dao.PartyUserGroupDao;
import com.elink.esua.epdc.dto.GroupUserBannedFormDTO; import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.GroupUserManagerFormDTO;
import com.elink.esua.epdc.dto.PartyUserGroupDTO;
import com.elink.esua.epdc.dto.constant.PartyGroupConstant; import com.elink.esua.epdc.dto.constant.PartyGroupConstant;
import com.elink.esua.epdc.dto.form.PartyUserBannedFormDTO; import com.elink.esua.epdc.dto.form.PartyUserBannedFormDTO;
import com.elink.esua.epdc.dto.form.PartyUserGroupFormDTO; import com.elink.esua.epdc.dto.form.PartyUserGroupFormDTO;
@ -41,6 +39,7 @@ import com.elink.esua.epdc.dto.result.CurrentUser;
import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO; import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO;
import com.elink.esua.epdc.entity.PartyUserGroupEntity; import com.elink.esua.epdc.entity.PartyUserGroupEntity;
import com.elink.esua.epdc.enums.BannedEnum; import com.elink.esua.epdc.enums.BannedEnum;
import com.elink.esua.epdc.feign.UserFeignClient;
import com.elink.esua.epdc.redis.PartyUserGroupRedis; import com.elink.esua.epdc.redis.PartyUserGroupRedis;
import com.elink.esua.epdc.service.PartyUserGroupService; import com.elink.esua.epdc.service.PartyUserGroupService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -65,6 +64,8 @@ public class PartyUserGroupServiceImpl extends BaseServiceImpl<PartyUserGroupDao
@Autowired @Autowired
private PartyUserGroupRedis partyUserGroupRedis; private PartyUserGroupRedis partyUserGroupRedis;
@Autowired
private UserFeignClient userFeignClient;
@Override @Override
public PageData<PartyUserGroupDTO> page(Map<String, Object> params) { public PageData<PartyUserGroupDTO> page(Map<String, Object> params) {
IPage<PartyUserGroupEntity> page = baseDao.selectPage( IPage<PartyUserGroupEntity> page = baseDao.selectPage(
@ -203,6 +204,33 @@ public class PartyUserGroupServiceImpl extends BaseServiceImpl<PartyUserGroupDao
@Override @Override
public Result updateInfo(PartyUserNewInfoFormDTO formDTO) { public Result updateInfo(PartyUserNewInfoFormDTO formDTO) {
//获取用户基本信息
Result<UserDTO> userInfoById = userFeignClient.getUserInfoById(formDTO.getUserId());
if (!userInfoById.success() || userInfoById.getData() == null) {
throw new RenException("获取用户信息失败");
}
UserDTO userDto = userInfoById.getData();
//网格信息
if (userDto.getGridId() != null && userDto.getGridId() != 0) {
formDTO.setGrid(userDto.getGrid());
formDTO.setGridId(userDto.getGridId());
formDTO.setAllDeptIds(userDto.getAllDeptIds());
formDTO.setAllDeptNames(userDto.getAllDeptNames());
formDTO.setParentDeptIds(userDto.getParentDeptIds());
formDTO.setParentDeptNames(userDto.getParentDeptNames());
} else {
Result<UserGridRelationDTO> userFirstScanGird = userFeignClient.getUserFirstScanGird(formDTO.getUserId());
if (!userFirstScanGird.success() || userFirstScanGird.getData() == null) {
throw new RenException("获取用户网格关联信息失败");
}
UserGridRelationDTO userGridRelationDTO = userFirstScanGird.getData();
formDTO.setGrid(userGridRelationDTO.getGrid());
formDTO.setGridId(userGridRelationDTO.getGridId());
formDTO.setAllDeptIds(userGridRelationDTO.getAllDeptIds());
formDTO.setAllDeptNames(userGridRelationDTO.getAllDeptNames());
formDTO.setParentDeptIds(userGridRelationDTO.getParentDeptIds());
formDTO.setParentDeptNames(userGridRelationDTO.getParentDeptNames());
}
baseDao.updateInfoByUserId(formDTO); baseDao.updateInfoByUserId(formDTO);
return new Result(); return new Result();
} }

2
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml

@ -104,7 +104,7 @@
if(t1.ID is not null ,1,0) as isJoin if(t1.ID is not null ,1,0) as isJoin
from epdc_party_group t from epdc_party_group t
left join epdc_party_user_group t1 on t1.PARTY_GROUP_ID = t.ID and t1.DEL_FLAG ='0' and t1.USER_ID=#{userId} left join epdc_party_user_group t1 on t1.PARTY_GROUP_ID = t.ID and t1.DEL_FLAG ='0' and t1.USER_ID=#{userId}
where t.DEL_FLAG ='0' and t.STATE ='0' and t.DEPT_ID = #{streetId} order by t.SORT, t.CREATED_TIME desc where t.DEL_FLAG ='0' and t.STATE ='0' order by t.SORT, t.CREATED_TIME desc
</select> </select>
<select id="getPartyGroupDTOByName" resultType="com.elink.esua.epdc.dto.PartyGroupDTO"> <select id="getPartyGroupDTOByName" resultType="com.elink.esua.epdc.dto.PartyGroupDTO">
select ID from epdc_party_group where PARTY_GROUP_NAME = #{partyGroupName} and DEL_FLAG='0' limit 1; select ID from epdc_party_group where PARTY_GROUP_NAME = #{partyGroupName} and DEL_FLAG='0' limit 1;

25
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml

@ -142,6 +142,8 @@
<result property="commentNum" column="COMMENT_NUM"/> <result property="commentNum" column="COMMENT_NUM"/>
<result property="topicAddress" column="TOPIC_ADDRESS"/> <result property="topicAddress" column="TOPIC_ADDRESS"/>
<result property="likeFlag" column="likeFlag"/> <result property="likeFlag" column="likeFlag"/>
<result property="identityFlag" column="IDENTITY_FLAG"/>
<result property="thisCommunity" column="thisCommunity"/>
<collection property="images" ofType="java.lang.String"> <collection property="images" ofType="java.lang.String">
<result property="image" column="IMG_URL"/> <result property="image" column="IMG_URL"/>
</collection> </collection>
@ -152,9 +154,13 @@
<result column="content" property="content"/> <result column="content" property="content"/>
<result column="commentPartyMember" property="partyMember"/> <result column="commentPartyMember" property="partyMember"/>
</collection> </collection>
<collection property="likes" ofType="com.elink.esua.epdc.dto.result.PartyTopicSupportResultDTO">
<result column="supportUserId" property="userId"/>
<result column="supportNickname" property="nickname"/>
<result column="supportUserAvatar" property="userAvatar"/>
</collection>
</resultMap> </resultMap>
<select id="selectListOfPartyTopic" resultMap="partyTopicResult"> <select id="selectListOfPartyTopic" resultMap="partyTopicResult">
select t.ID, select t.ID,
t.NICKNAME, t.NICKNAME,
t.USER_FACE, t.USER_FACE,
@ -165,21 +171,30 @@
t.SUPPORT_NUM, t.SUPPORT_NUM,
t.COMMENT_NUM, t.COMMENT_NUM,
t.TOPIC_ADDRESS, t.TOPIC_ADDRESS,
t6.IDENTITY_FLAG,
<if test='userId != "" and userId != null'> <if test='userId != "" and userId != null'>
if( ATTITUDE_FLAG='0',1,0)likeFlag, if( t1.ATTITUDE_FLAG='0',1,0)likeFlag,
</if> </if>
t2.IMG_URL, t2.IMG_URL,
t3.ID as commentId, t3.ID as commentId,
t3.USERNAME as username, t3.USERNAME as username,
t3.USER_FACE as commentUserFace, t3.USER_FACE as commentUserFace,
t3.CONTENT as content, t3.CONTENT as content,
t3.PARTY_MEMBER as commentPartyMemberDEL_FLAG t3.PARTY_MEMBER as commentPartyMember,
t5.USER_ID as supportUserId,
t5.NICKNAME as supportNickname,
t5.USER_AVATAR as supportUserAvatar,
(if(find_in_set(t7.DEPT_ID,t6.ALL_DEPT_IDS)>0,'1','0'))as thisCommunity
from epdc_party_topic t from epdc_party_topic t
<if test='userId != "" and userId != null'> <if test='userId != "" and userId != null'>
left join epdc_party_topic_user_attitude t1 on t.ID = t1.PARTY_TOPIC_ID and t1.DEL_FLAG='0' and t1.USER_ID = #{userId} left join (select * from epdc_party_topic_user_attitude group by PARTY_TOPIC_ID)t1 on t.ID = t1.PARTY_TOPIC_ID and t1.DEL_FLAG='0' and t1.USER_ID = #{userId}
</if> </if>
left join epdc_party_topic_img t2 on t.ID = t2.REFERENCE_ID and t2.DEL_FLAG='0' left join epdc_party_topic_img t2 on t.ID = t2.REFERENCE_ID and t2.DEL_FLAG='0'
left join (select ID,USERNAME,USER_FACE,PARTY_MEMBER,CONTENT,TOPIC_ID,DEL_FLAG,CREATED_TIME from epdc_party_topic_comment order by CREATED_TIME desc) t3 on t.ID = t3.TOPIC_ID and t3.DEL_FLAG='0' left join (select ID,USERNAME,USER_FACE,PARTY_MEMBER,CONTENT,TOPIC_ID,DEL_FLAG,CREATED_TIME from epdc_party_topic_comment order by CREATED_TIME desc) t3 on t.ID = t3.TOPIC_ID and t3.DEL_FLAG='0'
left join epdc_party_topic_user_attitude t4 on t.ID = t4.PARTY_TOPIC_ID and t4.DEL_FLAG='0'
left join (select epug.USER_ID,epug.NICKNAME,epug.USER_AVATAR,epug.DEL_FLAG from epdc_party_user_group epug where epug.DEL_FLAG='0' and epug.STATE ='0' group by epug.USER_ID)t5 on t4.USER_ID = t5.USER_ID
left join epdc_party_user_group t6 on t6.USER_ID = t.USER_ID and t6.PARTY_GROUP_ID = t.PARTY_GROUP_ID and t6.DEL_FLAG = '0' and t6.STATE ='0'
left join epdc_party_group t7 on t.PARTY_GROUP_ID = t7.ID and t7.DEL_FLAG = '0'
where where
t.ID in (select tmp.ID from (SELECT t.ID in (select tmp.ID from (SELECT
t1.ID t1.ID
@ -202,7 +217,7 @@
ORDER BY ORDER BY
t1.CREATED_TIME DESC t1.CREATED_TIME DESC
LIMIT #{pageIndex},#{pageSize}) tmp) LIMIT #{pageIndex},#{pageSize}) tmp)
order by t.CREATED_TIME desc,t3.CREATED_TIME order by t.CREATED_TIME desc,t3.CREATED_TIME,t4.CREATED_TIME
</select> </select>
<select id="selectListOfMyPartyTopic" resultMap="partyTopicResult"> <select id="selectListOfMyPartyTopic" resultMap="partyTopicResult">

101
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml

@ -25,7 +25,9 @@
</resultMap> </resultMap>
<update id="updateInfoByUserId" parameterType="com.elink.esua.epdc.dto.form.PartyUserNewInfoFormDTO"> <update id="updateInfoByUserId" parameterType="com.elink.esua.epdc.dto.form.PartyUserNewInfoFormDTO">
update epdc_party_user_group set NICKNAME = #{nickname}, update epdc_party_user_group set NICKNAME = #{nickname},
USER_AVATAR = #{userAvatar},MOBILE=#{mobile},PARTY_MEMBER=#{partyMember} USER_AVATAR = #{userAvatar},MOBILE=#{mobile},PARTY_MEMBER=#{partyMember},
GRID = #{grid},GRID_ID=#{gridId},ALL_DEPT_IDS=#{allDeptIds},ALL_DEPT_NAMES=#{allDeptNames},
PARENT_DEPT_IDS=#{parentDeptIds},PARENT_DEPT_NAMES=#{parentDeptNames}
where USER_ID = #{userId} and DEL_FLAG = '0' where USER_ID = #{userId} and DEL_FLAG = '0'
</update> </update>
@ -166,27 +168,33 @@
when bannedTime > 31 when bannedTime > 31
then 4 then 4
else 0 else 0
END )) as bannedFlag END )) as bannedFlag,
from (select ID, thisCommunity
PARTY_GROUP_ID, from (select
USER_ID, epug.ID,
NICKNAME, epug.PARTY_GROUP_ID,
USER_AVATAR, epug.USER_ID,
MOBILE, epug.NICKNAME,
IDENTITY_FLAG, epug.USER_AVATAR,
PARTY_MEMBER, epug.MOBILE,
STATE, epug.IDENTITY_FLAG,
REMARK, epug.PARTY_MEMBER,
BANNED_START_TIME, epug.STATE,
BANNED_END_TIME, epug.REMARK,
DEL_FLAG, epug.BANNED_START_TIME,
REVISION, epug.BANNED_END_TIME,
CREATED_BY, epug.DEL_FLAG,
CREATED_TIME, epug.REVISION,
UPDATED_BY, epug.CREATED_BY,
UPDATED_TIME, epug.CREATED_TIME,
ALL_DEPT_IDS, epug.UPDATED_BY,
GRID,DATEDIFF(BANNED_END_TIME,BANNED_START_TIME) as bannedTime from epdc_party_user_group)a epug.UPDATED_TIME,
epug.ALL_DEPT_IDS,
GRID,DATEDIFF(BANNED_END_TIME,BANNED_START_TIME) as bannedTime,
if(find_in_set(eag.DEPT_ID,epug.ALL_DEPT_IDS)>0,1,0) as thisCommunity
from epdc_party_user_group epug
left join epdc_party_group eag on eag.ID = epug.PARTY_GROUP_ID and eag.DEL_FLAG = '0' and eag.STATE = '0'
)a
where DEL_FLAG='0' where DEL_FLAG='0'
and PARTY_GROUP_ID = #{partyGroupId} and PARTY_GROUP_ID = #{partyGroupId}
order by IDENTITY_FLAG,CREATED_TIME desc order by IDENTITY_FLAG,CREATED_TIME desc
@ -210,27 +218,34 @@
when bannedTime > 31 when bannedTime > 31
then 4 then 4
else 0 else 0
END )) as bannedFlag END )) as bannedFlag,
from (select ID, thisCommunity
PARTY_GROUP_ID, from (
USER_ID, select
NICKNAME, epug.ID,
USER_AVATAR, epug.PARTY_GROUP_ID,
MOBILE, epug.USER_ID,
IDENTITY_FLAG, epug.NICKNAME,
PARTY_MEMBER, epug.USER_AVATAR,
STATE, epug.MOBILE,
REMARK, epug.IDENTITY_FLAG,
BANNED_START_TIME, epug.PARTY_MEMBER,
BANNED_END_TIME, epug.STATE,
DEL_FLAG, epug.REMARK,
REVISION, epug.BANNED_START_TIME,
CREATED_BY, epug.BANNED_END_TIME,
CREATED_TIME, epug.DEL_FLAG,
UPDATED_BY, epug.REVISION,
UPDATED_TIME, epug.CREATED_BY,
ALL_DEPT_IDS, epug.CREATED_TIME,
GRID,DATEDIFF(BANNED_END_TIME,BANNED_START_TIME) as bannedTime from epdc_party_user_group)a epug.UPDATED_BY,
epug.UPDATED_TIME,
epug.ALL_DEPT_IDS,
GRID,DATEDIFF(BANNED_END_TIME,BANNED_START_TIME) as bannedTime,
if(find_in_set(eag.DEPT_ID,epug.ALL_DEPT_IDS)>0,1,0) as thisCommunity
from epdc_party_user_group epug
left join epdc_party_group eag on eag.ID = epug.PARTY_GROUP_ID and eag.DEL_FLAG = '0' and eag.STATE = '0'
)a
where DEL_FLAG='0' where DEL_FLAG='0'
and PARTY_GROUP_ID = #{partyGroupId} and USER_ID = #{userId} and PARTY_GROUP_ID = #{partyGroupId} and USER_ID = #{userId}
LIMIT 1 LIMIT 1

Loading…
Cancel
Save