| | |
| | | Query query = new Query(); |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | IPage<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition,BtmType.class).lambda().eq(BtmType::getDomain, domainValue).orderByAsc(BtmType::getId)); |
| | | IPage<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition,BtmType.class).lambda().eq(BtmType::getBizDomain, domainValue).orderByAsc(BtmType::getId)); |
| | | if (CollectionUtils.isEmpty(page.getRecords())){ |
| | | return R.data(null); |
| | | } |
| | |
| | | conditionMap.remove(DOMAIN); |
| | | BtmType queryObj = new BtmType(); |
| | | BeanMap.create(queryObj).putAll(conditionMap); |
| | | List<BtmType> list = btmTypeService.list(Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getDomain, domainValue).orderByAsc(BtmType::getId)); |
| | | List<BtmType> list = btmTypeService.list(Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getBizDomain, domainValue).orderByAsc(BtmType::getId)); |
| | | if (CollectionUtils.isEmpty(list)){ |
| | | return R.data(null); |
| | | return R.data(new ArrayList<>()); |
| | | } |
| | | return R.data(BtmTypeWrapper.build().listEntityVO(list)); |
| | | } |
| | |
| | | ).orElseGet(ArrayList::new) |
| | | ); |
| | | if (CollectionUtils.isEmpty(voList)){ |
| | | return R.data(null); |
| | | return R.data(new ArrayList<>(),"暂无数据承载!"); |
| | | } |
| | | return R.data(voList); |
| | | } |
| | |
| | | ) |
| | | ).orElseGet(ArrayList::new) |
| | | ); |
| | | if (CollectionUtils.isEmpty(voList)){ |
| | | return R.data(null); |
| | | } |
| | | return R.data(voList); |
| | | } |
| | | |
| | |
| | | * @return 默认字段属性 |
| | | */ |
| | | @Override |
| | | @GetMapping(GET_DEFAULT_ATTR_BY_BTM_ID) |
| | | public R<BtmTypeVO> getDefaultAttrByBtmId(String btmTypeId) { |
| | | return R.data(Optional.ofNullable(btmTypeService.getDefaultAttrByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); |
| | | } |
| | |
| | | * @return 所有字段 |
| | | */ |
| | | @Override |
| | | @GetMapping(GET_ALL_ATTR_BY_BTM_ID) |
| | | public R<BtmTypeVO> getAllAttributeByBtmId(String btmTypeId) { |
| | | return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); |
| | | } |
| | |
| | | * @return 所有字段 |
| | | */ |
| | | @Override |
| | | @GetMapping(GET_ALL_ATTR_BY_BTM_OID) |
| | | public R<BtmTypeVO> getAllAttributeByBtmOid(String btmTypeOid) { |
| | | return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmOid(btmTypeOid)).orElseGet(BtmTypeVO::new)); |
| | | } |