|
|
|
@@ -36,10 +36,8 @@ |
|
|
|
wcubi.`id`,wcubi.`phone`,wcubi.`birthdate`,wcubi.`education`,wcubi.`sex`,wcubi.`height`,wcubi.`weight`,wcubi.`id_card`,wcubi.`email`, |
|
|
|
wcubi.`address`,wcubi.`poins`,wcubi.`tag_id`,wcubi.`create_date`,wcubi.`update_date`, |
|
|
|
wcubi.`final_tenant_id`,wcubi.`tenant_id`,wcubi.`parent_tenant_id`,wcubi.`name`,wcubi.`nick_name`, |
|
|
|
wcubi.`avatar_url`,wcubi.`credit`,wcubi.`active_time`,wcubi.`login_count`,wcubi.`act_record`,wcubi.`qr_code` |
|
|
|
,(select level from wx_level_config |
|
|
|
where poins >= points and tenant_id=wcubi.final_tenant_id |
|
|
|
order by points desc limit 1 ) level,wcubi.score_date,wcubi.status |
|
|
|
wcubi.`avatar_url`,wcubi.`credit`,wcubi.`active_time`,wcubi.`login_count`,wcubi.`act_record`,wcubi.`qr_code`, |
|
|
|
wcubi.score_date,wcubi.status |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="allSimpleColumns"> |
|
|
|
@@ -82,12 +80,12 @@ |
|
|
|
and wcubi.`address` like concat('%', #{address},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != poins "> |
|
|
|
and wcubi.`poins` = #{poins} |
|
|
|
<if test=" null != levelStartScore "> |
|
|
|
and wcubi.poins >= #{levelStartScore} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != credit "> |
|
|
|
and wcubi.`credit` = #{credit} |
|
|
|
<if test=" null != levelEndScore"> |
|
|
|
and wcubi.poins < #{levelEndScore} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != tagId "> |
|
|
|
@@ -144,16 +142,10 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> |
|
|
|
select r.* from ( |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_c_user_basic_info wcubi |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
) r where 1=1 |
|
|
|
|
|
|
|
<if test="null != level and '' != level"> |
|
|
|
and r.level =#{level} |
|
|
|
</if> |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_c_user_basic_info wcubi |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
</select> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions1"> |
|
|
|
@@ -191,12 +183,12 @@ |
|
|
|
and wcubi.`address` like concat('%', #{basicInfo.address},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != basicInfo.poins "> |
|
|
|
and wcubi.`poins` = #{basicInfo.poins} |
|
|
|
<if test=" null != basicInfo.levelStartScore "> |
|
|
|
and wcubi.poins >= #{basicInfo.levelStartScore} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != basicInfo.credit "> |
|
|
|
and wcubi.`credit` = #{basicInfo.credit} |
|
|
|
<if test=" null != basicInfo.levelEndScore"> |
|
|
|
and wcubi.poins < #{basicInfo.levelEndScore} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != basicInfo.tagId "> |
|
|
|
@@ -253,16 +245,10 @@ |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="findList1" resultMap="BaseResultMap"> |
|
|
|
select r.* from ( |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_c_user_basic_info wcubi |
|
|
|
<include refid="dynamicWhereConditions1"/> |
|
|
|
) r where 1=1 |
|
|
|
|
|
|
|
<if test="null != basicInfo.level and '' != basicInfo.level"> |
|
|
|
and r.level =#{basicInfo.level} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateScore" parameterType="com.iformall.domain.po.WxCUserBasicInfo"> |
|
|
|
|