huanghongfa
2021-05-28 54ad966d0b142c97fc659263b51d1ea5d7b5c7c6
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java
@@ -9,6 +9,7 @@
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@@ -25,6 +26,7 @@
            "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" +
@@ -69,7 +71,10 @@
            "AND ( w.`status` = 3 or  w.`status` = 5 )\n" +
            " </if> " +
            "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.isPageMyWish!=null and comActMicroWishVO.status==1'>" +
            "AND w.`status` in (1,2) \n" +
            "AND w.`status` =1 \n" +
            " </if> " +
            "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status==3  and comActMicroWishVO.isPageMyWish!=null '>" +
            "AND w.`status` in (2, 3) \n" +
            " </if> " +
            "<if test='comActMicroWishVO.createBegin != null '>" +
            "AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} \n" +
@@ -89,12 +94,13 @@
            " </if> " +
            " </where>" +
            " group by w.id  \n"+
            "ORDER BY w.`status` asc, w.create_at desc "+
            "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" +
@@ -151,4 +157,8 @@
            "GROUP BY\n" +
            "\tw.community_id\n")
    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")
    int updateStatusAutoConfirm();
}