| @@ -201,6 +201,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||||
| wxCUserTagsService.saveOrUpdate(record); | wxCUserTagsService.saveOrUpdate(record); | ||||
| wxCUserBasicInfo.setTagId(record.getId()); | wxCUserBasicInfo.setTagId(record.getId()); | ||||
| } | } | ||||
| wxCUserBasicInfo.setFinalTenantId(tenantEntity.getFinalTenantId()); | |||||
| wxCUserBasicInfoService.update(wxCUserBasicInfo); | wxCUserBasicInfoService.update(wxCUserBasicInfo); | ||||
| wxCUserBasicInfo.updateTenantInfo(oldInfo); | wxCUserBasicInfo.updateTenantInfo(oldInfo); | ||||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, wxCUserBasicInfo); | wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, wxCUserBasicInfo); | ||||
| @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.fasterxml.jackson.annotation.JsonIgnore; | import com.fasterxml.jackson.annotation.JsonIgnore; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.po.base.TenantEntityWithoutFinalTenantId; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| @@ -22,7 +23,7 @@ import java.util.Objects; | |||||
| @Data | @Data | ||||
| @ToString(callSuper = true) | @ToString(callSuper = true) | ||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxCUserBasicInfo extends TenantEntity { | |||||
| public class WxCUserBasicInfo extends TenantEntityWithoutFinalTenantId { | |||||
| protected Long id; | protected Long id; | ||||
| @@ -0,0 +1,51 @@ | |||||
| package com.iformall.domain.po.base; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import org.apache.commons.lang3.StringUtils; | |||||
| /** | |||||
| * @author Stormeye | |||||
| * @date 2019/4/24 14:32 | |||||
| */ | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class TenantEntityWithoutFinalTenantId extends BaseEntity { | |||||
| private static final long serialVersionUID = 1441638860618733611L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||||
| protected String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="父租户ID",name="parentTenantId") | |||||
| protected String parentTenantId; | |||||
| public void updateTenantInfo(TenantEntityWithoutFinalTenantId info) { | |||||
| setTenantId(info.getTenantId()); | |||||
| if (StringUtils.isNotBlank(info.getParentTenantId())) { | |||||
| setParentTenantId(info.getParentTenantId()); | |||||
| } | |||||
| } | |||||
| public void updateTenantInfo(BaseTenantEntity info) { | |||||
| setTenantId(info.getTenantId()); | |||||
| if (StringUtils.isNotBlank(info.getParentTenantId())) { | |||||
| setParentTenantId(info.getParentTenantId()); | |||||
| } | |||||
| } | |||||
| public String getTenantId() { | |||||
| return tenantId; | |||||
| } | |||||
| public void setTenantId(String tenantId) { | |||||
| this.tenantId = tenantId; | |||||
| } | |||||
| public String getParentTenantId() { | |||||
| return parentTenantId; | |||||
| } | |||||
| public void setParentTenantId(String parentTenantId) { | |||||
| this.parentTenantId = parentTenantId; | |||||
| } | |||||
| } | |||||