| | |
| | | private Long pageNum = 1L; |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | /** |
| | | * 报名状态 0 已取消 1已报名 |
| | | */ |
| | | @ApiModelProperty("报名状态 0 已取消 1已报名") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 取消原因 |
| | | */ |
| | | @ApiModelProperty("取消原因") |
| | | private String reason; |
| | | |
| | | /** |
| | | * 参与次数 |
| | | */ |
| | | @ApiModelProperty("参与次数") |
| | | private Integer times; |
| | | |
| | | /** |
| | | * 获取奖励 |
| | | */ |
| | | @ApiModelProperty("获取奖励") |
| | | private Integer award; |
| | | |
| | | /** |
| | | * 活动限制次数 |
| | | */ |
| | | @ApiModelProperty("活动限制次数") |
| | | private Integer limit; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "签到位置") |
| | | private String position; |
| | | |
| | | @ApiModelProperty(value = "签到次数") |
| | | private Integer times; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | |
| | | @ExcelProperty(value = "人群标签", index = 3) |
| | | private String tags; |
| | | |
| | | @ExcelProperty(value = "报名状态",index = 5) |
| | | private Integer status; |
| | | |
| | | @ExcelProperty(value = "取消原因", index = 6) |
| | | private String reason; |
| | | |
| | | @ExcelProperty(value = "参与情况", index = 7) |
| | | private String condition; |
| | | |
| | | @ExcelProperty(value = "获得奖励", index = 7) |
| | | private String award; |
| | | @ExcelIgnore |
| | | private Integer times; |
| | | @ExcelIgnore |
| | | private Integer limit; |
| | | |
| | | public void setCondition(String condition) { |
| | | if(this.times!=null&&this.limit!=null){ |
| | | this.condition = "("+times+"/"+limit+")"; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | // 居民 党员 志愿者 1 2 3 |
| | | @Select("<script> " + "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, " + "u.tags, " + "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 = #{activitySignVO.activityId} " |
| | | + "u.phone, " + "u.tags, " + "a.create_at, " + "a.is_volunteer, a.status , a.times ,a.reason,a.award,t.limit " + "FROM " + "com_act_act_sign a " |
| | | + "JOIN sys_user u ON a.user_id = u.user_id left join com_act_activity t on a.activity_id = t.id" + "WHERE " + "a.activity_id = #{activitySignVO.activityId} " |
| | | + "<if test='activitySignVO.phone != null and activitySignVO.phone != ""'>" |
| | | + "AND u.phone = #{activitySignVO.phone} " + " </if> " |
| | | + "<if test='activitySignVO.status != null'>" |
| | | + "AND a.status = #{activitySignVO.status} " + " </if> " |
| | | + "<if test='activitySignVO.tags != null and activitySignVO.tags != ""'>" |
| | | + "AND u.tags like concat('%',#{activitySignVO.tags},'%') " + " </if> " |
| | | + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>" |
| | |
| | | |
| | | @Select("<script> " + "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, " + "u.openid, " + "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 = #{activitySignVO.activityId} " |
| | | + "u.phone, " + "u.tags, " + "a.create_at, " + "a.is_volunteer, a.status , a.times ,a.reason,a.award,t.limit " + "FROM " + "com_act_act_sign a " |
| | | + "JOIN sys_user u ON a.user_id = u.user_id left join com_act_activity t on a.activity_id = t.id" + "WHERE " + "a.activity_id = #{activitySignVO.activityId} " |
| | | + "<if test='activitySignVO.phone != null and activitySignVO.phone != ""'>" |
| | | + "AND u.phone = #{activitySignVO.phone} " + " </if> " |
| | | + "<if test='activitySignVO.status != null'>" |
| | | + "AND a.status = #{activitySignVO.status} " + " </if> " |
| | | + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>" |
| | | + "AND u.`name` = #{activitySignVO.name} " + " </if> " |
| | | + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'>" |
| | |
| | | * 是否是志愿者 0 不是 1 是 |
| | | */ |
| | | private Integer isVolunteer; |
| | | |
| | | /** |
| | | * 报名状态 0 已取消 1已报名 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 取消原因 |
| | | */ |
| | | private String reason; |
| | | |
| | | /** |
| | | * 参与次数 |
| | | */ |
| | | private Integer times; |
| | | |
| | | /** |
| | | * 获取奖励 |
| | | */ |
| | | private Integer award; |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComActActivityCode; |
| | | import com.panzhihua.service_community.dao.ComActActivityCodeDao; |
| | | import com.panzhihua.service_community.service.ComActActivityCodeService; |
| | |
| | | @Service |
| | | public class ComActActivityCodeServiceImpl extends ServiceImpl<ComActActivityCodeDao, ComActActivityCode> implements ComActActivityCodeService { |
| | | |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.dao.*; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.ComActActPictureDAO; |
| | | import com.panzhihua.service_community.dao.ComActActRegistDAO; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActActEvaluateDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActPictureDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActRegistDO; |
| | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | @Resource |
| | | private ComActActPictureDAO comActActPictureDAO; |
| | | @Resource |
| | | private ComActActivityCodeDao comActActivityCodeDao; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | int signCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId)); |
| | | |
| | | if (signCount > 0) { |
| | | if (signCount >= comActActivityDO.getLimit()) { |
| | | return R.fail("请勿重复签到"); |
| | | } |
| | | |
| | |
| | | caar.id, |
| | | caar.activity_id, |
| | | caar.create_at, |
| | | caar.positon, |
| | | caar.times, |
| | | caar.award, |
| | | su.user_id, |
| | | su.`name`, |
| | | su.nick_name, |
| | |
| | | <select id="getRegistLists" resultType="com.panzhihua.common.model.vos.community.ComActActRegistExcelVO"> |
| | | SELECT |
| | | caar.create_at, |
| | | caar.positon, |
| | | caar.times, |
| | | caar.award, |
| | | su.`name`, |
| | | su.phone, |
| | | su.tags, |
| | |
| | | <select id="getNoRegistLists" resultType="com.panzhihua.common.model.vos.community.ComActActRegistExcelVO"> |
| | | SELECT |
| | | caas.create_at, |
| | | caar.positon, |
| | | caar.times, |
| | | caar.award, |
| | | su.`name` |
| | | su.phone, |
| | | su.tags, |
| | |
| | | <select id="getSignLists" resultType="com.panzhihua.common.model.vos.community.ComActActSignExcelVO"> |
| | | SELECT |
| | | caas.create_at, |
| | | caas.times, |
| | | cass.status, |
| | | cass.reason, |
| | | cass.award, |
| | | t.limit, |
| | | su.`name`, |
| | | su.phone, |
| | | su.tags, |
| | |
| | | FROM |
| | | com_act_act_sign caas |
| | | LEFT JOIN sys_user su ON caas.user_id = su.user_id |
| | | left join com_act_activity t on cass.activity_id = t.id |
| | | where caas.activity_id = #{activitySignVO.activityId} |
| | | <if test="activitySignVO.phone != null and activitySignVO.phone !=''"> |
| | | AND su.phone = #{activitySignVO.phone} |
| | | </if> |
| | | <if test='activitySignVO.status != null'> |
| | | AND caas.status = #{activitySignVO.status} |
| | | </if> |
| | | <if test="activitySignVO.name != null and activitySignVO.name !=''"> |
| | | AND su.`name` = #{activitySignVO.name} |
| | | </if> |