|
|
|
@@ -63,25 +63,20 @@ public class WxMerchantRelationServiceImpl implements WxMerchantRelationService |
|
|
|
wxMerchantRelationMapper.updateByMerchantIds(updateList,regionId); |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(insertList)) { |
|
|
|
insertInfo(regionId, insertList, tenantId); |
|
|
|
} |
|
|
|
return new ResultData(Result.SUCCESS, "编辑成功", null); |
|
|
|
} |
|
|
|
|
|
|
|
public void insertInfo(Long regionId, List<Long> ids, String tenantId) { |
|
|
|
List<WxMerchantRelation> list = new ArrayList<>(); |
|
|
|
for (Long id : ids) { |
|
|
|
WxMerchantRelation relation = new WxMerchantRelation(); |
|
|
|
relation.setId(IdWorker.get().nextId()); |
|
|
|
relation.setMerchantId(id); |
|
|
|
relation.setRegionMerchantId(regionId); |
|
|
|
relation.setTenantId(tenantId); |
|
|
|
list.add(relation); |
|
|
|
List<WxMerchantRelation> list = new ArrayList<>(); |
|
|
|
for (Long id : ids) { |
|
|
|
WxMerchantRelation relation = new WxMerchantRelation(); |
|
|
|
relation.setId(IdWorker.get().nextId()); |
|
|
|
relation.setMerchantId(id); |
|
|
|
relation.setRegionMerchantId(regionId); |
|
|
|
relation.setTenantId(tenantId); |
|
|
|
list.add(relation); |
|
|
|
} |
|
|
|
wxMerchantRelationMapper.insertBatch(list); |
|
|
|
} |
|
|
|
wxMerchantRelationMapper.insertBatch(list); |
|
|
|
return new ResultData(Result.SUCCESS, "成功", null); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void deleteByMerchantId(Long merchantId) { |
|
|
|
wxMerchantRelationMapper.deleteByMerchantId(merchantId); |
|
|
|
|