| | |
| | | @GetMapping("agreement") |
| | | @ApiImplicitParam(name = "type", value = "1居民端app协议 2网格员端app协议 3商家端app协议 4隐私政策") |
| | | public R agreement(@RequestParam("type") Integer type) { |
| | | return userService.agreement(type); |
| | | return userService.agreement(type,this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation("发布留言") |
| | |
| | | package com.panzhihua.common.model.vos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | |
| | | package com.panzhihua.common.model.vos.community.easyPhoto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @Data |
| | | @ApiModel |
| | | public class BannerVO { |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | @ApiModelProperty("1社区动态、2居民活动、志愿者活动、3党员活动、4问卷调查、5党建动态、6预约登记、7随手拍活动") |
| | | private Integer type; |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @Data |
| | | @ApiModel |
| | | public class ComPropertyRepairVO { |
| | | private Integer id; |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 报修内容 |
| | |
| | | * @return 协议内容 |
| | | */ |
| | | @PostMapping("agreement") |
| | | R agreement(@RequestParam("type") Integer type); |
| | | R agreement(@RequestParam("type") Integer type,@RequestParam("appId")String appId); |
| | | |
| | | /** |
| | | * 维护用户最后登录时间 |
| | |
| | | * @return |
| | | */ |
| | | int selectVotedPersonNum(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 批量插入投票记录 |
| | | * @param comActDiscussOptionUserDOList |
| | | * @return |
| | | */ |
| | | int batchInsert(@Param("comActDiscussOptionUserDOList") List<ComActDiscussOptionUserDO> comActDiscussOptionUserDOList); |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * @since 2022-03-01 13:44:23 |
| | | */ |
| | | @Data |
| | | @TableName("com_act_easy_photo_evaluate") |
| | | public class ComActEasyPhotoEvaluate implements Serializable { |
| | | private static final long serialVersionUID = -10187231854376444L; |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | |
| | | comActDiscussOptionUserDO.setUserId(userId); |
| | | comActDiscussOptionUserDO.setDiscussOptionId(optionId); |
| | | comActDiscussOptionUserDO.setDiscussId(discussId); |
| | | comActDiscussOptionUserDOList.add(comActDiscussOptionUserDO); |
| | | comActDiscussOptionUserDAO.insert(comActDiscussOptionUserDO); |
| | | }); |
| | | int result = comActDiscussOptionUserDAO.batchInsert(comActDiscussOptionUserDOList); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | comActDynVO.setReadNum(count); |
| | | if (nonNull(category) && !category.equals(3)) { |
| | | ComActDO comActDO = comActDAO.selectById(comActDynDO.getCommunityId()); |
| | | comActDynVO.setCommunityName(comActDO.getName()); |
| | | if(comActDO!=null){ |
| | | comActDynVO.setCommunityName(comActDO.getName()); |
| | | } |
| | | } |
| | | return R.ok(comActDynVO); |
| | | } |
| | |
| | | SELECT t.* FROM `com_act_activity` t left join com_act_act_regist t1 on t.id = t1.activity_id left join sys_user t2 on t1.user_id = t2.user_id |
| | | WHERE t1.end_time is not null and t.community_id = #{communityId} and t.type = 3 and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by t.id |
| | | </select> |
| | | |
| | | <select id="pageProjectActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT |
| | | a.id, |
| | | a.activity_name, |
| | | u.`name` sponsorName, |
| | | a.activity_addr, |
| | | a.aattend_people, |
| | | a.`status`, |
| | | a.is_qr_code, |
| | | 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, |
| | | a.type, |
| | | a.party_member_max |
| | | 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 |
| | | LEFT JOIN com_act ca ON a.community_id = ca.community_id |
| | | JOIN (SELECT * FROM com_act_social_project WHERE (street_id = #{comActActivityVO.streetId} OR community_id = #{comActActivityVO.communityId}) AND `status` =3) t ON a.project_id = t.id |
| | | GROUP BY a.id ORDER BY a.status = 99 desc,a.publish_at DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, discuss_option_id, user_id, create_at, discuss_id |
| | | </sql> |
| | | <insert id="batchInsert" parameterType="java.util.List"> |
| | | INSERT INTO `com_act_discuss_option_user`(discuss_option_id,user_id,create_at,discuss_id) |
| | | VALUES |
| | | <foreach collection="comActDiscussOptionUserDOList" item="item" index="index" separator="," > |
| | | (#{item.discussOptionId}, #{item.userId}, now(), #{item.discussId}) |
| | | </foreach> |
| | | </insert> |
| | | <select id="selectVotedVotesInToday" resultType="java.lang.Integer"> |
| | | SELECT COUNT(1) FROM `com_act_discuss_option_user` |
| | | WHERE discuss_id = #{discussId} AND user_id = #{userId} AND DATE(create_at) >= DATE(now()) |
| | |
| | | * @return 协议内容 |
| | | */ |
| | | @PostMapping("agreement") |
| | | public R agreement(@RequestParam("type") Integer type) { |
| | | return userService.agreement(type); |
| | | public R agreement(@RequestParam("type") Integer type,@RequestParam("appId")String appId) { |
| | | return userService.agreement(type,appId); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * 角色id |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long roleId; |
| | | |
| | | /** |
| | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | * 1居民端app协议 2网格员端app协议 3商家端app协议 4隐私政策 |
| | | * @return 协议内容 |
| | | */ |
| | | R agreement(Integer type); |
| | | R agreement(Integer type,String appId); |
| | | |
| | | /** |
| | | * 维护用户最后登录时间 |
| | |
| | | * @return 协议内容 |
| | | */ |
| | | @Override |
| | | public R agreement(Integer type) { |
| | | public R agreement(Integer type,String appId) { |
| | | SysUserAgreementDO sysUserAgreementDO = sysUserAgreementDAO |
| | | .selectOne(new QueryWrapper<SysUserAgreementDO>().lambda().eq(SysUserAgreementDO::getType, type)); |
| | | .selectOne(new QueryWrapper<SysUserAgreementDO>().lambda().eq(SysUserAgreementDO::getType, type).eq(SysUserAgreementDO::getAppId,appId)); |
| | | if (ObjectUtils.isEmpty(sysUserAgreementDO)) { |
| | | return R.fail("协议不存在"); |
| | | } |