|  |  | 
 |  |  | package com.doumee.dao.business; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.core.conditions.Wrapper; | 
 |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
 |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
 |  |  | import com.baomidou.mybatisplus.core.toolkit.Constants; | 
 |  |  | import com.doumee.dao.admin.response.MemberInfoDTO; | 
 |  |  | import com.doumee.dao.business.model.CarEvent; | 
 |  |  | import com.doumee.dao.business.model.Member; | 
 |  |  | import org.apache.ibatis.annotations.Param; | 
 |  |  | import org.apache.ibatis.annotations.Select; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author 江蹄蹄 | 
 |  |  | 
 |  |  |  */ | 
 |  |  | public interface MemberMapper extends BaseMapper<Member> { | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Select(" select m.* , c.name as companyName , " + | 
 |  |  |             " (select count(0) from member_card mc where mc.MEMBER_ID=m.id and mc.ISDELETED=0) as memberCardCount,  " + | 
 |  |  |             " (select GROUP_CONCAT(dr.name) from member_role mr left join device_role dr on dr.id=mr.ROLE_ID  " + | 
 |  |  |             " where mr.MEMBER_ID=m.id and mr.ISDELETED=0 GROUP BY mr.MEMBER_ID) as roleName "+ | 
 |  |  |             " from member m  " + | 
 |  |  |             " left join company c on m.COMPANY_ID=c.id "+ | 
 |  |  |             " ${ew.customSqlSegment} ") | 
 |  |  |     IPage<MemberInfoDTO> getPage(IPage<MemberInfoDTO> page, @Param(Constants.WRAPPER) Wrapper wrapper); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     void insertBatchSomeColumn(List<Member> list); | 
 |  |  | } |