| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComActMicroWishDAO extends BaseMapper<ComActMicroWishDO> { |
| | | |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "w.id,\n" + |
| | | "u.NAME sponsor_name,\n" + |
| | | "w.sponsor_phone,\n" + |
| | | "w.wish_name,\n" + |
| | | "w.`status`,\n" + |
| | | "w.`detail`,\n" + |
| | | "w.start_num,\n" + |
| | | "w.form,\n" + |
| | | "su.`name` responsible_name,\n" + |
| | | "w.score,\n" + |
| | | "w.create_at \n" + |
| | | "FROM\n" + |
| | | "com_act_micro_wish w\n" + |
| | | "JOIN sys_user u ON w.sponsor_id = u.user_id \n" + |
| | | "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != ""'>" + |
| | | "AND u.name = #{comActMicroWishVO.sponsorName} \n" + |
| | | " </if> " + |
| | | "LEFT JOIN sys_user su ON w.responsible_id = su.user_id \n" + |
| | | "<if test='comActMicroWishVO.responsibleName != null and comActMicroWishVO.responsibleName.trim() != ""'>" + |
| | | "AND su.`name` = #{comActMicroWishVO.responsibleName} \n" + |
| | | " </if> " + |
| | | "WHERE\n" + |
| | | "w.community_id=#{comActMicroWishVO.communityId} \n" + |
| | | "<if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone.trim() != ""'>" + |
| | | "AND w.sponsor_phone = #{comActMicroWishVO.sponsorPhone} \n" + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null '>" + |
| | | "AND w.`status` = #{comActMicroWishVO.status} \n" + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.createBegin != null and comActMicroWishVO.createBegin.trim() != ""'>" + |
| | | "AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} \n" + |
| | | "AND #{comActMicroWishVO.createEnd}" + |
| | | " </if> " + |
| | | "ORDER BY w.`status`, w.create_at "+ |
| | | "</script>") |
| | | IPage<ComActMicroWishVO> pageMicroWish(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); |
| | | @Select("SELECT\n" + |
| | | "w.id,\n" + |
| | | "w.start_num,\n" + |
| | | "u.NAME sponsor_name,\n" + |
| | | "w.create_at,\n" + |
| | | "w.sponsor_phone,\n" + |
| | | "w.`status`,\n" + |
| | | "w.wish_name,\n" + |
| | | "w.detail,\n" + |
| | | "w.photo_path_list,\n" + |
| | | "su.`name` responsible_name,\n" + |
| | | "w.form,\n" + |
| | | "w.examine_at,\n" + |
| | | "w.finish,\n" + |
| | | "w.finish_photo_path_list,\n" + |
| | | "w.finish_at,\n" + |
| | | "w.score,\n" + |
| | | "w.evaluate_at,\n" + |
| | | "w.evaluate \n" + |
| | | "FROM\n" + |
| | | "com_act_micro_wish w\n" + |
| | | "JOIN sys_user u ON w.sponsor_id = u.user_id\n" + |
| | | "LEFT JOIN sys_user su ON w.responsible_id = su.user_id \n" + |
| | | "WHERE\n" + |
| | | "w.id =#{id}") |
| | | ComActMicroWishVO detailMicroWish(Long id); |
| | | } |