| | |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO){ |
| | | Long communityId = this.getCommunityId(); |
| | | comActDynVO.setCommunityId(communityId); |
| | | comActDynVO.setIsTopping(null); |
| | | comActDynVO.setStatus(null); |
| | | return communityService.pageDynamic(comActDynVO); |
| | | } |
| | | |
| | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | String phone = loginUserInfo.getPhone(); |
| | | if (ObjectUtils.isEmpty(phone)) { |
| | | return R.fail("只有认证后的用户才能发布微心愿"); |
| | | } |
| | | comActMicroWishVO.setSponsorPhone(phone); |
| | | comActMicroWishVO.setCommunityId(communityId); |
| | | comActMicroWishVO.setSponsorId(userId); |
| | | return communityService.addMicroWish(comActMicroWishVO); |
| | |
| | | |
| | | @ApiModelProperty("是否点赞 0 否 1 是") |
| | | private Integer haveGiveThumbsUp; |
| | | |
| | | @ApiModelProperty(value = "是否需要反馈 1 是 0 不是",example = "0") |
| | | private Integer isNeedFeedBack; |
| | | |
| | | @ApiModelProperty("操作类型 1审核通过 2驳回 3反馈") |
| | | private Integer type; |
| | | } |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("集星数") |
| | | private Integer startNum; |
| | | private Integer starNum; |
| | | |
| | | @ApiModelProperty("形式 1分配人员 2发起活动") |
| | | private Integer form; |
| | |
| | | @ApiModelProperty("反馈图片集合,逗号分隔") |
| | | private String feedbackPhotoPathList; |
| | | |
| | | @ApiModelProperty("操作类型 1 审核通过 2驳回 3分配人员 4发起活动 5反馈") |
| | | @ApiModelProperty(value = "操作类型 1 审核通过 2驳回 3分配人员 4发起活动 5反馈",example = "1") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "小程序请求 1 是 0 不是",hidden = true) |
| | | private Integer isApplets; |
| | | |
| | | @ApiModelProperty(value = "是否点赞 1 是 0 不是") |
| | | @ApiModelProperty(value = "是否点赞 1 是 0 不是",example = "1") |
| | | private Integer haveGiveThumbsUp; |
| | | |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("adddynamicuser") |
| | | R addDynamicUser(@RequestParam("id") Long id, @RequestParam("userId")Long userId); |
| | | |
| | | /** |
| | | * 审核、反馈随手拍 |
| | | * @param comActEasyPhotoVO 操作参数 |
| | | * @return 操作结果 |
| | | */ |
| | | @PostMapping("puteasyphotostatus") |
| | | R putEasypHotoStatus(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "审核、分配、反馈心愿") |
| | | @PutMapping("putlmicrowish") |
| | | @PutMapping("putmicrowish") |
| | | public R putlMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | Long id = comActMicroWishVO.getId(); |
| | | if (ObjectUtils.isEmpty(id)) { |
| | |
| | | return r; |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "审核、反馈随手拍") |
| | | @PutMapping("puteasyphoto") |
| | | public R putEasypHotoStatus(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | Integer type = comActEasyPhotoVO.getType(); |
| | | if (null==type||type>3||type<1) { |
| | | return R.fail("操作类型错误"); |
| | | } |
| | | Long id = comActEasyPhotoVO.getId(); |
| | | if (ObjectUtils.isEmpty(id)) { |
| | | return R.fail("随手拍主键不能为空"); |
| | | } |
| | | R r = communityService.putEasypHotoStatus(comActEasyPhotoVO); |
| | | return r; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | * @return 操作结果 |
| | | */ |
| | | @PostMapping("putmicrowish") |
| | | R putMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO){ |
| | | public R putMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO){ |
| | | return comActMicroWishService.comActMicroWishVO(comActMicroWishVO); |
| | | } |
| | | |
| | | /** |
| | | * 新增社区动态浏览记录 |
| | | * @param id 动态主键 |
| | | * @param userId 登录用户id |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("adddynamicuser") |
| | | public R addDynamicUser(@RequestParam("id") Long id, @RequestParam("userId")Long userId){ |
| | | return comActDynService.addDynamicUser(id,userId); |
| | | } |
| | | |
| | | /** |
| | | * 审核反馈随手拍 |
| | | * @param comActEasyPhotoVO 操作参数 |
| | | * @return 操作结果 |
| | | */ |
| | | @PostMapping("puteasyphotostatus") |
| | | public R putEasypHotoStatus(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO){ |
| | | return comActEasyPhotoService.putEasypHotoStatus(comActEasyPhotoVO); |
| | | } |
| | | |
| | | } |
| | |
| | | "AND #{comActDynVO.publishAtEnd}" + |
| | | " </if> " + |
| | | " group by d.id "+ |
| | | " order by d.is_topping , d.create_at desc "+ |
| | | " order by d.is_topping desc, d.create_at desc "+ |
| | | "</script>") |
| | | IPage<ComActDynVO> pageDynamic(Page page, @Param("comActDynVO") ComActDynVO comActDynVO); |
| | | } |
| | |
| | | "p.happen_addr,\n" + |
| | | "su.`name` handler_name,\n" + |
| | | "p.`status`,\n" + |
| | | "p.`detail`,\n" + |
| | | "p.create_at,\n" + |
| | | "p.examine_at \n" + |
| | | "FROM\n" + |
| | |
| | | "<if test='comActEasyPhotoVO.sponsorName != null and comActEasyPhotoVO.sponsorName.trim() != ""'>" + |
| | | "AND u.`name` = #{comActEasyPhotoVO.sponsorName} \n" + |
| | | " </if> " + |
| | | "JOIN sys_user su ON p.handler_id = su.user_id \n" + |
| | | "left JOIN sys_user su ON p.handler_id = su.user_id \n" + |
| | | "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != ""'>" + |
| | | "AND su.`name` = #{comActEasyPhotoVO.handlerName} \n" + |
| | | " </if> " + |
| | |
| | | "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != ""'>" + |
| | | "AND p.happen_addr = #{comActEasyPhotoVO.happenAddr} \n" + |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.status != null '>" + |
| | | "<if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' >" + |
| | | "AND p.`status` = #{comActEasyPhotoVO.status} \n" + |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.createBegin != null '>" + |
| | |
| | | "u.`image_url`,\n" + |
| | | "u.phone,\n" + |
| | | "p.detail,\n" + |
| | | "p.status,\n" + |
| | | "p.is_hide,\n" + |
| | | "p.happen_addr,\n" + |
| | | "su.`name`,\n" + |
| | | "p.handle_result,\n" + |
| | |
| | | "w.sponsor_phone,\n" + |
| | | "w.wish_name,\n" + |
| | | "w.`status`,\n" + |
| | | "count(wu.id)start_num,\n" + |
| | | "count(wu.id)star_num,\n" + |
| | | "w.`detail`,\n" + |
| | | "w.form,\n" + |
| | | "su.`name` responsible_name,\n" + |
| | |
| | | "<if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone.trim() != ""'>" + |
| | | "AND w.sponsor_phone = #{comActMicroWishVO.sponsorPhone} \n" + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null '>" + |
| | | "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 '>" + |
| | | "AND w.`status` = #{comActMicroWishVO.status} \n" + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.createBegin != null '>" + |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long community_id; |
| | | private Long communityId; |
| | | /** |
| | | * 是否匿名发布 |
| | | */ |
| | | private Integer isHide; |
| | | |
| | | /** |
| | | * 随手拍是否需要反馈 |
| | | * 0 不需要 1 需要 |
| | | */ |
| | | private Integer isNeedFeedBack; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.service_community.model.dos.ComActDynDO; |
| | | |
| | | /** |
| | |
| | | * @return 详情 |
| | | */ |
| | | R detailDynamic(Long id); |
| | | /** |
| | | * 新增社区动态浏览记录 |
| | | * @param id 动态主键 |
| | | * @param userId 登录用户id |
| | | * @return 新增结果 |
| | | */ |
| | | R addDynamicUser(Long id, Long userId); |
| | | |
| | | } |
| | |
| | | * @return 操作结果 |
| | | */ |
| | | R putEasyPhoto(ComActEasyPhotoVO comActEasyPhotoVO); |
| | | /** |
| | | * 审核反馈随手拍 |
| | | * @param comActEasyPhotoVO 操作参数 |
| | | * @return 操作结果 |
| | | */ |
| | | R putEasypHotoStatus(ComActEasyPhotoVO comActEasyPhotoVO); |
| | | } |
| | |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | comActDynVO.setReadNum(count); |
| | | return R.ok(comActDynVO); |
| | | } |
| | | |
| | | /** |
| | | * 新增社区动态浏览记录 |
| | | * |
| | | * @param id 动态主键 |
| | | * @param userId 登录用户id |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R addDynamicUser(Long id, Long userId) { |
| | | ComActDynUserDO comActDynUserDO = comActDynUserDAO.selectOne(new QueryWrapper<ComActDynUserDO>().lambda().eq(ComActDynUserDO::getDynId, id).eq(ComActDynUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActDynUserDO)) { |
| | | comActDynUserDO=new ComActDynUserDO(); |
| | | comActDynUserDO.setCreateAt(new Date()); |
| | | comActDynUserDO.setDynId(id); |
| | | comActDynUserDO.setUserId(userId); |
| | | int insert = comActDynUserDAO.insert(comActDynUserDO); |
| | | if (insert>0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | }else{ |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 审核反馈随手拍 |
| | | * |
| | | * @param comActEasyPhotoVO 操作参数 |
| | | * @return 操作结果 |
| | | */ |
| | | @Override |
| | | public R putEasypHotoStatus(ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | Integer type = comActEasyPhotoVO.getType(); |
| | | // 操作类型 1审核通过 2驳回 3反馈 |
| | | ComActEasyPhotoDO cmActEasyPhotoDO=new ComActEasyPhotoDO(); |
| | | cmActEasyPhotoDO.setId(comActEasyPhotoVO.getId()); |
| | | int isNeedFeedBack = comActEasyPhotoVO.getIsNeedFeedBack().intValue(); |
| | | switch (type){ |
| | | case 1: |
| | | if (isNeedFeedBack==1) { |
| | | cmActEasyPhotoDO.setStatus(2);//进行中 |
| | | }else{ |
| | | cmActEasyPhotoDO.setStatus(4);//已完成 |
| | | } |
| | | break; |
| | | case 2: |
| | | cmActEasyPhotoDO.setStatus(3);//已驳回 |
| | | break; |
| | | case 3: |
| | | cmActEasyPhotoDO.setHandleResult(comActEasyPhotoVO.getHandleResult()); |
| | | cmActEasyPhotoDO.setHandlePhotoList(comActEasyPhotoVO.getHandlePhotoList()); |
| | | cmActEasyPhotoDO.setStatus(4);//已完成 |
| | | break; |
| | | default:break; |
| | | } |
| | | int update = comActEasyPhotoDAO.updateById(cmActEasyPhotoDO); |
| | | if (update>0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | } |