新增:通过传Domain请求头识别租户ID
This commit is contained in:
@@ -111,7 +111,10 @@ public class DocsController extends BaseController {
|
||||
docs.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (docsService.save(docs)) {
|
||||
return success("添加成功");
|
||||
final DocsContent content = new DocsContent();
|
||||
content.setDocsId(docs.getDocsId());
|
||||
contentService.save(content);
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
@@ -120,6 +123,11 @@ public class DocsController extends BaseController {
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Docs docs) {
|
||||
if (docsService.updateById(docs)) {
|
||||
final DocsContent content = contentService.getOne(new LambdaQueryWrapper<DocsContent>().eq(DocsContent::getDocsId, docs.getDocsId()).last("limit 1"));
|
||||
if(docs.getContent() != null){
|
||||
content.setContent(docs.getContent());
|
||||
}
|
||||
contentService.saveOrUpdate(content);
|
||||
return success("保存成功");
|
||||
}
|
||||
return fail("保存失败");
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.cms.entity.Domain;
|
||||
import com.gxwebsoft.cms.param.DomainParam;
|
||||
import com.gxwebsoft.cms.service.DomainService;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站域名记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-26 21:27:29
|
||||
*/
|
||||
@Api(tags = "网站域名记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/domain")
|
||||
public class DomainController extends BaseController {
|
||||
@Resource
|
||||
private DomainService domainService;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@ApiOperation("分页查询网站域名记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Domain>> page(DomainParam param) {
|
||||
// 使用关联查询
|
||||
return success(domainService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部网站域名记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Domain>> list(DomainParam param) {
|
||||
PageParam<Domain, DomainParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(domainService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(domainService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询网站域名记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Domain> get(@PathVariable("id") Integer id) {
|
||||
return success(domainService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(domainService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加网站域名记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Domain domain) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
domain.setUserId(loginUser.getUserId());
|
||||
domain.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
if (domainService.save(domain)) {
|
||||
// 重写缓存
|
||||
String key = "Domain:" + domain.getDomain();
|
||||
redisUtil.set(key,domain.getTenantId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改网站域名记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Domain domain) {
|
||||
if (domainService.updateById(domain)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除网站域名记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
final Domain domain = domainService.getById(id);
|
||||
if (domainService.removeById(id)) {
|
||||
// 删除缓存
|
||||
String key = "Domain:" + domain.getDomain();
|
||||
redisUtil.delete(key);
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加网站域名记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Domain> list) {
|
||||
if (domainService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改网站域名记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Domain> batchParam) {
|
||||
if (batchParam.update(domainService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除网站域名记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (domainService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,9 +38,6 @@ public class Docs implements Serializable {
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "可见性(public,private,protected)")
|
||||
private String visibility;
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 网站域名记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-26 21:27:29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Domain对象", description = "网站域名记录表")
|
||||
@TableName("cms_domain")
|
||||
public class Domain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "域名")
|
||||
private String domain;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.Domain;
|
||||
import com.gxwebsoft.cms.param.DomainParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站域名记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-26 21:27:29
|
||||
*/
|
||||
public interface DomainMapper extends BaseMapper<Domain> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<Domain>
|
||||
*/
|
||||
List<Domain> selectPageRel(@Param("page") IPage<Domain> page,
|
||||
@Param("param") DomainParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<Domain> selectListRel(@Param("param") DomainParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.DomainMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_domain a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.domain != null">
|
||||
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.Domain">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.Domain">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 网站域名记录表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-26 21:27:29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "DomainParam对象", description = "网站域名记录表查询参数")
|
||||
public class DomainParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "域名")
|
||||
private String domain;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.Domain;
|
||||
import com.gxwebsoft.cms.param.DomainParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站域名记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-26 21:27:29
|
||||
*/
|
||||
public interface DomainService extends IService<Domain> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<Domain>
|
||||
*/
|
||||
PageResult<Domain> pageRel(DomainParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<Domain>
|
||||
*/
|
||||
List<Domain> listRel(DomainParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id ID
|
||||
* @return Domain
|
||||
*/
|
||||
Domain getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class DocsBookServiceImpl extends ServiceImpl<DocsBookMapper, DocsBook> i
|
||||
@Override
|
||||
public PageResult<DocsBook> pageRel(DocsBookParam param) {
|
||||
PageParam<DocsBook, DocsBookParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<DocsBook> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class DocsBookServiceImpl extends ServiceImpl<DocsBookMapper, DocsBook> i
|
||||
List<DocsBook> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<DocsBook, DocsBookParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.DomainMapper;
|
||||
import com.gxwebsoft.cms.service.DomainService;
|
||||
import com.gxwebsoft.cms.entity.Domain;
|
||||
import com.gxwebsoft.cms.param.DomainParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站域名记录表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-26 21:27:29
|
||||
*/
|
||||
@Service
|
||||
public class DomainServiceImpl extends ServiceImpl<DomainMapper, Domain> implements DomainService {
|
||||
|
||||
@Override
|
||||
public PageResult<Domain> pageRel(DomainParam param) {
|
||||
PageParam<Domain, DomainParam> page = new PageParam<>(param);
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
List<Domain> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Domain> listRel(DomainParam param) {
|
||||
List<Domain> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Domain, DomainParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Domain getByIdRel(Integer id) {
|
||||
DomainParam param = new DomainParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.LongValue;
|
||||
@@ -15,6 +16,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -26,6 +28,8 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Configuration
|
||||
public class MybatisPlusConfig {
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor(HttpServletRequest request) {
|
||||
@@ -35,8 +39,18 @@ public class MybatisPlusConfig {
|
||||
TenantLineHandler tenantLineHandler = new TenantLineHandler() {
|
||||
@Override
|
||||
public Expression getTenantId() {
|
||||
// String device_id = request.getHeader("device-id");
|
||||
// System.out.println("device_id = " + device_id);
|
||||
|
||||
// 从域名拿ID
|
||||
final String domain = request.getHeader("Domain");
|
||||
if(StrUtil.isNotBlank(domain)){
|
||||
final String serverName = request.getServerName();
|
||||
System.out.println("serverName = " + serverName);
|
||||
System.out.println("domain2 = " + domain);
|
||||
final String domainName = redisUtil.get("Domain:".concat(domain));
|
||||
System.out.println("domainName = " + domainName);
|
||||
return new LongValue(domainName);
|
||||
}
|
||||
|
||||
// 从设备请求头拿ID
|
||||
String DeviceID = request.getHeader("Device-ID");
|
||||
if (StrUtil.isNotBlank(DeviceID)) {
|
||||
|
||||
@@ -7,9 +7,10 @@ import com.gxwebsoft.common.core.Constants;
|
||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.utils.SignCheckUtil;
|
||||
import com.gxwebsoft.common.system.entity.Menu;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.entity.UserInfo;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.ExpiredJwtException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
@@ -38,6 +39,8 @@ import java.util.stream.Collectors;
|
||||
public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
@Resource
|
||||
private ConfigProperties configProperties;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
|
||||
@@ -61,6 +64,14 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
|
||||
// 校验服务器域名白名单
|
||||
final SignCheckUtil checkUtil = new SignCheckUtil();
|
||||
String key = "WhiteDomain:" + jwtSubject.getTenantId();
|
||||
List<String> whiteDomains = redisUtil.get(key, List.class);
|
||||
if (!checkUtil.checkWhiteDomains(whiteDomains, request.getServerName())) {
|
||||
throw new UsernameNotFoundException("The requested domain name is not on the whitelist");
|
||||
}
|
||||
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if(jsonObject.getString("code").equals("401")){
|
||||
throw new UsernameNotFoundException("Username not found");
|
||||
|
||||
@@ -169,4 +169,29 @@ public class SignCheckUtil {
|
||||
return sign.equals(getWXSignString(params, key));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 白名单校验
|
||||
* @param domainName abc.com
|
||||
* @return true
|
||||
*/
|
||||
public boolean checkWhiteDomains(List<String> whiteDomains, String domainName) {
|
||||
if(whiteDomains == null){
|
||||
return true;
|
||||
}
|
||||
if (whiteDomains.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
// 服务器域名白名单列表
|
||||
whiteDomains.add("server.gxwebsoft.com");
|
||||
System.out.println("whiteDomains = " + whiteDomains);
|
||||
System.out.println(">>> domainName = " + domainName);
|
||||
for(String item: whiteDomains){
|
||||
if(Objects.equals(item, domainName)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,9 @@ public class CmsGenerator {
|
||||
// "cms_website",
|
||||
// "cms_website_field",
|
||||
// "cms_form",
|
||||
// "cms_form_record"
|
||||
// "cms_form_record",
|
||||
"cms_domain"
|
||||
|
||||
};
|
||||
// 需要去除的表前缀
|
||||
private static final String[] TABLE_PREFIX = new String[]{
|
||||
|
||||
Reference in New Issue
Block a user