Browse Source

Merge branch 'release_real_202012' of https://git.malls.iformall.com/server/formallProject into release_real_202012

release_toaliyun_real
xiaohanzi 5 years ago
parent
commit
01026cc8d4
2 changed files with 34 additions and 11 deletions
  1. +8
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  2. +26
    -11
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 8
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java View File

@@ -290,4 +290,12 @@ public class WxMerchant extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "1已关联合同", name = "hasContract")
@TableField(exist = false)
private Integer hasContract;

@io.swagger.annotations.ApiModelProperty(value="楼座号",name="building")
@TableField(exist = false)
private Long building;

@io.swagger.annotations.ApiModelProperty(value="楼层号",name="floor")
@TableField(exist = false)
private Long floor;
}

+ 26
- 11
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml View File

@@ -201,34 +201,34 @@
</select>

<select id="findListVo2" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap">
select distinct wm.* from wx_merchant wm
left join wx_merchant_b_user wmbu on wmbu.merchant_id = wm.id
where 1=1 and wm.is_del=0
select distinct m.* from wx_merchant m
left join wx_merchant_b_user wmbu on wmbu.merchant_id = m.id
where 1=1 and m.is_del=0
<if test=" null != tenantId and '' != tenantId">
and wm.`tenant_id` = #{tenantId}
and m.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and wm.`parent_tenant_id` = #{parentTenantId}
and m.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != name and ''!=name ">
and wm.`name` like concat('%', #{name},'%')
and m.`name` like concat('%', #{name},'%')
</if>
<if test=" null != linkPhone and ''!=linkPhone ">
and wm.`link_phone` like concat('%', #{linkPhone},'%')
and m.`link_phone` like concat('%', #{linkPhone},'%')
</if>
<if test=" null != phone and ''!=phone ">
and wmbu.`phone` like concat('%', #{phone},'%')
</if>
<if test=" null != businessId ">
and wm.`business_id` = #{businessId}
and m.`business_id` = #{businessId}
</if>
<if test=" null != status ">
and wm.`status` = #{status}
and m.`status` = #{status}
</if>
<if test=" null != type ">
and wm.`type` = #{type}
and m.`type` = #{type}
</if>
order by wm.create_date desc
<include refid="dynamicWhereConditionsVo"/>
</select>
<sql id="dataRule">
@@ -345,6 +345,21 @@
#{idItem}
</foreach>
</if>
<if test=" null != building or null != floor">
and m.id in(
select ms.merchant_id from (select merchant_id,shop_id from wx_merchant_shop where is_del=0) ms
inner join wx_merchant m on ms.merchant_id = m.id
inner join wx_shop s on s.id=ms.shop_id
where s.is_del=0
<if test=" null != building ">
and s.`building`= #{building}
</if>
<if test=" null != floor">
and s.`floor` = #{floor}
</if>
)

</if>
<include refid="dataRule"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>


Loading…
Cancel
Save