add 增加 租户套餐下拉选接口 过滤掉已经关闭的套餐

feature/model
疯狂的狮子li 2 years ago
parent 4fc7401b67
commit 8ecbdfd472

@ -48,6 +48,16 @@ public class SysTenantPackageController extends BaseController {
return tenantPackageService.queryPageList(bo, pageQuery); return tenantPackageService.queryPageList(bo, pageQuery);
} }
/**
*
*/
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
@SaCheckPermission("system:tenantPackage:list")
@GetMapping("/selectList")
public R<List<SysTenantPackageVo>> selectList() {
return R.ok(tenantPackageService.selectList());
}
/** /**
* *
*/ */

@ -25,6 +25,11 @@ public interface ISysTenantPackageService {
*/ */
TableDataInfo<SysTenantPackageVo> queryPageList(SysTenantPackageBo bo, PageQuery pageQuery); TableDataInfo<SysTenantPackageVo> queryPageList(SysTenantPackageBo bo, PageQuery pageQuery);
/**
*
*/
List<SysTenantPackageVo> selectList();
/** /**
* *
*/ */

@ -1,6 +1,7 @@
package org.dromara.system.service.impl; package org.dromara.system.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import org.dromara.common.core.constant.TenantConstants;
import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils; import org.dromara.common.core.utils.StringUtils;
@ -55,6 +56,12 @@ public class SysTenantPackageServiceImpl implements ISysTenantPackageService {
return TableDataInfo.build(result); return TableDataInfo.build(result);
} }
@Override
public List<SysTenantPackageVo> selectList() {
return baseMapper.selectVoList(new LambdaQueryWrapper<SysTenantPackage>()
.eq(SysTenantPackage::getStatus, TenantConstants.NORMAL));
}
/** /**
* *
*/ */

Loading…
Cancel
Save