|
|
|
@@ -15,47 +15,50 @@ |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`, `tenant_id`, `points`, `level`, `description`, `create_date`, `update_date`, `discount_enable`, `capability`,`scale` |
|
|
|
wlc.`id`, wlc.`tenant_id`, wlc.`points`, wlc.`level`, wlc.`description`, wlc.`create_date`, wlc.`update_date`, wlc.`discount_enable`, wlc.`capability`,wlc.`scale` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where 1 = 1 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and `id` = #{id} |
|
|
|
and wlc.`id` = #{id} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != tenantId "> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and wlc.`tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and wm.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != points "> |
|
|
|
and `points` = #{points} |
|
|
|
and wlc.`points` = #{points} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != level "> |
|
|
|
and `level` like concat('%', #{level},'%') |
|
|
|
and wlc.`level` like concat('%', #{level},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != description "> |
|
|
|
and `description` like concat('%', #{description},'%') |
|
|
|
and wlc.`description` like concat('%', #{description},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != createDate "> |
|
|
|
and `create_date` = #{createDate} |
|
|
|
and wlc.`create_date` = #{createDate} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != updateDate "> |
|
|
|
and `update_date` = #{updateDate} |
|
|
|
and wlc.`update_date` = #{updateDate} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != discountEnable "> |
|
|
|
and `discount_enable` = #{discountEnable} |
|
|
|
and wlc.`discount_enable` = #{discountEnable} |
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
<if test=" null != ids "> |
|
|
|
and id in |
|
|
|
and wlc.id in |
|
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
#{idItem} |
|
|
|
</foreach> |
|
|
|
@@ -66,7 +69,8 @@ |
|
|
|
<select id="findList" parameterType="com.iformall.domain.po.WxLevelConfig" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_level_config |
|
|
|
from wx_level_config wlc |
|
|
|
left join wx_mall wm on wm.tenant_id = wlc.tenant_id |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
</select> |
|
|
|
|
|
|
|
|