xhxu 5 лет назад
Родитель
Сommit
7e28ed387f
3 измененных файлов: 34 добавлений и 17 удалений
  1. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/base/TenantVEntity.java
  2. +10
    -6
      mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml
  3. +13
    -11
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 11
- 0
mallinkService/src/main/java/com/iformall/domain/po/base/TenantVEntity.java Просмотреть файл

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;

/**
* @author Stormeye
@@ -17,16 +18,26 @@ public class TenantVEntity extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="父租户ID",name="parentTenantId")
private String parentTenantId;

@TableField(exist = false)
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private TenantEntity tenantInfo;

public void updateTenantInfo(TenantEntity info) {
setTenantId(info.getTenantId());
if (StringUtils.isNotBlank(info.getParentTenantId())) {
setParentTenantId(info.getParentTenantId());
}
}

public void updateTenantInfo(TenantVEntity info) {
setTenantId(info.getTenantId());
if (StringUtils.isNotBlank(info.getParentTenantId())) {
setParentTenantId(info.getParentTenantId());
}
}

public TenantEntity getTenantInfo() {


+ 10
- 6
mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml Просмотреть файл

@@ -1131,8 +1131,11 @@
<if test="ownerId != null">
and co.owner_id = #{ownerId}
</if>
<if test="tenantId != null">
and co.tenant_id = #{tenantId}
<if test=" null != tenantId and '' != tenantId">
and co.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and co.`parent_tenant_id` = #{parentTenantId}
</if>
<if test="couponOrderStatus != null and 0 == couponOrderStatus">
AND (co.coupon_order_status = #{couponOrderStatus} OR co.coupon_order_status = 100 )
@@ -1351,12 +1354,13 @@
inner join wx_card_info a on co.id=a.id
where 1=1
and co.coupon_type = 100
<if test="tenantId != null">
and co.tenant_id = #{tenantId}
<if test=" null != tenantId and '' != tenantId">
and co.`tenant_id` = #{tenantId}
</if>
<if test="parentTenantId != null">
and co.parent_tenant_id = #{parentTenantId}
<if test=" null != parentTenantId and '' != parentTenantId">
and co.`parent_tenant_id` = #{parentTenantId}
</if>

<if test="cUserId != null">
and co.c_user_id = #{cUserId}
</if>


+ 13
- 11
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Просмотреть файл

@@ -412,10 +412,10 @@
</if>
left join wx_business bu on bu.id = m.business_id
where 1=1 and m.is_del=0
<if test=" null != tenantId">
<if test=" null != tenantId and '' != tenantId">
and m.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId">
<if test=" null != parentTenantId and '' != parentTenantId">
and m.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != merchantName and ''!=merchantName ">
@@ -474,9 +474,11 @@
<if test=" null != buildingId">
and mb.id = #{buildingId}
</if>
and m.tenant_id = #{tenantId}
<if test=" null != parentTenantId">
and m.parent_tenant_id = #{parentTenantId}
<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>
and s.is_del = 0
and ms.is_del = 0
@@ -509,12 +511,12 @@
left join wx_merchant_b_user mbu on m.id=mbu.merchant_id where mbu.status=0) m
on co.b_user_id=m.b_user_id
WHERE co.coupon_order_status = 1
<if test="tenantId != null">
and co.tenant_id = #{tenantId}
</if>
<if test="parentTenantId != null">
and co.parent_tenant_id = #{parentTenantId}
</if>
<if test=" null != tenantId and '' != tenantId">
and co.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and co.`parent_tenant_id` = #{parentTenantId}
</if>
<if test="starttime != null">
and co.create_date &gt;= #{starttime}
</if>


Загрузка…
Отмена
Сохранить