会员管理,手机号码与用户编号组合搜索支持或关系

master
382696293@qq.com 2 years ago
parent 86cced104a
commit e946428888

@ -94,27 +94,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWxUserMemberListByVm" parameterType="WxUserMemberVm" resultMap="WxUserMemberResult">
SELECT <include refid="fieldList" />
<where>
<if test="nickname != null and nickname != ''"> and member.nickname like concat('%', #{nickname}, '%')</if>
<if test="creditStart != null and creditEnd != null"> and member.credit &gt;= #{creditStart} and member.credit &lt;= #{creditEnd}</if>
<if test="userType != null "> and member.user_type = #{userType}</if>
<if test="provinceId != null and provinceId != ''"> and member.province_id = #{provinceId}</if>
<if test="cityId != null and cityId != ''"> and member.city_id = #{cityId}</if>
<if test="areaId != null and areaId != ''"> and member.area_id = #{areaId}</if>
<if test="birthday != null "> and member.birthday = #{birthday}</if>
<if test="id!=null and id !=''">
and
<foreach collection="id.split(',')" index="index" item="item" open="(" separator="OR"
close=")">
member.id = #{item}
member.id LIKE concat('%', #{item}, '%')
</foreach>
</if>
<if test="nickname != null and nickname != ''"> and member.nickname like concat('%', #{nickname}, '%')</if>
<if test="creditStart != null and creditEnd != null"> and member.credit &gt;= #{creditStart} and member.credit &lt;= #{creditEnd}</if>
<if test="userType != null "> and member.user_type = #{userType}</if>
<if test="mobile!=null and mobile !=''">
and
OR
<foreach collection="mobile.split(',')" index="index" item="item" open="(" separator="OR"
close=")">
member.mobile like concat('%', #{item}, '%')
</foreach>
</if>
<if test="provinceId != null and provinceId != ''"> and member.province_id = #{provinceId}</if>
<if test="cityId != null and cityId != ''"> and member.city_id = #{cityId}</if>
<if test="areaId != null and areaId != ''"> and member.area_id = #{areaId}</if>
<if test="birthday != null "> and member.birthday = #{birthday}</if>
<if test="params != null and params.beginTime != null">
and member.create_time &gt;= #{params.beginTime}
</if>

Loading…
Cancel
Save