新增:域名授权方式
This commit is contained in:
@@ -197,16 +197,19 @@ public class CmsWebsiteController extends BaseController {
|
||||
fields.forEach(d -> {
|
||||
config.put(d.getName(), d.getValue());
|
||||
});
|
||||
config.put("Domain", redisUtil.get("Domain:"));
|
||||
config.put("SubDomain", redisUtil.get("Domain:".concat(website.getWebsiteCode()).concat("wsdns.cn")));
|
||||
final List<CmsDomain> domains = domainService.list(new LambdaQueryWrapper<CmsDomain>()
|
||||
.eq(CmsDomain::getDeleted,0)
|
||||
.eq(CmsDomain::getStatus, 1)
|
||||
.eq(CmsDomain::getTenantId, getTenantId()));
|
||||
.eq(CmsDomain::getTenantId, getTenantId())
|
||||
.orderByAsc(CmsDomain::getSortNumber)
|
||||
);
|
||||
if (!CollectionUtils.isEmpty(domains)) {
|
||||
// 已授权的域名
|
||||
domains.forEach(d -> {
|
||||
config.put("Domain_" + d.getId(), d.getDomain());
|
||||
});
|
||||
// 主域名(默认选第一条记录)
|
||||
config.put("Domain", domains.get(0).getDomain());
|
||||
}
|
||||
website.setConfig(config);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user