Browse Source

bug

release_toaliyun_real
xhxu 5 years ago
parent
commit
7e28ed387f
3 changed files with 34 additions and 17 deletions
  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 View File

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


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


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

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


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


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


public TenantEntity getTenantInfo() { public TenantEntity getTenantInfo() {


+ 10
- 6
mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml View File

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

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


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

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


Loading…
Cancel
Save