| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.social.SocialProjectVO; |
| | |
| | | @Api(tags = {"项目管理"}) |
| | | @RestController |
| | | @RequestMapping("comActSocialProject") |
| | | public class ComActSocialProjectApi { |
| | | public class ComActSocialProjectApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | |
| | | @ApiOperation(value = "分页查询接口",response =SocialProjectVO.class ) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setCommunityId(this.getCommunityId()); |
| | | return communityService.selectAllComActSocialProject(commonPage); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.social.ComActSocialProjectPublicityVO; |
| | |
| | | @Api(tags = {"项目宣传管理"}) |
| | | @RestController |
| | | @RequestMapping("comActSocialProjectPublicity") |
| | | public class ComActSocialProjectPublicityApi { |
| | | public class ComActSocialProjectPublicityApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | |
| | | @ApiOperation(value = "分页查询",response = ComActSocialProjectPublicityVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setCommunityId(this.getCommunityId()); |
| | | return communityService.selectAllComActSocialProjectPublicity(commonPage); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiModelProperty("社工数") |
| | | private Integer socialCount; |
| | | |
| | | |
| | | /** |
| | | * 党员参与者人数下线 |
| | | */ |
| | | @ApiModelProperty("党员参与者人数下线") |
| | | private Integer partyMemberMin; |
| | | |
| | | /** |
| | | * 党员参与者人数上限 |
| | | */ |
| | | @ApiModelProperty("党员参与者人数上限") |
| | | private Integer partyMemberMax; |
| | | /** |
| | | * 签退范围,默认0无限制 |
| | | */ |
| | | @ApiModelProperty("签退范围,默认0无限制") |
| | | private Integer signOutRange; |
| | | |
| | | @ApiModelProperty("单次活动时长") |
| | | private Integer activityTime; |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.social.SocialProjectVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | else { |
| | | socialProjectVO.setCommunityId(this.getCommunityId()); |
| | | } |
| | | if(StringUtils.isNotEmpty(socialProjectVO.getResponsibility())){ |
| | | socialProjectVO.setStatus(3); |
| | | } |
| | | return communityService.insertComActSocialProject(socialProjectVO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody SocialProjectVO socialProjectVO) { |
| | | if(StringUtils.isNotEmpty(socialProjectVO.getResponsibility())){ |
| | | socialProjectVO.setStatus(3); |
| | | } |
| | | return communityService.updateComActSocialProject(socialProjectVO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "新增社区活动") |
| | | @PostMapping("activity") |
| | | public R addActivity(@RequestBody @Validated(AddGroup.class) ComActActivityVO comActActivityVO) { |
| | | if (comActActivityVO.getHaveIntegralReward().intValue() == 1) { |
| | | if (isNull(comActActivityVO.getRewardWay())) { |
| | | return R.fail("奖励方式不能为空"); |
| | | } |
| | | if (isNull(comActActivityVO.getRewardIntegral())) { |
| | | return R.fail("奖励积分不能为空"); |
| | | } |
| | | if (comActActivityVO.getRewardWay().intValue() == 1 && isNull(comActActivityVO.getLimit())) { |
| | | return R.fail("参与次数上限不能为空"); |
| | | } |
| | | } |
| | | if(nonNull(comActActivityVO.getVolunteerMax()) && comActActivityVO.getVolunteerMax().intValue() == 0) { |
| | | return R.fail("志愿者参与上限不能为0"); |
| | | } |
| | | Long communityId = this.getCommunityId(); |
| | | comActActivityVO.setCommunityId(communityId); |
| | | comActActivityVO.setUserId(this.getLoginUserInfo().getUserId()); |
| | |
| | | + "<if test='comActActivityVO.isApplets != null and comActActivityVO.isApplets ==1'>" |
| | | + "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 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> " |
| | | + "<if test='comActActivityVO.projectId != null'>" + "AND project_id = #{comActActivityVO.projectId} " |
| | | + " </if> " |
| | | + " </if> " + "<if test='comActActivityVO.type != null'>" |
| | | + "AND a.type=#{comActActivityVO.type} " + " </if> " |
| | | + " group by a.id " + " order by a.status asc,a.publish_at desc " + "</script>") |
| | | IPage<ComActActivityVO> pageActivity(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | |
| | | */ |
| | | BigScreenActivityLine selectActivityCountMonth(@Param("date") String date,@Param("year") String year); |
| | | |
| | | /** |
| | | * id查询 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | SocialProjectVO selectByLevel(Long id); |
| | | } |
| | |
| | | * 1志愿者活动 2居民活动 3党员活动 4项目活动 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 党员参与者人数下线 |
| | | */ |
| | | private Integer partyMemberMin; |
| | | |
| | | /** |
| | | * 党员参与者人数上限 |
| | | */ |
| | | private Integer partyMemberMax; |
| | | /** |
| | | * 签退范围,默认0无限制 |
| | | */ |
| | | private Integer signOutRange; |
| | | /** |
| | | * 单次活动时长 |
| | | */ |
| | | private Integer activityTime; |
| | | |
| | | } |
| | |
| | | ComActActivityCode comActActivityCode = new ComActActivityCode(); |
| | | comActActivityCode.setActivityId(comActActivityDO.getId().longValue()); |
| | | comActActivityCode.setCreateTime(new Date()); |
| | | comActActivityCode.setType(1); |
| | | comActActivityCode.setType(comActActivityVO.getType()); |
| | | comActActivityCode.setStatus(1); |
| | | comActActivityCodeService.save(comActActivityCode); |
| | | return R.ok(activityId); |
| | |
| | | return R.fail("数据异常"); |
| | | } |
| | | ProjectRelationVO projectRelationVO=new ProjectRelationVO(); |
| | | ComActSocialProject comActSocialProject=this.comActSocialProjectDao.selectById(commonPage.getParamId()); |
| | | SocialProjectVO comActSocialProject=this.comActSocialProjectDao.selectByLevel(commonPage.getParamId()); |
| | | if(comActSocialProject.getLevel()==1){ |
| | | ComActSocialProject comActSocialProject1=this.comActSocialProjectDao.selectOne(new QueryWrapper<ComActSocialProject>().lambda().eq(ComActSocialProject::getId,comActSocialProject.getParentId())); |
| | | SocialProjectVO comActSocialProject1=this.comActSocialProjectDao.selectByLevel(comActSocialProject.getParentId()); |
| | | if(comActSocialProject1!=null){ |
| | | SocialProjectVO socialProjectVO=new SocialProjectVO(); |
| | | BeanUtils.copyProperties(comActSocialProject1,socialProjectVO); |
| | | projectRelationVO.setFatherProjectLevelOne(socialProjectVO); |
| | | projectRelationVO.setFatherProjectLevelOne(comActSocialProject1); |
| | | } |
| | | |
| | | } |
| | | if(comActSocialProject.getLevel()==2){ |
| | | ComActSocialProject comActSocialProject1=this.comActSocialProjectDao.selectOne(new QueryWrapper<ComActSocialProject>().lambda().eq(ComActSocialProject::getId,comActSocialProject.getParentId())); |
| | | SocialProjectVO comActSocialProject1=this.comActSocialProjectDao.selectByLevel(comActSocialProject.getParentId()); |
| | | if(comActSocialProject1!=null){ |
| | | SocialProjectVO socialProjectVO=new SocialProjectVO(); |
| | | BeanUtils.copyProperties(comActSocialProject1,socialProjectVO); |
| | | projectRelationVO.setFatherProjectLevelTwo(socialProjectVO); |
| | | ComActSocialProject comActSocialProject2=this.comActSocialProjectDao.selectOne(new QueryWrapper<ComActSocialProject>().lambda().eq(ComActSocialProject::getId,comActSocialProject1.getParentId())); |
| | | projectRelationVO.setFatherProjectLevelTwo(comActSocialProject1); |
| | | SocialProjectVO comActSocialProject2=this.comActSocialProjectDao.selectByLevel(comActSocialProject1.getParentId()); |
| | | if(comActSocialProject2!=null){ |
| | | SocialProjectVO socialProjectVO1=new SocialProjectVO(); |
| | | BeanUtils.copyProperties(comActSocialProject2,socialProjectVO1); |
| | | projectRelationVO.setFatherProjectLevelOne(socialProjectVO1); |
| | | projectRelationVO.setFatherProjectLevelOne(comActSocialProject2); |
| | | } |
| | | } |
| | | } |
| | |
| | | </select> |
| | | <select id="pageActivityCommunityBack" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT t.* FROM ( |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, a.is_qr_code, |
| | | a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward , a.cover <if test='comActActivityVO.type != null and comActActivityVO.type == 4'>,so.socialCount</if> |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, |
| | | a.is_qr_code, a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward ,a.cover<if test='comActActivityVO.type != null and comActActivityVO.type == 4'>,so.socialCount</if> |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | left join (select count(t.id) as socialCount,activity_id from com_act_act_regist t LEFT JOIN sys_user t1 on t.user_id = t1.user_id LEFT JOIN com_act_social_worker t2 on t1.phone = t2.telephone where t2.id is not null GROUP BY t.activity_id) so on a.id = so.activity_id |
| | | </if> |
| | | WHERE a.`status` = 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | <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> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | AND a.is_project = 1 |
| | | </if> |
| | | <if test='comActActivityVO.rewardWay != null and comActActivityVO.rewardWay != 0'> |
| | | AND a.reward_way = #{comActActivityVO.rewardWay} |
| | | </if> |
| | | <if test='comActActivityVO.activityType != null and comActActivityVO.activityType !=""'> |
| | | AND a.activity_type = #{comActActivityVO.activityType} |
| | | </if> |
| | | <if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'> |
| | | AND a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) |
| | | </if> |
| | | <if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.status !=1'> |
| | | AND a.`status` = 99 |
| | | </if> |
| | | <if test='comActActivityVO.beginAt != null '> |
| | | AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} |
| | | </if> |
| | | GROUP BY a.id |
| | | UNION ALL SELECT t1.* FROM ( |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, |
| | | a.is_qr_code, a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward ,a.cover<if test='comActActivityVO.type != null and comActActivityVO.type == 4'>,so.socialCount</if> |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | left join (select count(t.id) as socialCount,activity_id from com_act_act_regist t LEFT JOIN sys_user t1 on t.user_id = t1.user_id LEFT JOIN com_act_social_worker t2 on t1.phone = t2.telephone where t2.id is not null GROUP BY t.activity_id) so on a.id = so.activity_id |
| | | </if> |
| | | WHERE a.`status` != 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | <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> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | AND a.is_project = 1 |
| | | </if> |
| | | <if test='comActActivityVO.rewardWay != null and comActActivityVO.rewardWay != 0'> |
| | | AND a.reward_way = #{comActActivityVO.rewardWay} |
| | | </if> |
| | | <if test='comActActivityVO.activityType != null and comActActivityVO.activityType !=""'> |
| | | AND a.activity_type = #{comActActivityVO.activityType} |
| | | </if> |
| | | <if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'> |
| | | AND a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) |
| | | </if> |
| | | <if test='comActActivityVO.status != null and comActActivityVO.status !=0 '> |
| | | AND a.`status` = #{comActActivityVO.status} |
| | | </if> |
| | | <if test='comActActivityVO.beginAt != null '> |
| | | AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} |
| | | </if> |
| | | GROUP BY a.id ORDER BY a.publish_at DESC |
| | | )t1 |
| | | )t |
| | | </if> |
| | | WHERE a.`status` != 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | <if test='comActActivityVO.type != null'> |
| | | AND a.type = #{comActActivityVO.type} |
| | | </if> |
| | | <if test='comActActivityVO.rewardWay != null and comActActivityVO.rewardWay != 0'> |
| | | AND a.reward_way = #{comActActivityVO.rewardWay} |
| | | </if> |
| | | <if test='comActActivityVO.activityType != null and comActActivityVO.activityType !=""'> |
| | | AND a.activity_type = #{comActActivityVO.activityType} |
| | | </if> |
| | | <if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'> |
| | | AND a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) |
| | | </if> |
| | | <if test='comActActivityVO.status != null and comActActivityVO.status !=0 '> |
| | | AND a.`status` = #{comActActivityVO.status} |
| | | </if> |
| | | <if test='comActActivityVO.beginAt != null '> |
| | | AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} |
| | | </if> |
| | | GROUP BY a.id ORDER BY a.status = 99 desc,a.publish_at DESC |
| | | </select> |
| | | <select id="inforActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT u.name sponsorName, ca.name communityName, |
| | |
| | | and t.type =#{commonPage.type} |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword !=''"> |
| | | and (t.name like concat('%',#{commonPage.keyword},'%') or responsibility like concat('%',#{commonPage.keyword},'%') ) |
| | | and (t.name like concat('%',#{commonPage.keyword},'%') or responsibility like |
| | | concat('%',#{commonPage.keyword},'%') ) |
| | | </if> |
| | | <if test="commonPage.beginTime !=null"> |
| | | and t.create_time >= #{commonPage.beginTime} |
| | |
| | | </select> |
| | | |
| | | <select id="getByApplet" resultType="com.panzhihua.common.model.vos.community.social.SocialProjectVO"> |
| | | select t.*,t1.phone as streetPhone,t2.name as columnName,t3.name as secondColumnName 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 |
| | | LEFT JOIN com_act_column t3 on t.second_column_id = t3.id |
| | | where t.id =#{id} |
| | | select t.*, t1.phone as streetPhone, t2.name as columnName, t3.name as secondColumnName |
| | | 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 |
| | | LEFT JOIN com_act_column t3 on t.second_column_id = t3.id |
| | | where t.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectBaseInfo" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectInfo"> |
| | | select (select count(*) from com_act_social_project where street_id =15 <if test="communityId!=null"> and community_id = #{communityId}</if>) count, |
| | | (select count(*) from com_act_social_project where street_id =15 and status >=2 <if test="communityId!=null"> and community_id = #{communityId}</if>) assigned, |
| | | (select count(*) from com_act_social_project where street_id =15 and 1 >=status <if test="communityId!=null"> and community_id = #{communityId}</if>) assign |
| | | select (select count(*) from com_act_social_project where street_id =15 <if test="communityId!=null">and |
| | | community_id = #{communityId}</if>) count, |
| | | (select count(*) from com_act_social_project where street_id =15 and status >=2 <if test="communityId!=null">and |
| | | community_id = #{communityId}</if>) assigned, |
| | | (select count(*) from com_act_social_project where street_id =15 and 1 >=status <if test="communityId!=null">and |
| | | community_id = #{communityId}</if>) assign |
| | | </select> |
| | | |
| | | <select id="selectType" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectTypeInfo"> |
| | |
| | | |
| | | <select id="selectActivity" resultType="integer"> |
| | | select count(*) from com_act_activity |
| | | <where> |
| | | is_project = 1 |
| | | <if test="type =1"> |
| | | and volunteer_max > 0 |
| | | </if> |
| | | <if test="type =2"> |
| | | and volunteer_max = 0 |
| | | </if> |
| | | <if test="communityId !=null"> |
| | | and community_id = #{communityId} |
| | | </if> |
| | | </where> |
| | | <where> |
| | | is_project = 1 |
| | | <if test="type =1"> |
| | | and volunteer_max > 0 |
| | | </if> |
| | | <if test="type =2"> |
| | | and volunteer_max = 0 |
| | | </if> |
| | | <if test="communityId !=null"> |
| | | and community_id = #{communityId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIndexBaseInfo" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkBaseInfo"> |
| | | <select id="selectIndexBaseInfo" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkBaseInfo"> |
| | | select (select count(*) from com_act_social_project where street_id = 15) projectCount, |
| | | (select count(*) from com_act_activity where is_project = 1) activityCount, |
| | | (select count(*) from com_act_activity where is_project = 1) activityCount, |
| | | (select count(*) from com_act_social_worker where street_id = 15) socialWorkerCount, |
| | | (select count(*) from com_mng_population where street_id = 15) userCount, |
| | | (select count(*) from com_act_social_org where street_id = 15) socialOrgCount, |
| | | (select count(*) from com_act_social_worker_service) serviceCount |
| | | (select count(*) from com_mng_population where street_id = 15) userCount, |
| | | (select count(*) from com_act_social_org where street_id = 15) socialOrgCount, |
| | | (select count(*) from com_act_social_worker_service) serviceCount |
| | | </select> |
| | | |
| | | <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> |
| | | select ( select count(id) from com_act_activity where status!=6 and is_project = 1 and publish_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at) y, |
| | | (select count(id) from com_act_activity where status!=6 and is_project = 1 and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at) countY |
| | | <select id="selectActivityCountMonth" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> |
| | | select (select count(id) from com_act_activity where status!=6 and is_project = 1 and publish_at >= DATE_FORMAT( CONCAT(#{year}, '-', |
| | | #{date}, '-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT( |
| | | #{year}, '-', |
| | | #{date}, '-00')), '%Y-%m-%d 23:59:59') >=publish_at) y, |
| | | ( |
| | | select count (id) |
| | | from com_act_activity |
| | | where status!=6 |
| | | and is_project = 1 |
| | | and DATE_FORMAT( LAST_DAY(CONCAT(#{year} |
| | | , '-' |
| | | , #{date} |
| | | , '-00')) |
| | | , '%Y-%m-%d 23:59:59') >=publish_at) countY |
| | | </select> |
| | | |
| | | <select id="selectByLevel" resultType="com.panzhihua.common.model.vos.community.social.SocialProjectVO"> |
| | | select t.*, t1.name as columnName, t2.name as secondColumnName |
| | | from com_act_social_project t |
| | | left join com_act_column t1 on t.column_id = t1.id |
| | | left join com_act_column t2 on t.second_column_id = t2.id |
| | | where t.id = #{id} |
| | | </select> |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.social.ComActSocialProjectPublicityVO"> |
| | | select t.*,t1.name,t1.responsibility from com_act_social_project_publicity t left join com_act_social_project t1 on t.project_id = t1.id order by is_top desc,create_time desc |
| | | select t.*,t1.name,t1.responsibility from com_act_social_project_publicity t left join com_act_social_project t1 on t.project_id = t1.id |
| | | <where> |
| | | <if test="commonPage.paramId !=null"> |
| | | and t.project_id =#{commonPage.paramId} |
| | | </if> |
| | | </where> |
| | | order by is_top desc,create_time desc |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.panzhihua.common.model.vos.community.social.ComActSocialProjectPublicityVO"> |