| | |
| | | <result property="gradeId" column="grade_id"/> |
| | | <result property="experience" column="experience"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="blackId" column="blackId"/> |
| | | <collection property="customerTagList" ofType="cn.lili.modules.lmk.domain.vo.CustomerTagVO" |
| | | select="selectTagByMemberId" |
| | | column="id" |
| | |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | * |
| | | LM.* |
| | | FROM |
| | | li_member lm |
| | | li_member LM |
| | | LEFT JOIN lmk_customer_black LMK ON LM.id = LMK.user_id and LMK.delete_flag = 0 |
| | | <where> |
| | | <!-- 用户名模糊查询 --> |
| | | <if test="query.username != null and query.username != ''"> |
| | | AND lm.username LIKE CONCAT('%', #{query.username}, '%') |
| | | AND LM.username LIKE CONCAT('%', #{query.username}, '%') |
| | | </if> |
| | | |
| | | <!-- 昵称模糊查询 --> |
| | | <if test="query.nickName != null and query.nickName != ''"> |
| | | AND lm.nick_name LIKE CONCAT('%', #{query.nickName}, '%') |
| | | AND LM.nick_name LIKE CONCAT('%', #{query.nickName}, '%') |
| | | </if> |
| | | |
| | | <!-- 手机号码精确查询 --> |
| | | <if test="query.mobile != null and query.mobile != ''"> |
| | | AND lm.mobile = #{query.mobile} |
| | | AND LM.mobile = #{query.mobile} |
| | | </if> |
| | | |
| | | <!-- 会员状态转 --> |
| | | <if test="query.disabled != null and query.disabled != ''"> |
| | | AND lm.disabled = #{query.disabled} |
| | | AND LM.disabled = #{query.disabled} |
| | | </if> |
| | | |
| | | <!-- 商铺id --> |
| | | <if test="query.storeId != null and query.storeId != ''"> |
| | | AND lm.store_id = #{query.storeId} |
| | | AND LM.store_id = #{query.storeId} |
| | | </if> |
| | | AND EXISTS ( |
| | | SELECT 1 |
| | | FROM li_order lo |
| | | WHERE lo.member_id = lm.id |
| | | ) |
| | | AND LM.delete_flag = 0 |
| | | </where> |
| | | ORDER BY lm.create_time DESC |
| | | </select> |