springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java
@@ -181,7 +181,7 @@ @ApiModelProperty("活动参加志愿者人员集合") private List<ActivitySignVO> activityVolunteerList; @ApiModelProperty("活动类型 1 支援者活动 2 普通社区活动 3 党建活动") @ApiModelProperty("活动类型 1 支援者活动 2 普通社区活动 3 党建活动 4项目活动") private Integer type; @ApiModelProperty("活动创建时间") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActColumnVO.java
@@ -51,9 +51,9 @@ private Integer status; /** * 分类类型 1服务类型分类 2技能分类 3通知公告 * 分类类型 1服务类型分类 2技能分类 3通知公告 4项目分类 */ @ApiModelProperty(value = "分类类型 1服务类型分类 2技能分类 3通知公告") @ApiModelProperty(value = "分类类型 1服务类型分类 2技能分类 3通知公告 4项目分类") private Integer type; private Long communityId; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/social/SocialProjectVO.java
@@ -113,4 +113,16 @@ */ @ApiModelProperty(value = "街道电话") private String streetPhone; /** * 分类id */ @ApiModelProperty(value = "分类id") private Long columnId; /** * 分类名称 */ @ApiModelProperty(value = "分类名称") private String columnName; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActSocialProjectApi.java
@@ -51,7 +51,7 @@ */ @GetMapping("{id}") public R selectOne(@PathVariable("id") Long id) { return R.ok(this.comActSocialProjectService.getById(id)); return this.comActSocialProjectService.getByBackstage(id); } /** * 根据项目id分页获取关联项目 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -61,9 +61,12 @@ + "AND a.`status` != 1 AND a.`status` != 6 " + " </if> " + "<if test='comActActivityVO.beginAt != null '>" + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " + " </if> " + "<if test='comActActivityVO.type != null and comActActivityVO.type==1 '>" + "AND a.volunteer_max!=0 " + " </if> " + "<if test='comActActivityVO.type != null and comActActivityVO.type==2 '>" + "AND a.volunteer_max=0 " + " </if> " + " group by a.id " + " order by a.status asc,a.publish_at desc " + "</script>") + "AND a.volunteer_max!=0 and is_project = 0 " + " </if> " + "<if test='comActActivityVO.type != null and comActActivityVO.type==2 '>" + "AND a.volunteer_max=0 and is_project = 0 " + " </if> " + "<if test='comActActivityVO.type != null and comActActivityVO.type==4 '>" + "AND is_project = 1 " + " </if> " + " group by a.id " + " order by a.status asc,a.publish_at desc " + "</script>") IPage<ComActActivityVO> pageActivity(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); // @Select("SELECT " + "u.name sponsorName, " + "ca.name communityName, " springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActSocialProject.java
@@ -110,4 +110,11 @@ */ @ApiModelProperty(value = "浏览量") private Integer views; /** * 分类id */ @ApiModelProperty(value = "分类id") private Long columnId; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActivityDO.java
@@ -209,4 +209,9 @@ * 活动类型 */ private String activityType; /** * 是否居民活动 */ private Integer isProject; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActSocialProjectService.java
@@ -28,6 +28,13 @@ R getByApplet(Long id); /** * 小程序获取详情 * @param id * @return */ R getByBackstage(Long id); /** * 根据项目id分页查询关联项目 * @param commonPage * @return springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -136,7 +136,9 @@ comActActivityDO.setStatus(3); } } if(comActActivityVO.getType()==4){ comActActivityDO.setIsProject(1); } boolean save = this.save(comActActivityDO); if (!save) { return R.fail(); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectServiceImpl.java
@@ -43,6 +43,11 @@ } @Override public R getByBackstage(Long id) { return R.ok(comActSocialProjectDao.getByApplet(id)); } @Override public R getProject(CommonPage commonPage) { if(commonPage.getParamId()==null){ return R.fail("数据异常"); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialProjectMapper.xml
@@ -18,38 +18,41 @@ </resultMap> <select id="pageList" resultType="com.panzhihua.common.model.vos.community.social.SocialProjectVO"> select * from com_act_social_project select t.*,t1.name as columnName from com_act_social_project t left join com_act_column t1 on t.column_id = t1.id <where> 1=1 <if test="commonPage.communityId !=0 and commonPage.communityId !=null"> and community_id =#{commmonPage.communityId} and t.community_id =#{commmonPage.communityId} </if> <if test="commonPage.streetId !=0 and commonPage.streetId !=null"> and street_id =#{commmonPage.streetId} and t.street_id =#{commmonPage.streetId} </if> <if test="commonPage.status !=null"> and status =#{commmonPage.status} and t.status =#{commmonPage.status} </if> <if test="commonPage.type !=null"> and type =#{commmonPage.type} and t.type =#{commmonPage.type} </if> <if test="commonPage.keyword !=null and commonPage.keyword !=''"> and (name like concat('%',#{commmonPage.keyword},'%') or responsibility like concat('%',#{commmonPage.keyword},'%') ) and (t.name like concat('%',#{commmonPage.keyword},'%') or responsibility like concat('%',#{commmonPage.keyword},'%') ) </if> <if test="commonPage.beginTime !=null"> and create_time >= #{commonPage.beginTime} and t.create_time >= #{commonPage.beginTime} </if> <if test="commonPage.endTime !=null"> and #{commonPage.endTime} >= create_time and #{commonPage.endTime} >= t.create_time </if> <if test="commonPage.paramId !=null"> and parent_id = #{commonPage.paramId} and t.parent_id = #{commonPage.paramId} </if> </where> order by create_time desc order by t.create_time desc </select> <select id="getByApplet" resultType="com.panzhihua.common.model.vos.community.social.SocialProjectVO"> select t.*,t1.phone as streetPhone from com_act_social_project t LEFT JOIN com_street t1 on t.street_id = t1.street_id where t.id =#{id} select t.*,t1.phone as streetPhone,t2.name as columnName from com_act_social_project t LEFT JOIN com_street t1 on t.street_id = t1.street_id LEFT JOIN com_act_column t2 on t.column_id = t2.id where t.id =#{id} </select> </mapper>