|
|
|
@@ -40,6 +40,12 @@ |
|
|
|
<result column="cash_out_limit" jdbcType="INTEGER" property="cashOutLimit"/> |
|
|
|
<result column="alipay_app_auth_token" jdbcType="VARCHAR" property="alipayAppAuthToken"/> |
|
|
|
<result column="alipay_member_template_id" jdbcType="VARCHAR" property="alipayMemberTemplateId"/> |
|
|
|
|
|
|
|
|
|
|
|
<result column="admin_id" jdbcType="BIGINT" property="adminId"/> |
|
|
|
<result column="admin_name" jdbcType="VARCHAR" property="adminName"/> |
|
|
|
<result column="admin_phone" jdbcType="VARCHAR" property="adminPhone"/> |
|
|
|
<result column="admin_username" jdbcType="VARCHAR" property="adminUsername"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
@@ -52,7 +58,7 @@ |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where 1=1 |
|
|
|
where id > 1 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and `id` = #{id} |
|
|
|
@@ -151,7 +157,6 @@ |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_mall |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
and id > 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
@@ -170,11 +175,17 @@ |
|
|
|
from wx_mall |
|
|
|
where `tenant_id` = #{value} |
|
|
|
</select> |
|
|
|
<select id="getByTenantInfo" parameterType="com.iformall.domain.po.WxMall" resultMap="BaseResultMap"> |
|
|
|
<select id="getByTenantInfo" parameterType="com.iformall.domain.po.base.TenantEntity" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_mall |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryMenusByTenantId" parameterType="string" resultType="string"> |
|
|
|
@@ -217,4 +228,41 @@ |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findList" parameterType="com.iformall.domain.po.WxMall" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`name`,m.`group`,m.`country`,m.`province`,m.`city`,m.`addr`, |
|
|
|
m.`service_phone`,m.`valid_start`, m.`valid_end`, |
|
|
|
mui.`id` admin_id,mui.`username` admin_username,mui.`name` admin_name,mui.`phone` admin_phone |
|
|
|
from wx_mall m |
|
|
|
left join mall_user_info mui on m.tenant_id = mui.tenant_id and mui.is_admin = 1 |
|
|
|
where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and m.`tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and m.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != name "> |
|
|
|
and m.`name` like concat('%', #{name},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != startTime "> |
|
|
|
and m.`valid_start` >= #{startTime} |
|
|
|
</if> |
|
|
|
<if test=" null != endTime"> |
|
|
|
and m.`valid_start` < #{endTime} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != adminName "> |
|
|
|
and mui.`name` like concat('%', #{adminName},'%') |
|
|
|
</if> |
|
|
|
<if test=" null != adminPhone"> |
|
|
|
and mui.`phone` like concat('%', #{adminPhone},'%') |
|
|
|
</if> |
|
|
|
<if test=" null != adminUsername "> |
|
|
|
and mui.`username` like concat('%', #{adminUsername},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |