|
|
|
@@ -5,6 +5,7 @@ import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxMerchantRelation; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.mapper.WxMerchantRelationMapper; |
|
|
|
import com.iformall.service.WxMerchantRelationService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
@@ -14,7 +15,6 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@@ -30,7 +30,7 @@ public class WxMerchantRelationServiceImpl implements WxMerchantRelationService |
|
|
|
|
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
@Override |
|
|
|
public ResultData saveOrUpdate(Long regionId, List<Long> ids, Integer type, String tenantId) { |
|
|
|
public ResultData saveOrUpdate(Long regionId, List<Long> ids, Integer type, TenantEntity tenantEntity) { |
|
|
|
if (regionId == null) { |
|
|
|
return new ResultData(Result.ERROR, "区域商户id不能为空"); |
|
|
|
} |
|
|
|
@@ -69,7 +69,8 @@ public class WxMerchantRelationServiceImpl implements WxMerchantRelationService |
|
|
|
relation.setId(IdWorker.get().nextId()); |
|
|
|
relation.setMerchantId(id); |
|
|
|
relation.setRegionMerchantId(regionId); |
|
|
|
relation.setTenantId(tenantId); |
|
|
|
relation.setTenantId(tenantEntity.getTenantId()); |
|
|
|
relation.setParentTenantId(tenantEntity.getParentTenantId()); |
|
|
|
list.add(relation); |
|
|
|
} |
|
|
|
wxMerchantRelationMapper.insertBatch(list); |
|
|
|
|