| | |
| | | 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.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PageActivityMembersVO; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | | 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 ComActActivityDAO extends BaseMapper<ComActActivityDO> { |
| | | // @Select("<script> " + |
| | | // " <where>" + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("<script> " + |
| | | "SELECT \n" + |
| | | "a.id,\n" + |
| | | "a.activity_name,\n" + |
| | | "u.`name` sponsorName,\n" + |
| | | "a.activity_addr,\n" + |
| | | "a.`status`,\n" + |
| | | "a.publish_at,\n" + |
| | | "a.begin_at,\n" + |
| | | "a.end_at,\n" + |
| | | "a.sign_up_begin,\n" + |
| | | "a.sign_up_end\n" + |
| | | "FROM\n" + |
| | | "com_act_activity a \n" + |
| | | "join sys_user u on a.sponsor_id=u.user_id\n" + |
| | | " <where>" + |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != ""'>" + |
| | | " and a.activity_name = #{comActActivityVO.activityName} \n" + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.status != null and comActActivityVO.status !=0'>" + |
| | | "AND a.`status` = #{comActActivityVO.status} \n" + |
| | | " </if> " + |
| | | "<if test='comActActivityVO.beginAt != null and comActActivityVO.beginAt.trim() != ""'>" + |
| | | "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} \n" + |
| | | " </if> " + |
| | | " </where>" + |
| | | "</script>") |
| | | IPage<ComActActivityVO> pageActivity( Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | @Select("SELECT u.name sponsorName,a.* FROM com_act_activity a join sys_user u on a.sponsor_id=u.user_id") |
| | | ComActActivityVO inforActivity(Long id); |
| | | } |