| | |
| | | package com.panzhihua.service_dangjian.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | 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.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PageActivityMembersVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingActivityVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbActivityMemberDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComPbActivityMemberDAO extends BaseMapper<ComPbActivityMemberDO> { |
| | | // @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> " + |
| | | // " <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 " + |
| | | " m.id," + |
| | | " m.NAME," + |
| | | " u.phone," + |
| | | " m.create_at registrationTime" + |
| | | " FROM " + |
| | | " com_pb_activity_member m " + |
| | | " LEFT JOIN sys_user u ON m.user_id = u.user_id " + |
| | | "WHERE " + |
| | | "m.activity_id = #{pageActivityMembersVO.activityId} " + |
| | | "<if test='pageActivityMembersVO.name != null and pageActivityMembersVO.name.trim() != ""'>" + |
| | | "AND m.`name` = #{pageActivityMembersVO.name} " + |
| | | " </if> " + |
| | | "<if test='pageActivityMembersVO.phone != null and pageActivityMembersVO.phone.trim() != ""'>" + |
| | | "AND u.phone = #{pageActivityMembersVO.phone}" + |
| | | " </if> " + |
| | | "</script>") |
| | | IPage<PageActivityMembersVO> pageActivityMembers(Page page, @Param("pageActivityMembersVO") PageActivityMembersVO pageActivityMembersVO); |
| | | @Select("<script> " + "SELECT " + " m.id," + " m.NAME," + " u.phone," + " m.create_at registrationTime" + " FROM " |
| | | + " com_pb_activity_member m " + " LEFT JOIN sys_user u ON m.user_id = u.user_id " + "WHERE " |
| | | + "m.activity_id = #{pageActivityMembersVO.activityId} " |
| | | + "<if test='pageActivityMembersVO.name != null and pageActivityMembersVO.name.trim() != ""'>" |
| | | + "AND m.`name` = #{pageActivityMembersVO.name} " + " </if> " |
| | | + "<if test='pageActivityMembersVO.phone != null and pageActivityMembersVO.phone.trim() != ""'>" |
| | | + "AND u.phone = #{pageActivityMembersVO.phone}" + " </if> " + "</script>") |
| | | IPage<PageActivityMembersVO> pageActivityMembers(Page page, |
| | | @Param("pageActivityMembersVO") PageActivityMembersVO pageActivityMembersVO); |
| | | |
| | | @Select("select a.* from com_pb_activity_member a join com_pb_member m on m.id=a.member_id " + |
| | | "join sys_user u on m.id_card=u.id_card and u.user_id=#{userId} where a.activity_id=#{id}") |
| | | @Select("select a.* from com_pb_activity_member a join com_pb_member m on m.id=a.member_id " |
| | | + "join sys_user u on m.id_card=u.id_card and u.user_id=#{userId} where a.activity_id=#{id}") |
| | | ComPbActivityMemberDO selectByUserIdActivityId(@Param("id") Long id, @Param("userId") Long userId); |
| | | @Select("SELECT \n" + |
| | | "u.user_id\n" + |
| | | "FROM\n" + |
| | | "com_pb_activity_member m \n" + |
| | | "join com_pb_member b on m.member_id=b.id\n" + |
| | | "join sys_user u on b.id_card=u.id_card\n" + |
| | | "WHERE\n" + |
| | | "m.activity_id =#{id}") |
| | | |
| | | @Select("SELECT \n" + "u.user_id\n" + "FROM\n" + "com_pb_activity_member m \n" |
| | | + "join com_pb_member b on m.member_id=b.id\n" + "join sys_user u on b.id_card=u.id_card\n" + "WHERE\n" |
| | | + "m.activity_id =#{id}") |
| | | List<Long> selectAllPartyBuildingActivityMembers(Long id); |
| | | |
| | | @Select("select m.id from sys_user u join com_pb_member m on u.id_card=m.id_card and u.community_id=#{communityId} and u.user_id=#{userId} ") |
| | | Long selectMemberIdByUserId(@Param("userId") Long userId, @Param("communityId") Long communityId); |
| | | |
| | | @Select("select type from sys_user where user_id=#{createBy}") |
| | | LoginUserInfoVO selectUserInfo(Long createBy); |
| | | } |