| | |
| | | private Integer type; |
| | | @ApiModelProperty(value = "认证时间(月份)", example = "1") |
| | | private Integer month; |
| | | @ApiModelProperty(value = "认证时间(年份)", example = "2021") |
| | | private Integer year; |
| | | |
| | | @ApiModelProperty(value = "排序列", example = "create_at", hidden = true) |
| | | public String getSortColumns() { |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("随手拍条数") |
| | | private Integer count; |
| | | } |
| | |
| | | "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 " + |
| | | "left 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},'%') " + |
| | | " </if> " + |
| | |
| | | " 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") |
| | | @Update("update com_act_micro_wish set `status`=6, evaluate_at=now() where `status`=5 and TIMESTAMPDIFF(HOUR, finish_at, SYSDATE())>=72") |
| | | int updateStatusAutoConfirm(); |
| | | |
| | | @Select("select id from com_act_micro_wish where `status`=5 and TIMESTAMPDIFF(HOUR, feedback_at, SYSDATE())>=72 ") |
| | | List<Long> getWishAutoConfirmIds(); |
| | | |
| | | @Select("SELECT COUNT(id) AS completedNum," + |
| | | "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5)) AS willNum ," + |
| | | "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " + |
| | |
| | | |
| | | @Override |
| | | public R timedTaskActMicroWishAll() { |
| | | |
| | | //微心愿自动确认前需要添加操作记录 |
| | | List<Long> wishIds = comActMicroWishDAO.getWishAutoConfirmIds(); |
| | | wishIds.forEach(wishId -> { |
| | | //需要添加操作记录 |
| | | }); |
| | | int num=comActMicroWishDAO.updateStatusAutoConfirm(); |
| | | log.info("定时任务--修改待自动确认微心愿状态数量【{}】",num); |
| | | return R.ok(); |
| | |
| | | canct.`name`, |
| | | canct.`status`, |
| | | canct.create_at, |
| | | ( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count`, |
| | | su.`name` as createBy |
| | | FROM |
| | | com_act_neighbor_circle_topic AS canct |
| | |
| | | </select> |
| | | |
| | | <select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO"> |
| | | select id,`name`,hot_num,`count` from com_act_neighbor_circle_topic where `status` = 1 and community_id = #{communityId} |
| | | SELECT canct.id, canct.`name`, canct.hot_num,( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count` |
| | | from com_act_neighbor_circle_topic as canct where canct.`status` = 1 and canct.community_id = #{communityId} |
| | | <if test="isZero != null and isZero == 1"> |
| | | and `count` > 0 |
| | | </if> |
| | | <if test="name != null and name != """> |
| | | and `name` like concat('%',#{name},'%') |
| | | and canct.`name` like concat('%',#{name},'%') |
| | | </if> |
| | | order by hot_num desc |
| | | order by `count` desc |
| | | </select> |
| | | |
| | | <update id="addHotNum"> |
| | |
| | | order by cea.CREATE_AT desc |
| | | </select> |
| | | |
| | | <select id="selectCommunityEldersRecordByPage" parameterType="com.panzhihua.common.model.dtos.community.PageEldersAuthRecordDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComEldersAuthRecordForCommunityVO"> |
| | | SELECT e.ID,e.CREATE_BY,e.CREATE_AT, e.UPDATE_BY, e.UPDATE_AT, e.ID_CARD, e.AUTH_USER_NAME, e.VIDEO_URL, |
| | | e.SUMIT_USER_ID, e.DOMICILE, e.STATUS, e.BIRTH_DAY, e.type, e.age, e.verification_result, u.name as sumitUserName, u.phone as sumitUserAccount |
| | | FROM ( SELECT MAX(id) AS id , DATE_FORMAT(create_at, '%Y-%m') AS yearMonth |
| | | FROM com_elders_auth GROUP BY id_card, yearMonth ) t |
| | | left join com_elders_auth e on t.id = e.id LEFT JOIN sys_user u ON e.SUMIT_USER_ID = u.user_id |
| | | <where> |
| | | <if test='pageEldersAuthRecordDTO.name!=null'> |
| | | AND e.AUTH_USER_NAME like concat('%', #{pageEldersAuthRecordDTO.name}, '%') |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.idCard!=null and pageEldersAuthRecordDTO.idCard!=""'> |
| | | AND e.ID_CARD = #{pageEldersAuthRecordDTO.idCard} |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.type!=null'> |
| | | AND e.type = #{pageEldersAuthRecordDTO.type} |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.month!=null'> |
| | | AND month(e.CREATE_AT) = #{pageEldersAuthRecordDTO.month} |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.year!=null'> |
| | | AND year(e.CREATE_AT) = #{pageEldersAuthRecordDTO.year} |
| | | </if> |
| | | </where> |
| | | <if test='pageEldersAuthRecordDTO.sortColumns!=null'> |
| | | ORDER BY e.${pageEldersAuthRecordDTO.sortColumns} ${pageEldersAuthRecordDTO.sortType} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |