New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.bigscreen.work; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | @ApiModel("工作大屏一起议列表请求参数") |
| | | public class ScreenActActivityListDTO { |
| | | |
| | | @ApiModelProperty(value = "分页每页数量",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "分页当前记录数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "社区id", example = "2", required = true) |
| | | @NotNull(message = "社区id不能为空") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value="查询开始时间") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value="查询结束时间") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value="发布类型 1 图文 2 投票") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 发布类型 1 图文 2 投票 |
| | | */ |
| | | public interface type{ |
| | | int tw = 1; |
| | | int tp = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.bigscreen.work; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | @ApiModel("工作大屏一起议列表请求参数") |
| | | public class ScreenActActivityPeopleListDTO { |
| | | |
| | | @ApiModelProperty(value = "分页每页数量",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "分页当前记录数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "活动id", example = "2", required = true) |
| | | @NotNull(message = "活动id不可为空") |
| | | private Long activityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.bigscreen.work; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | @ApiModel("工作大屏微心愿列表请求参数") |
| | | public class ScreenMicroListDTO { |
| | | |
| | | @ApiModelProperty(value = "分页每页数量",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "分页当前记录数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "社区id", example = "2", required = true) |
| | | @NotNull(message = "社区id不能为空") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value="查询开始时间") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value="查询结束时间") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value="状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成") |
| | | private Integer status; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.work; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("大屏社区活动列表返回参数") |
| | | public class ActActivityListVO { |
| | | |
| | | @ApiModelProperty("主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("负责人姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("负责人id") |
| | | private Long sponsorId; |
| | | |
| | | @ApiModelProperty("负责人头像") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("活动状态 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date beginAt; |
| | | |
| | | @ApiModelProperty("活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endAt; |
| | | |
| | | @ApiModelProperty("报名开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date signUpBegin; |
| | | |
| | | @ApiModelProperty("报名结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date signUpEnd; |
| | | |
| | | @ApiModelProperty("志愿者人数下限") |
| | | private Integer volunteerMin; |
| | | |
| | | @ApiModelProperty("志愿者人数上限") |
| | | private Integer volunteerMax; |
| | | |
| | | @ApiModelProperty("参与者人数下限") |
| | | private Integer participantMin; |
| | | |
| | | @ApiModelProperty("参与者人数上限") |
| | | private Integer participantMax; |
| | | |
| | | @ApiModelProperty("活动名称") |
| | | private String activityName; |
| | | |
| | | @ApiModelProperty("活动内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("活动封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("活动地址") |
| | | private String activityAddr; |
| | | |
| | | @ApiModelProperty("居民参加人数") |
| | | private Integer participantCount; |
| | | |
| | | @ApiModelProperty("志愿者参加人数") |
| | | private Integer volunteerCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.work; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("大屏社区活动报名详情返回参数") |
| | | public class ActActivityPeopleListVO { |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("身份") |
| | | private String identity; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("报名时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.work; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("大屏微心愿列表返回参数") |
| | | public class MicroListVO { |
| | | |
| | | @ApiModelProperty("主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("发起人姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("发起人id") |
| | | private Long sponsorId; |
| | | |
| | | @ApiModelProperty("发起人头像") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("发起人手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("发起时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("微心愿名称") |
| | | private String wishName; |
| | | |
| | | @ApiModelProperty("微心愿内容") |
| | | private String detail; |
| | | |
| | | @ApiModelProperty("活动封面") |
| | | private String photoPathList; |
| | | |
| | | @ApiModelProperty("集星数") |
| | | private Integer starNum; |
| | | |
| | | @ApiModelProperty("评价时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date evaluateAt; |
| | | |
| | | @ApiModelProperty("评价星数") |
| | | private Integer score; |
| | | |
| | | @ApiModelProperty("负责人名字") |
| | | private String responsibleName; |
| | | |
| | | @ApiModelProperty("形式 1分配人员 2发起活动") |
| | | private Integer form; |
| | | |
| | | @ApiModelProperty("分配时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date distributionAt; |
| | | |
| | | @ApiModelProperty("完成情况描述") |
| | | private String finish; |
| | | |
| | | @ApiModelProperty("完成情况图片列表,逗号分隔") |
| | | private String finishPhotoPathList; |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.event.ScreenEventListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; |
| | |
| | | @PostMapping("/screen/work/getScreenDiscussList") |
| | | R getScreenDiscussList(@RequestBody ScreenDiscussListDTO discussListDTO); |
| | | |
| | | /** |
| | | * 工作大屏-社区活动列表 |
| | | * @param actActivityListDTO 请求参数 |
| | | * @return 活动列表 |
| | | */ |
| | | @PostMapping("/screen/work/getScreenActActivityList") |
| | | R getScreenActActivityList(@RequestBody ScreenActActivityListDTO actActivityListDTO); |
| | | |
| | | /** |
| | | * 工作大屏-社区活动报名人员列表 |
| | | * @param activityPeopleListDTO 请求参数 |
| | | * @return 社区活动报名人员列表 |
| | | */ |
| | | @PostMapping("/screen/work/getActActivityPeopleList") |
| | | R getActActivityPeopleList(@RequestBody ScreenActActivityPeopleListDTO activityPeopleListDTO); |
| | | |
| | | /** |
| | | * 工作大屏-微心愿列表 |
| | | * @param microListDTO 请求参数 |
| | | * @return 微心愿列表 |
| | | */ |
| | | @PostMapping("/screen/work/getScreenMicroList") |
| | | R getScreenMicroList(@RequestBody ScreenMicroListDTO microListDTO); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.screen.work.ActActivityListVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.ActActivityPeopleListVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.DiscussListVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.common.model.vos.screen.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | return communityService.getScreenDiscussList(discussListDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "工作大屏社区活动列表接口@lyq",response = ActActivityListVO.class) |
| | | @PostMapping("/act/activity/list") |
| | | public R actActivityList(@RequestBody ScreenActActivityListDTO actActivityListDTO) { |
| | | if(actActivityListDTO.getCommunityId() == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.getScreenActActivityList(actActivityListDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "工作大屏社区活动报名详情接口@lyq",response = ActActivityPeopleListVO.class) |
| | | @PostMapping("/act/activity/people/list") |
| | | public R actActivityPeopleList(@RequestBody ScreenActActivityPeopleListDTO activityPeopleListDTO) { |
| | | return communityService.getActActivityPeopleList(activityPeopleListDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "工作大屏微心愿列表接口@lyq",response = MicroListVO.class) |
| | | @PostMapping("/micro/list") |
| | | public R microList(@RequestBody ScreenMicroListDTO microListDTO) { |
| | | if(microListDTO.getCommunityId() == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.getScreenMicroList(microListDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActActivityService; |
| | | import com.panzhihua.service_community.service.ComActDiscussService; |
| | | import com.panzhihua.service_community.service.ComActMicroWishService; |
| | | import com.panzhihua.service_community.service.ScreenWorkService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private ScreenWorkService screenWorkService; |
| | | @Resource |
| | | private ComActDiscussService comActDiscussService; |
| | | @Resource |
| | | private ComActActivityService comActActivityService; |
| | | @Resource |
| | | private ComActMicroWishService comActMicroWishService; |
| | | |
| | | /** |
| | | * |
| | |
| | | */ |
| | | @PostMapping("/getScreenDiscussList") |
| | | public R getScreenDiscussList(@RequestBody ScreenDiscussListDTO discussListDTO) { |
| | | return R.ok(comActDiscussService.getScreenDiscussList(discussListDTO)); |
| | | return comActDiscussService.getScreenDiscussList(discussListDTO); |
| | | } |
| | | |
| | | @PostMapping("/getScreenActActivityList") |
| | | public R getScreenActActivityList(@RequestBody ScreenActActivityListDTO actActivityListDTO) { |
| | | return comActActivityService.getScreenActActivityList(actActivityListDTO); |
| | | } |
| | | |
| | | @PostMapping("/getActActivityPeopleList") |
| | | public R getActActivityPeopleList(@RequestBody ScreenActActivityPeopleListDTO activityPeopleListDTO) { |
| | | return comActActivityService.getActActivityPeopleList(activityPeopleListDTO); |
| | | } |
| | | |
| | | @PostMapping("/getScreenMicroList") |
| | | public R getScreenMicroList(@RequestBody ScreenMicroListDTO microListDTO) { |
| | | return comActMicroWishService.getScreenMicroList(microListDTO); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.ActActivityPeopleListVO; |
| | | import com.panzhihua.service_community.model.dos.ComActActSignDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | |
| | | public interface ComActActSignDAO extends BaseMapper<ComActActSignDO> { |
| | | // 居民 党员 志愿者 1 2 3 |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "u.user_id id,\n" + |
| | | "u.image_url,\n" + |
| | | "u.name,\n" + |
| | | "u.nick_name,\n" + |
| | | "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity,\n" + |
| | | "u.phone,\n" + |
| | | "a.create_at, \n" + |
| | | "a.is_volunteer \n" + |
| | | "FROM\n" + |
| | | "com_act_act_sign a\n" + |
| | | "JOIN sys_user u ON a.user_id = u.user_id \n" + |
| | | "WHERE\n" + |
| | | "a.activity_id = #{activityId} \n" + |
| | | "SELECT " + |
| | | "u.user_id id, " + |
| | | "u.image_url, " + |
| | | "u.name, " + |
| | | "u.nick_name, " + |
| | | "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " + |
| | | "u.phone, " + |
| | | "a.create_at, " + |
| | | "a.is_volunteer " + |
| | | "FROM " + |
| | | "com_act_act_sign a " + |
| | | "JOIN sys_user u ON a.user_id = u.user_id " + |
| | | "WHERE " + |
| | | "a.activity_id = #{activityId} " + |
| | | "<if test='phone != null and phone.trim() != ""'>" + |
| | | "AND u.phone = #{phone} \n" + |
| | | "AND u.phone = #{phone} " + |
| | | " </if> " + |
| | | "<if test='name != null and name.trim() != ""'>" + |
| | | "AND u.`name` = #{name} \n" + |
| | | "AND u.`name` = #{name} " + |
| | | " </if> " + |
| | | "<if test='identity != null and identity.trim() != "" and identity==1'>" + |
| | | "AND u.is_partymember = 0 and a.is_volunteer=0 \n" + |
| | | "AND u.is_partymember = 0 and a.is_volunteer=0 " + |
| | | " </if> " + |
| | | "<if test='identity != null and identity.trim() != "" and identity==2'>" + |
| | | "AND u.is_partymember = 1 \n" + |
| | | "AND u.is_partymember = 1 " + |
| | | " </if> " + |
| | | "<if test='identity != null and identity.trim() != "" and identity==3'>" + |
| | | "AND a.is_volunteer=1 \n" + |
| | | "AND a.is_volunteer=1 " + |
| | | " </if> " + |
| | | "<if test='type != null and type != 0'>" + |
| | | "AND a.is_volunteer=#{type}-1 \n" + |
| | | "AND a.is_volunteer=#{type}-1 " + |
| | | " </if> " + |
| | | " order by a.create_at desc "+ |
| | | "</script>") |
| | | List<ActivitySignVO> listActivitySign(ActivitySignVO activitySignVO); |
| | | |
| | | @Select("SELECT " + |
| | | " caas.user_id, " + |
| | | " su.NAME, " + |
| | | "CASE " + |
| | | " WHEN su.is_volunteer = 1 THEN " + |
| | | " '志愿者' ELSE '居民' " + |
| | | " END identity, " + |
| | | " su.phone, " + |
| | | " caas.create_at " + |
| | | "FROM " + |
| | | " com_act_act_sign AS caas " + |
| | | " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id where caas.activity_id = #{activityPeopleListDTO.activityId}") |
| | | IPage<ActActivityPeopleListVO> getActActivityPeopleList(Page page,@Param("activityPeopleListDTO") ScreenActActivityPeopleListDTO activityPeopleListDTO); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.CommunityActivitiesVO; |
| | | import com.panzhihua.common.model.vos.community.CommunityGovernanceTrendsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.ActActivityListVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PageActivityMembersVO; |
| | | import com.panzhihua.common.model.vos.screen.CarouselInfoVO; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("<script> " + |
| | | "SELECT \n" + |
| | | "a.id,\n" + |
| | | "a.activity_name,\n" + |
| | | "u.`name` sponsorName,\n" + |
| | | "a.activity_addr,\n" + |
| | | "a.`status`,\n" + |
| | | "a.publish_at,\n" + |
| | | "a.begin_at,\n" + |
| | | "a.cover,\n" + |
| | | "a.end_at,\n" + |
| | | "a.volunteer_max,\n" + |
| | | "count(if(s.is_volunteer=1,s.id,null))volunteer_now,\n"+ |
| | | "count(if(s.is_volunteer=0,s.id,null))participant_now,\n"+ |
| | | "a.participant_max,\n" + |
| | | "a.sign_up_begin,\n" + |
| | | "a.sign_up_end,\n" + |
| | | "ca.name as communityName \n" + |
| | | "FROM\n" + |
| | | "com_act_activity a \n" + |
| | | "join sys_user u on a.sponsor_id=u.user_id\n" + |
| | | "left join com_act_act_sign s on a.id=s.activity_id \n"+ |
| | | "left join com_act ca on a.community_id=ca.community_id \n"+ |
| | | "SELECT " + |
| | | "a.id, " + |
| | | "a.activity_name, " + |
| | | "u.`name` sponsorName, " + |
| | | "a.activity_addr, " + |
| | | "a.`status`, " + |
| | | "a.publish_at, " + |
| | | "a.begin_at, " + |
| | | "a.cover, " + |
| | | "a.end_at, " + |
| | | "a.volunteer_max, " + |
| | | "count(if(s.is_volunteer=1,s.id,null))volunteer_now, "+ |
| | | "count(if(s.is_volunteer=0,s.id,null))participant_now, "+ |
| | | "a.participant_max, " + |
| | | "a.sign_up_begin, " + |
| | | "a.sign_up_end, " + |
| | | "ca.name as communityName " + |
| | | "FROM " + |
| | | "com_act_activity a " + |
| | | "join sys_user u on a.sponsor_id=u.user_id " + |
| | | "left join com_act_act_sign s on a.id=s.activity_id "+ |
| | | "left join com_act ca on a.community_id=ca.community_id "+ |
| | | " where 1=1 " + |
| | | |
| | | "<if test='comActActivityVO.choice == 0 '>" + |
| | | "AND a.community_id=#{comActActivityVO.communityId}\n" + |
| | | "AND a.community_id=#{comActActivityVO.communityId} " + |
| | | " </if> " + |
| | | |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != ""'>" + |
| | | " and a.activity_name like concat(#{comActActivityVO.activityName},'%') \n" + |
| | | " and a.activity_name like concat(#{comActActivityVO.activityName},'%') " + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.isIng==null'>" + |
| | | "AND a.`status` = #{comActActivityVO.status} \n" + |
| | | "AND a.`status` = #{comActActivityVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.isIng!=null and comActActivityVO.isIng==1'>" + |
| | | "AND a.`status` in (3,4) \n" + |
| | | "AND a.`status` in (3,4) " + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.isApplets != null and comActActivityVO.isApplets ==1'>" + |
| | | "AND a.`status` != 1 AND a.`status` != 6 \n" + |
| | | "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} \n" + |
| | | "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 \n" + |
| | | "AND a.volunteer_max!=0 " + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.type != null and comActActivityVO.type==2 '>" + |
| | | "AND a.participant_max!=0 \n" + |
| | | "AND a.participant_max!=0 " + |
| | | " </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 \n" + |
| | | "u.name sponsorName,\n" + |
| | | "ca.name communityName,\n" + |
| | | "count(if(s.is_volunteer=1,s.id,null))volunteer_now,\n"+ |
| | | "count(if(s.is_volunteer=0,s.id,null))participant_now,\n"+ |
| | | "a.* \n" + |
| | | "FROM \n" + |
| | | "com_act_activity a \n" + |
| | | "join sys_user u on a.sponsor_id=u.user_id \n"+ |
| | | "left join com_act_act_sign s on a.id=s.activity_id \n"+ |
| | | "left join com_act ca on a.community_id=ca.community_id \n"+ |
| | | "where a.id=#{id} \n"+ |
| | | @Select("SELECT " + |
| | | "u.name sponsorName, " + |
| | | "ca.name communityName, " + |
| | | "count(if(s.is_volunteer=1,s.id,null))volunteer_now, "+ |
| | | "count(if(s.is_volunteer=0,s.id,null))participant_now, "+ |
| | | "a.* " + |
| | | "FROM " + |
| | | "com_act_activity a " + |
| | | "join sys_user u on a.sponsor_id=u.user_id "+ |
| | | "left join com_act_act_sign s on a.id=s.activity_id "+ |
| | | "left join com_act ca on a.community_id=ca.community_id "+ |
| | | "where a.id=#{id} "+ |
| | | " group by a.id " |
| | | ) |
| | | ComActActivityVO inforActivity(Long id); |
| | | |
| | | @Select("SELECT\n" + |
| | | "a.* \n" + |
| | | "FROM\n" + |
| | | "com_act_act_sign s\n" + |
| | | "JOIN com_act_activity a ON s.activity_id = a.id \n" + |
| | | "WHERE\n" + |
| | | "s.user_id = #{comActActivityVO.sponsorId} \n" + |
| | | "ORDER BY\n" + |
| | | @Select("SELECT " + |
| | | "a.* " + |
| | | "FROM " + |
| | | "com_act_act_sign s " + |
| | | "JOIN com_act_activity a ON s.activity_id = a.id " + |
| | | "WHERE " + |
| | | "s.user_id = #{comActActivityVO.sponsorId} " + |
| | | "ORDER BY " + |
| | | "s.create_at DESC") |
| | | IPage<ComActActivityVO> pageMyActivity(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | |
| | | "join sys_user u on s.user_id=u.user_id and u.phone=#{phone} and s.is_volunteer=1 " + |
| | | "join com_act_activity t on s.activity_id=t.id and t.status=5") |
| | | List<ComActActivityVO> listActivityByPhone(String phone); |
| | | @Select("select t.id from (\n" + |
| | | "SELECT \n" + |
| | | "a.id,\n" + |
| | | "a.activity_name,\n" + |
| | | "COUNT(case when s.is_volunteer=1 then s.id else null end )volunteernum,\n" + |
| | | "COUNT(case when s.is_volunteer=0 then s.id else null end)usernum,\n" + |
| | | "a.participant_min,\n" + |
| | | "a.volunteer_min\n" + |
| | | "FROM\n" + |
| | | "com_act_activity a \n" + |
| | | "LEFT JOIN com_act_act_sign s on a.id=s.activity_id \n" + |
| | | "WHERE\n" + |
| | | "a.`status` in(3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),a.sign_up_end)<=0\n" + |
| | | @Select("select t.id from ( " + |
| | | "SELECT " + |
| | | "a.id, " + |
| | | "a.activity_name, " + |
| | | "COUNT(case when s.is_volunteer=1 then s.id else null end )volunteernum, " + |
| | | "COUNT(case when s.is_volunteer=0 then s.id else null end)usernum, " + |
| | | "a.participant_min, " + |
| | | "a.volunteer_min " + |
| | | "FROM " + |
| | | "com_act_activity a " + |
| | | "LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + |
| | | "WHERE " + |
| | | "a.`status` in(3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),a.sign_up_end)<=0 " + |
| | | "GROUP BY a.id)t WHERE t.usernum<participant_min or t.volunteernum<volunteer_min") |
| | | List<Long> selectTimedTaskActActivity(); |
| | | |
| | | @Update("<script> " + |
| | | "update com_act_activity set `status`=6 where id in\n" + |
| | | "<foreach item=\"item\" collection=\"longs\" separator=\",\" open=\"(\" close=\")\" index=\"\">\n"+ |
| | | "#{item}\n"+ |
| | | "</foreach>\n"+ |
| | | "update com_act_activity set `status`=6 where id in " + |
| | | "<foreach item=\"item\" collection=\"longs\" separator=\",\" open=\"(\" close=\")\" index=\"\"> "+ |
| | | "#{item} "+ |
| | | "</foreach> "+ |
| | | "</script>") |
| | | int updateIdBatch(@Param("longs") List<Long> longs); |
| | | |
| | |
| | | @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") |
| | | int updateStatusToBeginActiveOrEnd(); |
| | | @Select("<script> " + |
| | | "select t.* from (\n" + |
| | | "SELECT \n" + |
| | | "a.id,\n" + |
| | | "a.activity_name,\n" + |
| | | "u.`name` sponsorName,\n" + |
| | | "a.activity_addr,\n" + |
| | | "a.participant_max,\n" + |
| | | "count(if(s.is_volunteer=1,null,s.id))participant_now,\n"+ |
| | | "a.volunteer_max,\n" + |
| | | "count(if(s.is_volunteer=1,s.id,null))volunteer_now,\n"+ |
| | | "a.`status`,\n" + |
| | | "a.publish_at,\n" + |
| | | "a.begin_at,\n" + |
| | | "a.end_at,\n" + |
| | | "a.sign_up_begin,\n" + |
| | | "a.sign_up_end\n" + |
| | | "FROM\n" + |
| | | "\tcom_act_activity a \n" + |
| | | "\tLEFT JOIN sys_user u on a.sponsor_id=u.user_id\n" + |
| | | "\tLEFT JOIN com_act_act_sign s on a.id=s.activity_id\n" + |
| | | "WHERE\n" + |
| | | "\t a.`status` = 1 and a.community_id=#{comActActivityVO.communityId}\n" + |
| | | "select t.* from ( " + |
| | | "SELECT " + |
| | | "a.id, " + |
| | | "a.activity_name, " + |
| | | "u.`name` sponsorName, " + |
| | | "a.activity_addr, " + |
| | | "a.participant_max, " + |
| | | "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.begin_at, " + |
| | | "a.end_at, " + |
| | | "a.sign_up_begin, " + |
| | | "a.sign_up_end " + |
| | | "FROM " + |
| | | " com_act_activity a " + |
| | | " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + |
| | | " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + |
| | | "WHERE " + |
| | | " a.`status` = 1 and a.community_id=#{comActActivityVO.communityId} " + |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" + |
| | | "\tand a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) \n" + |
| | | " 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 \n" + |
| | | "AND a.`status` = 99 " + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.beginAt != null '>" + |
| | | "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} \n" + |
| | | "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " + |
| | | " </if> " + |
| | | "group by a.id\n" + |
| | | "\t\n" + |
| | | "\tunion all\n" + |
| | | "select t1.* from (\n"+ |
| | | "\t\n" + |
| | | "\tSELECT \n" + |
| | | "a.id,\n" + |
| | | "a.activity_name,\n" + |
| | | "u.`name` sponsorName,\n" + |
| | | "a.activity_addr,\n" + |
| | | "a.participant_max,\n" + |
| | | "count(if(s.is_volunteer=1,null,s.id))participant_now,\n"+ |
| | | "a.volunteer_max,\n" + |
| | | "count(if(s.is_volunteer=1,s.id,null))volunteer_now,\n"+ |
| | | "a.`status`,\n" + |
| | | "a.publish_at,\n" + |
| | | "a.begin_at,\n" + |
| | | "a.end_at,\n" + |
| | | "a.sign_up_begin,\n" + |
| | | "a.sign_up_end\n" + |
| | | "FROM\n" + |
| | | "\tcom_act_activity a \n" + |
| | | "\tLEFT JOIN sys_user u on a.sponsor_id=u.user_id\n" + |
| | | "\tLEFT JOIN com_act_act_sign s on a.id=s.activity_id\n" + |
| | | "WHERE\n" + |
| | | "\t a.`status` != 1 and a.community_id=#{comActActivityVO.communityId}\n" + |
| | | "group by a.id " + |
| | | " " + |
| | | " union all " + |
| | | "select t1.* from ( "+ |
| | | " " + |
| | | " SELECT " + |
| | | "a.id, " + |
| | | "a.activity_name, " + |
| | | "u.`name` sponsorName, " + |
| | | "a.activity_addr, " + |
| | | "a.participant_max, " + |
| | | "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.begin_at, " + |
| | | "a.end_at, " + |
| | | "a.sign_up_begin, " + |
| | | "a.sign_up_end " + |
| | | "FROM " + |
| | | " com_act_activity a " + |
| | | " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + |
| | | " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + |
| | | "WHERE " + |
| | | " a.`status` != 1 and a.community_id=#{comActActivityVO.communityId} " + |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" + |
| | | "\tand a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) \n" + |
| | | " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) " + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 '>" + |
| | | "AND a.`status` = #{comActActivityVO.status} \n" + |
| | | "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} \n" + |
| | | "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"+ |
| | | "</script>") |
| | |
| | | |
| | | @Update("update com_act_activity set `status`=4 where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") |
| | | int updateStatusToBeginAfterSingEnd(); |
| | | @Select("select GROUP_CONCAT(t.x1,',',t.x2,',',t.x3,',',t.x4) from (\n" + |
| | | "SELECT\n" + |
| | | "(select COUNT(d.id) from com_act_discuss d where d.community_id=#{communityId})x1,\n" + |
| | | "(select COUNT(w.id) from com_act_micro_wish w where w.community_id=#{communityId})x2,\n" + |
| | | "(select COUNT(p.id) from com_act_easy_photo p where p.community_id=#{communityId})x3,\n" + |
| | | "\tCOUNT( a.id ) x4\n" + |
| | | "FROM\n" + |
| | | "\tcom_pb_activity a \n" + |
| | | "WHERE\n" + |
| | | "\t a.community_id =#{communityId})t") |
| | | @Select("select GROUP_CONCAT(t.x1,',',t.x2,',',t.x3,',',t.x4) from ( " + |
| | | "SELECT " + |
| | | "(select COUNT(d.id) from com_act_discuss d where d.community_id=#{communityId})x1, " + |
| | | "(select COUNT(w.id) from com_act_micro_wish w where w.community_id=#{communityId})x2, " + |
| | | "(select COUNT(p.id) from com_act_easy_photo p where p.community_id=#{communityId})x3, " + |
| | | " COUNT( a.id ) x4 " + |
| | | "FROM " + |
| | | " com_pb_activity a " + |
| | | "WHERE " + |
| | | " a.community_id =#{communityId})t") |
| | | String selectCommunityGovernanceTrendsVO(Long communityId); |
| | | @Select("\n" + |
| | | "\tSELECT\n" + |
| | | "\t(select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id=#{communityId})discuss,\n" + |
| | | "\t(select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id=#{communityId})microWish,\n" + |
| | | "\t(select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id=#{communityId})eashPhoto,\n" + |
| | | "\t(select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id=#{communityId})pbActivity,\n" + |
| | | "\t\tCOUNT( a.id ) actActivity\n" + |
| | | "\tFROM\n" + |
| | | "\t\tcom_pb_activity a \n" + |
| | | "\tWHERE\n" + |
| | | "\t\tDATE_FORMAT( a.create_at, '%Y-%m-%d' )=DATE_FORMAT(#{date},'%Y-%m-%d') \n" + |
| | | "\t\tAND a.community_id =#{communityId}") |
| | | @Select(" " + |
| | | " SELECT " + |
| | | " (select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id=#{communityId})discuss, " + |
| | | " (select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id=#{communityId})microWish, " + |
| | | " (select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id=#{communityId})eashPhoto, " + |
| | | " (select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id=#{communityId})pbActivity, " + |
| | | " COUNT( a.id ) actActivity " + |
| | | " FROM " + |
| | | " com_pb_activity a " + |
| | | " WHERE " + |
| | | " DATE_FORMAT( a.create_at, '%Y-%m-%d' )=DATE_FORMAT(#{date},'%Y-%m-%d') " + |
| | | " AND a.community_id =#{communityId}") |
| | | CommunityActivitiesVO selectCommunityActivitiesVO(@Param("communityId") Long communityId, @Param("date")Date date); |
| | | |
| | | @Select("SELECT COUNT(id) AS currentNum," + |
| | |
| | | |
| | | @Select("SELECT cover FROM com_act_activity WHERE community_id = #{communityId} AND (status = 3 OR status = 4 OR status = 5)") |
| | | List<String> listImg(@Param("communityId")Long communityId); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " caa.id, " + |
| | | " su.`name` AS userName , " + |
| | | " su.image_url, " + |
| | | " caa.sponsor_id, " + |
| | | " caa.`status`, " + |
| | | " caa.create_at, " + |
| | | " caa.begin_at, " + |
| | | " caa.end_at, " + |
| | | " caa.sign_up_begin, " + |
| | | " caa.sign_up_end, " + |
| | | " caa.volunteer_min, " + |
| | | " caa.volunteer_max, " + |
| | | " caa.participant_min, " + |
| | | " caa.participant_max, " + |
| | | " caa.activity_name, " + |
| | | " caa.cover, " + |
| | | " caa.content, " + |
| | | " caa.activity_addr " + |
| | | "FROM " + |
| | | " com_act_activity AS caa " + |
| | | " LEFT JOIN sys_user AS su ON su.user_id = caa.sponsor_id" + |
| | | " <where> "+ |
| | | "<if test='actActivityListDTO.communityId != null '>" + |
| | | " and caa.community_id = #{actActivityListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='actActivityListDTO.startTime!=null and actActivityListDTO.startTime != ""'>" + |
| | | " AND DATE_FORMAT(caa.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{actActivityListDTO.startTime} " + |
| | | " </if> " + |
| | | "<if test='actActivityListDTO.endTime!=null and actActivityListDTO.endTime != ""'>" + |
| | | " AND DATE_FORMAT(caa.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{actActivityListDTO.endTime} " + |
| | | " </if> " + |
| | | "<if test='actActivityListDTO.type!=null'>" + |
| | | " AND caa.status = #{actActivityListDTO.status} " + |
| | | " </if> " + |
| | | " </where> "+ |
| | | "ORDER BY " + |
| | | " caa.create_at DESC " + |
| | | " </script>") |
| | | IPage<ActActivityListVO> getScreenActActivityList(Page page, @Param("actActivityListDTO") ScreenActActivityListDTO actActivityListDTO); |
| | | |
| | | @Select("SELECT " + |
| | | " count( caas.id ) AS volunteerCount,( " + |
| | | " SELECT " + |
| | | " count( caas1.id ) " + |
| | | " FROM " + |
| | | " com_act_act_sign AS caas1 " + |
| | | " LEFT JOIN sys_user AS su1 ON su1.user_id = caas1.user_id " + |
| | | " WHERE " + |
| | | " su1.is_volunteer = 0 " + |
| | | " AND caas1.activity_id = #{activityId} " + |
| | | " ) AS participantCount " + |
| | | "FROM " + |
| | | " com_act_act_sign AS caas " + |
| | | " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id " + |
| | | "WHERE " + |
| | | " su.is_volunteer = 1 " + |
| | | " AND activity_id = #{activityId} ") |
| | | ActActivityListVO getScreenActActivityPeopleCount(@Param("activityId") Long activityId); |
| | | } |
| | |
| | | "<if test='discussListDTO.communityId != null '>" + |
| | | " and cad.community_id = #{discussListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='discussListDTO.startTime != null '>" + |
| | | " and cad.community_id = #{discussListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='discussListDTO.startTime!=null and discussListDTO.startTime != ""'>" + |
| | | " AND DATE_FORMAT(cad.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{discussListDTO.startTime} " + |
| | | " </if> " + |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | public interface ComActMicroWishDAO extends BaseMapper<ComActMicroWishDO> { |
| | | |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "w.id,\n" + |
| | | "u.name sponsor_name,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "u.image_url ,\n" + |
| | | "w.sponsor_phone,\n" + |
| | | "w.wish_name,\n" + |
| | | "w.`status`,\n" + |
| | | "w.`feedback_at`,\n" + |
| | | "w.`examine_at`,\n" + |
| | | "w.`distribution_at`,\n" + |
| | | "w.`evaluate_at`,\n" + |
| | | "w.`photo_path_list`,\n" + |
| | | "count(wu.id)star_num,\n" + |
| | | "w.`detail`,\n" + |
| | | "w.form,\n" + |
| | | "w.reject_reason,\n" + |
| | | "su.`name` responsible_name,\n" + |
| | | "w.score,\n" + |
| | | "w.create_at \n" + |
| | | "FROM\n" + |
| | | "com_act_micro_wish w\n" + |
| | | "SELECT " + |
| | | "w.id, " + |
| | | "u.name sponsor_name, " + |
| | | "u.nick_name userNickName, " + |
| | | "u.image_url , " + |
| | | "w.sponsor_phone, " + |
| | | "w.wish_name, " + |
| | | "w.`status`, " + |
| | | "w.`feedback_at`, " + |
| | | "w.`examine_at`, " + |
| | | "w.`distribution_at`, " + |
| | | "w.`evaluate_at`, " + |
| | | "w.`photo_path_list`, " + |
| | | "count(wu.id)star_num, " + |
| | | "w.`detail`, " + |
| | | "w.form, " + |
| | | "w.reject_reason, " + |
| | | "su.`name` responsible_name, " + |
| | | "w.score, " + |
| | | "w.create_at " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | | "left join com_act_micro_wish_user wu on w.id=wu.micro_wish_id "+ |
| | | "JOIN sys_user u ON w.sponsor_id = u.user_id \n" + |
| | | "JOIN sys_user u ON w.sponsor_id = u.user_id " + |
| | | "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != ""'>" + |
| | | "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%') \n" + |
| | | "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%') " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.responsibleName == null or comActMicroWishVO.responsibleName.trim() == ""'>" + |
| | | "LEFT JOIN sys_user su ON w.responsible_id = su.user_id \n" + |
| | | "LEFT JOIN sys_user su ON w.responsible_id = su.user_id " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.responsibleName != null and comActMicroWishVO.responsibleName.trim() != ""'>" + |
| | | " JOIN sys_user su ON w.responsible_id = su.user_id \n" + |
| | | "AND su.`name` like concat(#{comActMicroWishVO.responsibleName},'%') \n" + |
| | | " JOIN sys_user su ON w.responsible_id = su.user_id " + |
| | | "AND su.`name` like concat(#{comActMicroWishVO.responsibleName},'%') " + |
| | | " </if> " + |
| | | " <where>" + |
| | | "<if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>" + |
| | | " and w.community_id=#{comActMicroWishVO.communityId} \n" + |
| | | " and w.community_id=#{comActMicroWishVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone.trim() != ""'>" + |
| | | "AND w.sponsor_phone like concat(#{comActMicroWishVO.sponsorPhone},'%') \n" + |
| | | "AND w.sponsor_phone like concat(#{comActMicroWishVO.sponsorPhone},'%') " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.status!=3 and comActMicroWishVO.isPageMyWish==null'>" + |
| | | "AND w.`status` = #{comActMicroWishVO.status} \n" + |
| | | "AND w.`status` = #{comActMicroWishVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status == 3 and comActMicroWishVO.isPageMyWish==null'>" + |
| | | "AND ( w.`status` = 3 or w.`status` = 5 )\n" + |
| | | "AND ( w.`status` = 3 or w.`status` = 5 ) " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.isPageMyWish!=null and comActMicroWishVO.status==1'>" + |
| | | "AND w.`status` =1 \n" + |
| | | "AND w.`status` =1 " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status==3 and comActMicroWishVO.isPageMyWish!=null '>" + |
| | | "AND w.`status` in (2, 3) \n" + |
| | | "AND w.`status` in (2, 3) " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.createBegin != null '>" + |
| | | "AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} \n" + |
| | | "AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} " + |
| | | "AND #{comActMicroWishVO.createEnd}" + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'>" + |
| | | "AND w.status in (3, 5, 6) \n" + |
| | | "AND w.status in (3, 5, 6) " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.userId != null and comActMicroWishVO.userId != 0'>" + |
| | | "AND w.sponsor_id =#{comActMicroWishVO.userId} \n" + |
| | | "AND w.sponsor_id =#{comActMicroWishVO.userId} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.backUserId != null and comActMicroWishVO.backUserId != 0 and comActMicroWishVO.status==3 '>" + |
| | | "AND w.responsible_id =#{comActMicroWishVO.backUserId} \n" + |
| | | "AND w.responsible_id =#{comActMicroWishVO.backUserId} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.backUserId != null and comActMicroWishVO.backUserId != 0 and comActMicroWishVO.status==0 '>" + |
| | | "and (w.status in(1,2,4,5,6) or (w.status=3 and w.responsible_id =#{comActMicroWishVO.backUserId}))\n" + |
| | | "and (w.status in(1,2,4,5,6) or (w.status=3 and w.responsible_id =#{comActMicroWishVO.backUserId})) " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " group by w.id \n"+ |
| | | " group by w.id "+ |
| | | "ORDER BY w.create_at desc "+ |
| | | "</script>") |
| | | IPage<ComActMicroWishVO> pageMicroWish(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); |
| | | @Select("SELECT\n" + |
| | | "w.id,\n" + |
| | | "u.name sponsor_name,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "w.create_at,\n" + |
| | | "u.image_url,\n" + |
| | | "w.sponsor_phone,\n" + |
| | | "w.`status`,\n" + |
| | | "w.`sponsor_id`,\n" + |
| | | "w.wish_name,\n" + |
| | | "count(wu.id)starNum,\n" + |
| | | "w.detail,\n" + |
| | | "w.photo_path_list,\n" + |
| | | "su.`name` responsible_name,\n" + |
| | | "w.form,\n" + |
| | | "w.reject_reason,\n" + |
| | | "w.examine_at,\n" + |
| | | "w.finish,\n" + |
| | | "w.finish_photo_path_list,\n" + |
| | | "w.finish_at,\n" + |
| | | "w.score,\n" + |
| | | "w.feedback,\n" + |
| | | "w.feedback_at,\n" + |
| | | "w.feedback_photo_path_list,\n" + |
| | | "w.distribution_at,\n" + |
| | | "w.evaluate_at,\n" + |
| | | "w.evaluate \n" + |
| | | "FROM\n" + |
| | | "com_act_micro_wish w\n" + |
| | | "JOIN sys_user u ON w.sponsor_id = u.user_id\n" + |
| | | "LEFT JOIN sys_user su ON w.responsible_id = su.user_id \n" + |
| | | "LEFT JOIN com_act_micro_wish_user wu ON w.id = wu.micro_wish_id \n" + |
| | | "WHERE\n" + |
| | | @Select("SELECT " + |
| | | "w.id, " + |
| | | "u.name sponsor_name, " + |
| | | "u.nick_name userNickName, " + |
| | | "w.create_at, " + |
| | | "u.image_url, " + |
| | | "w.sponsor_phone, " + |
| | | "w.`status`, " + |
| | | "w.`sponsor_id`, " + |
| | | "w.wish_name, " + |
| | | "count(wu.id)starNum, " + |
| | | "w.detail, " + |
| | | "w.photo_path_list, " + |
| | | "su.`name` responsible_name, " + |
| | | "w.form, " + |
| | | "w.reject_reason, " + |
| | | "w.examine_at, " + |
| | | "w.finish, " + |
| | | "w.finish_photo_path_list, " + |
| | | "w.finish_at, " + |
| | | "w.score, " + |
| | | "w.feedback, " + |
| | | "w.feedback_at, " + |
| | | "w.feedback_photo_path_list, " + |
| | | "w.distribution_at, " + |
| | | "w.evaluate_at, " + |
| | | "w.evaluate " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | | "JOIN sys_user u ON w.sponsor_id = u.user_id " + |
| | | "LEFT JOIN sys_user su ON w.responsible_id = su.user_id " + |
| | | "LEFT JOIN com_act_micro_wish_user wu ON w.id = wu.micro_wish_id " + |
| | | "WHERE " + |
| | | "w.id =#{id}"+ |
| | | " group by w.id " + |
| | | "order by w.create_at desc" |
| | | ) |
| | | ComActMicroWishVO detailMicroWish(Long id); |
| | | @Select("SELECT\n" + |
| | | "'2' type\n" + |
| | | "FROM\n" + |
| | | "com_act_micro_wish w \n" + |
| | | "WHERE\n" + |
| | | "w.community_id = #{communityId} \n" + |
| | | "AND w.`status` = 1\n" + |
| | | "\n" + |
| | | "union all \n" + |
| | | "\n" + |
| | | "SELECT\n" + |
| | | "'2' type\n" + |
| | | "FROM\n" + |
| | | "\tcom_act_micro_wish w \n" + |
| | | "WHERE\n" + |
| | | "\tw.community_id = #{communityId} \n" + |
| | | "\tAND w.`status` = 3 \n" + |
| | | "\tAND w.form = 1 \n" + |
| | | "\tAND w.responsible_id = #{userId} \n" + |
| | | "GROUP BY\n" + |
| | | "\tw.community_id\n") |
| | | @Select("SELECT " + |
| | | "'2' type " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | | "WHERE " + |
| | | "w.community_id = #{communityId} " + |
| | | "AND w.`status` = 1 " + |
| | | " " + |
| | | "union all " + |
| | | " " + |
| | | "SELECT " + |
| | | "'2' type " + |
| | | "FROM " + |
| | | " com_act_micro_wish w " + |
| | | "WHERE " + |
| | | " w.community_id = #{communityId} " + |
| | | " AND w.`status` = 3 " + |
| | | " AND w.form = 1 " + |
| | | " AND w.responsible_id = #{userId} " + |
| | | "GROUP BY " + |
| | | " w.community_id ") |
| | | List<TodoEventsVO> selectNeedToDo(@Param("communityId") Long communityId, @Param("userId") Long userId); |
| | | |
| | | @Update("update com_act_micro_wish set `status`=6, evaluate_at=now() where `status`=5 and TIMESTAMPDIFF(HOUR, feedback_at, SYSDATE())>=72") |
| | |
| | | |
| | | @Select("SELECT photo_path_list FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) ORDER BY create_at DESC limit #{pageSize}") |
| | | List<String> getAllImgs(@Param("communityId") Long communityId,@Param("pageSize") Integer pageSize); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " camw.id, " + |
| | | " su.`name` AS userName, " + |
| | | " camw.sponsor_id, " + |
| | | " su.image_url, " + |
| | | " su.phone, " + |
| | | " camw.`status`, " + |
| | | " camw.create_at, " + |
| | | " camw.wish_name, " + |
| | | " camw.finish, " + |
| | | " camw.finish_photo_path_list, " + |
| | | " camw.form, " + |
| | | " camw.evaluate_at, " + |
| | | " su1.name as responsibleName, " + |
| | | " camw.score, " + |
| | | " camw.distribution_at, " + |
| | | " camw.detail, " + |
| | | " camw.photo_path_list " + |
| | | "FROM " + |
| | | " com_act_micro_wish AS camw " + |
| | | " LEFT JOIN sys_user AS su ON su.user_id = camw.sponsor_id " + |
| | | " LEFT JOIN sys_user AS su1 ON su1.user_id = camw.responsible_id " + |
| | | " <where> " + |
| | | "<if test='microListDTO.status != null'>" + |
| | | "AND camw.`status` =#{microListDTO.status} " + |
| | | " </if> " + |
| | | "<if test='microListDTO.communityId != null'>" + |
| | | "AND camw.community_id =#{microListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='microListDTO.startTime!=null and microListDTO.startTime != ""'>" + |
| | | " AND DATE_FORMAT(camw.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{microListDTO.startTime} " + |
| | | " </if> " + |
| | | "<if test='microListDTO.endTime!=null and microListDTO.endTime != ""'>" + |
| | | " AND DATE_FORMAT(camw.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{microListDTO.endTime} " + |
| | | " </if> " + |
| | | " </where>" + |
| | | "ORDER BY camw.create_at desc "+ |
| | | " </script>") |
| | | IPage<MicroListVO> getScreenMicroList(Page page, @Param("microListDTO") ScreenMicroListDTO microListDTO); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | |
| | | */ |
| | | R indexDataCommunityBackstageEchart(Long communityId); |
| | | |
| | | R getScreenActActivityList(ScreenActActivityListDTO actActivityListDTO); |
| | | |
| | | R getActActivityPeopleList(ScreenActActivityPeopleListDTO activityPeopleListDTO); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | |
| | | * @return |
| | | */ |
| | | R timedTaskActMicroWishAll(); |
| | | |
| | | R getScreenMicroList(ScreenMicroListDTO microListDTO); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.ExcelElderAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.vos.IndexDataVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.screen.work.ActActivityListVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | |
| | | return R.ok(indexDataVO); |
| | | } |
| | | |
| | | @Override |
| | | public R getScreenActActivityList(ScreenActActivityListDTO actActivityListDTO){ |
| | | IPage<ActActivityListVO> actActivityListVOIPage = comActActivityDAO.getScreenActActivityList( |
| | | new Page(actActivityListDTO.getPageNum(),actActivityListDTO.getPageSize()),actActivityListDTO); |
| | | if(!actActivityListVOIPage.getRecords().isEmpty()){ |
| | | actActivityListVOIPage.getRecords().forEach(actActivityListVO -> { |
| | | ActActivityListVO activityListVO = comActActivityDAO.getScreenActActivityPeopleCount(actActivityListVO.getId()); |
| | | if(activityListVO != null){ |
| | | actActivityListVO.setParticipantCount(activityListVO.getParticipantCount()); |
| | | actActivityListVO.setVolunteerCount(activityListVO.getVolunteerCount()); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(actActivityListVOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public R getActActivityPeopleList(ScreenActActivityPeopleListDTO activityPeopleListDTO){ |
| | | return R.ok(comActActSignDAO.getActActivityPeopleList(new Page(activityPeopleListDTO.getPageNum(),activityPeopleListDTO.getPageSize()),activityPeopleListDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 获取最近七天的时间 |
| | | * @return |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishDAO; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishUserDAO; |
| | |
| | | log.info("定时任务--修改待自动确认微心愿状态数量【{}】",num); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getScreenMicroList(ScreenMicroListDTO microListDTO){ |
| | | IPage<MicroListVO> microListVOIPage = comActMicroWishDAO.getScreenMicroList(new Page(microListDTO.getPageNum(),microListDTO.getPageSize()),microListDTO); |
| | | if(!microListVOIPage.getRecords().isEmpty()){ |
| | | microListVOIPage.getRecords().forEach(microListVO -> { |
| | | Integer count = comActMicroWishUserDAO.selectCount(new QueryWrapper<ComActMicroWishUserDO>().lambda() |
| | | .eq(ComActMicroWishUserDO::getMicroWishId,microListVO.getId())); |
| | | microListVO.setStarNum(count); |
| | | }); |
| | | } |
| | | return R.ok(microListVOIPage); |
| | | } |
| | | } |