Merge remote-tracking branch 'origin/test' into test
| | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentReplyStatusByAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentStatusByAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @ApiOperation(value = "家庭成员列表") |
| | | @GetMapping("listfamily") |
| | | public R listFamily(@RequestParam(value = "pageNum") Long pageNum, @RequestParam("pageNum") Long pageSize) { |
| | | public R listFamily(@RequestParam(value = "pageNum") Long pageNum, @RequestParam("pageSize") Long pageSize) { |
| | | Long userId = this.getUserId(); |
| | | return userService.listFamily(userId, pageNum, pageSize); |
| | | } |
| | |
| | | @ApiOperation(value = "保存商家") |
| | | @PostMapping("/store/save") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R saveStore(@Valid @RequestBody ShopStoreVO storeVO) { |
| | | public R saveStore(@Validated(AddGroup.class) @RequestBody ShopStoreVO storeVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long loginUserId = loginUserInfo.getUserId(); |
| | | if (storeVO == null) { |
| | |
| | | @ApiOperation(value = "编辑商家、启用、禁用") |
| | | @PostMapping("/store/edit/{id}") |
| | | @ApiImplicitParam(name = "id", value = "商家id") |
| | | public R editStore(@Valid @RequestBody ShopStoreVO storeVO, @PathVariable("id") Long id) { |
| | | public R editStore(@Validated(AddGroup.class) @RequestBody ShopStoreVO storeVO, @PathVariable("id") Long id) { |
| | | //判断参数 |
| | | if(storeVO == null || id == null){ |
| | | return R.fail("参数错误"); |
| | |
| | | @ApiModelProperty("小程序首页是否显示公告(1.是 2.否)") |
| | | private Integer isTips; |
| | | |
| | | @ApiModelProperty("是否已实名") |
| | | private Boolean isRealNamed; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("办事指南内容") |
| | | @NotBlank(groups = {AddGroup.class}, message = "内容不能为空") |
| | | @Length(groups = {AddGroup.class}, max = 500) |
| | | @Length(groups = {AddGroup.class}, max = 5000) |
| | | private String content; |
| | | |
| | | @ApiModelProperty("办理时间") |
| | |
| | | @ApiModelProperty("发布人") |
| | | private String releaseName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "用户类型 1 小程序 2 运营平台 3 社区平台",hidden = true) |
| | | private Integer userType; |
| | | |
| | | @ApiModelProperty("发布人电话") |
| | | private String releasePhone; |
| | | |
| | | |
| | | @ApiModelProperty("社区") |
| | | private Long communityName; |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty("详情") |
| | | private String releaseContent; |
| | |
| | | private Integer fabulousNum; |
| | | |
| | | @ApiModelProperty("评论用户") |
| | | private Long userName; |
| | | private String userName; |
| | | |
| | | |
| | | @ApiModelProperty("评论用户手机号") |
| | |
| | | @ApiModelProperty("评论时间") |
| | | private Date createAt; |
| | | |
| | | |
| | | @ApiModelProperty("状态(1.显示 2.隐藏)") |
| | | private Integer status; |
| | | |
| | | } |
| | |
| | | private Long circleId; |
| | | |
| | | @ApiModelProperty("评论用户") |
| | | private Long userName; |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("评论用户手机号") |
| | | private String userPhone; |
| | | |
| | | @ApiModelProperty("评论内容") |
| | | private String content; |
| | | @ApiModelProperty("内容") |
| | | private String replyContent; |
| | | |
| | | @ApiModelProperty("点赞数") |
| | | private Integer fabulousNum; |
| | |
| | | |
| | | @ApiModelProperty("封面模式:1-小图展示 2-大图展示") |
| | | private Integer coverMode; |
| | | |
| | | @ApiModelProperty("社区名称") |
| | | private String communityName; |
| | | } |
| | |
| | | |
| | | |
| | | @ApiModelProperty("店铺登陆账号") |
| | | @Pattern(groups = {AddGroup.class},message="【密码】格式为6-16个字符,英文,数字,且必须包含英文和数字",regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | @Pattern(groups = {AddGroup.class}, message="【密码】格式为6-16个字符,英文,数字,且必须包含英文和数字",regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | @NotBlank(message = "店铺登陆账号不能为空") |
| | | private String storeAccount; |
| | | |
| | | |
| | | @ApiModelProperty("店铺登陆密码") |
| | | @NotBlank(message = "店铺登陆密码不能为空") |
| | | @Pattern(groups = {AddGroup.class},message="【密码】格式为6-16个字符,英文,数字,且必须包含英文和数字",regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | @Pattern(message="【密码】格式为6-16个字符,英文,数字,且必须包含英文和数字",regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | private String storePassword; |
| | | |
| | | |
| | |
| | | import com.panzhihua.common.model.vos.community.questnaire.EditComActQuestnaireVo; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.neighbor.AddNeighborCircleAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentReplyStatusByAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentStatusByAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.EditNeighborCircleAdminVO; |
| | |
| | | @PostMapping("/neighbor/neighborAddBrowseByApp") |
| | | R neighborAddBrowseByApp(@RequestBody ComActNeighborAddBrowseAppDTO addBrowseAppDTO); |
| | | |
| | | |
| | | /** |
| | | * 邻里圈_添加 |
| | | * @param addNeighborCircleAdminVO 参数 |
| | | */ |
| | | @PostMapping("/neighbor/addNeighborByAdmin") |
| | | R addNeighborByAdmin(@RequestBody AddNeighborCircleAdminVO addNeighborCircleAdminVO); |
| | | |
| | | } |
| | |
| | | @PostMapping("listfamily") |
| | | R listFamily(@RequestParam("userId")Long userId, |
| | | @RequestParam(value = "pageNum") Long pageNum, |
| | | @RequestParam("pageNum") Long pageSize); |
| | | @RequestParam("pageSize") Long pageSize); |
| | | |
| | | /** |
| | | * 新增家庭成员 |
| | |
| | | |
| | | |
| | | @ApiOperation(value = "邻里圈评论回复_基本详情",response = ComActNeighborCommentReplyByAdminVO.class) |
| | | @PostMapping("detailNeighborCommentReply") |
| | | @GetMapping("detailNeighborCommentReply") |
| | | R detailNeighborCommentReply(@RequestParam("id") Long id){ |
| | | return communityService.detailNeighborCommentReply(id); |
| | | } |
| | |
| | | return communityService.changeCommentReplyStatusByAdmin(changeStatusReplyVO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "邻里圈_添加") |
| | | @PostMapping("addNeighborByAdmin") |
| | | R addNeighborByAdmin(@RequestBody AddNeighborCircleAdminVO addNeighborCircleAdminVO){ |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | addNeighborCircleAdminVO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.addNeighborByAdmin(addNeighborCircleAdminVO); |
| | | } |
| | | |
| | | } |
| | |
| | | * 邻里圈评论回复_基本详情 |
| | | * @param id 参数 |
| | | */ |
| | | @PostMapping("detailNeighborCommentReply") |
| | | @GetMapping("detailNeighborCommentReply") |
| | | public R detailNeighborCommentReply(@RequestParam("id") Long id) { |
| | | return comActNeighborCircleService.detailNeighborCommentReply(id); |
| | | } |
| | |
| | | void updatePublic(@Param("ispublic") Integer ispublic,@Param("id") Long id); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT * \n" + |
| | | "SELECT t.id,t.msg_content,t.photo_pah,t.phone,t.sendto_user_id,t.sendto_user_name,t.status,t.ispublic," + |
| | | "t.user_id,t.user_account,t.user_name,t.user_phone,t.community_id,t.create_at,t.type, u.phone as userAccount \n" + |
| | | "FROM \n" + |
| | | " com_act_message t " + |
| | | " com_act_message t LEFT JOIN sys_user u ON t.user_id = u.user_id " + |
| | | " where t.community_id=#{comActMessageVO.communityId}\n" + |
| | | "<if test='comActMessageVO.userAccount != null and comActMessageVO.userAccount.trim() != ""'>" + |
| | | " and t.user_account=#{comActMessageVO.userAccount} \n" + |
| | |
| | | @Select("<script> " + |
| | | "select nc.*,u.name as userName from com_act_neighbor_circle_comment nc left join sys_user u on nc.user_id=u.user_id " + |
| | | "<where>"+ |
| | | "<if test='dto.id != null and pageActWorkGuideDTO.dto!= 0l'>" + |
| | | "circle_id = #{dto.id}"+ |
| | | "<if test='dto.id != null and dto.id!= 0l'>" + |
| | | "nc.circle_id = #{dto.id}"+ |
| | | " </if> " + |
| | | "</where>"+ |
| | | " ORDER BY create_at"+ |
| | | "</script>") |
| | | IPage<ComActNeighborCommentByAdminVO> selectPageDetailNeighborComment(Page page, DetailNeighborAllCommentByAdminDTO dto); |
| | | IPage<ComActNeighborCommentByAdminVO> selectPageDetailNeighborComment(Page page,@Param("dto") DetailNeighborAllCommentByAdminDTO dto); |
| | | } |
| | |
| | | List<ComActNeighborCircleCommentReplyAppVO> getCircleCommentReplyList(@Param("commentId") Long commentId); |
| | | |
| | | @Select("<script> " + |
| | | "select cr.*,u.name as userName from com_act_neighbor_circle_comment_reply cr left join sys_user u on cr.user_id=u.user_id " + |
| | | "select cr.*,u.name as userName,u.phone as userPhone,u.nick_name as userNickName from com_act_neighbor_circle_comment_reply cr left join sys_user u on cr.user_id=u.user_id " + |
| | | "<where>"+ |
| | | "<if test='dto.id != null and pageActWorkGuideDTO.dto!= 0l'>" + |
| | | "comment_id = #{dto.id}"+ |
| | | "<if test='dto.id != null and dto.id!= 0l'>" + |
| | | "cr.comment_id = #{dto.id}"+ |
| | | " </if> " + |
| | | "</where>"+ |
| | | " ORDER BY create_at"+ |
| | | " ORDER BY cr.create_at"+ |
| | | "</script>") |
| | | Page<ComActNeighborCommentReplyByAdminVO> selectListByComment(Page<ComActNeighborCircleCommentReplyDO> page, DetailNeighborCommentReplyByAdminDTO dto); |
| | | Page<ComActNeighborCommentReplyByAdminVO> selectListByComment(Page page,@Param("dto") DetailNeighborCommentReplyByAdminDTO dto); |
| | | |
| | | } |
| | |
| | | @Select("<script> \n"+ |
| | | "SELECT\n" + |
| | | "nc.*,\n" + |
| | | "u.`name` AS releaseName \n" + |
| | | "u.`name` AS releaseName,u.`type` as userType\n" + |
| | | ",ca.name as communityName\n" + |
| | | "FROM\n" + |
| | | "com_act_neighbor_circle nc\n" + |
| | | "LEFT JOIN sys_user u ON nc.release_id = u.user_id\n" + |
| | | "left join com_act ca on u.community_id=ca.community_id \n" + |
| | | "<where>"+ |
| | | "nc.community_id = #{neighborCircleAdminDTO.communityId} \n"+ |
| | | "<if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != ""'>" + |
| | |
| | | "and nc.create_at between #{neighborCircleAdminDTO.startAt} and #{neighborCircleAdminDTO.endAt} \n" + |
| | | " </if> " + |
| | | "</where>"+ |
| | | "order by nc.`status` asc,nc.create_at desc " + |
| | | "order by " + |
| | | "case when nc.`status`=1 then 0 else 1 end, \n" + |
| | | "nc.`status` asc,nc.create_at desc " + |
| | | "</script>") |
| | | IPage<ComActNeighborCircleAdminVO> pageNeighborByAdmin(Page page,@Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO); |
| | | |
| | |
| | | " AND sr.order_no = #{comShopFundsExportDTO.orderNo} " + |
| | | " </if> " + |
| | | " </if> " + |
| | | " GROUP BY sr.id ORDER BY sr.create_at "+ |
| | | " GROUP BY sr.id ORDER BY sr.create_at DESC "+ |
| | | "</script>") |
| | | IPage<ExcelShopFundsDTO> selectFundsExport(Page page, @Param("comShopFundsExportDTO") ComShopFundsExportDTO comShopFundsExportDTO); |
| | | |
| | |
| | | } |
| | | } |
| | | comActEasyPhotoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO.getPhone())); |
| | | if(comActEasyPhotoVO.getAddrRemark()==null){ |
| | | comActEasyPhotoVO.setAddrRemark(""); |
| | | } |
| | | return R.ok(comActEasyPhotoVO); |
| | | } |
| | | |
| | |
| | | Long id = comActEasyPhotoVO1.getId(); |
| | | Integer status = comActEasyPhotoVO1.getStatus(); |
| | | Date feedbackAt = comActEasyPhotoVO1.getFeedbackAt(); |
| | | ComActEasyPhotoUserDO comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoUserDO)) { |
| | | List<ComActEasyPhotoUserDO> comActEasyPhotoUserDO = |
| | | comActEasyPhotoUserDAO.selectList(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (comActEasyPhotoUserDO==null||comActEasyPhotoUserDO.size()==0) { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(0); |
| | | }else { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(1); |
| | |
| | | records.forEach(comActMessageVO1 -> { |
| | | Long id = comActMessageVO1.getId(); |
| | | List<ComActMessageBackVO> list = comActMessageDAO.selectMsgBackList(id); |
| | | |
| | | comActMessageVO1.setBackList(list); |
| | | }); |
| | | iPage.setRecords(records); |
| | |
| | | public R pageNeighborByAdmin(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) { |
| | | Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize()); |
| | | IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByAdmin(page, neighborCircleAdminDTO); |
| | | doPager.getRecords().forEach(data->{ |
| | | if(data.getUserType()!=1){ |
| | | data.setReleaseName(data.getCommunityName()); |
| | | } |
| | | }); |
| | | return R.ok(doPager); |
| | | } |
| | | |
| | |
| | | return R.fail("id有误!"); |
| | | } |
| | | neighborCircleDO.setStatus(editVO.getStatus()); |
| | | neighborCircleDO.setRefuseReason(editVO.getRefuseReason()); |
| | | if(editVO.getRefuseReason()!=null){ |
| | | neighborCircleDO.setRefuseReason(editVO.getRefuseReason()); |
| | | } |
| | | this.baseMapper.updateById(neighborCircleDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | //邻里圈浏览器记录 |
| | | neighborCircleBrowseDAO.delete(new LambdaQueryWrapper<ComActNeighborCircleBrowseDO>() |
| | | .eq(ComActNeighborCircleBrowseDO::getNeighborId, id)); |
| | | //邻里圈点赞删除 需要一层一层删 |
| | | /* neighborCircleFabulousDAO.delete(new LambdaQueryWrapper<ComActNeighborCircleFabulousDO>() |
| | | .eq(ComActNeighborCircleFabulousDO::get))*/ |
| | | //邻里圈点赞删除 |
| | | neighborCircleFabulousDAO.delete(new LambdaQueryWrapper<ComActNeighborCircleFabulousDO>() |
| | | .eq(ComActNeighborCircleFabulousDO::getCircleId,id)); |
| | | return R.ok(); |
| | | |
| | | } |
| | |
| | | if(commentDO==null){ |
| | | return R.fail("id有误!"); |
| | | } |
| | | AdministratorsUserVO user = this.baseMapper.selectUserByUserId(commentDO.getUserId()); |
| | | ComActNeighborCommentByAdminVO vo = new ComActNeighborCommentByAdminVO(); |
| | | BeanUtils.copyProperties(commentDO,vo); |
| | | vo.setUserName(user.getName()); |
| | | return R.ok(vo); |
| | | } |
| | | |
| | |
| | | public R detailNeighborCommentAllReply(DetailNeighborCommentReplyByAdminDTO dto) { |
| | | Page<ComActNeighborCircleCommentReplyDO> page = new Page<>(dto.getPageNum(),dto.getPageSize()); |
| | | Page<ComActNeighborCommentReplyByAdminVO> replyPage = neighborCircleCommentReplyDAO.selectListByComment(page, dto); |
| | | replyPage.getRecords().forEach(reply->{ |
| | | |
| | | }); |
| | | return R.ok(replyPage); |
| | | } |
| | | |
| | |
| | | if(replyDO==null){ |
| | | return R.fail("id有误!"); |
| | | } |
| | | AdministratorsUserVO user = this.baseMapper.selectUserByUserId(replyDO.getUserId()); |
| | | ComActNeighborCommentReplyByAdminVO vo = new ComActNeighborCommentReplyByAdminVO(); |
| | | BeanUtils.copyProperties(replyDO,vo); |
| | | vo.setUserName(user.getName()); |
| | | vo.setUserPhone(user.getPhone()); |
| | | return R.ok(vo); |
| | | } |
| | | |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | comShopOrderDO.setDeliveryStatus(2); |
| | | comShopOrderDO.setDeliveryType(2); |
| | | comShopOrderDO.setStatus(3); |
| | | comShopOrderDO.setDeliveryTime(Calendar.getInstance().getTime()); |
| | | comShopOrderDO.setLogisticsCompany(orderShipDTO.getLogisticsCompany()); |
| | | comShopOrderDO.setLogisticsNo(orderShipDTO.getLogisticsNo()); |
| | | int updated = comShopOrderDAO.updateById(comShopOrderDO); |
| | |
| | | comShopOrderDO.setDeliveryStatus(4); |
| | | comShopOrderDO.setDeliveryType(1); |
| | | comShopOrderDO.setStatus(3); |
| | | comShopOrderDO.setDeliveryTime(Calendar.getInstance().getTime()); |
| | | int updated = comShopOrderDAO.updateById(comShopOrderDO); |
| | | if(updated==1){ |
| | | |
| | |
| | | * @return 详情 |
| | | */ |
| | | @PostMapping("infodynamic") |
| | | public R infoYnamic(@RequestParam("id") Integer id){ |
| | | public R infoYnamic(@RequestParam("id") Long id){ |
| | | return comPbMemberService.infoYnamic(id); |
| | | |
| | | } |
| | |
| | | IPage<PartyBuildingComPbDynVO> pageYnamic(Page page, @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO); |
| | | @Update("update com_pb_dyn set `status`=2 WHERE `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0") |
| | | int timedTaskPartyBuildingStatus(); |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | " distinct COUNT( u.id ) readingVolume,\n" + |
| | | " d.community_id, d.content, d.cover, d.cover_mode, d.create_at, d.create_by, d.dyn_type, d.id, d.publish_at, d.status, d.title, d.type, \n" + |
| | | " act.name as createByName " + |
| | | "FROM\n" + |
| | | "com_pb_dyn d LEFT JOIN com_act act ON d.community_id = act.community_id \n" + |
| | | "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id " + |
| | | "where d.id = #{id} " + |
| | | " group by d.id " + |
| | | "</script>") |
| | | PartyBuildingComPbDynVO selectVoById(@Param("id")Long id); |
| | | } |
| | |
| | | * @param id 动态主键 |
| | | * @return 详情 |
| | | */ |
| | | R infoYnamic(Integer id); |
| | | R infoYnamic(Long id); |
| | | /** |
| | | * 分页查询党员动态 |
| | | * @param partyBuildingComPbDynVO 查询参数 |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.exceptions.PartyBuildingMemberException; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.RichTextUtil; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_dangjian.dao.*; |
| | |
| | | private ComPbDynDAO comPbDynDAO; |
| | | @Resource |
| | | private ComPbDynUserDAO comPbDynUserDAO; |
| | | |
| | | |
| | | private final String REDIS_ORG_ALL="ogrlist"; |
| | | |
| | |
| | | * @return 详情 |
| | | */ |
| | | @Override |
| | | public R infoYnamic(Integer id) { |
| | | ComPbDynDO comPbDynDO = comPbDynDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comPbDynDO)) { |
| | | public R infoYnamic(Long id) { |
| | | PartyBuildingComPbDynVO comPbDynVO = comPbDynDAO.selectVoById(id); |
| | | if (ObjectUtils.isEmpty(comPbDynVO)) { |
| | | return R.fail("动态不存在"); |
| | | } |
| | | PartyBuildingComPbDynVO partyBuildingComPbDynVO=new PartyBuildingComPbDynVO(); |
| | | Long createBy = comPbDynDO.getCreateBy(); |
| | | // ComPbMemberDO comPbMemberDO = comPbMemberDAO.selectById(createBy); |
| | | String name = comPbMemberDAO.selectNameByUserId(createBy); |
| | | if (ObjectUtils.isEmpty(name)) { |
| | | //String name = comPbMemberDAO.selectNameByUserId(createBy); |
| | | |
| | | if (ObjectUtils.isEmpty(comPbDynVO.getCreateByName())) { |
| | | // return R.fail("发布人不存在"); |
| | | String name = comPbMemberDAO.selectNameByUserId(comPbDynVO.getCreateBy()); |
| | | name="后台发布"; |
| | | comPbDynVO.setCreateByName(name); |
| | | } |
| | | Integer integer = comPbDynUserDAO.selectCount(new QueryWrapper<ComPbDynUserDO>().lambda().eq(ComPbDynUserDO::getDynId, id)); |
| | | BeanUtils.copyProperties(comPbDynDO,partyBuildingComPbDynVO); |
| | | partyBuildingComPbDynVO.setCreateByName(name); |
| | | partyBuildingComPbDynVO.setReadingVolume(null==integer?0:integer); |
| | | return R.ok(partyBuildingComPbDynVO); |
| | | //Integer integer = comPbDynUserDAO.selectCount(new QueryWrapper<ComPbDynUserDO>().lambda().eq(ComPbDynUserDO::getDynId, id)); |
| | | comPbDynVO.setReadingVolume(null==comPbDynVO.getReadingVolume()?0:comPbDynVO.getReadingVolume()); |
| | | return R.ok(comPbDynVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public R addDynUser(ComPbDynUserVO comPbDynUserVO) { |
| | | ComPbDynUserDO comPbDynUserDO = comPbDynUserDAO.selectOne(new QueryWrapper<ComPbDynUserDO>().lambda().eq(ComPbDynUserDO::getDynId,comPbDynUserVO.getDynId()).eq(ComPbDynUserDO::getUserId,comPbDynUserVO.getUserId())); |
| | | if (ObjectUtils.isEmpty(comPbDynUserDO)) { |
| | | comPbDynUserDO=new ComPbDynUserDO(); |
| | | BeanUtils.copyProperties(comPbDynUserVO,comPbDynUserDO); |
| | | int insert = comPbDynUserDAO.insert(comPbDynUserDO); |
| | | if (insert>0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | ComPbDynUserDO comPbDynUserDO=new ComPbDynUserDO(); |
| | | BeanUtils.copyProperties(comPbDynUserVO,comPbDynUserDO); |
| | | int insert = comPbDynUserDAO.insert(comPbDynUserDO); |
| | | if (insert>0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | @PostMapping("listfamily") |
| | | public R listFamily(@RequestParam("userId") Long userId, |
| | | @RequestParam(value = "pageNum") Long pageNum, |
| | | @RequestParam("pageNum") Long pageSize) { |
| | | @RequestParam("pageSize") Long pageSize) { |
| | | return userService.listFamily(userId, pageNum, pageSize); |
| | | } |
| | | |
| | |
| | | loginUserInfoVO.setStatus(sysUserDO.getStatus()); |
| | | loginUserInfoVO.setAccount(name); |
| | | loginUserInfoVO.setType(sysUserDO.getType()); |
| | | loginUserInfoVO.setIsRealNamed(sysUserDO.getIdCard()!=null);//暂时 身份证判断实名制 |
| | | List<SysRoleDO> roleDOList = roleDAO.selectByUserId(sysUserDO.getUserId()); |
| | | Set<String> set = new HashSet<>(); |
| | | if (!ObjectUtils.isEmpty(roleDOList)) { |