|
|
|
@@ -23,7 +23,8 @@ |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`phone`,`birthdate`,`education`,`sex`,`email`,`address`,`poins`,`tag_id`, |
|
|
|
`create_date`,`update_date`,`tenant_id`,`name`,`level`,`nick_name`,`credit`,`active_time` |
|
|
|
`create_date`,`update_date`,`tenant_id`,`name`,`nick_name`,`credit`,`active_time` |
|
|
|
,(select level from wx_level_config where discount_enable=1 and poins >= points order by points desc limit 1 ) level |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
@@ -84,11 +85,6 @@ |
|
|
|
<if test=" null != name "> |
|
|
|
and `name` like concat('%', #{name},'%') |
|
|
|
</if> |
|
|
|
<if test=" null != level "> |
|
|
|
<if test=" '' != level "> |
|
|
|
and `level` like concat('%', #{level},'%') |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test=" null != startTime and null!=endTime"> |
|
|
|
and `create_date` between #{startTime} and #{endTime} |
|
|
|
</if> |
|
|
|
@@ -102,10 +98,16 @@ |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_c_user_basic_info |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
select r.* from ( |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_c_user_basic_info |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
) r where 1=1 |
|
|
|
|
|
|
|
<if test="null != level and '' != level"> |
|
|
|
and r.level =#{level} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<sql id="allUserColumns"> |
|
|
|
|