From 78d1c9ee9b0c49f77c29d0535cb93c6d62c42f3a Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期四, 11 十一月 2021 13:58:25 +0800 Subject: [PATCH] 1111修改提交 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java | 61 +++++++++++++++++++++++------- 1 files changed, 47 insertions(+), 14 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java index 8b2cb6c..f023125 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java @@ -7,6 +7,7 @@ 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.model.vos.user.SysUserVO; import com.panzhihua.service_community.model.dos.ComActMicroWishDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -43,22 +44,24 @@ "w.`detail`, " + "w.form, " + "w.reject_reason, " + - "su.`name` responsible_name, " + + "su1.`name` responsible_name, " + "w.score, " + + "w.img_width, " + + "w.finish_at, " + + "w.aim_num, " + + "w.img_height, " + + "w.handle_id, " + "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 " + - "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != ""'>" + - "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%') " + - " </if> " + + "left JOIN sys_user u ON w.sponsor_id = u.user_id " + "<if test='comActMicroWishVO.responsibleName == null or comActMicroWishVO.responsibleName.trim() == ""'>" + - "LEFT JOIN sys_user su ON w.responsible_id = su.user_id " + + "LEFT JOIN sys_user su1 ON w.responsible_id = su1.user_id " + " </if> " + "<if test='comActMicroWishVO.responsibleName != null and comActMicroWishVO.responsibleName.trim() != ""'>" + - " JOIN sys_user su ON w.responsible_id = su.user_id " + - "AND su.`name` like concat(#{comActMicroWishVO.responsibleName},'%') " + + " JOIN sys_user su1 ON w.responsible_id = su1.user_id " + + "AND su1.`name` like concat(#{comActMicroWishVO.responsibleName},'%') " + " </if> " + " <where>" + "<if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>" + @@ -71,7 +74,7 @@ "AND w.`status` = #{comActMicroWishVO.status} " + " </if> " + "<if test='comActMicroWishVO.status == 3 and comActMicroWishVO.isPageMyWish==null'>" + - "AND ( w.`status` = 3 or w.`status` = 5 ) " + + "AND w.`status` in (2,3) " + " </if> " + "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.isPageMyWish!=null and comActMicroWishVO.status==1'>" + "AND w.`status` =1 " + @@ -83,7 +86,7 @@ "AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} " + "AND #{comActMicroWishVO.createEnd}" + " </if> " + - "<if test='comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'>" + + "<if test='comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0 and comActMicroWishVO.status != null and comActMicroWishVO.status != 7'>" + "AND w.status in (3, 5, 6) " + " </if> " + "<if test='comActMicroWishVO.userId != null and comActMicroWishVO.userId != 0'>" + @@ -95,16 +98,29 @@ "<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})) " + " </if> " + + "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != ""'>" + + "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%') " + + " </if> " + " </where>" + " group by w.id "+ "ORDER BY w.create_at desc "+ "</script>") IPage<ComActMicroWishVO> pageMicroWish(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); + + /** + * 社区后台分页查询微心愿 + * @param comActMicroWishVO 请求参数 + * @return 微心愿列表 + */ + IPage<ComActMicroWishVO> pageMicroWishAdmin(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); + + IPage<ComActMicroWishVO> pageMicroWishApplets(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); @Select("SELECT " + "w.id, " + "u.name sponsor_name, " + "u.nick_name userNickName, " + "w.create_at, " + + "w.aim_num, " + "u.image_url, " + "w.sponsor_phone, " + "w.`status`, " + @@ -116,6 +132,7 @@ "su.`name` responsible_name, " + "w.form, " + "w.reject_reason, " + + "w.community_id, " + "w.examine_at, " + "w.finish, " + "w.finish_photo_path_list, " + @@ -126,11 +143,14 @@ "w.feedback_photo_path_list, " + "w.distribution_at, " + "w.evaluate_at, " + + "w.img_width, " + + "w.img_height, " + + "w.handle_id, " + "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 sys_user u ON w.sponsor_id = u.user_id " + + "LEFT JOIN com_pb_service_team su ON w.responsible_id = su.id " + "LEFT JOIN com_act_micro_wish_user wu ON w.id = wu.micro_wish_id " + "WHERE " + "w.id =#{id}"+ @@ -161,8 +181,11 @@ " 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, finish_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 ," + @@ -195,7 +218,7 @@ "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 " + + " LEFT JOIN com_pb_service_team AS su1 ON su1.id = camw.responsible_id " + " <where> " + "<if test='microListDTO.status != null'>" + "AND camw.`status` =#{microListDTO.status} " + @@ -213,4 +236,14 @@ "ORDER BY camw.create_at desc "+ " </script>") IPage<MicroListVO> getScreenMicroList(Page page, @Param("microListDTO") ScreenMicroListDTO microListDTO); + + /** + * 微心愿处理人列表 + * @param communityId 社区id + * @param type 处理人类型(1.后台用户 2.党员 3.志愿者) + * @return 处理人列表 + */ + List<SysUserVO> getWishHandleListAdmin(@Param("type") Integer type,@Param("communityId") Long communityId); + + SysUserVO getUserByUserId(@Param("userId") Long userId); } -- Gitblit v1.7.1