lihang
2023-04-25 dd3a6c681f938fd53d5f6cc3a4fcee40e71b259c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
package com.vci.ubcs.omd.service.impl;
 
import com.alibaba.cloud.commons.lang.StringUtils;
import com.alibaba.nacos.api.exception.NacosException;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.omd.constant.BtmTypeConstant;
import com.vci.ubcs.omd.repeater.DomainRepeater;
import com.vci.ubcs.omd.service.IBtmTypeAttributeService;
import com.vci.ubcs.omd.wrapper.BtmTypeWrapper;
import com.vci.ubcs.starter.web.constant.OmdRegExpConstant;
import com.vci.ubcs.omd.dto.BtmTypeDTO;
import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO;
import com.vci.ubcs.omd.entity.BtmType;
import com.vci.ubcs.omd.entity.BtmTypeAttribute;
import com.vci.ubcs.omd.entity.ModifyAttributeInfoDO;
import com.vci.ubcs.omd.mapper.BtmTypeMapper;
import com.vci.ubcs.omd.service.IBtmTypeService;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import com.vci.ubcs.omd.vo.LinkTypeVO;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import com.vci.ubcs.starter.web.util.VciDateUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.DefaultTransactionDefinition;
import org.springframework.util.CollectionUtils;
 
import javax.validation.constraints.NotEmpty;
import java.util.*;
 
/**
 * Description: 业务类型服务的实现类
 *
 * @author LiHang
 * @date 2023/4/23
 */
@Service
public class BtmTypeServiceImpl extends ServiceImpl<BtmTypeMapper, BtmType> implements IBtmTypeService {
 
    /**
     * 事务管理
     */
    @Autowired
    private DataSourceTransactionManager dataSourceTransactionManager;
 
    /**
     * 业务类型关联属性服务
     */
    @Autowired
    private IBtmTypeAttributeService btmTypeAttributeService;
 
    /**
     * 设置平台本身的业务类型
     *
     * @param platformBtmType 平台本身的业务类型
     */
    @Override
    public void setPlatformBtmType(Collection<String> platformBtmType) {
 
    }
 
    /**
     * 根据主键获取业务类型
     *
     * @param pkBtmType 业务类型主键
     * @return 业务类型,如果不存在会返回null
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public BtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException {
        Func.requireNotNull(pkBtmType,"业务类型主键不能为空");
        BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(baseMapper.selectOne(Wrappers.<BtmType>query().lambda().eq(BtmType::getOid, pkBtmType)));
        btmTypeVO.setAttributes(btmTypeAttributeService.getAttributeByBtmTypeOid(pkBtmType));
        return btmTypeVO;
    }
 
    /**
     * 根据主键批量获取业务类型
     *
     * @param pkBtmTypes 业务类型主键,用逗号分隔
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public List<BtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException {
        return null;
    }
 
    /**
     * 批量根据主键获取业务类型
     *
     * @param pkBtmTypeCollection 业务类型主键集合
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public List<BtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException {
        return null;
    }
 
    /**
     * 根据英文名称获取业务类型
     *
     * @param id 英文名称
     * @return 业务类型,如果不存在会返回null
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public BtmTypeVO getBtmTypeById(String id) throws ServiceException {
        return null;
    }
 
    /**
     * 根据英文名称批量获取业务类型
     *
     * @param ids 英文名称,使用逗号分隔
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public List<BtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException {
        return null;
    }
 
    /**
     * 根据英文名称集合批量获取业务类型
     *
     * @param idCollection 英文名称集合
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public List<BtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException {
        return null;
    }
 
    /**
     * 根据英文名称集合批量获取业务类型的数据对象
     *
     * @param idCollection 英文名称集合
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public List<BtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException {
        return null;
    }
 
    /**
     * 根据主键集合批量获取业务类型的数据对象
     *
     * @param oidCollection 主键
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public List<BtmType> listBtmTypeDOByOidCollection(Collection<String> oidCollection) throws ServiceException {
        return null;
    }
 
    /**
     * 根据业务类型主键获取中文名称
     *
     * @param oid 业务类型主键,多个使用逗号分隔
     * @return 中文名称,如果不存在会返回null;多个会以逗号分隔
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public String getNameByOid(String oid) throws ServiceException {
        return null;
    }
 
    /**
     * 根据业务类型英文名称获取中文名称
     *
     * @param id 业务类型英文名称
     * @return 中文名称,如果不存在会返回null;多个会以逗号分隔
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public String getNameById(String id) throws ServiceException {
        return null;
    }
 
    /**
     * 根据业务类型主键获取关联的所有属性对象
     *
     * @param oid 业务类型主键
     * @return 所有的属性对象,包括系统属性
     * @throws ServiceException 业务类型不存在,参数为空或查询出错时会抛出错误
     */
    @Override
    public List<BtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException {
        return null;
    }
 
    /**
     * 根据业务类型英文名称获取关联的所有属性对象
     *
     * @param id 业务类型英文名称
     * @return 所有的属性对象,包括系统内置属性
     * @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
     */
    @Override
    public List<BtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException {
        return null;
    }
 
    /**
     * 根据业务类型主键获取关联的所有属性对象
     *
     * @param oidCollection 业务类型主键集合
     * @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
     * @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
     */
    @Override
    public Map<String, List<BtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException {
        return null;
    }
 
    /**
     * 根据业务类型英文名称获取关联的所有属性对象
     *
     * @param idCollection 业务类型英文名称集合
     * @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
     * @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
     */
    @Override
    public Map<String, List<BtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException {
        return null;
    }
 
    /**
     * 获取使用业务类型的链接类型
     *
     * @param pkBtmType 业务类型主键
     * @return 引用的链接类型
     * @throws ServiceException 参数为空或者查询出错时会抛出异常
     */
    @Override
    public List<LinkTypeVO> listLinkTypeForUsedBtmType(String pkBtmType) throws ServiceException {
        return null;
    }
 
    /**
     * 校验业务类型是否被引用
     *
     * @param pkBtmType 业务类型的主键
     * @return true表示被引用, false表示没有被引用
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public boolean checkBtmTypeUsed(String pkBtmType) throws ServiceException {
        return false;
    }
 
    /**
     * 校验业务类型是否被引用
     *
     * @param oidCollection 业务类型的主键集合
     * @return true表示被引用, false表示没有被引用
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    @Override
    public boolean checkBtmTypeUseds(Collection<String> oidCollection) throws ServiceException {
        return false;
    }
 
    /**
     * 添加业务类型
     *
     * @param btmTypeDTO      业务类型数据传输对象
     * @param autoCreateTable 是否自动创建表格
     * @return 添加后的业务类型
     * @throws ServiceException 添加出错的时候会抛出异常
     */
    @Override
    public BtmTypeDTO addSave(BtmTypeDTO btmTypeDTO, boolean autoCreateTable) throws ServiceException {
        TransactionStatus transaction = null;
        DefaultTransactionDefinition def = null;
        if (autoCreateTable) {
            def = new DefaultTransactionDefinition();
            def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
            // 事物隔离级别,开启新事务,这样会比较安全些。
            transaction = dataSourceTransactionManager.getTransaction(def);
            // 获得事务状态
        }
        BtmType btmTypeDO = new BtmType();
        try {
            VciBaseUtil.alertNotNull(btmTypeDTO, "要添加的业务类型", btmTypeDTO.getId(), "业务类型的英文名称", btmTypeDTO.getName(), "业务类型中文名称");
            if (btmTypeDTO.isViewFlag() && (StringUtils.isBlank(btmTypeDTO.getViewCreateSql())
                || StringUtils.isBlank(btmTypeDTO.getTableName()))) {
                throw new VciBaseException("如果当前是业务类型是视图的时候,请必须输入视图的创建语句和视图名称");
            }
            if (!btmTypeDTO.isViewFlag()) {
                VciBaseUtil.alertCollectionNotNull("属性", btmTypeDTO.getAttributesDTOList());
            }
            if (!btmTypeDTO.getId().matches(OmdRegExpConstant.LETTER)) {
                throw new VciBaseException("业务类型英文名称只能是纯英文,目前为{0}", new Object[]{btmTypeDTO.getId()});
            }
            if (btmTypeDTO.getId().length() > 24) {
                throw new VciBaseException("业务类型英文名称不能超过18,目前长度为{0}", new Object[]{btmTypeDTO.getId().length()});
            }
            List<BtmType> btmTypeDOList = listBtmTypeDOByIdCollection(VciBaseUtil.str2List(btmTypeDTO.getId()));
            if (!CollectionUtils.isEmpty(btmTypeDOList) && btmTypeDOList.size() > 0) {
                BtmType existBtmType = btmTypeDOList.get(0);
                throw new VciBaseException("业务类型英文名称已经存在(不区分大小写),这个英文名称对应的中文名称为{0},创建人{1},创建时间{2}"
                    , new Object[]{existBtmType.getName(), existBtmType.getCreator(), VciDateUtil.date2Str(existBtmType.getCreateTime(), VciDateUtil.DateFormat)});
            }
            /*
            //检查使用的版本规则是否存在
            if (StringUtils.isNotBlank(btmTypeDTO.getRevisionRuleId())) {
                if (revisionRuleServiceI.checkRevisionRuleExist(btmTypeDTO.getRevisionRuleId())) {
                    throw new VciBaseException("版本规则{0}[{1}]在系统中不存在,请先查证",
                        new Object[]{btmTypeDTO.getRevisionRuleId(), btmTypeDTO.getRevisionRuleName()});
                }
            }
            //检查使用的生命周期是否存在
            if (StringUtils.isNotBlank(btmTypeDTO.getLifeCycleId())
                && !FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE.equalsIgnoreCase(btmTypeDTO.getLifeCycleId())) {
                if (lifeCycleServiceI.checkLifeCycleExist(btmTypeDTO.getLifeCycleId())) {
                    throw new VciBaseException("生命周期{0}[{1}]在系统中不存在,请先查证",
                        new Object[]{btmTypeDTO.getLifeCycleId(), btmTypeDTO.getLifeCycleName()});
                }
            }
            if (StringUtils.isNotBlank(btmTypeDTO.getSubLifeCycleId())) {
                if (lifeCycleServiceI.checkLifeCycleExist(btmTypeDTO.getSubLifeCycleId())) {
                    throw new VciBaseException("备用生命周期{0}[{1}]中其中有某些在系统中不存在,请先查证",
                        new Object[]{btmTypeDTO.getSubLifeCycleId(), btmTypeDTO.getSubLifeCycleName()});
                }
            }
            */
            if (StringUtils.isBlank(btmTypeDTO.getOid())) {
                btmTypeDTO.setOid(VciBaseUtil.getPk());
            }
 
            BeanUtil.copy(btmTypeDTO, btmTypeDO);
            String creator = AuthUtil.getUserAccount();
            Date now = new Date();
            btmTypeDO.setCreator(creator);
            btmTypeDO.setCreateTime(now);
            btmTypeDO.setOwner(creator);
            btmTypeDO.setBtmname(BtmTypeConstant.OMD_BTMTYPE);
            btmTypeDO.setTs(now);
            if (StringUtils.isBlank(btmTypeDO.getTableName())) {
                btmTypeDO.setTableName(getTableName(btmTypeDO.getId()));
            }
 
            //处理属性
            addAttributeForBtm(btmTypeDTO, creator, now);
 
            baseMapper.insert(btmTypeDO);
            if (autoCreateTable) {
                dataSourceTransactionManager.commit(transaction);
            }
        } catch (ServiceException e) {
            if (autoCreateTable) {
                dataSourceTransactionManager.rollback(transaction);
            }
            throw e;
        } catch (Throwable e) {
            if (autoCreateTable) {
                dataSourceTransactionManager.rollback(transaction);
            }
            throw e;
        }
        if (autoCreateTable) {
            BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(btmTypeDO);
            btmTypeVO.setAttributes(listHasAttributesByOid(btmTypeDO.getOid()));
            checkTableSame(btmTypeVO);
        }
        return btmTypeDTO;
    }
 
    /**
     * 检查业务类型的属性是否和数据库中相同
     *
     * @param btmTypeVO 业务类型的显示对象
     */
    private void checkTableSame(BtmTypeVO btmTypeVO) {
        /*List<OmdBtmTypeVO> btmTypeVOList = new ArrayList<>();
        btmTypeVOList.add(btmTypeVO);
        List<OsModifyAttributeInfoDO> modifyAttributeInfoDOList = ddlServiceI.checkDifferent(btmTypeVOList, null);
        try {
            modifyAttributeServiceI.batchAddSave(modifyAttributeInfoDOList);
        } catch (Throwable e) {
            if (logger.isErrorEnabled()) {
                logger.error("保存【修改属性】数据", e);
            }
        }
        ddlServiceI.reflexDifferent(modifyAttributeInfoDOList);
        modifyAttributeServiceI.finishModify(modifyAttributeInfoDOList);*/
    }
 
    /**
     * 添加属性到业务类型中
     *
     * @param btmTypeDTO 业务类型的数据传输对象
     * @param creator    创建人
     * @param now        当前时间
     */
    private void addAttributeForBtm(BtmTypeDTO btmTypeDTO, String creator, Date now) throws VciBaseException{
        List<BtmTypeLinkAttributesDTO> attributesDTOList = btmTypeDTO.getAttributesDTOList();
        btmTypeAttributeService.checkAndInsert(btmTypeDTO.getOid(),attributesDTOList,creator,now);
    }
 
    /**
     * 修改业务类型
     *
     * @param btmTypeDTO    业务类型数据传输对象
     * @param autoEditTable 是否自动更新表格
     * @return 修改后的业务类型
     * @throws ServiceException 修改出错的时候会抛出异常
     */
    @Override
    public BtmTypeDTO editSave(BtmTypeDTO btmTypeDTO, boolean autoEditTable) throws ServiceException {
        return null;
    }
 
    /**
     * 删除业务类型
     *
     * @param btmTypeVO       业务类型显示对象
     * @param autoDeleteTable 自动删除表格
     * @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
     */
    @Override
    public void delete(BtmTypeVO btmTypeVO, boolean autoDeleteTable) throws ServiceException {
 
    }
 
    /**
     * 批量删除业务类型
     *
     * @param btmTypeVOList   要删除的业务类型显示对象列表
     * @param autoDeleteTable 自动删除表格
     * @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
     */
    @Override
    public void batchDelete(List<BtmTypeVO> btmTypeVOList, boolean autoDeleteTable) throws ServiceException {
 
    }
 
    /**
     * 检查业务类型与数据库表是否一致
     *
     * @param pkBtmType 业务类型主键
     * @return 不同的属性信息
     * @throws ServiceException 参数为空或者查询出错时会抛出异常
     */
    @Override
    public List<ModifyAttributeInfoDO> checkDbTableSame(String pkBtmType) throws ServiceException {
        return null;
    }
 
    /**
     * 获取数据库表,支持业务类型和视图
     *
     * @param id 业务类型的名称
     * @return 数据库表的名称
     * @throws ServiceException 参数为空的时候会抛出异常
     */
    @Override
    public String getTableName(String id) throws ServiceException {
        return null;
    }
 
    /**
     * 将业务类型使用的属性的传输对象转换为数据对象
     *
     * @param attributesDTO 属性的数据传输对象
     * @param pkBtmType     业务类型的主键
     * @param creator       创建人
     * @param now           当前时间
     * @return 属性的数据对象
     */
    @Override
    public BtmTypeAttribute btmTypeAttributeDTO2DO(BtmTypeLinkAttributesDTO attributesDTO, String pkBtmType, String creator, Date now) {
        return null;
    }
 
    /**
     * 业务类型的属性显示对象转换为数据对象
     *
     * @param thisBtmTypeHasAttributeVOList 业务类型属性显示对象
     * @return 数据对象
     */
    @Override
    public List<BtmTypeAttribute> btmTypeAttributeVO2DO(List<BtmTypeAttributeVO> thisBtmTypeHasAttributeVOList) {
        return null;
    }
 
    /**
     * 批量将业务类型的数据对象转换为显示对象
     *
     * @param attributeDOList 属性的数据对象列表
     * @return 属性的显示对象列表
     */
    @Override
    public List<BtmTypeAttributeVO> batchBtmTypeAttributeDO2VO(List<BtmTypeAttribute> attributeDOList) {
        return null;
    }
 
    /**
     * 批量将业务类型的数据对象转换为显示对象
     *
     * @param attributesDO 属性的数据对象
     * @return 属性的显示对象列表
     */
    @Override
    public BtmTypeAttributeVO btmTypeAttributeDO2VO(BtmTypeAttribute attributesDO) {
        return null;
    }
 
    /**
     * 获取业务类型的指定属性
     *
     * @param id                    链接类型的英文名称
     * @param attributeIdCollection 属性的集合,如果为空则获取全部
     * @return 属性的显示对象
     */
    @Override
    public List<BtmTypeAttribute> listAttributeDOByIdsForBtm(String id, Collection<String> attributeIdCollection) {
        return null;
    }
 
    /**
     * 根据业务类型的编号获取属性
     *
     * @param id 业务类型的编号
     * @return 属性的显示对象
     */
    @Override
    public List<BtmTypeAttributeVO> listAttributeByBtmTypeId(String id) {
        return null;
    }
 
    /**
     * 根据业务类型的主键获取属性
     *
     * @param oid 业务类型的主键
     * @return 属性的显示对象
     */
    @Override
    public List<BtmTypeAttributeVO> listAttributeByBtmTypeOid(String oid) {
        return null;
    }
 
    /**
     * 批量根据业务类型编号或者主键获取包含的属性
     *
     * @param oidsOrIds 主键或者编号集合
     * @param queryById 是否使用编号查询
     * @return key是业务类型的主键或者编号,值是包含的属性的信息
     * @throws ServiceException 参数为空或者查询出错会抛出异常
     */
    @Override
    public List<BtmTypeAttributeVO> batchListAttributeByBtmType(Collection<String> oidsOrIds, boolean queryById) throws ServiceException {
        return null;
    }
 
    /**
     * 新增或修改业务类型
     *
     * @param btmTypeDTO 业务类型页面传输对象
     * @return 执行结果
     */
    @Override
    public boolean submit(BtmTypeDTO btmTypeDTO) {
        addSave(btmTypeDTO,false);
        try {
            R result = DomainRepeater.submitBtmType(btmTypeDTO.getDomain(), Objects.requireNonNull(BeanUtil.copy(btmTypeDTO, BtmTypeVO.class)));
            return result.isSuccess();
        } catch (NacosException e) {
            throw new RuntimeException(e);
        }
    }
 
    @Override
    public boolean deleteLogic(@NotEmpty List<Long> ids) {
        return false;
    }
 
    @Override
    public boolean changeStatus(@NotEmpty List<Long> ids, Integer status) {
        return false;
    }
}